Skip to content

Commit edb8bc0

Browse files
FDUEnrichalibuild
andauthored
[PWGHF] Save only mc signal in treecreator. (#9934)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent de4bfd1 commit edb8bc0

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

PWGHF/TableProducer/candidateSelectorOmegac0ToOmegaPi.cxx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ struct HfCandidateSelectorToOmegaPi {
156156
HistogramRegistry registry{"registry"}; // for QA of selections
157157

158158
OutputObj<TH1D> hInvMassCharmBaryon{TH1D("hInvMassCharmBaryon", "Charm baryon invariant mass;inv mass;entries", 500, 2.3, 3.1)};
159+
OutputObj<TH1D> hPtCharmBaryon{TH1D("hPtCharmBaryon", "Charm baryon transverse momentum before sel;Pt;entries", 8000, 0., 80)};
159160

160161
void init(InitContext const&)
161162
{
@@ -192,6 +193,7 @@ struct HfCandidateSelectorToOmegaPi {
192193
registry.add("hStatusCheck", "Check consecutive selections status;status;entries", {HistType::kTH1D, {{12, 0., 12.}}});
193194

194195
// for QA of the selections (bin 0 -> candidates that did not pass the selection, bin 1 -> candidates that passed the selection)
196+
registry.add("hSelPtOmegac", "hSelPtOmegac;status;entries", {HistType::kTH1D, {axisSel}});
195197
registry.add("hSelSignDec", "hSelSignDec;status;entries", {HistType::kTH1D, {axisSel}});
196198
registry.add("hSelEtaPosV0Dau", "hSelEtaPosV0Dau;status;entries", {HistType::kTH1D, {axisSel}});
197199
registry.add("hSelEtaNegV0Dau", "hSelEtaNegV0Dau;status;entries", {HistType::kTH1D, {axisSel}});
@@ -425,6 +427,15 @@ struct HfCandidateSelectorToOmegaPi {
425427
}
426428
}
427429

430+
// Omegac Pt selection
431+
hPtCharmBaryon->Fill(std::abs(candidate.kfptOmegac()));
432+
if (std::abs(candidate.kfptOmegac()) < ptCandMin || std::abs(candidate.kfptOmegac()) > ptCandMax) {
433+
resultSelections = false;
434+
registry.fill(HIST("hSelPtOmegac"), 0);
435+
} else {
436+
registry.fill(HIST("hSelPtOmegac"), 1);
437+
}
438+
428439
// v0&Casc&Omegac ldl selection
429440
if ((candidate.v0ldl() < v0LdlMin) || (candidate.cascldl() < cascLdlMin) || (candidate.omegacldl() > omegacLdlMax)) {
430441
resultSelections = false;

PWGHF/TableProducer/treeCreatorOmegacToOmegaPi.cxx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ struct HfTreeCreatorOmegac0ToOmegaPi {
207207
Produces<o2::aod::HfToOmegaPiEvs> rowEv;
208208

209209
Configurable<float> zPvCut{"zPvCut", 10., "Cut on absolute value of primary vertex z coordinate"};
210+
Configurable<bool> keepOnlyMcSignal{"keepOnlyMcSignal", true, "Fill MC tree only with signal candidates"};
210211

211212
using MyTrackTable = soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra>;
212213
using MyEventTable = soa::Join<aod::Collisions, aod::EvSels>;
@@ -425,7 +426,13 @@ struct HfTreeCreatorOmegac0ToOmegaPi {
425426
// Filling candidate properties
426427
rowCandidateLite.reserve(candidates.size());
427428
for (const auto& candidate : candidates) {
428-
fillKfCandidate(candidate, candidate.flagMcMatchRec(), candidate.originRec(), candidate.collisionMatched());
429+
if (keepOnlyMcSignal) {
430+
if (candidate.originRec() != 0) {
431+
fillKfCandidate(candidate, candidate.flagMcMatchRec(), candidate.originRec(), candidate.collisionMatched());
432+
}
433+
} else {
434+
fillKfCandidate(candidate, candidate.flagMcMatchRec(), candidate.originRec(), candidate.collisionMatched());
435+
}
429436
}
430437
}
431438
PROCESS_SWITCH(HfTreeCreatorOmegac0ToOmegaPi, processKFMcFull, "Process KF MC", false);

0 commit comments

Comments
 (0)