Skip to content

Commit 0669b5a

Browse files
authored
Update correlatorDplusHadrons.cxx
Minor fix in logic
1 parent c4c1d9e commit 0669b5a

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -563,23 +563,7 @@ struct HfCorrelatorDplusHadrons {
563563
if (std::abs(yD) >= yCandMax || particle1.pt() <= ptCandMin) {
564564
continue;
565565
}
566-
registry.fill(HIST("hDplusBin"), poolBin);
567-
registry.fill(HIST("hPtCandMCGen"), particle1.pt());
568-
registry.fill(HIST("hEtaMcGen"), particle1.eta());
569-
registry.fill(HIST("hPhiMcGen"), RecoDecay::constrainAngle(particle1.phi(), -PIHalf));
570-
registry.fill(HIST("hYMCGen"), yD);
571-
572-
// prompt and non-prompt division
573-
isDplusPrompt = particle1.originMcGen() == RecoDecay::OriginType::Prompt;
574-
isDplusNonPrompt = particle1.originMcGen() == RecoDecay::OriginType::NonPrompt;
575-
if (isDplusPrompt) {
576-
registry.fill(HIST("hPtCandMcGenPrompt"), particle1.pt());
577-
} else if (isDplusNonPrompt) {
578-
registry.fill(HIST("hPtCandMcGenNonPrompt"), particle1.pt());
579-
}
580-
581-
// prompt and non-prompt division
582-
std::vector<int> listDaughters{};
566+
std::vector<int> listDaughters{};
583567
std::array<int, NDaughters> const arrDaughDplusPDG = {+kPiPlus, -kKPlus, kPiPlus};
584568
std::array<int, NDaughters> prongsId{};
585569
listDaughters.clear();
@@ -600,6 +584,22 @@ struct HfCorrelatorDplusHadrons {
600584
if (!isDaughtersOk)
601585
continue; // Skip this D+ candidate if any daughter fails eta cut
602586
counterDplusHadron++;
587+
588+
registry.fill(HIST("hDplusBin"), poolBin);
589+
registry.fill(HIST("hPtCandMCGen"), particle1.pt());
590+
registry.fill(HIST("hEtaMcGen"), particle1.eta());
591+
registry.fill(HIST("hPhiMcGen"), RecoDecay::constrainAngle(particle1.phi(), -PIHalf));
592+
registry.fill(HIST("hYMCGen"), yD);
593+
594+
// prompt and non-prompt division
595+
isDplusPrompt = particle1.originMcGen() == RecoDecay::OriginType::Prompt;
596+
isDplusNonPrompt = particle1.originMcGen() == RecoDecay::OriginType::NonPrompt;
597+
if (isDplusPrompt) {
598+
registry.fill(HIST("hPtCandMcGenPrompt"), particle1.pt());
599+
} else if (isDplusNonPrompt) {
600+
registry.fill(HIST("hPtCandMcGenNonPrompt"), particle1.pt());
601+
}
602+
603603
// Dplus Hadron correlation dedicated section
604604
// if it's a Dplus particle, search for Hadron and evaluate correlations
605605
registry.fill(HIST("hcountDplustriggersMCGen"), 0, particle1.pt()); // to count trigger Dplus for normalisation)

0 commit comments

Comments
 (0)