You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gRandom->SetSeed(0); // Ensure unique seed from UUID for each process call
538
+
}
539
+
536
540
// preparatory step: we need the multiplicities for each collision
537
541
std::vector<int> pidmults;
538
542
long totalTPCtracks = 0;
@@ -660,7 +664,8 @@ class pidTPCModule
660
664
}
661
665
}
662
666
663
-
constauto& bc = trk.has_collision() ? cols.iteratorAt(trk.collisionId()).templatebc_as<aod::BCsWithTimestamps>() : bcs.begin();
667
+
auto collision = cols.rawIteratorAt(trk.collisionId());
668
+
constauto& bc = trk.has_collision() ? cols.rawIteratorAt(trk.collisionId()).templatebc_as<aod::BCsWithTimestamps>() : bcs.begin();
664
669
if (useCCDBParam && pidTPCopts.ccdbTimestamp.value == 0 && !ccdb->isCachedObjectValid(pidTPCopts.ccdbPath.value, bc.timestamp())) { // Updating parametrisation only if the initial timestamp is 0
665
670
if (pidTPCopts.recoPass.value == "") {
666
671
LOGP(info, "Retrieving latest TPC response object for timestamp {}:", bc.timestamp());
@@ -681,6 +686,44 @@ class pidTPCModule
681
686
response->PrintAll();
682
687
}
683
688
689
+
// if this is a MC process function, go for MC tune on data processing
690
+
ifconstexpr (soa::is_table<TMCParticles>) {
691
+
// Perform TuneOnData sampling for MC dE/dx
692
+
float mcTunedTPCSignal = 0.;
693
+
if (!trk.hasTPC()) {
694
+
mcTunedTPCSignal = -999.f;
695
+
} else {
696
+
if (pidTPCopts.skipTPCOnly) {
697
+
if (!trk.hasITS() && !trk.hasTRD() && !trk.hasTOF()) {
698
+
mcTunedTPCSignal = -999.f;
699
+
}
700
+
}
701
+
int pid = getPIDIndex(trk.mcParticle().pdgCode());
702
+
703
+
auto expSignal = response->GetExpectedSignal(trk, pid);
704
+
auto expSigma = response->GetExpectedSigma(cols.iteratorAt(trk.collisionId()), pidmults[trk.collisionId()], trk, pid);
705
+
if (expSignal < 0. || expSigma < 0.) { // if expectation invalid then give undefined signal
auto mean = network_prediction[2 * (count_tracks + tracksForNet_size * pid)] * expSignal; // Absolute mean, i.e. the mean dE/dx value of the data in that slice, not the mean of the NSigma distribution
0 commit comments