Skip to content

Commit 144ab32

Browse files
gmantzarNils Konert
andauthored
[PWGCF] Enabeling the simultanously selecting two different V0s, Cascades and Resonances in the ProducerReso task (#13868)
Co-authored-by: Nils Konert <ge87lel@nidoking.ktas.ph.tum.de>
1 parent b01c2e2 commit 144ab32

File tree

8 files changed

+1315
-663
lines changed

8 files changed

+1315
-663
lines changed

PWGCF/DataModel/FemtoDerived.h

Lines changed: 55 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,18 @@ enum ParticleType {
114114
kResoPosdaughTPC_NegdaughTOF,
115115
kResoPosdaughTOF_NegdaughTPC,
116116
kResoPosdaughTOF_NegdaughTOF,
117+
kResoKStarPosdaughTPC_NegdaughTPC, // cases for KStar-daughters for TPC or TOF combinations
118+
kResoKStarPosdaughTPC_NegdaughTOF,
119+
kResoKStarPosdaughTOF_NegdaughTPC,
120+
kResoKStarPosdaughTOF_NegdaughTOF,
121+
kV0K0Short,
122+
kV0K0ShortChild,
123+
kResoKStarChild,
124+
kResoKStar,
125+
kOmega,
126+
kOmegaV0,
127+
kOmegaV0Child,
128+
kOmegaBachelor,
117129
kNParticleTypes //! Number of particle types
118130
};
119131

@@ -123,9 +135,9 @@ enum MomentumType {
123135
kPtpc //! momentum at the inner wall of the TPC (useful for PID plots)
124136
};
125137

126-
static constexpr std::string_view ParticleTypeName[kNParticleTypes] = {"Track", "V0", "V0Child", "Cascade", "CascadeV0", "CascadeV0Child", "CascadeBachelor", "CharmHadron", "Reso", "ResoChild", "ResoPosdaughTPC_NegdaughTPC", "ResoPosdaughTPC_NegdaughTOF", "ResoPosdaughTOF_NegdaughTPC", "ResoPosdaughTOF_NegdaughTOF"}; //! Naming of the different particle types
138+
static constexpr std::string_view ParticleTypeName[kNParticleTypes] = {"Track", "V0", "V0Child", "Cascade", "CascadeV0", "CascadeV0Child", "CascadeBachelor", "CharmHadron", "Reso", "ResoChild", "ResoPosdaughTPC_NegdaughTPC", "ResoPosdaughTPC_NegdaughTOF", "ResoPosdaughTOF_NegdaughTPC", "ResoPosdaughTOF_NegdaughTOF", "ResoKStarPosdaughTPC_NegdaughTPC", "ResoKStarPosdaughTPC_NegdaughTOF", "ResoKStarPosdaughTOF_NegdaughTPC", "ResoKStarPosdaughTOF_NegdaughTOF", "V0K0Short", "V0K0ShortChild", "ResoKStarChild", "ResoKStar", "Omega", "OmegaV0", "OmegaV0Child", "OmegaBachelor"}; //! Naming of the different particle types
127139

128-
static constexpr std::string_view TempFitVarName[kNParticleTypes] = {"/hDCAxy", "/hCPA", "/hDCAxy", "/hCPA", "/hCPA", "/hDCAxy", "/hDCAxy", "/hCPA", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hDCAxy"};
140+
static constexpr std::string_view TempFitVarName[kNParticleTypes] = {"/hDCAxy", "/hCPA", "/hDCAxy", "/hCPA", "/hCPA", "/hDCAxy", "/hDCAxy", "/hCPA", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hCPA", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hCPA", "/hCPA", "/hDCAxy", "/hDCAxy"};
129141

130142
using cutContainerType = uint32_t; //! Definition of the data type for the bit-wise container for the different selection criteria
131143

@@ -228,47 +240,47 @@ enum CharmHadronMassHypo {
228240
lcToPiKP = 2,
229241
dplusToPiKPi = 4
230242
};
231-
DECLARE_SOA_COLUMN(GIndexCol, gIndexCol, int); //! Global index for the collision
232-
DECLARE_SOA_COLUMN(TimeStamp, timeStamp, int64_t); //! Timestamp for the collision
233-
DECLARE_SOA_COLUMN(VertexZ, vertexZ, float); //! VertexZ for the collision
234-
DECLARE_SOA_COLUMN(TrackId, trackId, int); //! track id to match associate particle with charm hadron prongs
235-
DECLARE_SOA_COLUMN(Charge, charge, int8_t); //! Charge of charm hadron
236-
DECLARE_SOA_COLUMN(Prong0Id, prong0Id, int); //! Track id of charm hadron prong0
237-
DECLARE_SOA_COLUMN(Prong1Id, prong1Id, int); //! Track id of charm hadron prong1
238-
DECLARE_SOA_COLUMN(Prong2Id, prong2Id, int); //! Track id of charm hadron prong2
239-
DECLARE_SOA_COLUMN(Prong0Pt, prong0Pt, float); //! Track pT of charm hadron prong0
240-
DECLARE_SOA_COLUMN(Prong1Pt, prong1Pt, float); //! Track pT of charm hadron prong1
241-
DECLARE_SOA_COLUMN(Prong2Pt, prong2Pt, float); //! Track pT of charm hadron prong2
242-
DECLARE_SOA_COLUMN(Prong0Eta, prong0Eta, float); //! Track eta of charm hadron prong0
243-
DECLARE_SOA_COLUMN(Prong1Eta, prong1Eta, float); //! Track eta of charm hadron prong1
244-
DECLARE_SOA_COLUMN(Prong2Eta, prong2Eta, float); //! Track eta of charm hadron prong2
245-
DECLARE_SOA_COLUMN(Prong0Phi, prong0Phi, float); //! Track phi of charm hadron prong0
246-
DECLARE_SOA_COLUMN(Prong1Phi, prong1Phi, float); //! Track phi of charm hadron prong1
247-
DECLARE_SOA_COLUMN(Prong2Phi, prong2Phi, float); //! Track phi of charm hadron prong2
248-
DECLARE_SOA_COLUMN(CandidateSelFlag, candidateSelFlag, int); //! Selection of mass hypothesis for charm hadron (1 for Lc -> pkpi, 2 for Lc -> pikp, 4 for D+ -> pikpi)
249-
DECLARE_SOA_COLUMN(BDTBkg, bdtBkg, float); //! Background score using Boosted Decision Tree for charm hadron
250-
DECLARE_SOA_COLUMN(BDTPrompt, bdtPrompt, float); //! Prompt signal score using Boosted Decision Tree for charm hadron
251-
DECLARE_SOA_COLUMN(BDTFD, bdtFD, float); //! Feed-down score using Boosted Decision Tree for charm hadron
252-
DECLARE_SOA_COLUMN(FlagMc, flagMc, int); //! To select MC particle among charm hadrons, { DplusToPiKPi = 1, LcToPKPi = 17, DsToKKPi = 6, XicToPKPi = 21, N3ProngD = 2ecays };
253-
DECLARE_SOA_COLUMN(OriginMcRec, originMcRec, int); //! flag for reconstruction level matching (1 for prompt, 2 for non-prompt)
254-
DECLARE_SOA_COLUMN(OriginMcGen, originMcGen, int); //! flag for generator level matching (1 for prompt, 2 for non-prompt)
255-
DECLARE_SOA_COLUMN(IsCandidateSwapped, isCandidateSwapped, int); //! swapping of the prongs order (0 for Lc -> pkpi, 1 for Lc -> pikp)
256-
DECLARE_SOA_COLUMN(TrkPt, trkPt, float); //! Transverse momentum of associate femto particle
257-
DECLARE_SOA_COLUMN(TrkEta, trkEta, float); //! Eta of associate femto particle
258-
DECLARE_SOA_COLUMN(TrkPhi, trkPhi, float); //! Phi of associate femto particle
259-
DECLARE_SOA_COLUMN(Kstar, kstar, float); //! Relative momentum in particles pair frame
260-
DECLARE_SOA_COLUMN(KT, kT, float); //! kT distribution of particle pairs
261-
DECLARE_SOA_COLUMN(MT, mT, float); //! Transverse mass distribution
262-
DECLARE_SOA_COLUMN(CharmM, charmM, float); //! Charm hadron mass
263-
DECLARE_SOA_COLUMN(CharmTrkM, charmtrkM, float); //! Charm hadron track mass
264-
DECLARE_SOA_COLUMN(CharmPt, charmPt, float); //! Transverse momentum of charm hadron for result task
265-
DECLARE_SOA_COLUMN(CharmEta, charmEta, float); //! Eta of charm hadron for result task
266-
DECLARE_SOA_COLUMN(CharmPhi, charmPhi, float); //! Phi of charm hadron for result task
267-
DECLARE_SOA_COLUMN(Mult, mult, int); //! Charge particle multiplicity
268-
DECLARE_SOA_COLUMN(MultPercentile, multPercentile, float); //! Multiplicity precentile
269-
DECLARE_SOA_COLUMN(PairSign, pairSign, int8_t); //! Selection between like sign (1) and unlike sign pair (2)
270-
DECLARE_SOA_COLUMN(ProcessType, processType, int64_t); //! Selection between same-event (1), and mixed-event (2)
271-
DECLARE_SOA_DYNAMIC_COLUMN(M, m, //!
243+
DECLARE_SOA_COLUMN(GIndexCol, gIndexCol, int); //! Global index for the collision
244+
DECLARE_SOA_COLUMN(TimeStamp, timeStamp, int64_t); //! Timestamp for the collision
245+
DECLARE_SOA_COLUMN(VertexZ, vertexZ, float); //! VertexZ for the collision
246+
DECLARE_SOA_COLUMN(TrackId, trackId, int); //! track id to match associate particle with charm hadron prongs
247+
DECLARE_SOA_COLUMN(Charge, charge, int8_t); //! Charge of charm hadron
248+
DECLARE_SOA_COLUMN(Prong0Id, prong0Id, int); //! Track id of charm hadron prong0
249+
DECLARE_SOA_COLUMN(Prong1Id, prong1Id, int); //! Track id of charm hadron prong1
250+
DECLARE_SOA_COLUMN(Prong2Id, prong2Id, int); //! Track id of charm hadron prong2
251+
DECLARE_SOA_COLUMN(Prong0Pt, prong0Pt, float); //! Track pT of charm hadron prong0
252+
DECLARE_SOA_COLUMN(Prong1Pt, prong1Pt, float); //! Track pT of charm hadron prong1
253+
DECLARE_SOA_COLUMN(Prong2Pt, prong2Pt, float); //! Track pT of charm hadron prong2
254+
DECLARE_SOA_COLUMN(Prong0Eta, prong0Eta, float); //! Track eta of charm hadron prong0
255+
DECLARE_SOA_COLUMN(Prong1Eta, prong1Eta, float); //! Track eta of charm hadron prong1
256+
DECLARE_SOA_COLUMN(Prong2Eta, prong2Eta, float); //! Track eta of charm hadron prong2
257+
DECLARE_SOA_COLUMN(Prong0Phi, prong0Phi, float); //! Track phi of charm hadron prong0
258+
DECLARE_SOA_COLUMN(Prong1Phi, prong1Phi, float); //! Track phi of charm hadron prong1
259+
DECLARE_SOA_COLUMN(Prong2Phi, prong2Phi, float); //! Track phi of charm hadron prong2
260+
DECLARE_SOA_COLUMN(CandidateSelFlag, candidateSelFlag, int); //! Selection of mass hypothesis for charm hadron (1 for Lc -> pkpi, 2 for Lc -> pikp, 4 for D+ -> pikpi)
261+
DECLARE_SOA_COLUMN(BDTBkg, bdtBkg, float); //! Background score using Boosted Decision Tree for charm hadron
262+
DECLARE_SOA_COLUMN(BDTPrompt, bdtPrompt, float); //! Prompt signal score using Boosted Decision Tree for charm hadron
263+
DECLARE_SOA_COLUMN(BDTFD, bdtFD, float); //! Feed-down score using Boosted Decision Tree for charm hadron
264+
DECLARE_SOA_COLUMN(FlagMc, flagMc, int); //! To select MC particle among charm hadrons, { DplusToPiKPi = 1, LcToPKPi = 17, DsToKKPi = 6, XicToPKPi = 21, N3ProngD = 2ecays };
265+
DECLARE_SOA_COLUMN(OriginMcRec, originMcRec, int); //! flag for reconstruction level matching (1 for prompt, 2 for non-prompt)
266+
DECLARE_SOA_COLUMN(OriginMcGen, originMcGen, int); //! flag for generator level matching (1 for prompt, 2 for non-prompt)
267+
DECLARE_SOA_COLUMN(IsCandidateSwapped, isCandidateSwapped, int); //! swapping of the prongs order (0 for Lc -> pkpi, 1 for Lc -> pikp)
268+
DECLARE_SOA_COLUMN(TrkPt, trkPt, float); //! Transverse momentum of associate femto particle
269+
DECLARE_SOA_COLUMN(TrkEta, trkEta, float); //! Eta of associate femto particle
270+
DECLARE_SOA_COLUMN(TrkPhi, trkPhi, float); //! Phi of associate femto particle
271+
DECLARE_SOA_COLUMN(Kstar, kstar, float); //! Relative momentum in particles pair frame
272+
DECLARE_SOA_COLUMN(KT, kT, float); //! kT distribution of particle pairs
273+
DECLARE_SOA_COLUMN(MT, mT, float); //! Transverse mass distribution
274+
DECLARE_SOA_COLUMN(CharmM, charmM, float); //! Charm hadron mass
275+
DECLARE_SOA_COLUMN(CharmTrkM, charmtrkM, float); //! Charm hadron track mass
276+
DECLARE_SOA_COLUMN(CharmPt, charmPt, float); //! Transverse momentum of charm hadron for result task
277+
DECLARE_SOA_COLUMN(CharmEta, charmEta, float); //! Eta of charm hadron for result task
278+
DECLARE_SOA_COLUMN(CharmPhi, charmPhi, float); //! Phi of charm hadron for result task
279+
DECLARE_SOA_COLUMN(Mult, mult, int); //! Charge particle multiplicity
280+
DECLARE_SOA_COLUMN(MultPercentile, multPercentile, float); //! Multiplicity precentile
281+
DECLARE_SOA_COLUMN(PairSign, pairSign, int8_t); //! Selection between like sign (1) and unlike sign pair (2)
282+
DECLARE_SOA_COLUMN(ProcessType, processType, int64_t); //! Selection between same-event (1), and mixed-event (2)
283+
DECLARE_SOA_DYNAMIC_COLUMN(M, m, //!
272284
[](float pt0, float phi0, float eta0, float pt1, float phi1, float eta1, float pt2, float phi2, float eta2, const std::array<double, 3>& m) -> float { return RecoDecay::m(std::array{
273285
RecoDecayPtEtaPhi::pVector(pt0, eta0, phi0),
274286
RecoDecayPtEtaPhi::pVector(pt1, eta1, phi1),

PWGCF/FemtoDream/Core/femtoDreamCascadeSelection.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class FemtoDreamCascadeSelection
137137
template <typename Col, typename Casc, typename Track>
138138
bool isSelectedMinimal(Col const& col, Casc const& cascade, Track const& posTrack, Track const& negTrack, Track const& bachTrack);
139139

140-
template <int cutstage = 0, o2::aod::femtodreamparticle::ParticleType part, typename Col, typename Casc, typename Track>
140+
template <int cutstage = 0, o2::aod::femtodreamparticle::ParticleType part, o2::aod::femtodreamparticle::ParticleType v0daugh, o2::aod::femtodreamparticle::ParticleType bach, typename Col, typename Casc, typename Track>
141141
void fillQA(Col const& col, Casc const& cascade, Track const& posTrack, Track const& negTrack, Track const& bachTrack);
142142

143143
// template <typename cutContainerType, typename Col, typename Casc, typename V0, typename Track>
@@ -352,7 +352,7 @@ class FemtoDreamCascadeSelection
352352
// static constexpr std::string_view mCutStage[kNcutStages] = {"BeforeSel", "AfterSel"};
353353
}; // namespace femtoDream
354354

355-
template <o2::aod::femtodreamparticle::ParticleType part, o2::aod::femtodreamparticle::ParticleType daugh, o2::aod::femtodreamparticle::ParticleType bach, typename cutContainerType>
355+
template <o2::aod::femtodreamparticle::ParticleType part, o2::aod::femtodreamparticle::ParticleType v0daugh, o2::aod::femtodreamparticle::ParticleType bach, typename cutContainerType>
356356
void FemtoDreamCascadeSelection::init(HistogramRegistry* QAregistry, HistogramRegistry* Registry, bool isSelectCascOmega)
357357
{
358358

@@ -405,15 +405,15 @@ void FemtoDreamCascadeSelection::init(HistogramRegistry* QAregistry, HistogramRe
405405
mQAHistogramRegistry->add((folderName + "/" + static_cast<std::string>(mCutStage[istage]) + "/hV0InvMass").c_str(), "; Invariant mass Cascade V0; Entries", kTH1F, {massAxisV0});
406406
}
407407

408-
PosDaughTrack.init<aod::femtodreamparticle::ParticleType::kCascadeV0Child,
408+
PosDaughTrack.init<v0daugh,
409409
aod::femtodreamparticle::TrackType::kPosChild,
410410
aod::femtodreamparticle::cutContainerType>(mQAHistogramRegistry, mHistogramRegistry);
411411

412-
NegDaughTrack.init<aod::femtodreamparticle::ParticleType::kCascadeV0Child,
412+
NegDaughTrack.init<v0daugh,
413413
aod::femtodreamparticle::TrackType::kNegChild,
414414
aod::femtodreamparticle::cutContainerType>(mQAHistogramRegistry, mHistogramRegistry);
415415

416-
BachDaughTrack.init<aod::femtodreamparticle::ParticleType::kCascadeBachelor,
416+
BachDaughTrack.init<bach,
417417
aod::femtodreamparticle::TrackType::kBachelor,
418418
aod::femtodreamparticle::cutContainerType>(mQAHistogramRegistry, mHistogramRegistry);
419419
}
@@ -657,7 +657,7 @@ std::array<cutContainerType, 8> FemtoDreamCascadeSelection::getCutContainer(Col
657657
outputBachTrack.at(femtoDreamTrackSelection::TrackContainerPosition::kPID)};
658658
}
659659

660-
template <int cutstage, o2::aod::femtodreamparticle::ParticleType part, typename Col, typename Casc, typename Track>
660+
template <int cutstage, o2::aod::femtodreamparticle::ParticleType part, o2::aod::femtodreamparticle::ParticleType v0daugh, o2::aod::femtodreamparticle::ParticleType bach, typename Col, typename Casc, typename Track>
661661
void FemtoDreamCascadeSelection::fillQA(Col const& col, Casc const& casc, Track const& posTrack, Track const& negTrack, Track const& bachTrack)
662662
{
663663

@@ -685,11 +685,11 @@ void FemtoDreamCascadeSelection::fillQA(Col const& col, Casc const& casc, Track
685685
mQAHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[part]) + HIST("/") + HIST(mCutStage[cutstage]) + HIST("/hV0DCAToPV"), v0dcatopv);
686686
mQAHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[part]) + HIST("/") + HIST(mCutStage[cutstage]) + HIST("/hV0InvMass"), casc.mLambda());
687687

688-
PosDaughTrack.fillQA<aod::femtodreamparticle::ParticleType::kCascadeV0Child,
688+
PosDaughTrack.fillQA<v0daugh,
689689
aod::femtodreamparticle::TrackType::kPosChild, false, cutstage>(posTrack);
690-
NegDaughTrack.fillQA<aod::femtodreamparticle::ParticleType::kCascadeV0Child,
690+
NegDaughTrack.fillQA<v0daugh,
691691
aod::femtodreamparticle::TrackType::kNegChild, false, cutstage>(negTrack);
692-
BachDaughTrack.fillQA<aod::femtodreamparticle::ParticleType::kCascadeBachelor,
692+
BachDaughTrack.fillQA<bach,
693693
aod::femtodreamparticle::TrackType::kBachelor, false, cutstage>(bachTrack);
694694
}
695695
}

0 commit comments

Comments
 (0)