Skip to content

Commit 2f27fc3

Browse files
mfagginMattia Faggin
andauthored
PWGHF: first checked implementation of Xic->pKpi filtering (#5436)
* PWGHF: first checked code of Xic->pKpi filtering * Update HFSecondaryVertex.h * Update HFXicCandidateSelector.cxx * Fix code with camelCase syntax conventions * Fix code syntax conventions for Xic methods * PWGHF: further fixes for Xic to pKpi filtering and analysis - (HFCandidateCreator3Prong.cxx) remove refuse std::move, forgot in the middle of the for loop - (HFCandidateCreator3Prong.cxx) fix if statement condition for isMatchedMCGen - (taskXic.cxx) fix MC histogram titles * PWGHF: avoid storing return values of RecoDecay::getMatchedMCRec and isMatchedMCGen for Xic->pKpi * PWGHF: pair Xic code with adaptAnalysisTask and charge() changes * PWGHF: remove check for charge to be different from 0 * PWGHF: change label_as into mcParticle_as in taskXic * PWGHF: fix particle label for ct distribution in taskXic * PWGHF: remove selection flag for Xicbar (obsolete) from taskXic Co-authored-by: Mattia Faggin <mfaggin@cern.ch>
1 parent 56fe695 commit 2f27fc3

8 files changed

Lines changed: 718 additions & 5 deletions

File tree

Analysis/Core/include/AnalysisCore/HFConfigurables.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ class HFTrackIndexSkimsCreatorConfigs
5454
double mInvMassDsToPiKKMax = 2.15; //original value 2.2
5555
double mCPADsToPiKKMin = 0.5;
5656
double mDecLenDsToPiKKMin = 0.;
57+
// 3-prong cuts - XicToPKPi
58+
double mPtXicToPKPiMin = 1.; //
59+
double mInvMassXicToPKPiMin = 2.25; //
60+
double mInvMassXicToPKPiMax = 2.70; //
61+
double mCPAXicToPKPiMin = 0.5;
62+
double mDecLenXicToPKPiMin = 0.;
5763

5864
private:
5965
ClassDef(HFTrackIndexSkimsCreatorConfigs, 1);

Analysis/DataModel/include/AnalysisDataModel/HFCandidateSelectionTables.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,14 @@ DECLARE_SOA_COLUMN(IsSelJpsiToEE, isSelJpsiToEE, int);
3939
} // namespace hf_selcandidate_jpsi
4040
DECLARE_SOA_TABLE(HFSelJpsiToEECandidate, "AOD", "HFSELJPSICAND", hf_selcandidate_jpsi::IsSelJpsiToEE);
4141
} // namespace o2::aod
42+
43+
namespace o2::aod
44+
{
45+
namespace hf_selcandidate_xic
46+
{
47+
DECLARE_SOA_COLUMN(IsSelXicToPKPi, isSelXicToPKPi, int);
48+
DECLARE_SOA_COLUMN(IsSelXicToPiKP, isSelXicToPiKP, int);
49+
} // namespace hf_selcandidate_xic
50+
DECLARE_SOA_TABLE(HFSelXicToPKPiCandidate, "AOD", "HFSELXICCAND", hf_selcandidate_xic::IsSelXicToPKPi, hf_selcandidate_xic::IsSelXicToPiKP);
51+
} // namespace o2::aod
4252
#endif // O2_ANALYSIS_HFCANDIDATESELECTIONTABLES_H_

Analysis/DataModel/include/AnalysisDataModel/HFSecondaryVertex.h

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ DECLARE_SOA_COLUMN(JpsiToEEFlag, jpsiToEEFlag, uint8_t);
5555
DECLARE_SOA_COLUMN(DPlusPiKPiFlag, dPlusPiKPiFlag, uint8_t);
5656
DECLARE_SOA_COLUMN(LcPKPiFlag, lcPKPiFlag, uint8_t);
5757
DECLARE_SOA_COLUMN(DsKKPiFlag, dsKKPiFlag, uint8_t);
58+
DECLARE_SOA_COLUMN(XicToPKPiFlag, xicToPKPiFlag, uint8_t);
5859
} // namespace hf_track_index
5960

6061
DECLARE_SOA_TABLE(HfTrackIndexProng2, "AOD", "HFTRACKIDXP2",
@@ -75,7 +76,8 @@ DECLARE_SOA_TABLE(HfTrackIndexProng3, "AOD", "HFTRACKIDXP3",
7576
DECLARE_SOA_TABLE(HfCutStatusProng3, "AOD", "HFCUTSTATUSP3",
7677
hf_track_index::DPlusPiKPiFlag,
7778
hf_track_index::LcPKPiFlag,
78-
hf_track_index::DsKKPiFlag);
79+
hf_track_index::DsKKPiFlag,
80+
hf_track_index::XicToPKPiFlag);
7981

8082
// general decay properties
8183
namespace hf_cand
@@ -312,6 +314,7 @@ DECLARE_SOA_DYNAMIC_COLUMN(MaxNormalisedDeltaIP, maxNormalisedDeltaIP, [](float
312314
// MC matching result:
313315
// - ±DPlusToPiKPi: D± → π± K∓ π±
314316
// - ±LcToPKPi: Λc± → p± K∓ π±
317+
// - ±XicToPKPi: Ξc± → p± K∓ π±
315318
DECLARE_SOA_COLUMN(FlagMCMatchRec, flagMCMatchRec, int8_t); // reconstruction level
316319
DECLARE_SOA_COLUMN(FlagMCMatchGen, flagMCMatchGen, int8_t); // generator level
317320
DECLARE_SOA_COLUMN(FlagMCDecayChanRec, flagMCDecayChanRec, int8_t); // Resonant decay channel flag, reconstruction level
@@ -321,6 +324,7 @@ DECLARE_SOA_COLUMN(FlagMCDecayChanGen, flagMCDecayChanGen, int8_t); // Resonant
321324
enum DecayType { DPlusToPiKPi = 0,
322325
LcToPKPi,
323326
DsToPiKK,
327+
XicToPKPi,
324328
N3ProngDecays }; //always keep N3ProngDecays at the end
325329

326330
// functions for specific particles
@@ -382,6 +386,38 @@ auto InvMassLcpiKp(const T& candidate)
382386
{
383387
return candidate.m(array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kKPlus), RecoDecay::getMassPDG(kProton)});
384388
}
389+
390+
// Ξc± → p± K∓ π±
391+
392+
template <typename T>
393+
auto CtXic(const T& candidate)
394+
{
395+
return candidate.ct(RecoDecay::getMassPDG(4232));
396+
}
397+
398+
template <typename T>
399+
auto YXic(const T& candidate)
400+
{
401+
return candidate.y(RecoDecay::getMassPDG(4232));
402+
}
403+
404+
template <typename T>
405+
auto EXic(const T& candidate)
406+
{
407+
return candidate.e(RecoDecay::getMassPDG(4232));
408+
}
409+
410+
template <typename T>
411+
auto InvMassXicToPKPi(const T& candidate)
412+
{
413+
return InvMassLcpKpi(candidate);
414+
}
415+
416+
template <typename T>
417+
auto InvMassXicToPiKP(const T& candidate)
418+
{
419+
return InvMassLcpiKp(candidate);
420+
}
385421
} // namespace hf_cand_prong3
386422

387423
// 3-prong decay candidate table

Analysis/Tasks/PWGHF/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ o2_add_dpl_workflow(hf-jpsi-toee-candidate-selector
6868
PUBLIC_LINK_LIBRARIES O2::Framework O2::AnalysisDataModel O2::AnalysisCore O2::DetectorsVertexing
6969
COMPONENT_NAME Analysis)
7070

71+
o2_add_dpl_workflow(hf-xic-topkpi-candidate-selector
72+
SOURCES HFXicToPKPiCandidateSelector.cxx
73+
PUBLIC_LINK_LIBRARIES O2::Framework O2::AnalysisDataModel O2::AnalysisCore O2::DetectorsVertexing
74+
COMPONENT_NAME Analysis)
75+
7176
o2_add_dpl_workflow(hf-task-d0
7277
SOURCES taskD0.cxx
7378
PUBLIC_LINK_LIBRARIES O2::Framework O2::AnalysisDataModel O2::AnalysisCore O2::DetectorsVertexing
@@ -93,6 +98,11 @@ o2_add_dpl_workflow(hf-task-bplus
9398
PUBLIC_LINK_LIBRARIES O2::Framework O2::AnalysisDataModel O2::AnalysisCore O2::DetectorsVertexing
9499
COMPONENT_NAME Analysis)
95100

101+
o2_add_dpl_workflow(hf-task-xic
102+
SOURCES taskXic.cxx
103+
PUBLIC_LINK_LIBRARIES O2::Framework O2::AnalysisDataModel O2::AnalysisCore O2::DetectorsVertexing
104+
COMPONENT_NAME Analysis)
105+
96106
o2_add_dpl_workflow(hf-mc-validation
97107
SOURCES HFMCValidation.cxx
98108
PUBLIC_LINK_LIBRARIES O2::Framework O2::AnalysisDataModel O2::AnalysisCore O2::DetectorsVertexing

Analysis/Tasks/PWGHF/HFCandidateCreator3Prong.cxx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ struct HFCandidateCreator3ProngMC {
179179
// Λc± → p± K∓ π±
180180
if (flag == 0) {
181181
//Printf("Checking Λc± → p± K∓ π±");
182-
auto indexRecLc = RecoDecay::getMatchedMCRec(particlesMC, std::move(arrayDaughters), 4122, array{+kProton, -kKPlus, +kPiPlus}, true, &sign, 2);
182+
auto indexRecLc = RecoDecay::getMatchedMCRec(particlesMC, arrayDaughters, 4122, array{+kProton, -kKPlus, +kPiPlus}, true, &sign, 2);
183183
if (indexRecLc > -1) {
184184
flag = sign * (1 << LcToPKPi);
185185

@@ -201,6 +201,14 @@ struct HFCandidateCreator3ProngMC {
201201
}
202202
}
203203

204+
// Ξc± → p± K∓ π±
205+
if (flag == 0) {
206+
//Printf("Checking Ξc± → p± K∓ π±");
207+
if (RecoDecay::getMatchedMCRec(particlesMC, std::move(arrayDaughters), 4232, array{+kProton, -kKPlus, +kPiPlus}, true, &sign) > -1) {
208+
flag = sign * (1 << XicToPKPi);
209+
}
210+
}
211+
204212
rowMCMatchRec(flag, DecayChannel);
205213
}
206214

@@ -242,6 +250,14 @@ struct HFCandidateCreator3ProngMC {
242250
}
243251
}
244252

253+
// Ξc± → p± K∓ π±
254+
if (flag == 0) {
255+
//Printf("Checking Ξc± → p± K∓ π±");
256+
if (RecoDecay::isMatchedMCGen(particlesMC, particle, 4232, array{+kProton, -kKPlus, +kPiPlus}, true, &sign)) {
257+
flag = sign * (1 << XicToPKPi);
258+
}
259+
}
260+
245261
rowMCMatchGen(flag, DecayChannel);
246262
}
247263
}

Analysis/Tasks/PWGHF/HFTrackIndexSkimsCreator.cxx

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ struct HFTrackIndexSkimsCreator {
183183
{"hNCand3ProngVsNTracks", "3-prong candidates preselected;# of selected tracks;# of candidates;entries", {HistType::kTH2F, {{2500, 0., 25000.}, {5000, 0., 500000.}}}},
184184
{"hmassDPlusToPiKPi", "D+ candidates;inv. mass (#pi K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{500, 0., 5.}}}},
185185
{"hmassLcToPKPi", "Lc candidates;inv. mass (p K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{500, 0., 5.}}}},
186-
{"hmassDsToPiKK", "Ds candidates;inv. mass (K K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{500, 0., 5.}}}}}};
186+
{"hmassDsToPiKK", "Ds candidates;inv. mass (K K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{500, 0., 5.}}}},
187+
{"hmassXicToPKPi", "Xic candidates;inv. mass (p K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{500, 0., 5.}}}}}};
187188

188189
Filter filterSelectTracks = (aod::hf_seltrack::isSelProng > 0);
189190
using SelectedTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TracksCov, aod::TracksExtra, aod::HFSelTrack>>;
@@ -278,6 +279,12 @@ struct HFTrackIndexSkimsCreator {
278279
cut3ProngCPACandMin[DsToPiKK] = configs->mCPADsToPiKKMin;
279280
cut3ProngDecLenCandMin[DsToPiKK] = configs->mDecLenDsToPiKKMin;
280281

282+
cut3ProngPtCandMin[XicToPKPi] = configs->mPtXicToPKPiMin;
283+
cut3ProngInvMassCandMin[XicToPKPi] = configs->mInvMassXicToPKPiMin;
284+
cut3ProngInvMassCandMax[XicToPKPi] = configs->mInvMassXicToPKPiMax;
285+
cut3ProngCPACandMin[XicToPKPi] = configs->mCPAXicToPKPiMin;
286+
cut3ProngDecLenCandMin[XicToPKPi] = configs->mDecLenXicToPKPiMin;
287+
281288
bool cutStatus2Prong[n2ProngDecays][nCuts2Prong];
282289
bool cutStatus3Prong[n3ProngDecays][nCuts3Prong];
283290
int nCutStatus2ProngBit = TMath::Power(2, nCuts2Prong) - 1; //bit value for selection status for each 2 prongs candidate where each selection is one bit and they are all set it 1
@@ -295,11 +302,13 @@ struct HFTrackIndexSkimsCreator {
295302
arr3Mass1[DPlusToPiKPi] = array{massPi, massK, massPi};
296303
arr3Mass1[LcToPKPi] = array{massProton, massK, massPi};
297304
arr3Mass1[DsToPiKK] = array{massK, massK, massPi};
305+
arr3Mass1[XicToPKPi] = array{massProton, massK, massPi};
298306

299307
array<array<double, 3>, n3ProngDecays> arr3Mass2;
300308
arr3Mass2[DPlusToPiKPi] = array{massPi, massK, massPi};
301309
arr3Mass2[LcToPKPi] = array{massPi, massK, massProton};
302310
arr3Mass2[DsToPiKK] = array{massPi, massK, massK};
311+
arr3Mass2[XicToPKPi] = array{massPi, massK, massProton};
303312

304313
double mass2ProngHypo1[n2ProngDecays];
305314
double mass2ProngHypo2[n2ProngDecays];
@@ -631,7 +640,7 @@ struct HFTrackIndexSkimsCreator {
631640
}
632641
}
633642
}
634-
rowProng3CutStatus(Prong3CutStatus[0], Prong3CutStatus[1], Prong3CutStatus[2]); //FIXME when we can do this by looping over n3ProngDecays
643+
rowProng3CutStatus(Prong3CutStatus[0], Prong3CutStatus[1], Prong3CutStatus[2], Prong3CutStatus[3]); //FIXME when we can do this by looping over n3ProngDecays
635644
}
636645

637646
// fill histograms
@@ -654,6 +663,9 @@ struct HFTrackIndexSkimsCreator {
654663
if (n3 == DsToPiKK) {
655664
registry.get<TH1>(HIST("hmassDsToPiKK"))->Fill(mass3ProngHypo1[n3]);
656665
}
666+
if (n3 == XicToPKPi) {
667+
registry.get<TH1>(HIST("hmassXicToPKPi"))->Fill(mass3ProngHypo1[n3]);
668+
}
657669
}
658670
if ((cut3ProngInvMassCandMin[n3] < 0. && cut3ProngInvMassCandMax[n3] <= 0.) || (mass3ProngHypo2[n3] >= cut3ProngInvMassCandMin[n3] && mass3ProngHypo2[n3] < cut3ProngInvMassCandMax[n3])) {
659671
mass3ProngHypo2[n3] = RecoDecay::M(arr3Mom, arr3Mass2[n3]);
@@ -663,6 +675,9 @@ struct HFTrackIndexSkimsCreator {
663675
if (n3 == DsToPiKK) {
664676
registry.get<TH1>(HIST("hmassDsToPiKK"))->Fill(mass3ProngHypo2[n3]);
665677
}
678+
if (n3 == XicToPKPi) {
679+
registry.get<TH1>(HIST("hmassXicToPKPi"))->Fill(mass3ProngHypo2[n3]);
680+
}
666681
}
667682
}
668683
}
@@ -798,7 +813,7 @@ struct HFTrackIndexSkimsCreator {
798813
}
799814
}
800815
}
801-
rowProng3CutStatus(Prong3CutStatus[0], Prong3CutStatus[1], Prong3CutStatus[2]); //FIXME when we can do this by looping over n3ProngDecays
816+
rowProng3CutStatus(Prong3CutStatus[0], Prong3CutStatus[1], Prong3CutStatus[2], Prong3CutStatus[3]); //FIXME when we can do this by looping over n3ProngDecays
802817
}
803818

804819
// fill histograms
@@ -821,6 +836,9 @@ struct HFTrackIndexSkimsCreator {
821836
if (n3 == DsToPiKK) {
822837
registry.get<TH1>(HIST("hmassDsToPiKK"))->Fill(mass3ProngHypo1[n3]);
823838
}
839+
if (n3 == XicToPKPi) {
840+
registry.get<TH1>(HIST("hmassXicToPKPi"))->Fill(mass3ProngHypo1[n3]);
841+
}
824842
}
825843
if ((cut3ProngInvMassCandMin[n3] < 0. && cut3ProngInvMassCandMax[n3] <= 0.) || (mass3ProngHypo2[n3] >= cut3ProngInvMassCandMin[n3] && mass3ProngHypo2[n3] < cut3ProngInvMassCandMax[n3])) {
826844
mass3ProngHypo2[n3] = RecoDecay::M(arr3Mom, arr3Mass2[n3]);
@@ -830,6 +848,9 @@ struct HFTrackIndexSkimsCreator {
830848
if (n3 == DsToPiKK) {
831849
registry.get<TH1>(HIST("hmassDsToPiKK"))->Fill(mass3ProngHypo2[n3]);
832850
}
851+
if (n3 == XicToPKPi) {
852+
registry.get<TH1>(HIST("hmassXicToPKPi"))->Fill(mass3ProngHypo2[n3]);
853+
}
833854
}
834855
}
835856
}

0 commit comments

Comments
 (0)