Skip to content

Commit d86e06e

Browse files
mherzer28alibuild
andauthored
[PWGLF] rigidity correction (#11159)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent ff88fbb commit d86e06e

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ struct TrHeAnalysis {
166166
std::vector<Particle> particles;
167167
Configurable<bool> enableTr{"enableTr", true, "Flag to enable triton analysis."};
168168
Configurable<bool> enableHe{"enableHe", true, "Flag to enable helium-3 analysis."};
169+
Configurable<bool> cfgRigidityCorrection{"cfgRigidityCorrection", true, "Enable Rigidity correction"};
169170
ConfigurableAxis binsDeDx{"binsDeDx", {600, 0.f, 3000.f}, ""};
170171
ConfigurableAxis binsBeta{"binsBeta", {120, 0.0, 1.2}, ""};
171172
ConfigurableAxis binsDca{"binsDca", {400, -1.f, 1.f}, ""};
@@ -410,7 +411,7 @@ struct TrHeAnalysis {
410411
int tnItsCluster = track.itsNCls();
411412
float tTpcChi2NCl = track.tpcChi2NCl();
412413
float tItsChi2NCl = track.itsChi2NCl();
413-
float tRigidity = track.tpcInnerParam();
414+
float tRigidity = getRigidity(track);
414415
float tItsClusterSize =
415416
getMeanItsClsSize(track) / std::cosh(track.eta());
416417
h3Data(tPt, tEta, tPhi, tCharge, tH3DeDx, tnSigmaTpc, tTofSignalH3,
@@ -456,7 +457,7 @@ struct TrHeAnalysis {
456457
int tnItsCluster = track.itsNCls();
457458
float tTpcChi2NCl = track.tpcChi2NCl();
458459
float tItsChi2NCl = track.itsChi2NCl();
459-
float tRigidity = track.tpcInnerParam();
460+
float tRigidity = getRigidity(track);
460461
float tItsClusterSize =
461462
getMeanItsClsSize(track) / std::cosh(track.eta());
462463
heData(tPt, tEta, tPhi, tCharge, tHeDeDx, tnSigmaTpc, tTofSignalHe,
@@ -563,7 +564,7 @@ struct TrHeAnalysis {
563564
int tnItsCluster = track.itsNCls();
564565
float tTpcChi2NCl = track.tpcChi2NCl();
565566
float tItsChi2NCl = track.itsChi2NCl();
566-
float tRigidity = track.tpcInnerParam();
567+
float tRigidity = getRigidity(track);
567568
float tItsClusterSize =
568569
getMeanItsClsSize(track) / std::cosh(track.eta());
569570
h3Data(tPt, tEta, tPhi, tCharge, tH3DeDx, tnSigmaTpc, tTofSignalH3,
@@ -608,7 +609,7 @@ struct TrHeAnalysis {
608609
int tnItsCluster = track.itsNCls();
609610
float tTpcChi2NCl = track.tpcChi2NCl();
610611
float tItsChi2NCl = track.itsChi2NCl();
611-
float tRigidity = track.tpcInnerParam();
612+
float tRigidity = getRigidity(track);
612613
float tItsClusterSize =
613614
getMeanItsClsSize(track) / std::cosh(track.eta());
614615
heData(tPt, tEta, tPhi, tCharge, tHeDeDx, tnSigmaTpc, tTofSignalHe,
@@ -650,6 +651,14 @@ struct TrHeAnalysis {
650651
}
651652
return n > 0 ? static_cast<float>(sum) / n : 0.f;
652653
}
654+
template <class T>
655+
float getRigidity(T const& track)
656+
{
657+
if (!cfgRigidityCorrection)
658+
return track.tpcInnerParam();
659+
bool hePID = track.pidForTracking() == o2::track::PID::Helium3 || track.pidForTracking() == o2::track::PID::Alpha;
660+
return hePID ? track.tpcInnerParam() / 2 : track.tpcInnerParam();
661+
}
653662
};
654663

655664
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)

0 commit comments

Comments
 (0)