Skip to content

Commit c67a2d6

Browse files
PWGHF: Adding possibility to store correlated bkg from D+ and Ds in D+ tree
1 parent 406d763 commit c67a2d6

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

PWGHF/TableProducer/candidateSelectorDplusToPiKPi.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ struct HfCandidateSelectorDplusToPiKPi {
6060
Configurable<std::vector<double>> binsPtTrack{"binsPtTrack", std::vector<double>{hf_cuts_single_track::vecBinsPtTrack}, "track pT bin limits for DCA pT-dependent cut"};
6161
// QA switch
6262
Configurable<bool> activateQA{"activateQA", false, "Flag to enable QA histogram"};
63+
// Correlated bakcground from Ds and D+
64+
Configurable<bool> storeDsDplusBkg{"storeDsBkg", false, "Flag to store correlated background from misidentified product of Ds and D+ decay"};
6365
// ML inference
6466
Configurable<bool> applyMl{"applyMl", false, "Flag to apply ML selections"};
6567
Configurable<std::vector<double>> binsPtMl{"binsPtMl", std::vector<double>{hf_cuts_ml::vecBinsPt}, "pT bin limits for ML application"};
@@ -223,7 +225,7 @@ struct HfCandidateSelectorDplusToPiKPi {
223225

224226
auto ptCand = candidate.pt();
225227

226-
if (!TESTBIT(candidate.hfflag(), aod::hf_cand_3prong::DecayType::DplusToPiKPi)) {
228+
if (!TESTBIT(candidate.hfflag(), aod::hf_cand_3prong::DecayType::DplusToPiKPi) && !(storeDsDplusBkg && TESTBIT(candidate.hfflag(), aod::hf_cand_3prong::DecayType::DsToKKPi))) { // DecayType::DsToKKPi is used to flag both Ds± → K± K∓ π± and D± → K± K∓ π±
227229
hfSelDplusToPiKPiCandidate(statusDplusToPiKPi);
228230
if (applyMl) {
229231
hfMlDplusToPiKPiCandidate(outputMlNotPreselected);

PWGHF/TableProducer/treeCreatorDplusToPiKPi.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ struct HfTreeCreatorDplusToPiKPi {
249249
Filter filterSelectCandidates = aod::hf_sel_candidate_dplus::isSelDplusToPiKPi >= selectionFlagDplus;
250250
Filter filterMcGenMatching = nabs(o2::aod::hf_cand_3prong::flagMcMatchGen) == static_cast<int8_t>(BIT(aod::hf_cand_3prong::DecayType::DplusToPiKPi));
251251

252-
Partition<SelectedCandidatesMc> reconstructedCandSig = nabs(aod::hf_cand_3prong::flagMcMatchRec) == static_cast<int8_t>(BIT(aod::hf_cand_3prong::DecayType::DplusToPiKPi));
252+
Partition<SelectedCandidatesMc> reconstructedCandSig = nabs(aod::hf_cand_3prong::flagMcMatchRec) == static_cast<int8_t>(BIT(aod::hf_cand_3prong::DecayType::DplusToPiKPi)) || nabs(aod::hf_cand_3prong::flagMcMatchRec) == static_cast<int8_t>(BIT(aod::hf_cand_3prong::DecayType::DsToKKPi)); // DecayType::DsToKKPi is used to flag both Ds± → K± K∓ π± and D± → K± K∓ π±
253253
Partition<SelectedCandidatesMc> reconstructedCandBkg = nabs(aod::hf_cand_3prong::flagMcMatchRec) != static_cast<int8_t>(BIT(aod::hf_cand_3prong::DecayType::DplusToPiKPi));
254254

255255
void init(InitContext const&)

0 commit comments

Comments
 (0)