Skip to content
Merged
Changes from 4 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
38 changes: 19 additions & 19 deletions PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ struct HfCorrelatorDplusHadrons {
Produces<aod::Dplus> entryDplus;
Produces<aod::Hadron> entryHadron;
static constexpr std::size_t NDaughters{3u};
static constexpr float kEtaDaughtersMax = 0.8f; // Eta cut on daughters of D+ meson as Run2
static constexpr float EtaDaughtersMax = 0.8f; // Eta cut on daughters of D+ meson as Run2

Configurable<int> selectionFlagDplus{"selectionFlagDplus", 7, "Selection Flag for Dplus"}; // 7 corresponds to topo+PID cuts
Configurable<int> numberEventsMixed{"numberEventsMixed", 5, "Number of events mixed in ME process"};
Expand Down Expand Up @@ -437,7 +437,7 @@ struct HfCorrelatorDplusHadrons {
double etaDaugh1 = RecoDecay::eta(std::array{candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()});
double etaDaugh2 = RecoDecay::eta(std::array{candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()});
double etaDaugh3 = RecoDecay::eta(std::array{candidate.pxProng2(), candidate.pyProng2(), candidate.pzProng2()});
if (std::abs(etaDaugh1) >= kEtaDaughtersMax || std::abs(etaDaugh2) >= kEtaDaughtersMax || std::abs(etaDaugh3) >= kEtaDaughtersMax) {
if (std::abs(etaDaugh1) >= EtaDaughtersMax || std::abs(etaDaugh2) >= EtaDaughtersMax || std::abs(etaDaugh3) >= EtaDaughtersMax) {
continue;
}
// efficiency weight determination
Expand Down Expand Up @@ -563,22 +563,6 @@ struct HfCorrelatorDplusHadrons {
if (std::abs(yD) >= yCandMax || particle1.pt() <= ptCandMin) {
continue;
}
registry.fill(HIST("hDplusBin"), poolBin);
registry.fill(HIST("hPtCandMCGen"), particle1.pt());
registry.fill(HIST("hEtaMcGen"), particle1.eta());
registry.fill(HIST("hPhiMcGen"), RecoDecay::constrainAngle(particle1.phi(), -PIHalf));
registry.fill(HIST("hYMCGen"), yD);

// prompt and non-prompt division
isDplusPrompt = particle1.originMcGen() == RecoDecay::OriginType::Prompt;
isDplusNonPrompt = particle1.originMcGen() == RecoDecay::OriginType::NonPrompt;
if (isDplusPrompt) {
registry.fill(HIST("hPtCandMcGenPrompt"), particle1.pt());
} else if (isDplusNonPrompt) {
registry.fill(HIST("hPtCandMcGenNonPrompt"), particle1.pt());
}

// prompt and non-prompt division
std::vector<int> listDaughters{};
std::array<int, NDaughters> const arrDaughDplusPDG = {+kPiPlus, -kKPlus, kPiPlus};
std::array<int, NDaughters> prongsId{};
Expand All @@ -590,7 +574,7 @@ struct HfCorrelatorDplusHadrons {
bool isDaughtersOk = true;
for (const auto& dauIdx : listDaughters) {
auto daughI = mcParticles.rawIteratorAt(dauIdx - mcParticles.offset());
if (std::abs(daughI.eta()) >= kEtaDaughtersMax) {
if (std::abs(daughI.eta()) >= EtaDaughtersMax) {
isDaughtersOk = false;
break;
}
Expand All @@ -600,6 +584,22 @@ struct HfCorrelatorDplusHadrons {
if (!isDaughtersOk)
continue; // Skip this D+ candidate if any daughter fails eta cut
counterDplusHadron++;

registry.fill(HIST("hDplusBin"), poolBin);
registry.fill(HIST("hPtCandMCGen"), particle1.pt());
registry.fill(HIST("hEtaMcGen"), particle1.eta());
registry.fill(HIST("hPhiMcGen"), RecoDecay::constrainAngle(particle1.phi(), -PIHalf));
registry.fill(HIST("hYMCGen"), yD);

// prompt and non-prompt division
isDplusPrompt = particle1.originMcGen() == RecoDecay::OriginType::Prompt;
isDplusNonPrompt = particle1.originMcGen() == RecoDecay::OriginType::NonPrompt;
if (isDplusPrompt) {
registry.fill(HIST("hPtCandMcGenPrompt"), particle1.pt());
} else if (isDplusNonPrompt) {
registry.fill(HIST("hPtCandMcGenNonPrompt"), particle1.pt());
}
Comment thread
vkucera marked this conversation as resolved.
Outdated

// Dplus Hadron correlation dedicated section
// if it's a Dplus particle, search for Hadron and evaluate correlations
registry.fill(HIST("hcountDplustriggersMCGen"), 0, particle1.pt()); // to count trigger Dplus for normalisation)
Expand Down
Loading