diff --git a/PWGHF/D2H/Tasks/taskDs.cxx b/PWGHF/D2H/Tasks/taskDs.cxx index ed48130843e..7d2061e685f 100644 --- a/PWGHF/D2H/Tasks/taskDs.cxx +++ b/PWGHF/D2H/Tasks/taskDs.cxx @@ -51,7 +51,7 @@ struct HfTaskDs { Partition selectedDsToKKPiCand = aod::hf_sel_candidate_ds::isSelDsToKKPi >= selectionFlagDs; Partition selectedDsToPiKKCand = aod::hf_sel_candidate_ds::isSelDsToPiKK >= selectionFlagDs; - Partition reconstructedCandSig = nabs(aod::hf_cand_3prong::flagMcMatchRec) == static_cast(BIT(aod::hf_cand_3prong::DecayType::DsToKKPi)) && (aod::hf_cand_3prong::flagMcDecayChanRec == decayChannelDs || (FillDplusMC && aod::hf_cand_3prong::flagMcDecayChanRec == (decayChannelDplusMC + 2 ))); + Partition reconstructedCandSig = nabs(aod::hf_cand_3prong::flagMcMatchRec) == static_cast(BIT(aod::hf_cand_3prong::DecayType::DsToKKPi)) && (aod::hf_cand_3prong::flagMcDecayChanRec == decayChannelDs || (FillDplusMC && aod::hf_cand_3prong::flagMcDecayChanRec == (decayChannelDplusMC + 2))); Partition reconstructedCandBkg = nabs(aod::hf_cand_3prong::flagMcMatchRec) != static_cast(BIT(aod::hf_cand_3prong::DecayType::DsToKKPi)); HistogramRegistry registry{ @@ -202,8 +202,7 @@ struct HfTaskDs { { auto pt = candidate.pt(); // rec. level pT // Dplus - if (isDplus) - { + if (isDplus) { auto y = hfHelper.yDplus(candidate); registry.fill(HIST("hPtRecSigDplus"), pt); @@ -327,8 +326,7 @@ struct HfTaskDs { if (candidate.isCandidateSwapped() == 1) { // 1 corresponds to PiKK fillHistoMCRec(candidate, candidate.isSelDsToPiKK(), false); } - } - else if (FillDplusMC) { + } else if (FillDplusMC) { if (yCandRecoMax >= 0. && std::abs(hfHelper.yDplus(candidate)) > yCandRecoMax) { continue; } @@ -361,13 +359,12 @@ struct HfTaskDs { // MC gen. for (const auto& particle : mcParticles) { if (std::abs(particle.flagMcMatchGen()) == 1 << aod::hf_cand_3prong::DecayType::DsToKKPi) { - if (particle.flagMcDecayChanGen() == decayChannelDs || (FillDplusMC && particle.flagMcDecayChanGen() == (decayChannelDplusMC + 2))){ + if (particle.flagMcDecayChanGen() == decayChannelDs || (FillDplusMC && particle.flagMcDecayChanGen() == (decayChannelDplusMC + 2))) { auto pt = particle.pt(); auto y = 0; if (particle.flagMcDecayChanGen() == decayChannelDs) { y = RecoDecay::y(std::array{particle.px(), particle.py(), particle.pz()}, o2::constants::physics::MassDS); - } - else if (FillDplusMC) { + } else if (FillDplusMC) { y = RecoDecay::y(std::array{particle.px(), particle.py(), particle.pz()}, o2::constants::physics::MassDPlus); } if (yCandGenMax >= 0. && std::abs(y) > yCandGenMax) { @@ -386,8 +383,7 @@ struct HfTaskDs { registry.fill(HIST("hPtGenDsNonPrompt"), pt); registry.fill(HIST("hPtVsYGenDsNonPrompt"), pt, y); } - } - else if (FillDplusMC) { + } else if (FillDplusMC) { registry.fill(HIST("hPtGenDplus"), pt); registry.fill(HIST("hPtVsYGenDplus"), pt, y); registry.fill(HIST("hEtaGenDplus"), particle.eta()); @@ -400,8 +396,7 @@ struct HfTaskDs { registry.fill(HIST("hPtVsYGenDplusNonPrompt"), pt, y); } } - } - else { + } else { continue; } } diff --git a/PWGHF/DataModel/CandidateReconstructionTables.h b/PWGHF/DataModel/CandidateReconstructionTables.h index faff779006a..86ac79a6aea 100644 --- a/PWGHF/DataModel/CandidateReconstructionTables.h +++ b/PWGHF/DataModel/CandidateReconstructionTables.h @@ -771,8 +771,8 @@ enum DecayType { DplusToPiKPi = 0, enum DecayChannelDToKKPi { DsToPhiPi = 1, DsToK0starK, - DplusToPhiPi, // used to describe D+ in MC production for Ds analysis - DplusToK0starK // used to describe D+ in MC production for Ds analysis + DplusToPhiPi, // used to describe D+ in MC production for Ds analysis + DplusToK0starK // used to describe D+ in MC production for Ds analysis }; } // namespace hf_cand_3prong diff --git a/PWGHF/TableProducer/candidateCreator3Prong.cxx b/PWGHF/TableProducer/candidateCreator3Prong.cxx index 4628c6d10e3..75ae19651d4 100644 --- a/PWGHF/TableProducer/candidateCreator3Prong.cxx +++ b/PWGHF/TableProducer/candidateCreator3Prong.cxx @@ -320,8 +320,7 @@ struct HfCandidateCreator3ProngExpressions { channel = DecayChannelDToKKPi::DsToK0starK; } } - } - else { // Check for D± → K± K∓ π± + } else { // Check for D± → K± K∓ π± indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kDPlus, std::array{+kKPlus, -kKPlus, +kPiPlus}, true, &sign, 2); if (indexRec > -1) { flag = sign * (1 << DecayType::DsToKKPi); @@ -416,8 +415,7 @@ struct HfCandidateCreator3ProngExpressions { channel = DecayChannelDToKKPi::DsToK0starK; } } - } - else if (RecoDecay::isMatchedMCGen(mcParticles, particle, Pdg::kDPlus, std::array{+kKPlus, -kKPlus, +kPiPlus}, true, &sign, 2)) { // Check for D± → K± K∓ π± + } else if (RecoDecay::isMatchedMCGen(mcParticles, particle, Pdg::kDPlus, std::array{+kKPlus, -kKPlus, +kPiPlus}, true, &sign, 2)) { // Check for D± → K± K∓ π± flag = sign * (1 << DecayType::DsToKKPi); RecoDecay::getDaughters(particle, &arrDaughIndex, std::array{0}, 1); if (arrDaughIndex.size() == 2) { diff --git a/PWGHF/TableProducer/treeCreatorDsToKKPi.cxx b/PWGHF/TableProducer/treeCreatorDsToKKPi.cxx index 8c7cec17fb8..8779aebb579 100644 --- a/PWGHF/TableProducer/treeCreatorDsToKKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorDsToKKPi.cxx @@ -244,12 +244,12 @@ struct HfTreeCreatorDsToKKPi { using TracksWPid = soa::Join; Filter filterSelectCandidates = aod::hf_sel_candidate_ds::isSelDsToKKPi >= selectionFlagDs || aod::hf_sel_candidate_ds::isSelDsToPiKK >= selectionFlagDs; - Filter filterMcGenMatching = nabs(o2::aod::hf_cand_3prong::flagMcMatchGen) == static_cast(BIT(aod::hf_cand_3prong::DecayType::DsToKKPi)) && (aod::hf_cand_3prong::flagMcDecayChanGen == decayChannelDs || (FillDplusMC && aod::hf_cand_3prong::flagMcDecayChanGen == (decayChannelDplusMC + 2))); //Do not store Dplus MC if FillDplusMC is false + Filter filterMcGenMatching = nabs(o2::aod::hf_cand_3prong::flagMcMatchGen) == static_cast(BIT(aod::hf_cand_3prong::DecayType::DsToKKPi)) && (aod::hf_cand_3prong::flagMcDecayChanGen == decayChannelDs || (FillDplusMC && aod::hf_cand_3prong::flagMcDecayChanGen == (decayChannelDplusMC + 2))); // Do not store Dplus MC if FillDplusMC is false Partition selectedDsToKKPiCand = aod::hf_sel_candidate_ds::isSelDsToKKPi >= selectionFlagDs; Partition selectedDsToPiKKCand = aod::hf_sel_candidate_ds::isSelDsToPiKK >= selectionFlagDs; - Partition reconstructedCandSig = nabs(aod::hf_cand_3prong::flagMcMatchRec) == static_cast(BIT(aod::hf_cand_3prong::DecayType::DsToKKPi)) && (aod::hf_cand_3prong::flagMcDecayChanRec == decayChannelDs || (FillDplusMC && aod::hf_cand_3prong::flagMcDecayChanRec == (decayChannelDplusMC + 2 ))); //Do not store Dplus MC if FillDplusMC is false + Partition reconstructedCandSig = nabs(aod::hf_cand_3prong::flagMcMatchRec) == static_cast(BIT(aod::hf_cand_3prong::DecayType::DsToKKPi)) && (aod::hf_cand_3prong::flagMcDecayChanRec == decayChannelDs || (FillDplusMC && aod::hf_cand_3prong::flagMcDecayChanRec == (decayChannelDplusMC + 2))); // Do not store Dplus MC if FillDplusMC is false Partition reconstructedCandBkg = nabs(aod::hf_cand_3prong::flagMcMatchRec) != static_cast(BIT(aod::hf_cand_3prong::DecayType::DsToKKPi)); void init(InitContext const&)