4141#include " ReconstructionDataFormats/PID.h"
4242#include " ReconstructionDataFormats/Track.h"
4343
44+ #include " TMCProcess.h"
4445#include < TF1.h>
4546
4647#include < gsl/span>
@@ -71,7 +72,7 @@ struct LFNucleiBATask {
7172 Configurable<bool > enableAl{" enableAl" , true , " Flag to enable alpha analysis." };
7273
7374 Configurable<bool > enableTrackingEff{" enableTrackingEff" , 0 , " Flag to enable tracking efficiency hitos." };
74- Configurable<std::string> ccdburl {" ccdb-url" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
75+ Configurable<std::string> ccdbUrl {" ccdb-url" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
7576
7677 // Set the triggered events skimming scheme
7778 struct : ConfigurableGroup {
@@ -214,6 +215,12 @@ struct LFNucleiBATask {
214215
215216 Configurable<bool > enableCentrality{" enableCentrality" , true , " Flag to enable centrality 3D histos)" };
216217
218+ // ITS to TPC - Fake hit loop
219+ static constexpr int kFakeLoop = 10 ; // Fixed O2Linter error
220+ // TPC low/high momentum range
221+ static constexpr float kCfgTpcClasses [] = {0 .5f , 0 .1f };
222+ static constexpr float kCfgKaonCut = 5 .f;
223+
217224 // PDG codes and masses used in this analysis
218225 static constexpr int PDGPion = PDG_t::kPiPlus ;
219226 static constexpr int PDGKaon = PDG_t::kKPlus ;
@@ -230,20 +237,34 @@ struct LFNucleiBATask {
230237 static constexpr float MassAlphaVal = o2::constants::physics::MassAlpha;
231238
232239 // PDG of Mothers
233- static constexpr int kPdgMotherlist [] = {
234- PDGProton, // proton
235- PDGPion, // pi+
236- PDGKaon, // K+
237- 311 , // K0
238- PDGDeuteron, // deuteron
239- PDGTriton, // triton
240- PDGHelium, // He-3
241- PDGAlpha, // Alpha
242- 1000130270 , // Aluminium
243- 1000140280 , // Silicon
244- 1000260560 // Iron
245- };
246- static constexpr int kNumMotherlist = sizeof (kPdgMotherlist ) / sizeof (kPdgMotherlist [0 ]);
240+ static constexpr int kPdgMotherList [] = {
241+ PDG_t::kPiPlus ,
242+ PDG_t::kKPlus ,
243+ PDG_t::kK0Short ,
244+ PDG_t::kNeutron ,
245+ PDG_t::kProton ,
246+ PDG_t::kLambda0 ,
247+ o2::constants::physics::Pdg::kDeuteron ,
248+ o2::constants::physics::Pdg::kHelium3 ,
249+ o2::constants::physics::Pdg::kTriton ,
250+ o2::constants::physics::Pdg::kHyperTriton ,
251+ o2::constants::physics::Pdg::kAlpha };
252+
253+ static constexpr int kNumMotherList = sizeof (kPdgMotherList ) / sizeof (kPdgMotherList [0 ]);
254+
255+ static constexpr const char * kMotherNames [kNumMotherList ] = {
256+ " #pi^{+}" ,
257+ " K^{+}" ,
258+ " K^{0}_{S}" ,
259+ " n" ,
260+ " p" ,
261+ " #Lambda" ,
262+ " d" ,
263+ " He3" ,
264+ " t" ,
265+ " ^{3}_{#Lambda}H" ,
266+ " He4" };
267+
247268 static constexpr int kMaxNumMom = 4 ; // X: 0..4, overflow=5
248269
249270 template <typename TrackType>
@@ -949,6 +970,26 @@ struct LFNucleiBATask {
949970 histos.add <TH2>(" tracks/deuteron/dca/before/hDCAxyVsPtDeuteronTruePrim" , " DCAxy vs Pt (d); #it{p}_{T} (GeV/#it{c}); DCAxy (cm)" , HistType::kTH2F , {{ptAxis}, {dcaxyAxis}});
950971 histos.add <TH2>(" tracks/deuteron/dca/before/hDCAxyVsPtDeuteronTrueSec" , " DCAxy vs Pt (d); #it{p}_{T} (GeV/#it{c}); DCAxy (cm)" , HistType::kTH2F , {{ptAxis}, {dcaxyAxis}});
951972 histos.add <TH2>(" tracks/deuteron/dca/before/hDCAxyVsPtDeuteronTrueMaterial" , " DCAxy vs Pt (d); #it{p}_{T} (GeV/#it{c}); DCAxy (cm)" , HistType::kTH2F , {{ptAxis}, {dcaxyAxis}});
973+
974+ histos.add <TH1>(" tracks/deuteron/dca/before/hNumMothers" , " N mothers per particle; N mothers;counts" , HistType::kTH1I , {{7 , 1.0 , 8.0 }});
975+ histos.add <TH3>(" tracks/deuteron/dca/before/hMomTrueMaterial" , " MC mothers;mother index;mother type; mother #it{p}_{T}" , HistType::kTH3F , {{kMaxNumMom + 2 , -0.5 , static_cast <double >(kMaxNumMom ) + 1.5 }, {kNumMotherList + 2 , -1.5 , static_cast <double >(kNumMotherList ) + 0.5 }, {250 , 0.0 , 10.0 }});
976+
977+ std::shared_ptr<TH3> hTempDe = histos.get <TH3>(HIST (" tracks/deuteron/dca/before/hMomTrueMaterial" ));
978+ TH3* hPdgDe = hTempDe.get ();
979+
980+ TAxis* axPdgDe = hPdgDe->GetXaxis ();
981+ for (int i = 0 ; i <= kMaxNumMom ; i++) {
982+ axPdgDe->SetBinLabel (i + 1 , Form (" %d" , i));
983+ }
984+ axPdgDe->SetBinLabel (kMaxNumMom + 2 , " >=5" );
985+
986+ TAxis* ayPdgDe = hPdgDe->GetYaxis ();
987+ ayPdgDe->SetBinLabel (1 , " undef." );
988+ ayPdgDe->SetBinLabel (2 , " other" );
989+ for (int i = 0 ; i < kNumMotherList ; i++) {
990+ ayPdgDe->SetBinLabel (i + 3 , kMotherNames [i]);
991+ }
992+
952993 histos.add <TH2>(" tracks/deuteron/dca/before/hDCAxyVsPtDeuteronTrueTransport" , " DCAxy vs Pt (d); #it{p}_{T} (GeV/#it{c}); DCAxy (cm)" , HistType::kTH2F , {{ptAxis}, {dcaxyAxis}});
953994
954995 histos.add <TH2>(" tracks/deuteron/dca/before/hDCAxyVsPtantiDeuteronTrue" , " DCAxy vs Pt (#bar{d}); #it{p}_{T} (GeV/#it{c}); DCAxy (cm)" , HistType::kTH2F , {{ptAxis}, {dcaxyAxis}});
@@ -1146,22 +1187,24 @@ struct LFNucleiBATask {
11461187 histos.add <TH2>(" tracks/helium/dca/before/hDCAxyVsPtHeliumTrueSec" , " DCAxy vs Pt (He); #it{p}_{T} (GeV/#it{c}); DCAxy (cm)" , HistType::kTH2F , {{ptZHeAxis}, {dcaxyAxis}});
11471188 histos.add <TH2>(" tracks/helium/dca/before/hDCAxyVsPtHeliumTrueMaterial" , " DCAxy vs Pt (He); #it{p}_{T} (GeV/#it{c}); DCAxy (cm)" , HistType::kTH2F , {{ptZHeAxis}, {dcaxyAxis}});
11481189
1149- histos.add <TH2>(" tracks/helium/dca/before/hMomTrueMaterial" , " MC mothers;mother index;mother PDG" , HistType::kTH2I , {{kMaxNumMom + 2 , -0.5 , static_cast <double >(kMaxNumMom ) + 1.5 }, {kNumMotherlist + 2 , -1.5 , static_cast <double >(kNumMotherlist ) + 0.5 }});
1190+ histos.add <TH1>(" tracks/helium/dca/before/hNumMothers" , " N mothers per particle; N mothers;counts" , HistType::kTH1I , {{7 , 1.0 , 8.0 }});
1191+ histos.add <TH3>(" tracks/helium/dca/before/hMomTrueMaterial" , " MC mothers;mother index;mother type; mother #it{p}_{T}" , HistType::kTH3F , {{kMaxNumMom + 2 , -0.5 , static_cast <double >(kMaxNumMom ) + 1.5 }, {kNumMotherList + 2 , -1.5 , static_cast <double >(kNumMotherList ) + 0.5 }, {250 , 0.0 , 10.0 }});
11501192
1151- // Fix for getting TH2 pointer
1152- std::shared_ptr<TH2> hTemp = histos.get <TH2 >(HIST (" tracks/helium/dca/before/hMomTrueMaterial" ));
1153- TH2* hPDG = hTemp .get ();
1193+ // Fix for getting TH3 pointer
1194+ std::shared_ptr<TH3> hTempHe = histos.get <TH3 >(HIST (" tracks/helium/dca/before/hMomTrueMaterial" ));
1195+ TH3* hPdgHe = hTempHe .get ();
11541196
1155- TAxis* axPDG = hPDG ->GetXaxis ();
1156- for (int i = 0 ; i <= kMaxNumMom ; ++i ) {
1157- axPDG ->SetBinLabel (i + 1 , Form (" %d" , i));
1197+ TAxis* axPdgHe = hPdgHe ->GetXaxis ();
1198+ for (int i = 0 ; i <= kMaxNumMom ; i++ ) {
1199+ axPdgHe ->SetBinLabel (i + 1 , Form (" %d" , i));
11581200 }
1159- axPDG->SetBinLabel (kMaxNumMom + 2 , " >=5" );
1160- TAxis* ayPDG = hPDG->GetYaxis ();
1161- ayPDG->SetBinLabel (1 , " -1" ); // undefined
1162- ayPDG->SetBinLabel (2 , " 0" ); // other
1163- for (int i = 0 ; i < kNumMotherlist ; ++i) {
1164- ayPDG->SetBinLabel (i + 3 , Form (" %d" , kPdgMotherlist [i]));
1201+ axPdgHe->SetBinLabel (kMaxNumMom + 2 , " >=5" );
1202+
1203+ TAxis* ayPdgHe = hPdgHe->GetYaxis ();
1204+ ayPdgHe->SetBinLabel (1 , " undef." );
1205+ ayPdgHe->SetBinLabel (2 , " other" );
1206+ for (int i = 0 ; i < kNumMotherList ; i++) {
1207+ ayPdgHe->SetBinLabel (i + 3 , kMotherNames [i]);
11651208 }
11661209
11671210 histos.add <TH2>(" tracks/helium/dca/before/hDCAxyVsPtHeliumTrueTransport" , " DCAxy vs Pt (He); #it{p}_{T} (GeV/#it{c}); DCAxy (cm)" , HistType::kTH2F , {{ptZHeAxis}, {dcaxyAxis}});
@@ -2655,15 +2698,15 @@ struct LFNucleiBATask {
26552698 if constexpr (IsFilteredData) {
26562699 isPhysPrim = track.isPhysicalPrimary ();
26572700 isProdByGen = track.producedByGenerator ();
2658- isWeakDecay = track.getProcess () == 4 ; // NOLINT
2701+ isWeakDecay = ( track.getProcess () == TMCProcess:: kPDecay );
26592702 pdgCode = track.pdgCode ();
26602703 } else {
26612704 if (!track.has_mcParticle ()) {
26622705 continue ;
26632706 }
26642707 isPhysPrim = track.mcParticle ().isPhysicalPrimary ();
26652708 isProdByGen = track.mcParticle ().producedByGenerator ();
2666- isWeakDecay = track.mcParticle ().getProcess () == 4 ; // NOLINT
2709+ isWeakDecay = ( track.mcParticle ().getProcess () == TMCProcess:: kPDecay );
26672710 pdgCode = track.mcParticle ().pdgCode ();
26682711 }
26692712
@@ -3158,16 +3201,19 @@ struct LFNucleiBATask {
31583201 int pdgMom = 0 ;
31593202 // gen Pt
31603203 float genPt = 0 ;
3204+ float ptMom = 0 ;
31613205 // Mothers variables
31623206 [[maybe_unused]] int firstMotherId = -1 ;
31633207 [[maybe_unused]] int firstMotherPdg = -1 ;
3164- [[maybe_unused]] int pdgList[8 ];
3208+ [[maybe_unused]] float firstMotherPt = -1 .f ;
3209+ [[maybe_unused]] int pdgMomList[kMaxNumMom ];
3210+ [[maybe_unused]] float ptMomList[kMaxNumMom ];
31653211 [[maybe_unused]] int nSaved = 0 ;
31663212
31673213 if constexpr (IsFilteredData) {
31683214 isPhysPrim = track.isPhysicalPrimary ();
31693215 isProdByGen = track.producedByGenerator ();
3170- isWeakDecay = track.getProcess () == 4 ; // NOLINT
3216+ isWeakDecay = ( track.getProcess () == TMCProcess:: kPDecay );
31713217 pdgCode = track.pdgCode ();
31723218 genPt = std::sqrt (std::pow (track.px (), 2 ) + std::pow (track.py (), 2 ));
31733219
@@ -3177,7 +3223,7 @@ struct LFNucleiBATask {
31773223 }
31783224 isPhysPrim = track.mcParticle ().isPhysicalPrimary ();
31793225 isProdByGen = track.mcParticle ().producedByGenerator ();
3180- isWeakDecay = track.mcParticle ().getProcess () == 4 ; // NOLINT
3226+ isWeakDecay = ( track.mcParticle ().getProcess () == TMCProcess:: kPDecay );
31813227 pdgCode = track.mcParticle ().pdgCode ();
31823228
31833229 // Access to MC particles mother
@@ -3186,28 +3232,32 @@ struct LFNucleiBATask {
31863232 const int nMothers = static_cast <int >(motherIds.size ());
31873233 firstMotherId = -1 ;
31883234 firstMotherPdg = -1 ;
3189-
3235+ firstMotherPt = - 1 . f ;
31903236 nSaved = 0 ;
31913237
3192- for (int iMom = 0 ; iMom < nMothers; ++iMom ) {
3238+ for (int iMom = 0 ; iMom < nMothers; iMom++ ) {
31933239 int motherId = motherIds[iMom];
31943240 if (motherId < 0 || motherId >= particles.size ()) {
31953241 continue ; // added check on mother
31963242 }
31973243 o2::aod::McParticles::iterator mother = particles.iteratorAt (motherId);
31983244 pdgMom = mother.pdgCode ();
3245+ ptMom = mother.pt ();
31993246
32003247 if (iMom == 0 ) {
32013248 firstMotherId = motherId;
32023249 firstMotherPdg = pdgMom;
3250+ firstMotherPt = ptMom;
32033251 }
3204- if (nSaved < 8 ) {
3205- pdgList[nSaved++] = pdgMom;
3252+ if (nSaved < kMaxNumMom ) {
3253+ pdgMomList[nSaved] = pdgMom;
3254+ ptMomList[nSaved] = ptMom;
3255+ nSaved++;
32063256 }
32073257 }
32083258
32093259 genPt = track.mcParticle ().pt ();
3210- for (int i = 0 ; i < 10 ; i++) { // From ITS to TPC
3260+ for (int i = 0 ; i < kFakeLoop ; i++) { // From ITS to TPC
32113261 if (track.mcMask () & 1 << i) {
32123262 hasFakeHit = true ;
32133263 break ;
@@ -3308,10 +3358,32 @@ struct LFNucleiBATask {
33083358 if (!isPhysPrim && !isProdByGen) {
33093359 if (outFlagOptions.makeDCABeforeCutPlots ) {
33103360 histos.fill (HIST (" tracks/deuteron/dca/before/hDCAxyVsPtDeuteronTrueTransport" ), DPt, track.dcaXY ());
3311- if (isWeakDecay)
3361+ if (isWeakDecay) {
33123362 histos.fill (HIST (" tracks/deuteron/dca/before/hDCAxyVsPtDeuteronTrueSec" ), DPt, track.dcaXY ());
3313- else
3363+ } else {
33143364 histos.fill (HIST (" tracks/deuteron/dca/before/hDCAxyVsPtDeuteronTrueMaterial" ), DPt, track.dcaXY ());
3365+ if constexpr (!IsFilteredData) {
3366+ histos.fill (HIST (" tracks/deuteron/dca/before/hNumMothers" ), nSaved);
3367+ if (nSaved > 0 ) {
3368+ for (int iMom = 0 ; iMom < nSaved; iMom++) {
3369+ int motherIndexBin = (iMom <= kMaxNumMom ) ? iMom : (kMaxNumMom + 1 );
3370+ int pdgMom = pdgMomList[iMom];
3371+ float ptMom = ptMomList[iMom];
3372+ int motherSpeciesBin = -1 ;
3373+ if (pdgMom != -1 ) {
3374+ motherSpeciesBin = 0 ;
3375+ for (int j = 0 ; j < kNumMotherList ; j++) {
3376+ if (kPdgMotherList [j] == pdgMom) {
3377+ motherSpeciesBin = j + 1 ;
3378+ break ;
3379+ }
3380+ }
3381+ }
3382+ histos.fill (HIST (" tracks/deuteron/dca/before/hMomTrueMaterial" ), motherIndexBin, motherSpeciesBin, ptMom);
3383+ }
3384+ }
3385+ }
3386+ }
33153387 if (track.hasTOF () && outFlagOptions.doTOFplots ) {
33163388 histos.fill (HIST (" tracks/deuteron/dca/before/TOF/hDCAxyVsPtDeuteronTrueTransport" ), DPt, track.dcaXY ());
33173389 if (isWeakDecay)
@@ -3472,21 +3544,23 @@ struct LFNucleiBATask {
34723544 } else {
34733545 histos.fill (HIST (" tracks/helium/dca/before/hDCAxyVsPtHeliumTrueMaterial" ), hePt, track.dcaXY ());
34743546 if (!IsFilteredData) {
3547+ histos.fill (HIST (" tracks/helium/dca/before/hNumMothers" ), nSaved);
34753548 if (nSaved > 0 ) {
3476- for (int i = 0 ; i < nSaved; ++i) {
3477- int idxComp = (i <= kMaxNumMom ) ? i : (kMaxNumMom + 1 );
3478- int pdgMom = pdgList[i];
3479- int yVal = -1 ;
3549+ for (int iMom = 0 ; iMom < nSaved; iMom++) {
3550+ int motherIndexBin = (iMom <= kMaxNumMom ) ? iMom : (kMaxNumMom + 1 );
3551+ int pdgMom = pdgMomList[iMom];
3552+ float ptMom = ptMomList[iMom];
3553+ int motherSpeciesBin = -1 ;
34803554 if (pdgMom != -1 ) {
3481- yVal = 0 ;
3482- for (int j = 0 ; j < kNumMotherlist ; ++j ) {
3483- if (kPdgMotherlist [j] == pdgMom) {
3484- yVal = j + 1 ;
3555+ motherSpeciesBin = 0 ;
3556+ for (int j = 0 ; j < kNumMotherList ; j++ ) {
3557+ if (kPdgMotherList [j] == pdgMom) {
3558+ motherSpeciesBin = j + 1 ;
34853559 break ;
34863560 }
34873561 }
34883562 }
3489- histos.fill (HIST (" tracks/helium/dca/before/hMomTrueMaterial" ), idxComp, yVal );
3563+ histos.fill (HIST (" tracks/helium/dca/before/hMomTrueMaterial" ), motherIndexBin, motherSpeciesBin, ptMom );
34903564 }
34913565 }
34923566 }
@@ -3902,26 +3976,26 @@ struct LFNucleiBATask {
39023976 debugHistos.fill (HIST (" debug/qa/h2TPCncrVsPtPos" ), track.tpcInnerParam (), track.tpcNClsCrossedRows ());
39033977 debugHistos.fill (HIST (" debug/qa/h2TPCncrVsTPCsignalPos" ), track.tpcSignal (), track.tpcNClsCrossedRows ());
39043978
3905- if (track.tpcInnerParam () < 0 . 5f ) {
3979+ if (track.tpcInnerParam () < kCfgTpcClasses [ 0 ] ) {
39063980 debugHistos.fill (HIST (" debug/qa/h1TPCncrLowPPos" ), track.tpcNClsCrossedRows ());
39073981 }
3908- if ((track.tpcInnerParam () >= 0 . 5f ) && (track.tpcInnerParam () < 1 . f )) {
3982+ if ((track.tpcInnerParam () >= kCfgTpcClasses [ 0 ] ) && (track.tpcInnerParam () < kCfgTpcClasses [ 1 ] )) {
39093983 debugHistos.fill (HIST (" debug/qa/h1TPCncrMidPPos" ), track.tpcNClsCrossedRows ());
39103984 }
3911- if (track.tpcInnerParam () >= 1 . f ) {
3985+ if (track.tpcInnerParam () >= kCfgTpcClasses [ 1 ] ) {
39123986 debugHistos.fill (HIST (" debug/qa/h1TPCncrHighPPos" ), track.tpcNClsCrossedRows ());
39133987 }
39143988 } else {
39153989 debugHistos.fill (HIST (" debug/qa/h2TPCncrVsPtNeg" ), track.tpcInnerParam (), track.tpcNClsCrossedRows ());
39163990 debugHistos.fill (HIST (" debug/qa/h2TPCncrVsTPCsignalNeg" ), track.tpcSignal (), track.tpcNClsCrossedRows ());
39173991
3918- if (track.tpcInnerParam () < 0 . 5f ) {
3992+ if (track.tpcInnerParam () < kCfgTpcClasses [ 0 ] ) {
39193993 debugHistos.fill (HIST (" debug/qa/h1TPCncrLowPNeg" ), track.tpcNClsCrossedRows ());
39203994 }
3921- if ((track.tpcInnerParam () >= 0 . 5f ) && (track.tpcInnerParam () < 1 . f )) {
3995+ if ((track.tpcInnerParam () >= kCfgTpcClasses [ 0 ] ) && (track.tpcInnerParam () < kCfgTpcClasses [ 1 ] )) {
39223996 debugHistos.fill (HIST (" debug/qa/h1TPCncrMidPNeg" ), track.tpcNClsCrossedRows ());
39233997 }
3924- if (track.tpcInnerParam () >= 1 . f ) {
3998+ if (track.tpcInnerParam () >= kCfgTpcClasses [ 1 ] ) {
39253999 debugHistos.fill (HIST (" debug/qa/h1TPCncrHighPNeg" ), track.tpcNClsCrossedRows ());
39264000 }
39274001 }
@@ -3934,7 +4008,7 @@ struct LFNucleiBATask {
39344008 histos.fill (HIST (" tracks/eff/h2pVsTPCmomentum" ), track.tpcInnerParam (), track.p ());
39354009
39364010 if (filterOptions.enableFiltering ) {
3937- if (track.tpcNSigmaKa () < 5 )
4011+ if (track.tpcNSigmaKa () < kCfgKaonCut )
39384012 continue ;
39394013 }
39404014
@@ -4908,7 +4982,7 @@ struct LFNucleiBATask {
49084982 if constexpr (IsFilteredData) {
49094983 isPhysPrim = track.isPhysicalPrimary ();
49104984 isProdByGen = track.producedByGenerator ();
4911- isWeakDecay = track.getProcess () == 4 ;
4985+ isWeakDecay = ( track.getProcess () == TMCProcess:: kPDecay ) ;
49124986 pdgCode = track.pdgCode ();
49134987 isItsPassed = track.itsPassed ();
49144988 isTpcPassed = track.tpcPassed ();
@@ -4920,7 +4994,7 @@ struct LFNucleiBATask {
49204994 }
49214995 isPhysPrim = track.mcParticle ().isPhysicalPrimary ();
49224996 isProdByGen = track.mcParticle ().producedByGenerator ();
4923- isWeakDecay = track.mcParticle ().getProcess () == 4 ;
4997+ isWeakDecay = ( track.mcParticle ().getProcess () == TMCProcess:: kPDecay ) ;
49244998 pdgCode = track.mcParticle ().pdgCode ();
49254999 isItsPassed = track.passedITSNCls () &&
49265000 track.passedITSChi2NDF () &&
@@ -4934,7 +5008,7 @@ struct LFNucleiBATask {
49345008 track.passedTPCRefit () &&
49355009 track.hasTPC ();
49365010
4937- for (int i = 0 ; i < 10 ; i++) { // From ITS to TPC
5011+ for (int i = 0 ; i < kFakeLoop ; i++) { // From ITS to TPC
49385012 if (track.mcMask () & 1 << i) {
49395013 hasFakeHit = true ;
49405014 break ;
@@ -6059,14 +6133,14 @@ struct LFNucleiBATask {
60596133 spectraGen.fill (HIST (" histGenVetxZ" ), mcCollision.posZ ());
60606134 if (mcCollision.centFT0M () < cfgMultCutLow || mcCollision.centFT0M () > cfgMultCutHigh)
60616135 return ;
6062- for (auto & mcParticleGen : mcParticles) { // NOLINT
6136+ for (auto const & mcParticleGen : mcParticles) { // NOLINT
60636137 if (mcParticleGen.y () > kinemOptions.cfgRapidityCutHigh || mcParticleGen.y () < kinemOptions.cfgRapidityCutLow ) {
60646138 continue ;
60656139 }
60666140
60676141 bool isPhysPrim = mcParticleGen.isPhysicalPrimary ();
60686142 bool isProdByGen = mcParticleGen.producedByGenerator ();
6069- bool isWeakDecay = mcParticleGen.getProcess () == 4 ;
6143+ bool isWeakDecay = ( mcParticleGen.getProcess () == TMCProcess:: kPDecay ) ;
60706144
60716145 if (mcParticleGen.pdgCode () == PDGPion) {
60726146 spectraGen.fill (HIST (" pion/histGenPtPion" ), mcParticleGen.pt ());
@@ -6324,7 +6398,7 @@ struct LFNucleiBATask {
63246398 for (const auto & mcPart : mcParticles) {
63256399 if (!mcPart.isPhysicalPrimary ())
63266400 continue ;
6327- if (std::abs (mcPart.y ()) >= 0.5 )
6401+ if (std::abs (mcPart.y ()) >= kCfgTpcClasses [ 0 ] )
63286402 continue ;
63296403 if (mcPart.pdgCode () == PDGDeuteron) {
63306404 evLossHistos.fill (HIST (" evLoss/pt/hDeuteronGen" ), mcPart.pt ());
0 commit comments