Skip to content

Commit c232519

Browse files
committed
Please consider the following formatting changes
1 parent ad6e1db commit c232519

File tree

1 file changed

+38
-33
lines changed

1 file changed

+38
-33
lines changed

PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -578,44 +578,49 @@ struct HfCorrelatorDplusHadrons {
578578
listDaughters.clear();
579579
RecoDecay::getDaughters(particle1, &listDaughters, arrDaughDplusPDG, 2);
580580
int counterDaughters = 0;
581-
if (listDaughters.size() != NDaughters) continue;
582-
bool isDaughtersOk = true;
583-
for (const auto& dauIdx : listDaughters) {
584-
auto daughI = mcParticles.rawIteratorAt(dauIdx - mcParticles.offset());
585-
if (std::abs(daughI.eta()) >= kEtaDaughtersMax) { isDaughtersOk = false; break; }
586-
counterDaughters += 1;
587-
prongsId[counterDaughters - 1] = daughI.globalIndex();
581+
if (listDaughters.size() != NDaughters)
582+
continue;
583+
bool isDaughtersOk = true;
584+
for (const auto& dauIdx : listDaughters) {
585+
auto daughI = mcParticles.rawIteratorAt(dauIdx - mcParticles.offset());
586+
if (std::abs(daughI.eta()) >= kEtaDaughtersMax) {
587+
isDaughtersOk = false;
588+
break;
588589
}
589-
if (!isDaughtersOk) continue; // Skip this D+ candidate if any daughter fails eta cut
590-
counterDplusHadron++;
591-
// Dplus Hadron correlation dedicated section
592-
// if it's a Dplus particle, search for Hadron and evaluate correlations
593-
registry.fill(HIST("hcountDplustriggersMCGen"), 0, particle1.pt()); // to count trigger Dplus for normalisation)
594-
for (const auto& particleAssoc : mcParticles) {
595-
if (std::abs(particleAssoc.eta()) > etaTrackMax || particleAssoc.pt() < ptTrackMin || particleAssoc.pt() > ptTrackMax) {
596-
continue;
590+
counterDaughters += 1;
591+
prongsId[counterDaughters - 1] = daughI.globalIndex();
597592
}
598-
if (removeDaughters) {
599-
if (particleAssoc.globalIndex() == prongsId[0] || particleAssoc.globalIndex() == prongsId[1] || particleAssoc.globalIndex() == prongsId[2]) {
593+
if (!isDaughtersOk)
594+
continue; // Skip this D+ candidate if any daughter fails eta cut
595+
counterDplusHadron++;
596+
// Dplus Hadron correlation dedicated section
597+
// if it's a Dplus particle, search for Hadron and evaluate correlations
598+
registry.fill(HIST("hcountDplustriggersMCGen"), 0, particle1.pt()); // to count trigger Dplus for normalisation)
599+
for (const auto& particleAssoc : mcParticles) {
600+
if (std::abs(particleAssoc.eta()) > etaTrackMax || particleAssoc.pt() < ptTrackMin || particleAssoc.pt() > ptTrackMax) {
601+
continue;
602+
}
603+
if (removeDaughters) {
604+
if (particleAssoc.globalIndex() == prongsId[0] || particleAssoc.globalIndex() == prongsId[1] || particleAssoc.globalIndex() == prongsId[2]) {
605+
continue;
606+
}
607+
}
608+
if ((std::abs(particleAssoc.pdgCode()) != kElectron) && (std::abs(particleAssoc.pdgCode()) != kMuonMinus) && (std::abs(particleAssoc.pdgCode()) != kPiPlus) && (std::abs(particleAssoc.pdgCode()) != kKPlus) && (std::abs(particleAssoc.pdgCode()) != kProton)) {
609+
continue;
610+
}
611+
if (!particleAssoc.isPhysicalPrimary()) {
600612
continue;
601613
}
602-
}
603-
if ((std::abs(particleAssoc.pdgCode()) != kElectron) && (std::abs(particleAssoc.pdgCode()) != kMuonMinus) && (std::abs(particleAssoc.pdgCode()) != kPiPlus) && (std::abs(particleAssoc.pdgCode()) != kKPlus) && (std::abs(particleAssoc.pdgCode()) != kProton)) {
604-
continue;
605-
}
606-
if (!particleAssoc.isPhysicalPrimary()) {
607-
continue;
608-
}
609614

610-
int trackOrigin = RecoDecay::getCharmHadronOrigin(mcParticles, particleAssoc, true);
611-
registry.fill(HIST("hPtParticleAssocMcGen"), particleAssoc.pt());
612-
entryDplusHadronPair(getDeltaPhi(particleAssoc.phi(), particle1.phi()),
613-
particleAssoc.eta() - particle1.eta(),
614-
particle1.pt(),
615-
particleAssoc.pt(),
616-
poolBin);
617-
entryDplusHadronRecoInfo(MassDPlus, true);
618-
entryDplusHadronGenInfo(isDplusPrompt, particleAssoc.isPhysicalPrimary(), trackOrigin);
615+
int trackOrigin = RecoDecay::getCharmHadronOrigin(mcParticles, particleAssoc, true);
616+
registry.fill(HIST("hPtParticleAssocMcGen"), particleAssoc.pt());
617+
entryDplusHadronPair(getDeltaPhi(particleAssoc.phi(), particle1.phi()),
618+
particleAssoc.eta() - particle1.eta(),
619+
particle1.pt(),
620+
particleAssoc.pt(),
621+
poolBin);
622+
entryDplusHadronRecoInfo(MassDPlus, true);
623+
entryDplusHadronGenInfo(isDplusPrompt, particleAssoc.isPhysicalPrimary(), trackOrigin);
619624
} // end associated loop
620625
} // end trigger
621626
registry.fill(HIST("hcountDplusHadronPerEvent"), counterDplusHadron);

0 commit comments

Comments
 (0)