Skip to content

Commit 06e2d8d

Browse files
ddobrigkalibuild
andauthored
[Common] Reorder dEdxNorm use in TPC PID (#12348)
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
1 parent 23f36f0 commit 06e2d8d

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

Common/TableProducer/PID/pidTPCModule.h

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,18 @@ class pidTPCModule
633633

634634
// if corrected dE/dx is requested, correct it here on the spot and use that
635635
if (pidTPCopts.useCorrecteddEdx) {
636+
637+
//_________________________________________________________
638+
// bypass TPC signal in case TracksQA information present
639+
if constexpr (soa::is_table<TTracksQA>) {
640+
tpcSignalToEvaluatePID = -999.f;
641+
if (indexTrack2TrackQA[trk.globalIndex()] != -1) {
642+
auto trackQA = tracksQA.rawIteratorAt(indexTrack2TrackQA[trk.globalIndex()]);
643+
tpcSignalToEvaluatePID = trackQA.tpcdEdxNorm();
644+
}
645+
}
646+
//_________________________________________________________
647+
636648
double hadronicRate;
637649
int occupancy;
638650
if (trk.has_collision()) {
@@ -648,7 +660,7 @@ class pidTPCModule
648660
occupancy = 0;
649661
}
650662

651-
float fTPCSignal = trk.tpcSignal();
663+
float fTPCSignal = tpcSignalToEvaluatePID;
652664
float fNormMultTPC = multTPC / 11000.;
653665

654666
float fTrackOccN = occupancy / 1000.;
@@ -689,17 +701,6 @@ class pidTPCModule
689701
// change the signal used for PID
690702
tpcSignalToEvaluatePID = fTPCSignal / fTPCSignalN_CR1;
691703

692-
//_________________________________________________________
693-
// bypass TPC signal in case TracksQA information present
694-
if constexpr (soa::is_table<TTracksQA>) {
695-
tpcSignalToEvaluatePID = -999.f;
696-
if (indexTrack2TrackQA[trk.globalIndex()] != -1) {
697-
auto trackQA = tracksQA.rawIteratorAt(indexTrack2TrackQA[trk.globalIndex()]);
698-
tpcSignalToEvaluatePID = trackQA.tpcdEdxNorm();
699-
}
700-
}
701-
//_________________________________________________________
702-
703704
if (pidTPCopts.savedEdxsCorrected) {
704705
// populated cursor if requested or autodetected
705706
products.dEdxCorrected(tpcSignalToEvaluatePID);

0 commit comments

Comments
 (0)