@@ -48,6 +48,7 @@ struct qaEventTrackLite {
4848 ConfigurableAxis binsImpPar{" binsImpPar" , {200 , -0.15 , 0.15 }, " Impact parameter binning (cm)" };
4949 ConfigurableAxis binsEta{" binsEta" , {200 , -2 ., 2 .}, " Eta binning" };
5050 ConfigurableAxis binsPhi{" binsPhi" , {180 , 0 ., 2 * M_PI }, " Phi binning" };
51+ ConfigurableAxis binsVtxZ{" binsVtxZ" , {100 , -20 ., 20 .}, " Vtx Z binning" };
5152
5253 HistogramRegistry histos;
5354
@@ -189,14 +190,15 @@ struct qaEventTrackLite {
189190 const AxisSpec axis1overPt{bins1overPt, " 1/#it{p}_{T} (GeV/c)^{-1}" };
190191 const AxisSpec axisEta{binsEta, " #it{#eta}" };
191192 const AxisSpec axisPhi{binsPhi, " #it{#phi} (rad)" };
193+ const AxisSpec axisVtxZ{binsVtxZ, " Vertex Z (cm)" };
192194
193195 // TPC dEdx splines
194196 betheBlock.setUpBetheBlockAleph (tpcSplinesPeriod);
195197
196198 // kine histograms
197- histos.add (" Tracks/VertexPositionZ" , " " , kTH1D , {{ 100 , - 20 . f , 20 . f , " Vertex Z (cm) " } });
198- histos.add (" Tracks/VertexPositionZvsEta" , " " , kTH2D , {axisEta, { 100 , - 20 . f , 20 . f , " Vertex Z (cm) " } });
199- histos.add (" Tracks/VertexPositionZvsEtaHasITS" , " " , kTH2D , {axisEta, { 100 , - 20 . f , 20 . f , " Vertex Z (cm) " } });
199+ histos.add (" Tracks/VertexPositionZ" , " " , kTH1D , {axisVtxZ });
200+ histos.add (" Tracks/VertexPositionZvsEta" , " " , kTH2D , {axisEta, axisVtxZ });
201+ histos.add (" Tracks/VertexPositionZvsEtaHasITS" , " " , kTH2D , {axisEta, axisVtxZ });
200202 histos.add (" Tracks/Kine/pt" , " #it{p}_{T}" , kTH1D , {axisPt});
201203 histos.add (" Tracks/Kine/eta" , " #eta" , kTH1D , {axisEta});
202204 histos.add (" Tracks/Kine/phi" , " #phi" , kTH1D , {axisPhi});
@@ -283,11 +285,17 @@ struct qaEventTrackLite {
283285 histos.add (" Particles/Kine/pt" , " Particle #it{p}_{T}" , kTH1D , {axisPt});
284286 histos.add (" Particles/Kine/eta" , " Particle #eta" , kTH1D , {axisEta});
285287 histos.add (" Particles/Kine/phi" , " Particle #phi" , kTH1D , {axisPhi});
286- histos.add (" Particle/selPtEtaPhiMCGenPrimary" , " pt eta phi map MC gen Primary; pt,eta,phi" , kTH3D , {axisPt, {50 , -1.2 , 1.2 , " #eta" }, {30 , 0 ., 2 * M_PI , " #varphi" }});
287- histos.add (" Particle/selPtEtaPhiMCRecoNoSelPrimary" , " pt eta phi map MC gen Primary sel0; pt,eta,phi" , kTH3D , {axisPt, {50 , -1.2 , 1.2 , " #eta" }, {30 , 0 ., 2 * M_PI , " #varphi" }});
288- histos.add (" Particle/selPtEtaPhiMCRecoSel1Primary" , " pt eta phi map MC gen Primary sel1; pt,eta,phi" , kTH3D , {axisPt, {50 , -1.2 , 1.2 , " #eta" }, {30 , 0 ., 2 * M_PI , " #varphi" }});
289- histos.add (" Particle/selPtEtaPhiMCRecoSel2Primary" , " pt eta phi map MC gen Primary sel2; pt,eta,phi" , kTH3D , {axisPt, {50 , -1.2 , 1.2 , " #eta" }, {30 , 0 ., 2 * M_PI , " #varphi" }});
290- histos.add (" Particle/selPtEtaPhiMCRecoSel3Primary" , " pt eta phi map MC gen Primary sel3; pt,eta,phi" , kTH3D , {axisPt, {50 , -1.2 , 1.2 , " #eta" }, {30 , 0 ., 2 * M_PI , " #varphi" }});
288+ histos.add (" Particle/selPtEtaPhiMCGenPrimary" , " pt eta phi map MC gen Primary" , kTH3D , {axisPt, {50 , -1.2 , 1.2 , " #eta" }, {30 , 0 ., 2 * M_PI , " #varphi" }});
289+ histos.add (" Particle/selPtEtaPhiMCRecoNoSelPrimary" , " pt eta phi map MC reco Primary sel0" , kTH3D , {axisPt, {50 , -1.2 , 1.2 , " #eta" }, {30 , 0 ., 2 * M_PI , " #varphi" }});
290+ histos.add (" Particle/selPtEtaPhiMCRecoSel1Primary" , " pt eta phi map MC reco Primary sel1" , kTH3D , {axisPt, {50 , -1.2 , 1.2 , " #eta" }, {30 , 0 ., 2 * M_PI , " #varphi" }});
291+ histos.add (" Particle/selPtEtaPhiMCRecoSel2Primary" , " pt eta phi map MC reco Primary sel2" , kTH3D , {axisPt, {50 , -1.2 , 1.2 , " #eta" }, {30 , 0 ., 2 * M_PI , " #varphi" }});
292+ histos.add (" Particle/selPtEtaPhiMCRecoSel3Primary" , " pt eta phi map MC reco Primary sel3" , kTH3D , {axisPt, {50 , -1.2 , 1.2 , " #eta" }, {30 , 0 ., 2 * M_PI , " #varphi" }});
293+
294+ histos.add (" Particle/selPtEtaVtxzMCGenPrimary" , " pt eta VtxZ map MC gen Primary" , kTH3F , {axisPt, axisEta, axisVtxZ});
295+ histos.add (" Particle/selPtEtaVtxzMCRecoNoSelPrimary" , " pt eta VtxZ map MC reco Primary sel0" , kTH3F , {axisPt, axisEta, axisVtxZ});
296+ histos.add (" Particle/selPtEtaVtxzMCRecoSel1Primary" , " pt eta VtxZ map MC reco Primary sel1" , kTH3F , {axisPt, axisEta, axisVtxZ});
297+ histos.add (" Particle/selPtEtaVtxzMCRecoSel2Primary" , " pt eta VtxZ map MC reco Primary sel2" , kTH3F , {axisPt, axisEta, axisVtxZ});
298+ histos.add (" Particle/selPtEtaVtxzMCRecoSel3Primary" , " pt eta VtxZ map MC reco Primary sel3" , kTH3F , {axisPt, axisEta, axisVtxZ});
291299 histos.add (" Tracks/resoPhivsPtvsEta" , " #varphi(reco)-#varphi(gen);" , kTH3D , {axisPt, axisEta, {180 , -M_PI , M_PI , " #varphi(reco)-#varphi(gen)" }});
292300 histos.add (" Tracks/phiRecovsphiGen" , " #varphi(reco) vs. #varphi(gen);" , kTH2D , {axisPhi, axisPhi});
293301 histos.get <TH2 >(HIST (" Tracks/phiRecovsphiGen" ))->GetXaxis ()->SetTitle (" #varphi(reco)" );
@@ -316,16 +324,17 @@ struct qaEventTrackLite {
316324 // TOF
317325 Filter tofChi = o2::aod::track::tofChi2 > chi2TofMin;
318326 Filter length = o2::aod::track::length > lengthMin;
319-
320327 template <bool isMC, typename trackType>
321328 void fillHistograms (trackType const & track)
322329 {
323-
324- if (TMath::Abs (track. dpgCollision (). posZ ()) > vtxZMax)
330+ const float vtxZ = track. dpgCollision (). posZ ();
331+ if (TMath::Abs (vtxZ) > vtxZMax) {
325332 return ;
333+ }
326334 if constexpr (isMC) {
327- if (track.productionMode () == 0 && isPdgSelected (track.pdgCode ())) {
335+ if (track.isPhysicalPrimary () && isPdgSelected (track.pdgCode ())) {
328336 histos.fill (HIST (" Particle/selPtEtaPhiMCGenPrimary" ), track.ptMC (), track.etaMC (), track.phiMC ());
337+ histos.fill (HIST (" Particle/selPtEtaVtxzMCGenPrimary" ), track.ptMC (), track.etaMC (), vtxZ);
329338 }
330339 }
331340 // temporary additional selections
@@ -338,18 +347,22 @@ struct qaEventTrackLite {
338347 Bool_t isPdgOk = true ;
339348 if constexpr (isMC) {
340349 isPdgOk = isPdgSelected (track.pdgCode ());
341- if (track.productionMode () == 0 && isPdgOk) {
350+ if (track.isPhysicalPrimary () && isPdgOk) {
342351 histos.get <TH1 >(HIST (" Particles/PDGs" ))->Fill (Form (" %i" , track.pdgCode ()), 1 );
343352 histos.fill (HIST (" Particle/selPtEtaPhiMCRecoNoSelPrimary" ), track.ptMC (), track.etaMC (), track.phiMC ());
353+ histos.fill (HIST (" Particle/selPtEtaVtxzMCRecoNoSelPrimary" ), track.ptMC (), track.etaMC (), vtxZ);
344354
345355 if (sel1) {
346356 histos.fill (HIST (" Particle/selPtEtaPhiMCRecoSel1Primary" ), track.ptMC (), track.etaMC (), track.phiMC ());
357+ histos.fill (HIST (" Particle/selPtEtaVtxzMCRecoSel1Primary" ), track.ptMC (), track.etaMC (), vtxZ);
347358 }
348359 if (sel2) {
349360 histos.fill (HIST (" Particle/selPtEtaPhiMCRecoSel2Primary" ), track.ptMC (), track.etaMC (), track.phiMC ());
361+ histos.fill (HIST (" Particle/selPtEtaVtxzMCRecoSel2Primary" ), track.ptMC (), track.etaMC (), vtxZ);
350362 }
351363 if (sel3) {
352364 histos.fill (HIST (" Particle/selPtEtaPhiMCRecoSel3Primary" ), track.ptMC (), track.etaMC (), track.phiMC ());
365+ histos.fill (HIST (" Particle/selPtEtaVtxzMCRecoSel3Primary" ), track.ptMC (), track.etaMC (), vtxZ);
353366 }
354367 }
355368
@@ -473,22 +486,27 @@ struct qaEventTrackLite {
473486 PROCESS_SWITCH (qaEventTrackLite, processDataLite, " process data lite" , true );
474487
475488 // Process MC
476- void processMCLite (o2::soa::Filtered<soa::Join<aod::DPGTracks, aod::DPGRecoParticles>> const & tracks, aod::DPGCollisions const &, aod::DPGNonRecoParticles const & particles)
489+ void processMCLite (o2::soa::Filtered<soa::Join<aod::DPGTracks, aod::DPGRecoParticles>> const & tracks, aod::DPGCollisions const &,
490+ aod::DPGNonRecoParticles const & nonRecoParticles)
477491 {
478492 for (const auto & track : tracks) {
479493 fillHistograms<true >(track);
480494 }
481495
482- for (const auto & particle : particles) {
483- if (TMath::Abs (particle.dpgCollision ().posZ ()) > vtxZMax)
496+ for (const auto & particle : nonRecoParticles) {
497+ const float vtxZ = particle.dpgCollision ().posZ ();
498+ if (TMath::Abs (vtxZ) > vtxZMax) {
484499 continue ;
500+ }
485501
486502 histos.fill (HIST (" Particles/Kine/pt" ), particle.ptMC ());
487503 histos.fill (HIST (" Particles/Kine/eta" ), particle.etaMC ());
488504 histos.fill (HIST (" Particles/Kine/phi" ), particle.phiMC ());
489505
490- if (particle.productionMode () == 0 && isPdgSelected (particle.pdgCode ()))
506+ if (particle.isPhysicalPrimary () && isPdgSelected (particle.pdgCode ())) {
491507 histos.fill (HIST (" Particle/selPtEtaPhiMCGenPrimary" ), particle.ptMC (), particle.etaMC (), particle.phiMC ());
508+ histos.fill (HIST (" Particle/selPtEtaVtxzMCGenPrimary" ), particle.ptMC (), particle.etaMC (), vtxZ);
509+ }
492510 }
493511 }
494512 PROCESS_SWITCH (qaEventTrackLite, processMCLite, " process MC lite" , false );
0 commit comments