diff --git a/PWGHF/DataModel/CandidateReconstructionTables.h b/PWGHF/DataModel/CandidateReconstructionTables.h index c5c3eea19f1..cf28bc85b68 100644 --- a/PWGHF/DataModel/CandidateReconstructionTables.h +++ b/PWGHF/DataModel/CandidateReconstructionTables.h @@ -1500,6 +1500,7 @@ DECLARE_SOA_COLUMN(NSigTofPiFromLambda, nSigTofPiFromLambda, float); DECLARE_SOA_COLUMN(NSigTofPrFromLambda, nSigTofPrFromLambda, float); // MC DECLARE_SOA_COLUMN(DecayLengthMcGen, decayLengthMcGen, float); +DECLARE_SOA_COLUMN(MassMcGen, massMcGen, float); // Residuals and pulls DECLARE_SOA_COLUMN(PtResidual, ptResidual, float); DECLARE_SOA_COLUMN(PResidual, pResidual, float); @@ -1605,7 +1606,8 @@ DECLARE_SOA_TABLE(HfCandXicMcGen, "AOD", "HFCANDXICMCGEN", hf_cand_mc_flag::FlagMcMatchGen, hf_cand_mc_flag::OriginMcGen, hf_cand_mc_flag::PdgBhadMotherPart, - hf_cand_xic_to_xi_pi_pi::DecayLengthMcGen); + hf_cand_xic_to_xi_pi_pi::DecayLengthMcGen, + hf_cand_xic_to_xi_pi_pi::MassMcGen); // table with residuals and pulls of PV DECLARE_SOA_TABLE(HfCandXicResid, "AOD", "HFCANDXICRESID", diff --git a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx index 3780b21c1f9..b3b72f70883 100644 --- a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx +++ b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx @@ -1093,6 +1093,7 @@ struct HfCandidateCreatorXicToXiPiPiExpressions { registry.add("hDecayedPions", "hDecayedPions", {HistType::kTH1F, {{5, -0.5, 4.5}}}); registry.add("hInteractionsWithMaterial", "hInteractionsWithMaterial", {HistType::kTH1F, {{6, -0.5, 5.5}}}); registry.add("hDebugRec", "hDebugRec", {HistType::kTH1F, {{4, -0.5, 3.5}}}); + registry.add("hy_pt_gen", "Generated MC", {HistType::kTH2F, {{20, -1.0, 1.0}, {200, 0, 20}}}); registry.get(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + TotalRec, "total"); registry.get(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + XicToFinalState, "#Xi^{+}_{c} #rightarrow #pi^{#plus} #pi^{#plus} #pi^{#minus} p #pi^{#minus}"); registry.get(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + XiToPiPPi, "#Xi^{#minus} #rightarrow #pi^{#minus} p #pi^{#minus}"); @@ -1300,12 +1301,13 @@ struct HfCandidateCreatorXicToXiPiPiExpressions { if (rejectionMask != 0) { // at least one event selection not satisfied --> reject all particles from this collision for (unsigned int i = 0; i < mcParticlesPerMcColl.size(); ++i) { - rowMcMatchGen(-99, -99, -99, decayLengthGen); + rowMcMatchGen(-99, -99, -99, decayLengthGen, -1.f); } continue; } for (const auto& particle : mcParticlesPerMcColl) { + const float massGen = RecoDecay::m(particle.pVector(), particle.e()); sign = 0; flag = 0; origin = RecoDecay::OriginType::None; @@ -1345,6 +1347,9 @@ struct HfCandidateCreatorXicToXiPiPiExpressions { // Check whether the charm baryon is non-prompt (from a b quark). if (flag != 0) { + // fill inclusive generated Xic+ + registry.fill(HIST("hy_pt_gen"), particle.y(), particle.pt()); + origin = RecoDecay::getCharmHadronOrigin(mcParticles, particle, false, &idxBhadMothers); // Calculate the decay length of the generated particle auto dau0 = particle.template daughters_as().begin(); @@ -1355,9 +1360,9 @@ struct HfCandidateCreatorXicToXiPiPiExpressions { // Fill table if (origin == RecoDecay::OriginType::NonPrompt) { auto bHadMother = mcParticles.rawIteratorAt(idxBhadMothers[0]); - rowMcMatchGen(flag, origin, bHadMother.pdgCode(), decayLengthGen); + rowMcMatchGen(flag, origin, bHadMother.pdgCode(), decayLengthGen, massGen); } else { - rowMcMatchGen(flag, origin, 0, decayLengthGen); + rowMcMatchGen(flag, origin, 0, decayLengthGen, massGen); } } // close loop over generated particles } // close loop over McCollisions diff --git a/PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx b/PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx index 070e92a43e2..418314dc4c9 100644 --- a/PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx +++ b/PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx @@ -245,6 +245,8 @@ struct HfCandidateSelectorXicToXiPiPi { registry.add("hNCrossedRowsTpcBachelorPionRecBkg", "Reconstructed background;#it{N}_{rows}^{TPC} (#pi #leftarrow #Xi);entries", {HistType::kTH1F, {{103, 49.5, 152.5}}}); registry.add("hNCrossedRowsTpcV0PosDauRecBkg", "Reconstructed background;#it{N}_{rows}^{TPC} (V0 pos. dau.);entries", {HistType::kTH1F, {{103, 49.5, 152.5}}}); registry.add("hNCrossedRowsTpcV0NegDauRecBkg", "Reconstructed background;#it{N}_{rows}^{TPC} (V0 neg. dau.);entries", {HistType::kTH1F, {{103, 49.5, 152.5}}}); + /// reconstructed MC + registry.add("hmass_pt_reco_truth", "Reconstructed truth matching MC;inv.mass(#Xi#pi#pi) [GeV/c^{2}];p_{T} [GeV/c]", {HistType::kTH2F, {{40, 2.3, 2.7}, {200, 0, 20}}}); } } @@ -641,6 +643,7 @@ struct HfCandidateSelectorXicToXiPiPi { if constexpr (IsMc) { if (isMatchedSignal) { registry.fill(HIST("hSelCandidatesRecSig"), PidSelected); + registry.fill(HIST("hmass_pt_reco_truth"), hfCandXic.invMassXicPlus(), hfCandXic.pt()); } else { registry.fill(HIST("hSelCandidatesRecBkg"), PidSelected); } diff --git a/PWGHF/TableProducer/treeCreatorXicToXiPiPi.cxx b/PWGHF/TableProducer/treeCreatorXicToXiPiPi.cxx index b407f3b51be..3c8c2bfd209 100644 --- a/PWGHF/TableProducer/treeCreatorXicToXiPiPi.cxx +++ b/PWGHF/TableProducer/treeCreatorXicToXiPiPi.cxx @@ -364,6 +364,7 @@ DECLARE_SOA_TABLE(HfCandXicToXiPiPiFullPs, "AOD", "HFXICXI2PIFULLP", hf_cand_mc_flag::OriginMcGen, hf_cand_mc_flag::PdgBhadMotherPart, full::Pt, + full::M, full::Eta, full::Phi, full::Y, @@ -811,6 +812,7 @@ struct HfTreeCreatorXicToXiPiPi { particle.originMcGen(), particle.pdgBhadMotherPart(), particle.pt(), + particle.massMcGen(), particle.eta(), particle.phi(), RecoDecay::y(particle.pVector(), o2::constants::physics::MassXiCPlus), @@ -865,6 +867,7 @@ struct HfTreeCreatorXicToXiPiPi { particle.originMcGen(), particle.pdgBhadMotherPart(), particle.pt(), + particle.massMcGen(), particle.eta(), particle.phi(), RecoDecay::y(particle.pVector(), o2::constants::physics::MassXiCPlus), @@ -911,6 +914,7 @@ struct HfTreeCreatorXicToXiPiPi { particle.originMcGen(), particle.pdgBhadMotherPart(), particle.pt(), + particle.massMcGen(), particle.eta(), particle.phi(), RecoDecay::y(particle.pVector(), o2::constants::physics::MassXiCPlus),