Skip to content

Commit c736365

Browse files
authored
Update treeCreatorOmegacToOmegaPi.cxx
1 parent fcf683c commit c736365

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

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)