Skip to content

Commit 23311e8

Browse files
JaeYoonCHOhero-seo
authored andcommitted
Add generated Xic+ mass to the Gen tree
1 parent d17edd9 commit 23311e8

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

‎PWGHF/DataModel/CandidateReconstructionTables.h‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1500,6 +1500,7 @@ DECLARE_SOA_COLUMN(NSigTofPiFromLambda, nSigTofPiFromLambda, float);
15001500
DECLARE_SOA_COLUMN(NSigTofPrFromLambda, nSigTofPrFromLambda, float);
15011501
// MC
15021502
DECLARE_SOA_COLUMN(DecayLengthMcGen, decayLengthMcGen, float);
1503+
DECLARE_SOA_COLUMN(MassMcGen, massMcGen, float);
15031504
// Residuals and pulls
15041505
DECLARE_SOA_COLUMN(PtResidual, ptResidual, float);
15051506
DECLARE_SOA_COLUMN(PResidual, pResidual, float);
@@ -1605,7 +1606,8 @@ DECLARE_SOA_TABLE(HfCandXicMcGen, "AOD", "HFCANDXICMCGEN",
16051606
hf_cand_mc_flag::FlagMcMatchGen,
16061607
hf_cand_mc_flag::OriginMcGen,
16071608
hf_cand_mc_flag::PdgBhadMotherPart,
1608-
hf_cand_xic_to_xi_pi_pi::DecayLengthMcGen);
1609+
hf_cand_xic_to_xi_pi_pi::DecayLengthMcGen,
1610+
hf_cand_xic_to_xi_pi_pi::MassMcGen);
16091611

16101612
// table with residuals and pulls of PV
16111613
DECLARE_SOA_TABLE(HfCandXicResid, "AOD", "HFCANDXICRESID",

‎PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,12 +1301,13 @@ struct HfCandidateCreatorXicToXiPiPiExpressions {
13011301
if (rejectionMask != 0) {
13021302
// at least one event selection not satisfied --> reject all particles from this collision
13031303
for (unsigned int i = 0; i < mcParticlesPerMcColl.size(); ++i) {
1304-
rowMcMatchGen(-99, -99, -99, decayLengthGen);
1304+
rowMcMatchGen(-99, -99, -99, decayLengthGen, -1.f);
13051305
}
13061306
continue;
13071307
}
13081308

13091309
for (const auto& particle : mcParticlesPerMcColl) {
1310+
const float massGen = RecoDecay::m(particle.pVector(), particle.e());
13101311
sign = 0;
13111312
flag = 0;
13121313
origin = RecoDecay::OriginType::None;
@@ -1359,9 +1360,9 @@ struct HfCandidateCreatorXicToXiPiPiExpressions {
13591360
// Fill table
13601361
if (origin == RecoDecay::OriginType::NonPrompt) {
13611362
auto bHadMother = mcParticles.rawIteratorAt(idxBhadMothers[0]);
1362-
rowMcMatchGen(flag, origin, bHadMother.pdgCode(), decayLengthGen);
1363+
rowMcMatchGen(flag, origin, bHadMother.pdgCode(), decayLengthGen, massGen);
13631364
} else {
1364-
rowMcMatchGen(flag, origin, 0, decayLengthGen);
1365+
rowMcMatchGen(flag, origin, 0, decayLengthGen, massGen);
13651366
}
13661367
} // close loop over generated particles
13671368
} // close loop over McCollisions

‎PWGHF/TableProducer/treeCreatorXicToXiPiPi.cxx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ DECLARE_SOA_TABLE(HfCandXicToXiPiPiFullPs, "AOD", "HFXICXI2PIFULLP",
364364
hf_cand_mc_flag::OriginMcGen,
365365
hf_cand_mc_flag::PdgBhadMotherPart,
366366
full::Pt,
367+
full::M,
367368
full::Eta,
368369
full::Phi,
369370
full::Y,
@@ -812,6 +813,7 @@ struct HfTreeCreatorXicToXiPiPi {
812813
particle.originMcGen(),
813814
particle.pdgBhadMotherPart(),
814815
particle.pt(),
816+
particle.massMcGen(),
815817
particle.eta(),
816818
particle.phi(),
817819
RecoDecay::y(particle.pVector(), o2::constants::physics::MassXiCPlus),
@@ -867,6 +869,7 @@ struct HfTreeCreatorXicToXiPiPi {
867869
particle.originMcGen(),
868870
particle.pdgBhadMotherPart(),
869871
particle.pt(),
872+
particle.massMcGen(),
870873
particle.eta(),
871874
particle.phi(),
872875
RecoDecay::y(particle.pVector(), o2::constants::physics::MassXiCPlus),
@@ -913,6 +916,7 @@ struct HfTreeCreatorXicToXiPiPi {
913916
particle.originMcGen(),
914917
particle.pdgBhadMotherPart(),
915918
particle.pt(),
919+
particle.massMcGen(),
916920
particle.eta(),
917921
particle.phi(),
918922
RecoDecay::y(particle.pVector(), o2::constants::physics::MassXiCPlus),

0 commit comments

Comments
 (0)