@@ -215,6 +215,7 @@ struct LFNucleiBATask {
215215 TF1* fShiftPtantiHe = 0 ;
216216 TF1* fShiftAntiD = 0 ;
217217 TF1* fShiftD = 0 ;
218+ TF1* fShiftPtPID = 0 ;
218219
219220 Configurable<bool > enablePtShiftD{" enablePtShiftD" , true , " Flag to enable Pt shift (for Deuteron only)" };
220221 Configurable<bool > enablePtShiftAntiD{" enablePtShiftAntiD" , true , " Flag to enable Pt shift (for antiDeuteron only)" };
@@ -225,6 +226,9 @@ struct LFNucleiBATask {
225226 Configurable<std::vector<float >> parShiftPtHe{" parShiftPtHe" , {0 .0f , 0 .1f , 0 .1f , 0 .1f , 0 .1f }, " Parameters for helium3-Pt shift (if enabled)." };
226227 Configurable<std::vector<float >> parShiftPtAntiHe{" parShiftPtAntiHe" , {0 .0f , 0 .1f , 0 .1f , 0 .1f , 0 .1f }, " Parameters for anti-helium3-Pt shift (if enabled)." };
227228
229+ Configurable<bool > enablePtShiftPID{" enablePtShiftPID" , true , " Flag to enable wrong PID in tracking pT correction shift" };
230+ Configurable<std::vector<float >> parShiftPtPID{" parShiftPtPID" , {0 .0f , 0 .1f , 0 .1f , 0 .1f , 0 .1f , 0 .1f , 0 .1f }, " Parameters for helium3-Pt wrong pid shift (if enabled)." };
231+
228232 Configurable<bool > enableCentrality{" enableCentrality" , true , " Flag to enable centrality 3D histos)" };
229233
230234 // ITS to TPC - Fake hit loop
@@ -581,7 +585,7 @@ struct LFNucleiBATask {
581585 }
582586
583587 if (enableDebug) {
584- debugHistos.add <TH1>(" debug/event/h1CentV0M" , " V0M; Multiplicity; counts" , HistType::kTH1F , {{27000 , 0 , 27000 }});
588+ // debugHistos.add<TH1>("debug/event/h1CentV0M", "V0M; Multiplicity; counts", HistType::kTH1F, {{27000, 0, 27000}});
585589 // trackQA
586590 debugHistos.add <TH1>(" debug/tracks/h1Eta" , " pseudoRapidity; #eta; counts" , HistType::kTH1F , {{200 , -2.0 , 2.0 }});
587591 debugHistos.add <TH1>(" debug/tracks/h1VarPhi" , " #phi; #phi; counts" , HistType::kTH1F , {{63 , 0.0 , 6.3 }});
@@ -776,6 +780,11 @@ struct LFNucleiBATask {
776780 histos.add <TH1>(" tracks/helium/h1HeliumSpectra_Z2" , " #it{p}_{T} (He)" , HistType::kTH1F , {ptHeAxis});
777781 histos.add <TH1>(" tracks/helium/h1antiHeliumSpectra_Z2" , " #it{p}_{T} (#bar{He})" , HistType::kTH1F , {ptHeAxis});
778782
783+ if (enableDebug) {
784+ debugHistos.add <TH2>(" tracks/helium/h2HeliumPidTrackingVsPt" , " #it{p}_{T} (He) vs PIDforTracking" , HistType::kTH2F , {{80 , 0 , 8 }, {9 , -0.5 , 8.5 }});
785+ debugHistos.add <TH2>(" tracks/helium/h2antiHeliumPidTrackingVsPt" , " #it{p}_{T} (#bar{He}) vs PIDforTracking" , HistType::kTH2F , {{80 , 0 , 8 }, {9 , -0.5 , 8.5 }});
786+ }
787+
779788 if (outFlagOptions.doTOFplots && enableCentrality) {
780789 histos.add <TH2>(" tracks/helium/TOF/h2HeliumSpectraVsMult_Z2" , " #it{p}_{T} (He)" , HistType::kTH2F , {{ptHeAxis}, {binsPercentile}});
781790 histos.add <TH2>(" tracks/helium/TOF/h2antiHeliumSpectraVsMult_Z2" , " #it{p}_{T} (#bar{He})" , HistType::kTH2F , {{ptHeAxis}, {binsPercentile}});
@@ -1733,7 +1742,7 @@ struct LFNucleiBATask {
17331742 }
17341743
17351744 if (outFlagOptions.doTOFplots && outFlagOptions.enablePIDplot ) {
1736- histos.add <TH2>(" tracks/h2TPCsignVsBetaGamma" , " TPC <-dE/dX> vs #beta#gamma/Z; Signed #beta#gamma; TPC <-dE/dx> (a.u.)" , HistType::kTH2F , {{250 , -5 .f , 5 .f }, {dedxAxis}});
1745+ histos.add <TH2>(" tracks/h2TPCsignVsBetaGamma" , " TPC <-dE/dX> vs #beta#gamma/Z; Signed #beta#gamma; TPC <-dE/dx> (a.u.)" , HistType::kTH2F , {{200 , -4 .f , 4 .f }, {dedxAxis}});
17371746 histos.add <TH2>(" tracks/h2TOFbetaVsP" , " TOF #beta vs #it{p}/Z; Signed #it{p} (GeV/#it{c}); TOF #beta" , HistType::kTH2F , {{250 , -5 .f , 5 .f }, {betaAxis}});
17381747 if (outFlagOptions.enableBetaCut )
17391748 histos.add <TH2>(" tracks/h2TOFbetaVsP_BetaCut" , " TOF #beta vs #it{p}/Z; Signed #it{p} (GeV/#it{c}); TOF #beta" , HistType::kTH2F , {{250 , -5 .f , 5 .f }, {betaAxis}});
@@ -2154,32 +2163,35 @@ struct LFNucleiBATask {
21542163
21552164 spectraGen.add (" helium/histPtGenHe" , " PtGenHe" , HistType::kTH1F , {{800 , 0 .f , 8 .f }});
21562165 spectraGen.add (" helium/histPtRecHe" , " PtRecHe" , HistType::kTH1F , {{800 , 0 .f , 8 .f }});
2157- spectraGen.add (" helium/histPtShiftHe" , " PtReco-PtGen vs PtReco;#it{p}_{T}(reco); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {400 , -4 .f , 4 .f }});
2158- spectraGen.add (" helium/histPtShiftHeVsGen" , " PtReco-PtGen vs PtGen;#it{p}_{T}(gen); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {400 , -4 .f , 4 .f }});
2159- spectraGen.add (" helium/histPtShiftVsEtaHe" , " PtReco-PtGen vs #eta" , HistType::kTH2F , {{200 , -2 .f , 2 .f }, {400 , -4 .f , 4 .f }});
2166+ spectraGen.add (" helium/histPtShiftHe" , " PtReco-PtGen vs PtReco;#it{p}_{T}(reco); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {140 , -1 .f , 1 .4f }});
2167+ spectraGen.add (" helium/histPtShiftHeVsGen" , " PtReco-PtGen vs PtGen;#it{p}_{T}(gen); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {140 , -1 .f , 1 .4f }});
2168+ spectraGen.add (" helium/histPtShiftHe_WrongPidTr" , " PtReco-PtGen (He, wrong PIDforTracking) vs PtReco;#it{p}_{T}(reco); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {140 , -1 .f , 1 .4f }});
2169+
2170+ spectraGen.add (" helium/histPtShiftVsEtaHe" , " PtReco-PtGen vs #eta" , HistType::kTH2F , {{140 , -1 .4f , 1 .4f }, {140 , -1 .f , 1 .4f }});
21602171
21612172 spectraGen.add (" helium/histPGenHe" , " PGenHe" , HistType::kTH1F , {{800 , 0 .f , 8 .f }});
21622173 spectraGen.add (" helium/histPRecHe" , " PRecHe" , HistType::kTH1F , {{800 , 0 .f , 8 .f }});
2163- spectraGen.add (" helium/histPShiftHe" , " PReco-PGen vs PReco" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {400 , -4 .f , 4 . f }});
2164- spectraGen.add (" helium/histPShiftVsEtaHe" , " PReco-PGen vs #eta" , HistType::kTH2F , {{200 , -2 . f , 2 . f }, {400 , -4 .f , 4 . f }});
2174+ spectraGen.add (" helium/histPShiftHe" , " PReco-PGen vs PReco" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {140 , -1 .f , 1 . 4f }});
2175+ spectraGen.add (" helium/histPShiftVsEtaHe" , " PReco-PGen vs #eta" , HistType::kTH2F , {{140 , -1 . 4f , 1 . 4f }, {140 , -1 .f , 1 . 4f }});
21652176
21662177 spectraGen.add (" helium/histPtGenantiHe" , " PtGenantiHe" , HistType::kTH1F , {{800 , 0 .f , 8 .f }});
21672178 spectraGen.add (" helium/histPtRecantiHe" , " PtRecantiHe" , HistType::kTH1F , {{800 , 0 .f , 8 .f }});
2168- spectraGen.add (" helium/histPtShiftantiHe" , " PtReco-PtGen vs PtReco; #it{p}_{T}(reco); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {400 , -4 .f , 4 .f }});
2169- spectraGen.add (" helium/histPtShiftantiHeVsGen" , " PtReco-PtGen vs PtGen; #it{p}_{T}(gen); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {400 , -4 .f , 4 .f }});
2170- spectraGen.add (" helium/histPtShiftVsEtaantiHe" , " PtReco-PtGen vs #eta" , HistType::kTH2F , {{200 , -2 .f , 2 .f }, {400 , -4 .f , 4 .f }});
2179+ spectraGen.add (" helium/histPtShiftantiHe" , " PtReco-PtGen vs PtReco; #it{p}_{T}(reco); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {140 , -1 .f , 1 .4f }});
2180+ spectraGen.add (" helium/histPtShiftantiHeVsGen" , " PtReco-PtGen vs PtGen; #it{p}_{T}(gen); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {140 , -1 .f , 1 .4f }});
2181+ spectraGen.add (" helium/histPtShiftantiHe_WrongPidTr" , " PtReco-PtGen (#bar{H}e, wrong PIDforTracking) vs PtReco;#it{p}_{T}(reco); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {140 , -1 .f , 1 .4f }});
2182+ spectraGen.add (" helium/histPtShiftVsEtaantiHe" , " PtReco-PtGen vs #eta" , HistType::kTH2F , {{140 , -1 .4f , 1 .4f }, {140 , -1 .f , 1 .4f }});
21712183
21722184 if (outFlagOptions.doTOFplots ) {
2173- spectraGen.add (" helium/TOF/histPtShiftHe" , " PtReco-PtGen vs PtReco;#it{p}_{T}(reco); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {400 , -4 .f , 4 . f }});
2174- spectraGen.add (" helium/TOF/histPtShiftHeVsGen" , " PtReco-PtGen vs PtGen;#it{p}_{T}(gen); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {400 , -4 .f , 4 . f }});
2175- spectraGen.add (" helium/TOF/histPtShiftantiHe" , " PtReco-PtGen vs PtReco; #it{p}_{T}(reco); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {400 , -4 .f , 4 . f }});
2176- spectraGen.add (" helium/TOF/histPtShiftantiHeVsGen" , " PtReco-PtGen vs PtGen; #it{p}_{T}(gen); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {400 , -4 .f , 4 . f }});
2185+ spectraGen.add (" helium/TOF/histPtShiftHe" , " PtReco-PtGen vs PtReco;#it{p}_{T}(reco); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {140 , -1 .f , 1 . 4f }});
2186+ spectraGen.add (" helium/TOF/histPtShiftHeVsGen" , " PtReco-PtGen vs PtGen;#it{p}_{T}(gen); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {140 , -1 .f , 1 . 4f }});
2187+ spectraGen.add (" helium/TOF/histPtShiftantiHe" , " PtReco-PtGen vs PtReco; #it{p}_{T}(reco); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {140 , -1 .f , 1 . 4f }});
2188+ spectraGen.add (" helium/TOF/histPtShiftantiHeVsGen" , " PtReco-PtGen vs PtGen; #it{p}_{T}(gen); #it{p}_{T}(reco) - #it{p}_{T}(gen)" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {140 , -1 .f , 1 . 4f }});
21772189 }
21782190
21792191 spectraGen.add (" helium/histPGenantiHe" , " PGenantiHe" , HistType::kTH1F , {{800 , 0 .f , 8 .f }});
21802192 spectraGen.add (" helium/histPRecantiHe" , " PRecantiHe" , HistType::kTH1F , {{800 , 0 .f , 8 .f }});
2181- spectraGen.add (" helium/histPShiftantiHe" , " PReco-PGen vs PReco" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {400 , -4 .f , 4 . f }});
2182- spectraGen.add (" helium/histPShiftVsEtaantiHe" , " PReco-PGen vs #eta" , HistType::kTH2F , {{200 , -2 . f , 2 . f }, {400 , -4 .f , 4 . f }});
2193+ spectraGen.add (" helium/histPShiftantiHe" , " PReco-PGen vs PReco" , HistType::kTH2F , {{800 , 0 .f , 8 .f }, {140 , -1 .f , 1 . 4f }});
2194+ spectraGen.add (" helium/histPShiftVsEtaantiHe" , " PReco-PGen vs #eta" , HistType::kTH2F , {{140 , -1 . 4f , 1 . 4f }, {140 , -1 .f , 1 . 4f }});
21832195
21842196 spectraGen.add (" pion/histGenPtPion" , " generated particles" , HistType::kTH1F , {ptAxis});
21852197 spectraGen.add (" pion/histGenPtPionPrim" , " generated particles" , HistType::kTH1F , {ptAxis});
@@ -2453,9 +2465,11 @@ struct LFNucleiBATask {
24532465 }
24542466
24552467 isTritonTPCpid = std::abs (track.tpcNSigmaTr ()) < nsigmaTPCvar.nsigmaTPCTr ;
2468+ bool heliumPID = track.pidForTracking () == o2::track::PID::Helium3 || track.pidForTracking () == o2::track::PID::Alpha;
24562469
24572470 float shiftPtPos = 0 .f ;
24582471 float shiftPtNeg = 0 .f ;
2472+ float shiftPtPID = 0 .f ;
24592473
24602474 if (enablePtShiftHe && !fShiftPtHe ) {
24612475 fShiftPtHe = new TF1 (" fShiftPtHe" , " [0] * exp([1] + [2] * x) + [3] + [4] * x" , 0 .f , 8 .f );
@@ -2475,6 +2489,12 @@ struct LFNucleiBATask {
24752489 fShiftAntiD ->SetParameters (parAntiD[0 ], parAntiD[1 ], parAntiD[2 ], parAntiD[3 ], parAntiD[4 ]);
24762490 }
24772491
2492+ if (enablePtShiftPID && !fShiftPtPID ) {
2493+ fShiftPtPID = new TF1 (" fShiftPtPID" , " [0] * exp([1] + [2] * x) + [3] + [4] * x + [5] * x * x + [6] * x * x * x" , 0 .f , 8 .f );
2494+ auto parPID = (std::vector<float >)parShiftPtPID; // NOLINT
2495+ fShiftPtPID ->SetParameters (parPID[0 ], parPID[1 ], parPID[2 ], parPID[3 ], parPID[4 ], parPID[5 ], parPID[6 ]);
2496+ }
2497+
24782498 switch (unableAntiDPtShift) {
24792499 case 0 :
24802500 if (enablePtShiftAntiD && fShiftAntiD ) {
@@ -2517,6 +2537,13 @@ struct LFNucleiBATask {
25172537 shiftPtNeg = fShiftPtantiHe ->Eval (2 * track.pt ());
25182538 antihePt = track.pt () - shiftPtNeg / 2 .f ;
25192539 }
2540+ if (enablePtShiftPID && fShiftPtPID ) {
2541+ shiftPtPID = fShiftPtPID ->Eval (2 * track.pt ());
2542+ if (!heliumPID && (track.pt () < 2 .4f )) {
2543+ hePt = track.pt () - shiftPtPID / 2 .f ;
2544+ antihePt = track.pt () - shiftPtPID / 2 .f ;
2545+ }
2546+ }
25202547 break ;
25212548 case 1 :
25222549 hePt = 2 .f * track.pt ();
@@ -3719,6 +3746,8 @@ struct LFNucleiBATask {
37193746 spectraGen.fill (HIST (" helium/histPtRecHe" ), 2 .f * hePt);
37203747 spectraGen.fill (HIST (" helium/histPtShiftHe" ), 2 .f * hePt, 2 .f * hePt - track.mcParticle ().pt ());
37213748 spectraGen.fill (HIST (" helium/histPtShiftHeVsGen" ), track.mcParticle ().pt (), 2 .f * hePt - track.mcParticle ().pt ());
3749+ if (!heliumPID)
3750+ spectraGen.fill (HIST (" helium/histPtShiftHe_WrongPidTr" ), 2 .f * hePt, 2 .f * hePt - track.mcParticle ().pt ());
37223751 spectraGen.fill (HIST (" helium/histPtShiftVsEtaHe" ), track.eta (), 2 .f * hePt - track.mcParticle ().pt ());
37233752 if (track.hasTOF () && outFlagOptions.doTOFplots ) {
37243753 spectraGen.fill (HIST (" helium/TOF/histPtShiftHe" ), 2 .f * hePt, 2 .f * hePt - track.mcParticle ().pt ());
@@ -3796,6 +3825,8 @@ struct LFNucleiBATask {
37963825 spectraGen.fill (HIST (" helium/histPtRecantiHe" ), 2 .f * antihePt);
37973826 spectraGen.fill (HIST (" helium/histPtShiftantiHe" ), 2 .f * antihePt, 2 .f * antihePt - track.mcParticle ().pt ());
37983827 spectraGen.fill (HIST (" helium/histPtShiftantiHeVsGen" ), track.mcParticle ().pt (), 2 .f * antihePt - track.mcParticle ().pt ());
3828+ if (!heliumPID)
3829+ spectraGen.fill (HIST (" helium/histPtShiftantiHe_WrongPidTr" ), 2 .f * antihePt, 2 .f * antihePt - track.mcParticle ().pt ());
37993830 spectraGen.fill (HIST (" helium/histPtShiftVsEtaantiHe" ), track.eta (), 2 .f * antihePt - track.mcParticle ().pt ());
38003831 if (track.hasTOF () && outFlagOptions.doTOFplots ) {
38013832 spectraGen.fill (HIST (" helium/TOF/histPtShiftantiHe" ), 2 .f * antihePt, 2 .f * antihePt - track.mcParticle ().pt ());
@@ -4832,6 +4863,8 @@ struct LFNucleiBATask {
48324863 histos.fill (HIST (" tracks/helium/h2HeliumEtavsPt_Z2" ), track.eta (), 2 * hePt);
48334864 if (outFlagOptions.enablePIDplot )
48344865 histos.fill (HIST (" tracks/helium/h2TPCsignVsTPCmomentumHelium" ), heTPCmomentum, track.tpcSignal ());
4866+ if (enableDebug)
4867+ debugHistos.fill (HIST (" tracks/helium/h2HeliumPidTrackingVsPt" ), 2 * hePt, track.pidForTracking ());
48354868 }
48364869 if (isAntiHeWTPCpid) {
48374870 if (outFlagOptions.enableEffPlots ) {
@@ -4843,6 +4876,8 @@ struct LFNucleiBATask {
48434876 histos.fill (HIST (" tracks/helium/h2antiHeliumEtavsPt_Z2" ), track.eta (), 2 * antihePt);
48444877 if (outFlagOptions.enablePIDplot )
48454878 histos.fill (HIST (" tracks/helium/h2TPCsignVsTPCmomentumantiHelium" ), antiheTPCmomentum, track.tpcSignal ());
4879+ if (enableDebug)
4880+ debugHistos.fill (HIST (" tracks/helium/h2antiHeliumPidTrackingVsPt" ), 2 * antihePt, track.pidForTracking ());
48464881 }
48474882
48484883 if (outFlagOptions.doTOFplots && track.hasTOF ()) {
0 commit comments