@@ -64,8 +64,8 @@ struct Alice3HfTask3Prong {
6464
6565 int selectedPdg{-1 };
6666
67- using Cands3PReco = soa::Filtered<soa::Join<aod::Alice3Cand3Ps, aod::Alice3Sel3Ps, aod::Alice3McRecFlags>>;
68- using Cands3PRecoWMl = soa::Filtered<soa::Join<aod::Alice3Cand3Ps, aod::Alice3Sel3Ps, aod::Alice3Ml3Ps, aod::Alice3McRecFlags>>;
67+ using Cands3PReco = soa::Filtered<soa::Join<aod::Alice3Cand3Ps, aod::Alice3Sel3Ps, aod::Alice3McRecFlags, aod::Alice3SVResos >>;
68+ using Cands3PRecoWMl = soa::Filtered<soa::Join<aod::Alice3Cand3Ps, aod::Alice3Sel3Ps, aod::Alice3Ml3Ps, aod::Alice3McRecFlags, aod::Alice3SVResos >>;
6969 using Cands3PGen = soa::Join<aod::McParticles, aod::Alice3McGenFlags>;
7070
7171 Filter filterSelectCandidates = (aod::a3_hf_sel_3prong::isSelMassHypo0 == true || aod::a3_hf_sel_3prong::isSelMassHypo1 == true );
@@ -79,6 +79,7 @@ struct Alice3HfTask3Prong {
7979 ConfigurableAxis thnConfigAxisCanType{" thnConfigAxisCanType" , {5 , 0 ., 5 .}, " " };
8080 ConfigurableAxis thnAxisRapidity{" thnAxisRapidity" , {20 , -1 , 1 }, " Cand. rapidity bins" };
8181 ConfigurableAxis thnConfigAxisGenPtB{" thnConfigAxisGenPtB" , {1000 , 0 , 100 }, " Gen Pt B" };
82+ ConfigurableAxis thnConfigAxisDeltaSecVtxCoord{" thnConfigAxisDeltaSecVtxCoord" , {1000 , -10 , 10 }, " " };
8283
8384 HistogramRegistry registry{" registry" , {}};
8485
@@ -142,6 +143,9 @@ struct Alice3HfTask3Prong {
142143 addHistogramsRec (" hCPAxy" , " cosine of pointing angle xy" , " entries" , {HistType::kTH1F , {{110 , -1.1 , 1.1 }}});
143144 addHistogramsRec (" hDca2" , " prong Chi2PCA to sec. vertex (cm)" , " entries" , {HistType::kTH1F , {{400 , 0 ., 20 .}}});
144145 addHistogramsRec (" hEta" , " #it{#eta}" , " entries" , {HistType::kTH1F , {{100 , -2 ., 2 .}}});
146+ addHistogramsRec (" hDeltaXRecoGenSecVtx" , " p_{T} (GeV/#it{c})" , " #Delta X Sec. Vtx. (cm)" , {HistType::kTH2F , {thnConfigAxisPt, thnConfigAxisDeltaSecVtxCoord}});
147+ addHistogramsRec (" hDeltaYRecoGenSecVtx" , " p_{T} (GeV/#it{c})" , " #Delta Y Sec. Vtx. (cm)" , {HistType::kTH2F , {thnConfigAxisPt, thnConfigAxisDeltaSecVtxCoord}});
148+ addHistogramsRec (" hDeltaZRecoGenSecVtx" , " p_{T} (GeV/#it{c})" , " #Delta Z Sec. Vtx. (cm)" , {HistType::kTH2F , {thnConfigAxisPt, thnConfigAxisDeltaSecVtxCoord}});
145149 addHistogramsRec (" hd0VsPtProng0" , " prong 0 DCAxy to prim. vertex (cm)" , " #it{p}_{T} (GeV/#it{c})" , {HistType::kTH2F , {{600 , -0.4 , 0.4 }, {vbins}}});
146150 addHistogramsRec (" hd0VsPtProng1" , " prong 1 DCAxy to prim. vertex (cm)" , " #it{p}_{T} (GeV/#it{c})" , {HistType::kTH2F , {{600 , -0.4 , 0.4 }, {vbins}}});
147151 addHistogramsRec (" hd0VsPtProng2" , " prong 2 DCAxy to prim. vertex (cm)" , " #it{p}_{T} (GeV/#it{c})" , {HistType::kTH2F , {{600 , -0.4 , 0.4 }, {vbins}}});
@@ -257,15 +261,18 @@ struct Alice3HfTask3Prong {
257261 registry.fill (histoPrefix + HIST (" hImpParErrProng1VsPt" ) + histoSuffix, candidate.errorImpactParameterY1 (), candidate.pt ());
258262 registry.fill (histoPrefix + HIST (" hImpParErrProng2VsPt" ) + histoSuffix, candidate.errorImpactParameterY2 (), candidate.pt ());
259263 registry.fill (histoPrefix + HIST (" hDecLenErrVsPt" ) + histoSuffix, candidate.errorDecayLength (), candidate.pt ());
264+ registry.fill (histoPrefix + HIST (" hDeltaXRecoGenSecVtx" ) + histoSuffix, candidate.pt (), candidate.deltaXSecVtx ());
265+ registry.fill (histoPrefix + HIST (" hDeltaYRecoGenSecVtx" ) + histoSuffix, candidate.pt (), candidate.deltaYSecVtx ());
266+ registry.fill (histoPrefix + HIST (" hDeltaZRecoGenSecVtx" ) + histoSuffix, candidate.pt (), candidate.deltaZSecVtx ());
260267 }
261268
262269 // / Fill MC histograms at reconstruction level
263270 // / \tparam CharmHad is the charm hadron species
264271 // / \tparam SaveMl indicates whether ML scores are saved in the THnSparse
265272 // / \tparam CandsRec is the type of the reconstructed candidates collection
266273 // / \param candidates is the collection of reconstructed candidates
267- template <CharmHadAlice3 CharmHad, bool SaveMl, typename CandsRec, typename AllParticles >
268- void fillHistosMcRec (CandsRec const & candidates, AllParticles const & allParticles )
274+ template <CharmHadAlice3 CharmHad, bool SaveMl, typename CandsRec, typename GenParticles >
275+ void fillHistosMcRec (CandsRec const & candidates, GenParticles const & genParticles )
269276 {
270277 registry.fill (HIST (" MC/rec/hCandidateCounter" ), 0 .);
271278 for (const auto & candidate : candidates) {
@@ -277,13 +284,13 @@ struct Alice3HfTask3Prong {
277284 registry.fill (HIST (" MC/rec/hCandidateCounter" ), 2 .);
278285 if (candidate.particleMcRec () >= 0 ) {
279286 registry.fill (HIST (" MC/rec/hCandidateCounter" ), 3 .);
280- auto mcParticle = allParticles .iteratorAt (candidate.particleMcRec ());
287+ auto mcParticle = genParticles .iteratorAt (candidate.particleMcRec ());
281288 if (mcParticle.has_daughters ()) {
282289 auto daughters = mcParticle.daughtersIds ();
283290 LOG (debug) << " Reco candidate matched to MC particle with PDG " << mcParticle.pdgCode () << " daughters: " << daughters.size ();
284291 int prongIdx = 0 ;
285292 for (int dauId = daughters[0 ]; dauId <= daughters[1 ]; dauId++) {
286- auto dau = allParticles .iteratorAt (dauId);
293+ auto dau = genParticles .iteratorAt (dauId);
287294 LOG (debug) << " dauId: " << dauId << " PDG: " << dau.pdgCode () << " with pT: " << dau.pt ();
288295 switch (prongIdx) {
289296 case 0 :
@@ -376,9 +383,9 @@ struct Alice3HfTask3Prong {
376383 // / \tparam ParticleType is the type of the generated particle
377384 // / \tparam TableType is the type of the full table (non-Partition)
378385 // / \param particle is a generated particle
379- // / \param allParticles is the full table of particles for iteratorAt access
386+ // / \param genParticles is the full table of particles for iteratorAt access
380387 template <CharmHadAlice3 CharmHad, int SignalType, typename ParticleType, typename TableType>
381- void fillHistogramsGen (ParticleType const & particle, TableType const & allParticles )
388+ void fillHistogramsGen (ParticleType const & particle, TableType const & genParticles )
382389 {
383390 LOG (debug) << " Filling generated histograms for signal type " << SignalType;
384391 static constexpr auto histoPrefix = HIST (" MC/gen/" ) + HIST (SignalFolders[SignalType]) + HIST (" /" );
@@ -400,7 +407,7 @@ struct Alice3HfTask3Prong {
400407 float pz = 0 .f ;
401408 float e = 0 .f ;
402409 for (int iDau = firstDauIdx; iDau <= lastDauIdx && iDau > 0 ; iDau++) {
403- const auto & dau = allParticles .iteratorAt (iDau);
410+ const auto & dau = genParticles .iteratorAt (iDau);
404411 e += dau.e ();
405412 px += dau.px ();
406413 py += dau.py ();
@@ -415,11 +422,11 @@ struct Alice3HfTask3Prong {
415422 // / Fill MC histograms at generated level
416423 // / \tparam CharmHad is the charm hadron species
417424 // / \tparam CandsGen is the type of the generated candidates collection
418- // / \tparam AllParticles is the type of the full particle table
425+ // / \tparam GenParticles is the type of the full particle table
419426 // / \param mcParticles is the collection of generated particles (can be a Partition)
420- // / \param allParticles is the full table of particles
421- template <CharmHadAlice3 CharmHad, typename CandsGen, typename AllParticles >
422- void fillHistosMcGen (CandsGen const & mcParticles, AllParticles const & allParticles )
427+ // / \param genParticles is the full table of particles
428+ template <CharmHadAlice3 CharmHad, typename CandsGen, typename GenParticles >
429+ void fillHistosMcGen (CandsGen const & mcParticles, GenParticles const & genParticles )
423430 {
424431 // MC gen.
425432 for (const auto & particle : mcParticles) {
@@ -431,14 +438,14 @@ struct Alice3HfTask3Prong {
431438 const auto ptGen = particle.pt ();
432439 const auto originType = particle.originMcGen ();
433440
434- fillHistogramsGen<CharmHad, Signal>(particle, allParticles );
441+ fillHistogramsGen<CharmHad, Signal>(particle, genParticles );
435442
436443 float ptGenB = -1 .f ;
437444 if (originType == RecoDecay::OriginType::Prompt) {
438- fillHistogramsGen<CharmHad, Prompt>(particle, allParticles );
445+ fillHistogramsGen<CharmHad, Prompt>(particle, genParticles );
439446 } else if (particle.originMcGen () == RecoDecay::OriginType::NonPrompt) {
440447 ptGenB = particle.bHadMotherPtGen ();
441- fillHistogramsGen<CharmHad, NonPrompt>(particle, allParticles );
448+ fillHistogramsGen<CharmHad, NonPrompt>(particle, genParticles );
442449 }
443450
444451 if (fillThn) {
0 commit comments