Skip to content

Commit 7d89b37

Browse files
committed
Add Xic femto QA daughter table
1 parent 13abf87 commit 7d89b37

3 files changed

Lines changed: 110 additions & 21 deletions

File tree

PWGCF/DataModel/FemtoDerived.h

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ DECLARE_SOA_COLUMN(Charge, charge, int8_t); //! Charge of c
245245
DECLARE_SOA_COLUMN(Prong0Id, prong0Id, int); //! Track id of charm hadron prong0
246246
DECLARE_SOA_COLUMN(Prong1Id, prong1Id, int); //! Track id of charm hadron prong1
247247
DECLARE_SOA_COLUMN(Prong2Id, prong2Id, int); //! Track id of charm hadron prong2
248+
DECLARE_SOA_COLUMN(XiProngId, xiProngId, int); //! Cascade id of the Xi prong in Xic -> Xi pi pi candidates
248249
DECLARE_SOA_COLUMN(Prong0Pt, prong0Pt, float); //! Track pT of charm hadron prong0
249250
DECLARE_SOA_COLUMN(Prong1Pt, prong1Pt, float); //! Track pT of charm hadron prong1
250251
DECLARE_SOA_COLUMN(Prong2Pt, prong2Pt, float); //! Track pT of charm hadron prong2
@@ -258,9 +259,18 @@ DECLARE_SOA_COLUMN(CandidateSelFlag, candidateSelFlag, int); //! Selection o
258259
DECLARE_SOA_COLUMN(BDTBkg, bdtBkg, float); //! Background score using Boosted Decision Tree for charm hadron
259260
DECLARE_SOA_COLUMN(BDTPrompt, bdtPrompt, float); //! Prompt signal score using Boosted Decision Tree for charm hadron
260261
DECLARE_SOA_COLUMN(BDTFD, bdtFD, float); //! Feed-down score using Boosted Decision Tree for charm hadron
261-
DECLARE_SOA_COLUMN(InvMassCharm, invMassCharm, float); //! Reconstructed invariant mass of charm hadron (e.g. invMassXicPlus for Ξc± → Ξππ)
262+
DECLARE_SOA_COLUMN(CascBachelorTrackId, cascBachelorTrackId, int); //! Bachelor track ID from Xi cascade (Xic -> Xi pi pi)
262263
DECLARE_SOA_COLUMN(CascPosTrackId, cascPosTrackId, int); //! Positive track ID from Λ in Ξ cascade (Ξc± → Ξππ)
263264
DECLARE_SOA_COLUMN(CascNegTrackId, cascNegTrackId, int); //! Negative track ID from Λ in Ξ cascade (Ξc± → Ξππ)
265+
DECLARE_SOA_COLUMN(CascBachelorPt, cascBachelorPt, float); //! pT of the bachelor track from the Xi cascade
266+
DECLARE_SOA_COLUMN(CascBachelorPhi, cascBachelorPhi, float); //! phi of the bachelor track from the Xi cascade
267+
DECLARE_SOA_COLUMN(CascBachelorEta, cascBachelorEta, float); //! eta of the bachelor track from the Xi cascade
268+
DECLARE_SOA_COLUMN(CascPosPt, cascPosPt, float); //! pT of the positive Lambda daughter track from the Xi cascade
269+
DECLARE_SOA_COLUMN(CascPosPhi, cascPosPhi, float); //! phi of the positive Lambda daughter track from the Xi cascade
270+
DECLARE_SOA_COLUMN(CascPosEta, cascPosEta, float); //! eta of the positive Lambda daughter track from the Xi cascade
271+
DECLARE_SOA_COLUMN(CascNegPt, cascNegPt, float); //! pT of the negative Lambda daughter track from the Xi cascade
272+
DECLARE_SOA_COLUMN(CascNegPhi, cascNegPhi, float); //! phi of the negative Lambda daughter track from the Xi cascade
273+
DECLARE_SOA_COLUMN(CascNegEta, cascNegEta, float); //! eta of the negative Lambda daughter track from the Xi cascade
264274
DECLARE_SOA_COLUMN(FlagMc, flagMc, int); //! To select MC particle among charm hadrons, { DplusToPiKPi = 1, LcToPKPi = 17, DsToKKPi = 6, XicToPKPi = 21, XicToXiPiPi = 1, N3ProngD = 2ecays };
265275
DECLARE_SOA_COLUMN(OriginMcRec, originMcRec, int); //! flag for reconstruction level matching (1 for prompt, 2 for non-prompt)
266276
DECLARE_SOA_COLUMN(OriginMcGen, originMcGen, int); //! flag for generator level matching (1 for prompt, 2 for non-prompt)
@@ -391,6 +401,16 @@ DECLARE_SOA_DYNAMIC_COLUMN(Eta, eta,
391401
RecoDecayPtEtaPhi::pVector(pt2, eta2, phi2))); }); //! Eta distribution of charm hadron
392402
} // namespace fdhf_dstar
393403

404+
namespace fdhf_xic
405+
{
406+
DECLARE_SOA_DYNAMIC_COLUMN(Y, y, //!
407+
[](float pt0, float phi0, float eta0, float pt1, float phi1, float eta1, float pt2, float phi2, float eta2) -> float { return RecoDecay::y(RecoDecay::pVec(
408+
RecoDecayPtEtaPhi::pVector(pt0, eta0, phi0),
409+
RecoDecayPtEtaPhi::pVector(pt1, eta1, phi1),
410+
RecoDecayPtEtaPhi::pVector(pt2, eta2, phi2)),
411+
o2::constants::physics::MassXiCPlus); }); //! Rapidity distribution of Xic candidates
412+
} // namespace fdhf_xic
413+
394414
DECLARE_SOA_TABLE(FDHfCand3Prong, "AOD", "FDHFCAND3PRONG", //! Table to store the derived data for charm 3prong candidates
395415
o2::soa::Index<>,
396416
femtodreamparticle::FDCollisionId,
@@ -419,11 +439,48 @@ DECLARE_SOA_TABLE(FDHfCand3Prong, "AOD", "FDHFCAND3PRONG", //! Table to store th
419439
fdhf::Phi<fdhf::Prong0Pt, fdhf::Prong0Phi, fdhf::Prong0Eta, fdhf::Prong1Pt, fdhf::Prong1Phi, fdhf::Prong1Eta, fdhf::Prong2Pt, fdhf::Prong2Phi, fdhf::Prong2Eta>,
420440
fdhf::Pt<fdhf::Prong0Pt, fdhf::Prong0Phi, fdhf::Prong0Eta, fdhf::Prong1Pt, fdhf::Prong1Phi, fdhf::Prong1Eta, fdhf::Prong2Pt, fdhf::Prong2Phi, fdhf::Prong2Eta>);
421441

422-
DECLARE_SOA_TABLE(FDHfCand3ProngXic, "AOD", "FDHFCAND3PRONGXIC", //! Extension table for Ξc± → Ξππ candidates (aligned rows with FDHfCand3Prong)
442+
DECLARE_SOA_TABLE(FDHfCand3ProngXic, "AOD", "FDHFCAND3PRONGXIC", //! Table to store the derived data for Xic -> Xi pi pi candidates
423443
o2::soa::Index<>,
424-
fdhf::InvMassCharm,
444+
femtodreamparticle::FDCollisionId,
445+
fdhf::TimeStamp,
446+
fdhf::Charge,
447+
fdhf::XiProngId,
448+
fdhf::Prong1Id,
449+
fdhf::Prong2Id,
450+
fdhf::CascBachelorTrackId,
425451
fdhf::CascPosTrackId,
426-
fdhf::CascNegTrackId);
452+
fdhf::CascNegTrackId,
453+
fdhf::Prong0Pt,
454+
fdhf::Prong1Pt,
455+
fdhf::Prong2Pt,
456+
fdhf::Prong0Eta,
457+
fdhf::Prong1Eta,
458+
fdhf::Prong2Eta,
459+
fdhf::Prong0Phi,
460+
fdhf::Prong1Phi,
461+
fdhf::Prong2Phi,
462+
fdhf::CandidateSelFlag,
463+
fdhf::BDTBkg,
464+
fdhf::BDTPrompt,
465+
fdhf::BDTFD,
466+
fdhf::M<fdhf::Prong0Pt, fdhf::Prong0Phi, fdhf::Prong0Eta, fdhf::Prong1Pt, fdhf::Prong1Phi, fdhf::Prong1Eta, fdhf::Prong2Pt, fdhf::Prong2Phi, fdhf::Prong2Eta>,
467+
fdhf::P<fdhf::Prong0Pt, fdhf::Prong0Phi, fdhf::Prong0Eta, fdhf::Prong1Pt, fdhf::Prong1Phi, fdhf::Prong1Eta, fdhf::Prong2Pt, fdhf::Prong2Phi, fdhf::Prong2Eta>,
468+
fdhf_xic::Y<fdhf::Prong0Pt, fdhf::Prong0Phi, fdhf::Prong0Eta, fdhf::Prong1Pt, fdhf::Prong1Phi, fdhf::Prong1Eta, fdhf::Prong2Pt, fdhf::Prong2Phi, fdhf::Prong2Eta>,
469+
fdhf::Eta<fdhf::Prong0Pt, fdhf::Prong0Phi, fdhf::Prong0Eta, fdhf::Prong1Pt, fdhf::Prong1Phi, fdhf::Prong1Eta, fdhf::Prong2Pt, fdhf::Prong2Phi, fdhf::Prong2Eta>,
470+
fdhf::Phi<fdhf::Prong0Pt, fdhf::Prong0Phi, fdhf::Prong0Eta, fdhf::Prong1Pt, fdhf::Prong1Phi, fdhf::Prong1Eta, fdhf::Prong2Pt, fdhf::Prong2Phi, fdhf::Prong2Eta>,
471+
fdhf::Pt<fdhf::Prong0Pt, fdhf::Prong0Phi, fdhf::Prong0Eta, fdhf::Prong1Pt, fdhf::Prong1Phi, fdhf::Prong1Eta, fdhf::Prong2Pt, fdhf::Prong2Phi, fdhf::Prong2Eta>);
472+
473+
DECLARE_SOA_TABLE(FDHfCand3ProngXicQa, "AOD", "FDHFCAND3PXICQA", //! QA extension table for Xi daughters in Xic -> Xi pi pi candidates
474+
o2::soa::Index<>,
475+
fdhf::CascBachelorPt,
476+
fdhf::CascBachelorPhi,
477+
fdhf::CascBachelorEta,
478+
fdhf::CascPosPt,
479+
fdhf::CascPosPhi,
480+
fdhf::CascPosEta,
481+
fdhf::CascNegPt,
482+
fdhf::CascNegPhi,
483+
fdhf::CascNegEta);
427484

428485
DECLARE_SOA_TABLE(FDHfCand2Prong, "AOD", "FDHFCAND2PRONG", //! Table to store the derived data for charm 3prong candidates
429486
o2::soa::Index<>,

PWGHF/HFC/TableProducer/producerCharmHadronsTrackFemtoDream.cxx

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ struct HfProducerCharmHadronsTrackFemtoDream {
118118
Produces<aod::FDColMasks> rowMasks;
119119
Produces<aod::FDHfCand3Prong> rowCandCharm3Prong;
120120
Produces<aod::FDHfCand3ProngXic> rowCandCharm3ProngXic;
121+
Produces<aod::FDHfCand3ProngXicQa> rowCandCharm3ProngXicQa;
121122
Produces<aod::FDHfCand2Prong> rowCandCharm2Prong;
122123
Produces<aod::FDHfCandDstar> rowCandCharmDstar;
123124
Produces<aod::FDHfCandMC> rowCandMcCharmHad;
@@ -935,8 +936,6 @@ struct HfProducerCharmHadronsTrackFemtoDream {
935936
fillMcCollision(col);
936937
}
937938

938-
tables.rowCandCharm3Prong.reserve(sizeCand);
939-
tables.rowCandCharm3ProngXic.reserve(sizeCand);
940939
bool isTrackFilled = false;
941940
int nSelectedXic = 0;
942941

@@ -976,14 +975,20 @@ struct HfProducerCharmHadronsTrackFemtoDream {
976975
const auto phi0 = static_cast<float>(RecoDecay::phi(candidate.pxProng0(), candidate.pyProng0()));
977976
const auto phi1 = static_cast<float>(RecoDecay::phi(candidate.pxProng1(), candidate.pyProng1()));
978977
const auto phi2 = static_cast<float>(RecoDecay::phi(candidate.pxProng2(), candidate.pyProng2()));
978+
const auto cascBachelorTrack = tracks.rawIteratorAt(candidate.bachelorId());
979+
const auto cascPosTrack = tracks.rawIteratorAt(candidate.posTrackId());
980+
const auto cascNegTrack = tracks.rawIteratorAt(candidate.negTrackId());
979981

980-
tables.rowCandCharm3Prong(
982+
tables.rowCandCharm3ProngXic(
981983
tables.outputCollision.lastIndex(),
982984
timeStamp,
983985
candidate.sign(),
986+
candidate.cascadeId(),
984987
candidate.pi0Id(),
985988
candidate.pi1Id(),
986989
candidate.bachelorId(),
990+
candidate.posTrackId(),
991+
candidate.negTrackId(),
987992
candidate.ptProng0(),
988993
candidate.ptProng1(),
989994
candidate.ptProng2(),
@@ -998,10 +1003,16 @@ struct HfProducerCharmHadronsTrackFemtoDream {
9981003
outputMlXic.at(1),
9991004
outputMlXic.at(2));
10001005

1001-
tables.rowCandCharm3ProngXic(
1002-
candidate.invMassXicPlus(),
1003-
candidate.posTrackId(),
1004-
candidate.negTrackId());
1006+
tables.rowCandCharm3ProngXicQa(
1007+
cascBachelorTrack.pt(),
1008+
cascBachelorTrack.phi(),
1009+
cascBachelorTrack.eta(),
1010+
cascPosTrack.pt(),
1011+
cascPosTrack.phi(),
1012+
cascPosTrack.eta(),
1013+
cascNegTrack.pt(),
1014+
cascNegTrack.phi(),
1015+
cascNegTrack.eta());
10051016

10061017
++nSelectedXic;
10071018
if constexpr (IsMc) {

PWGHF/HFC/Tasks/taskCharmHadronsTrackFemtoDream.cxx

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ struct HfTaskCharmHadronsTrackFemtoDream {
165165
using FilteredCharmCand3Prongs = soa::Filtered<aod::FDHfCand3Prong>;
166166
using FilteredCharmCand3Prong = FilteredCharmCand3Prongs::iterator;
167167

168-
using FilteredCharmCand3ProngsXic = soa::Filtered<soa::Join<aod::FDHfCand3Prong, aod::FDHfCand3ProngXic>>;
168+
using FilteredCharmCand3ProngsXic = soa::Filtered<aod::FDHfCand3ProngXic>;
169169
using FilteredCharmCand3ProngXic = FilteredCharmCand3ProngsXic::iterator;
170170

171171
using FilteredCharmCand2Prongs = soa::Filtered<aod::FDHfCand2Prong>;
@@ -177,7 +177,7 @@ struct HfTaskCharmHadronsTrackFemtoDream {
177177
using FilteredCharmMcCand3Prongs = soa::Filtered<soa::Join<aod::FDHfCand3Prong, aod::FDHfCandMC>>;
178178
using FilteredCharmMcCand3Prong = FilteredCharmMcCand3Prongs::iterator;
179179

180-
using FilteredCharmMcCand3ProngsXic = soa::Filtered<soa::Join<aod::FDHfCand3Prong, aod::FDHfCand3ProngXic, aod::FDHfCandMC>>;
180+
using FilteredCharmMcCand3ProngsXic = soa::Filtered<soa::Join<aod::FDHfCand3ProngXic, aod::FDHfCandMC>>;
181181
using FilteredCharmMcCand3ProngXic = FilteredCharmMcCand3ProngsXic::iterator;
182182

183183
using FilteredCharmMcCand2Prongs = soa::Filtered<soa::Join<aod::FDHfCand2Prong, aod::FDHfCandMC>>;
@@ -402,7 +402,8 @@ struct HfTaskCharmHadronsTrackFemtoDream {
402402
return mDstar - mD0;
403403
}
404404
} else if constexpr (Channel == DecayChannel::XicToXiPiPi) {
405-
return cand.invMassCharm();
405+
invMass = cand.m(std::array{MassXiMinus, MassPiPlus, MassPiPlus});
406+
return invMass;
406407
}
407408
// Add more channels as needed
408409
return 0.f;
@@ -527,7 +528,8 @@ struct HfTaskCharmHadronsTrackFemtoDream {
527528
}
528529

529530
if constexpr (Channel == DecayChannel::XicToXiPiPi) {
530-
if (p1.trackId() == p2.prong0Id() || p1.trackId() == p2.prong1Id() || p1.trackId() == p2.prong2Id() ||
531+
if (p1.trackId() == p2.prong1Id() || p1.trackId() == p2.prong2Id() ||
532+
p1.trackId() == p2.cascBachelorTrackId() ||
531533
p1.trackId() == p2.cascPosTrackId() || p1.trackId() == p2.cascNegTrackId()) {
532534
continue;
533535
}
@@ -536,10 +538,6 @@ struct HfTaskCharmHadronsTrackFemtoDream {
536538
continue;
537539
}
538540
}
539-
540-
if (!pairCleaner3Prong.isCleanPair(p1, p2, parts)) {
541-
continue;
542-
}
543541
}
544542

545543
if constexpr (Channel == DecayChannel::DstarToD0Pi) {
@@ -659,7 +657,7 @@ struct HfTaskCharmHadronsTrackFemtoDream {
659657
}
660658
}
661659

662-
if constexpr (Channel == DecayChannel::DplusToPiKPi || Channel == DecayChannel::LcToPKPi || Channel == DecayChannel::XicToXiPiPi) {
660+
if constexpr (Channel == DecayChannel::DplusToPiKPi || Channel == DecayChannel::LcToPKPi) {
663661

664662
if (pairQASetting.useCPR.value) {
665663
if (pairCloseRejectionME3Prong.isClosePair(p1, p2, parts, collision1.magField())) {
@@ -672,6 +670,14 @@ struct HfTaskCharmHadronsTrackFemtoDream {
672670
}
673671
}
674672

673+
if constexpr (Channel == DecayChannel::XicToXiPiPi) {
674+
if (pairQASetting.useCPR.value) {
675+
if (pairCloseRejectionME3Prong.isClosePair(p1, p2, parts, collision1.magField())) {
676+
continue;
677+
}
678+
}
679+
}
680+
675681
if constexpr (Channel == DecayChannel::DstarToD0Pi) {
676682

677683
if (pairQASetting.useCPR.value) {
@@ -764,7 +770,7 @@ struct HfTaskCharmHadronsTrackFemtoDream {
764770

765771
timeStamp = part.timeStamp();
766772

767-
if constexpr (Channel == DecayChannel::DplusToPiKPi || Channel == DecayChannel::LcToPKPi || Channel == DecayChannel::XicToXiPiPi) {
773+
if constexpr (Channel == DecayChannel::DplusToPiKPi || Channel == DecayChannel::LcToPKPi) {
768774

769775
rowFemtoResultCharm3Prong(
770776
col.globalIndex(),
@@ -780,6 +786,21 @@ struct HfTaskCharmHadronsTrackFemtoDream {
780786
part.bdtBkg(),
781787
part.bdtPrompt(),
782788
part.bdtFD());
789+
} else if constexpr (Channel == DecayChannel::XicToXiPiPi) {
790+
rowFemtoResultCharm3Prong(
791+
col.globalIndex(),
792+
timeStamp,
793+
invMass,
794+
part.pt(),
795+
part.eta(),
796+
part.phi(),
797+
part.xiProngId(),
798+
part.prong1Id(),
799+
part.prong2Id(),
800+
part.charge(),
801+
part.bdtBkg(),
802+
part.bdtPrompt(),
803+
part.bdtFD());
783804
} else if constexpr (Channel == DecayChannel::D0ToPiK) {
784805
rowFemtoResultCharm2Prong(
785806
col.globalIndex(),

0 commit comments

Comments
 (0)