Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions PWGHF/D2H/Tasks/taskDs.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct HfTaskDs {
Partition<CandDsData> selectedDsToKKPiCand = aod::hf_sel_candidate_ds::isSelDsToKKPi >= selectionFlagDs;
Partition<CandDsData> selectedDsToPiKKCand = aod::hf_sel_candidate_ds::isSelDsToPiKK >= selectionFlagDs;

Partition<CandDsMcReco> reconstructedCandSig = nabs(aod::hf_cand_3prong::flagMcMatchRec) == static_cast<int8_t>(BIT(aod::hf_cand_3prong::DecayType::DsToKKPi)) && (aod::hf_cand_3prong::flagMcDecayChanRec == decayChannelDs || (FillDplusMC && aod::hf_cand_3prong::flagMcDecayChanRec == (decayChannelDplusMC + 2 )));
Partition<CandDsMcReco> reconstructedCandSig = nabs(aod::hf_cand_3prong::flagMcMatchRec) == static_cast<int8_t>(BIT(aod::hf_cand_3prong::DecayType::DsToKKPi)) && (aod::hf_cand_3prong::flagMcDecayChanRec == decayChannelDs || (FillDplusMC && aod::hf_cand_3prong::flagMcDecayChanRec == (decayChannelDplusMC + 2)));
Partition<CandDsMcReco> reconstructedCandBkg = nabs(aod::hf_cand_3prong::flagMcMatchRec) != static_cast<int8_t>(BIT(aod::hf_cand_3prong::DecayType::DsToKKPi));

HistogramRegistry registry{
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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) {
Expand All @@ -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());
Expand All @@ -400,8 +396,7 @@ struct HfTaskDs {
registry.fill(HIST("hPtVsYGenDplusNonPrompt"), pt, y);
}
}
}
else {
} else {
continue;
}
}
Expand Down
4 changes: 2 additions & 2 deletions PWGHF/DataModel/CandidateReconstructionTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions PWGHF/TableProducer/candidateCreator3Prong.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions PWGHF/TableProducer/treeCreatorDsToKKPi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,12 @@ struct HfTreeCreatorDsToKKPi {
using TracksWPid = soa::Join<aod::Tracks, aod::TracksPidPiExt, aod::TracksPidKaExt>;

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<int8_t>(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<int8_t>(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<CandDsData> selectedDsToKKPiCand = aod::hf_sel_candidate_ds::isSelDsToKKPi >= selectionFlagDs;
Partition<CandDsData> selectedDsToPiKKCand = aod::hf_sel_candidate_ds::isSelDsToPiKK >= selectionFlagDs;

Partition<CandDsMcReco> reconstructedCandSig = nabs(aod::hf_cand_3prong::flagMcMatchRec) == static_cast<int8_t>(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<CandDsMcReco> reconstructedCandSig = nabs(aod::hf_cand_3prong::flagMcMatchRec) == static_cast<int8_t>(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<CandDsMcReco> reconstructedCandBkg = nabs(aod::hf_cand_3prong::flagMcMatchRec) != static_cast<int8_t>(BIT(aod::hf_cand_3prong::DecayType::DsToKKPi));

void init(InitContext const&)
Expand Down