Skip to content

Commit 3151e24

Browse files
mfagginMattia Faggin
andauthored
[PWGHF] Add particle/antiparticle info for SigmaC. (#11081)
Co-authored-by: Mattia Faggin <mfaggin@cern.ch>
1 parent 07b1fd7 commit 3151e24

File tree

3 files changed

+78
-25
lines changed

3 files changed

+78
-25
lines changed

PWGHF/D2H/Tasks/taskSigmac.cxx

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ struct HfTaskSigmac {
7878
const AxisSpec thnAxisGenPtLambdaCBMother{thnConfigAxisGenPtB, "#it{p}_{T}^{gen}(#Lambda_{c}^{+} B mother) (GeV/#it{c})"};
7979
const AxisSpec thnAxisGenPtSigmaCBMother{thnConfigAxisGenPtB, "#it{p}_{T}^{gen}(#Sigma_{c}^{0,++} B mother) (GeV/#it{c})"};
8080
const AxisSpec thnAxisGenSigmaCSpecies = {o2::aod::hf_cand_sigmac::Species::NSpecies, -0.5f, +o2::aod::hf_cand_sigmac::Species::NSpecies - 0.5f, "bin 1: #Sigma_{c}(2455), bin 2: #Sigma_{c}(2520)"};
81+
const AxisSpec thnAxisSigmaCParticleAntiparticle = {o2::aod::hf_cand_sigmac::Conjugated::NConjugated, -0.5f, +o2::aod::hf_cand_sigmac::Conjugated::NConjugated - 0.5f, "bin 1: particle, bin 2: antiparticle"};
8182

8283
/// analysis histograms
8384
HistogramRegistry registry{
@@ -271,17 +272,19 @@ struct HfTaskSigmac {
271272
std::vector<AxisSpec> axesSigmaCWoMl = {thnAxisPtLambdaC, axisDeltaMassSigmaC, thnAxisDecLength, thnAxisDecLengthXY, thnAxisCPA, thnAxisCPAXY, thnAxisOriginMc, thnAxisChannel, thnAxisPtSigmaC, thnAxisChargeSigmaC};
272273
if (isMc) {
273274
registry.add("MC/generated/hnLambdaCGen", "THn for Lambdac gen", HistType::kTHnSparseF, {thnAxisGenPtLambdaC, thnAxisGenPtLambdaCBMother, thnAxisOriginMc, thnAxisChannel});
274-
registry.add("MC/generated/hnSigmaCGen", "THn for Sigmac gen", HistType::kTHnSparseF, {thnAxisGenPtSigmaC, thnAxisGenPtSigmaCBMother, thnAxisOriginMc, thnAxisChannel, thnAxisGenPtLambdaC, thnAxisChargeSigmaC, thnAxisGenSigmaCSpecies});
275+
registry.add("MC/generated/hnSigmaCGen", "THn for Sigmac gen", HistType::kTHnSparseF, {thnAxisGenPtSigmaC, thnAxisGenPtSigmaCBMother, thnAxisOriginMc, thnAxisChannel, thnAxisGenPtLambdaC, thnAxisChargeSigmaC, thnAxisGenSigmaCSpecies, thnAxisSigmaCParticleAntiparticle});
275276
if (doprocessMcWithMl) {
276277
axesLambdaCWithMl.push_back(thnAxisGenPtLambdaCBMother);
277278
axesSigmaCWithMl.push_back(thnAxisGenPtSigmaCBMother);
278279
axesSigmaCWithMl.push_back(thnAxisGenSigmaCSpecies);
280+
axesSigmaCWithMl.push_back(thnAxisSigmaCParticleAntiparticle);
279281
registry.add("hnLambdaC", "THn for Lambdac", HistType::kTHnSparseF, axesLambdaCWithMl);
280282
registry.add("hnSigmaC", "THn for Sigmac", HistType::kTHnSparseF, axesSigmaCWithMl);
281283
} else {
282284
axesLambdaCWoMl.push_back(thnAxisGenPtLambdaCBMother);
283285
axesSigmaCWoMl.push_back(thnAxisGenPtSigmaCBMother);
284286
axesSigmaCWoMl.push_back(thnAxisGenSigmaCSpecies);
287+
axesSigmaCWoMl.push_back(thnAxisSigmaCParticleAntiparticle);
285288
registry.add("hnLambdaC", "THn for Lambdac", HistType::kTHnSparseF, axesLambdaCWoMl);
286289
registry.add("hnSigmaC", "THn for Sigmac", HistType::kTHnSparseF, axesSigmaCWoMl);
287290
}
@@ -669,11 +672,12 @@ struct HfTaskSigmac {
669672
registry.fill(HIST("MC/generated/hPtGenLcFromSc0PlusPlusSig"), ptGenLc, origin, channel);
670673
registry.fill(HIST("MC/generated/hEtaGenLcFromSc0PlusPlusSig"), etaGenLc, origin, channel);
671674
registry.fill(HIST("MC/generated/hPhiGenLcFromSc0PlusPlusSig"), phiGenLc, origin, channel); /// Generated Λc+ ← Σc0,++ signal
675+
int8_t particleAntiparticle = particle.particleAntiparticle();
672676
if (origin == RecoDecay::OriginType::Prompt) {
673-
registry.fill(HIST("MC/generated/hnSigmaCGen"), ptGenSc, ptGenScBMother, origin, channel, ptGenLc, 0, sigmacSpecies);
677+
registry.fill(HIST("MC/generated/hnSigmaCGen"), ptGenSc, ptGenScBMother, origin, channel, ptGenLc, 0, sigmacSpecies, particleAntiparticle);
674678
} else {
675679
ptGenScBMother = mcParticlesSc.rawIteratorAt(particle.idxBhadMotherPart()).pt();
676-
registry.fill(HIST("MC/generated/hnSigmaCGen"), ptGenSc, ptGenScBMother, origin, channel, ptGenLc, 0, sigmacSpecies);
680+
registry.fill(HIST("MC/generated/hnSigmaCGen"), ptGenSc, ptGenScBMother, origin, channel, ptGenLc, 0, sigmacSpecies, particleAntiparticle);
677681
}
678682

679683
// debug -- uncomment if needed
@@ -703,11 +707,12 @@ struct HfTaskSigmac {
703707
registry.fill(HIST("MC/generated/hPtGenLcFromSc0PlusPlusSig"), ptGenLc, origin, channel);
704708
registry.fill(HIST("MC/generated/hEtaGenLcFromSc0PlusPlusSig"), etaGenLc, origin, channel);
705709
registry.fill(HIST("MC/generated/hPhiGenLcFromSc0PlusPlusSig"), phiGenLc, origin, channel); /// Generated Λc+ ← Σc0,++ signal
710+
int8_t particleAntiparticle = particle.particleAntiparticle();
706711
if (origin == RecoDecay::OriginType::Prompt) {
707-
registry.fill(HIST("MC/generated/hnSigmaCGen"), ptGenSc, ptGenScBMother, origin, channel, ptGenLc, 2, sigmacSpecies);
712+
registry.fill(HIST("MC/generated/hnSigmaCGen"), ptGenSc, ptGenScBMother, origin, channel, ptGenLc, 2, sigmacSpecies, particleAntiparticle);
708713
} else {
709714
ptGenScBMother = mcParticlesSc.rawIteratorAt(particle.idxBhadMotherPart()).pt();
710-
registry.fill(HIST("MC/generated/hnSigmaCGen"), ptGenSc, ptGenScBMother, origin, channel, ptGenLc, 2, sigmacSpecies);
715+
registry.fill(HIST("MC/generated/hnSigmaCGen"), ptGenSc, ptGenScBMother, origin, channel, ptGenLc, 2, sigmacSpecies, particleAntiparticle);
711716
}
712717

713718
// debug -- uncomment if needed
@@ -860,6 +865,7 @@ struct HfTaskSigmac {
860865

861866
/// THn for candidate Σc0,++ cut variation
862867
if (enableTHn) {
868+
int8_t particleAntiparticle = candSc.particleAntiparticle();
863869
if constexpr (useMl) {
864870
/// fill with ML information
865871
/// BDT index 0: bkg score; BDT index 2: non-prompt score
@@ -868,10 +874,10 @@ struct HfTaskSigmac {
868874
outputMl.at(0) = candidateLc.mlProbLcToPKPi()[0]; /// bkg score
869875
outputMl.at(1) = candidateLc.mlProbLcToPKPi()[2]; /// non-prompt score
870876
}
871-
registry.get<THnSparse>(HIST("hnSigmaC"))->Fill(ptLc, deltaMass, outputMl.at(0), outputMl.at(1), origin, channel, ptSc, std::abs(chargeSc), candSc.ptBhadMotherPart(), sigmacSpecies);
877+
registry.get<THnSparse>(HIST("hnSigmaC"))->Fill(ptLc, deltaMass, outputMl.at(0), outputMl.at(1), origin, channel, ptSc, std::abs(chargeSc), candSc.ptBhadMotherPart(), sigmacSpecies, particleAntiparticle);
872878
} else {
873879
/// fill w/o BDT information
874-
registry.get<THnSparse>(HIST("hnSigmaC"))->Fill(ptLc, deltaMass, decLengthLc, decLengthXYLc, cpaLc, cpaXYLc, origin, channel, ptSc, std::abs(chargeSc), candSc.ptBhadMotherPart(), sigmacSpecies);
880+
registry.get<THnSparse>(HIST("hnSigmaC"))->Fill(ptLc, deltaMass, decLengthLc, decLengthXYLc, cpaLc, cpaXYLc, origin, channel, ptSc, std::abs(chargeSc), candSc.ptBhadMotherPart(), sigmacSpecies, particleAntiparticle);
875881
}
876882
}
877883

@@ -934,6 +940,7 @@ struct HfTaskSigmac {
934940

935941
/// THn for candidate Σc0,++ cut variation
936942
if (enableTHn) {
943+
int8_t particleAntiparticle = candSc.particleAntiparticle();
937944
if constexpr (useMl) {
938945
/// fill with ML information
939946
/// BDT index 0: bkg score; BDT index 2: non-prompt score
@@ -942,10 +949,10 @@ struct HfTaskSigmac {
942949
outputMl.at(0) = candidateLc.mlProbLcToPiKP()[0]; /// bkg score
943950
outputMl.at(1) = candidateLc.mlProbLcToPiKP()[2]; /// non-prompt score
944951
}
945-
registry.get<THnSparse>(HIST("hnSigmaC"))->Fill(ptLc, deltaMass, outputMl.at(0), outputMl.at(1), origin, channel, ptSc, std::abs(chargeSc), candSc.ptBhadMotherPart(), sigmacSpecies);
952+
registry.get<THnSparse>(HIST("hnSigmaC"))->Fill(ptLc, deltaMass, outputMl.at(0), outputMl.at(1), origin, channel, ptSc, std::abs(chargeSc), candSc.ptBhadMotherPart(), sigmacSpecies, particleAntiparticle);
946953
} else {
947954
/// fill w/o BDT information
948-
registry.get<THnSparse>(HIST("hnSigmaC"))->Fill(ptLc, deltaMass, decLengthLc, decLengthXYLc, cpaLc, cpaXYLc, origin, channel, ptSc, std::abs(chargeSc), candSc.ptBhadMotherPart(), sigmacSpecies);
955+
registry.get<THnSparse>(HIST("hnSigmaC"))->Fill(ptLc, deltaMass, decLengthLc, decLengthXYLc, cpaLc, cpaXYLc, origin, channel, ptSc, std::abs(chargeSc), candSc.ptBhadMotherPart(), sigmacSpecies, particleAntiparticle);
949956
}
950957
}
951958

@@ -1044,6 +1051,7 @@ struct HfTaskSigmac {
10441051

10451052
/// THn for candidate Σc0,++ cut variation
10461053
if (enableTHn) {
1054+
int8_t particleAntiparticle = candSc.particleAntiparticle();
10471055
if constexpr (useMl) {
10481056
/// fill with ML information
10491057
/// BDT index 0: bkg score; BDT index 2: non-prompt score
@@ -1052,10 +1060,10 @@ struct HfTaskSigmac {
10521060
outputMl.at(0) = candidateLc.mlProbLcToPKPi()[0]; /// bkg score
10531061
outputMl.at(1) = candidateLc.mlProbLcToPKPi()[2]; /// non-prompt score
10541062
}
1055-
registry.get<THnSparse>(HIST("hnSigmaC"))->Fill(ptLc, deltaMass, outputMl.at(0), outputMl.at(1), origin, channel, ptSc, std::abs(chargeSc), candSc.ptBhadMotherPart(), sigmacSpecies);
1063+
registry.get<THnSparse>(HIST("hnSigmaC"))->Fill(ptLc, deltaMass, outputMl.at(0), outputMl.at(1), origin, channel, ptSc, std::abs(chargeSc), candSc.ptBhadMotherPart(), sigmacSpecies, particleAntiparticle);
10561064
} else {
10571065
/// fill w/o BDT information
1058-
registry.get<THnSparse>(HIST("hnSigmaC"))->Fill(ptLc, deltaMass, decLengthLc, decLengthXYLc, cpaLc, cpaXYLc, origin, channel, ptSc, std::abs(chargeSc), candSc.ptBhadMotherPart(), sigmacSpecies);
1066+
registry.get<THnSparse>(HIST("hnSigmaC"))->Fill(ptLc, deltaMass, decLengthLc, decLengthXYLc, cpaLc, cpaXYLc, origin, channel, ptSc, std::abs(chargeSc), candSc.ptBhadMotherPart(), sigmacSpecies, particleAntiparticle);
10591067
}
10601068
}
10611069

@@ -1116,6 +1124,7 @@ struct HfTaskSigmac {
11161124

11171125
/// THn for candidate Σc0,++ cut variation
11181126
if (enableTHn) {
1127+
int8_t particleAntiparticle = candSc.particleAntiparticle();
11191128
if constexpr (useMl) {
11201129
/// fill with ML information
11211130
/// BDT index 0: bkg score; BDT index 2: non-prompt score
@@ -1124,10 +1133,10 @@ struct HfTaskSigmac {
11241133
outputMl.at(0) = candidateLc.mlProbLcToPiKP()[0]; /// bkg score
11251134
outputMl.at(1) = candidateLc.mlProbLcToPiKP()[2]; /// non-prompt score
11261135
}
1127-
registry.get<THnSparse>(HIST("hnSigmaC"))->Fill(ptLc, deltaMass, outputMl.at(0), outputMl.at(1), origin, channel, ptSc, std::abs(chargeSc), candSc.ptBhadMotherPart(), sigmacSpecies);
1136+
registry.get<THnSparse>(HIST("hnSigmaC"))->Fill(ptLc, deltaMass, outputMl.at(0), outputMl.at(1), origin, channel, ptSc, std::abs(chargeSc), candSc.ptBhadMotherPart(), sigmacSpecies, particleAntiparticle);
11281137
} else {
11291138
/// fill w/o BDT information
1130-
registry.get<THnSparse>(HIST("hnSigmaC"))->Fill(ptLc, deltaMass, decLengthLc, decLengthXYLc, cpaLc, cpaXYLc, origin, channel, ptSc, std::abs(chargeSc), candSc.ptBhadMotherPart(), sigmacSpecies);
1139+
registry.get<THnSparse>(HIST("hnSigmaC"))->Fill(ptLc, deltaMass, decLengthLc, decLengthXYLc, cpaLc, cpaXYLc, origin, channel, ptSc, std::abs(chargeSc), candSc.ptBhadMotherPart(), sigmacSpecies, particleAntiparticle);
11311140
}
11321141
}
11331142

PWGHF/DataModel/CandidateReconstructionTables.h

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2123,10 +2123,11 @@ DECLARE_SOA_COLUMN(StatusSpreadLcMinvPKPiFromPDG, statusSpreadLcMinvPKPiFromPDG,
21232123
DECLARE_SOA_COLUMN(StatusSpreadLcMinvPiKPFromPDG, statusSpreadLcMinvPiKPFromPDG, int); //! // Λc Minv(piKp) spread from PDG Λc mass
21242124
DECLARE_SOA_INDEX_COLUMN_FULL(Prong0, prong0, int, HfCand3Prong, "_0"); //! Λc index
21252125
// MC matching result:
2126-
DECLARE_SOA_COLUMN(FlagMcMatchRec, flagMcMatchRec, int8_t); //! reconstruction level
2127-
DECLARE_SOA_COLUMN(FlagMcMatchGen, flagMcMatchGen, int8_t); //! generator level
2128-
DECLARE_SOA_COLUMN(OriginMcRec, originMcRec, int8_t); //! particle origin, reconstruction level
2129-
DECLARE_SOA_COLUMN(OriginMcGen, originMcGen, int8_t); //! particle origin, generator level
2126+
DECLARE_SOA_COLUMN(FlagMcMatchRec, flagMcMatchRec, int8_t); //! reconstruction level
2127+
DECLARE_SOA_COLUMN(FlagMcMatchGen, flagMcMatchGen, int8_t); //! generator level
2128+
DECLARE_SOA_COLUMN(OriginMcRec, originMcRec, int8_t); //! particle origin, reconstruction level
2129+
DECLARE_SOA_COLUMN(OriginMcGen, originMcGen, int8_t); //! particle origin, generator level
2130+
DECLARE_SOA_COLUMN(ParticleAntiparticle, particleAntiparticle, int8_t); //! particle or antiparticle
21302131

21312132
// mapping of decay types
21322133
enum DecayType { Sc0ToPKPiPi = 0,
@@ -2139,6 +2140,9 @@ enum Species : int { Sc2455 = 0,
21392140
enum Decays : int { PKPi = 0,
21402141
PiKP,
21412142
NDecays };
2143+
enum Conjugated : int { Particle = 0,
2144+
Antiparticle,
2145+
NConjugated };
21422146
constexpr int ChargeNull = 0;
21432147
constexpr int ChargePlusPlus = 2;
21442148
} // namespace hf_cand_sigmac
@@ -2195,13 +2199,15 @@ DECLARE_SOA_TABLE(HfCandScMcRec, "AOD", "HFCANDSCMCREC", //!
21952199
hf_cand_sigmac::FlagMcMatchRec,
21962200
hf_cand_sigmac::OriginMcRec,
21972201
hf_cand::PtBhadMotherPart,
2198-
hf_cand::PdgBhadMotherPart);
2202+
hf_cand::PdgBhadMotherPart,
2203+
hf_cand_sigmac::ParticleAntiparticle);
21992204

22002205
// table with results of generation level MC matching
22012206
DECLARE_SOA_TABLE(HfCandScMcGen, "AOD", "HFCANDSCMCGEN", //!
22022207
hf_cand_sigmac::FlagMcMatchGen,
22032208
hf_cand_sigmac::OriginMcGen,
2204-
hf_cand::IdxBhadMotherPart);
2209+
hf_cand::IdxBhadMotherPart,
2210+
hf_cand_sigmac::ParticleAntiparticle);
22052211

22062212
// specific Σc0,++ candidate properties in cascade channel
22072213
namespace hf_cand_sigmac_to_cascade

0 commit comments

Comments
 (0)