Skip to content

Commit 4fcdc35

Browse files
authored
[PWGHF] Adding Ds prompt selection (#11939)
1 parent 538a921 commit 4fcdc35

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -714,16 +714,18 @@ struct HfCorrelatorDsHadrons {
714714
continue;
715715
}
716716

717-
registry.fill(HIST("hCorrAllPrimaryParticles"), getDeltaPhi(particleAssoc.phi(), particle.phi()), particle.pt(), particleAssoc.pt());
718-
if (std::abs(particleAssoc.pdgCode()) == kPiPlus) {
719-
registry.fill(HIST("hCorrAllPrimaryHadrons"), getDeltaPhi(particleAssoc.phi(), particle.phi()), particle.pt(), particleAssoc.pt());
720-
registry.fill(HIST("hCorrAllPrimaryPions"), getDeltaPhi(particleAssoc.phi(), particle.phi()), particle.pt(), particleAssoc.pt());
721-
} else if (std::abs(particleAssoc.pdgCode()) == kKPlus) {
722-
registry.fill(HIST("hCorrAllPrimaryHadrons"), getDeltaPhi(particleAssoc.phi(), particle.phi()), particle.pt(), particleAssoc.pt());
723-
registry.fill(HIST("hCorrAllPrimaryKaons"), getDeltaPhi(particleAssoc.phi(), particle.phi()), particle.pt(), particleAssoc.pt());
724-
} else if (std::abs(particleAssoc.pdgCode()) == kProton) {
725-
registry.fill(HIST("hCorrAllPrimaryHadrons"), getDeltaPhi(particleAssoc.phi(), particle.phi()), particle.pt(), particleAssoc.pt());
726-
registry.fill(HIST("hCorrAllPrimaryProtons"), getDeltaPhi(particleAssoc.phi(), particle.phi()), particle.pt(), particleAssoc.pt());
717+
if (isDsPrompt) {
718+
registry.fill(HIST("hCorrAllPrimaryParticles"), getDeltaPhi(particleAssoc.phi(), particle.phi()), particle.pt(), particleAssoc.pt());
719+
if (std::abs(particleAssoc.pdgCode()) == kPiPlus) {
720+
registry.fill(HIST("hCorrAllPrimaryHadrons"), getDeltaPhi(particleAssoc.phi(), particle.phi()), particle.pt(), particleAssoc.pt());
721+
registry.fill(HIST("hCorrAllPrimaryPions"), getDeltaPhi(particleAssoc.phi(), particle.phi()), particle.pt(), particleAssoc.pt());
722+
} else if (std::abs(particleAssoc.pdgCode()) == kKPlus) {
723+
registry.fill(HIST("hCorrAllPrimaryHadrons"), getDeltaPhi(particleAssoc.phi(), particle.phi()), particle.pt(), particleAssoc.pt());
724+
registry.fill(HIST("hCorrAllPrimaryKaons"), getDeltaPhi(particleAssoc.phi(), particle.phi()), particle.pt(), particleAssoc.pt());
725+
} else if (std::abs(particleAssoc.pdgCode()) == kProton) {
726+
registry.fill(HIST("hCorrAllPrimaryHadrons"), getDeltaPhi(particleAssoc.phi(), particle.phi()), particle.pt(), particleAssoc.pt());
727+
registry.fill(HIST("hCorrAllPrimaryProtons"), getDeltaPhi(particleAssoc.phi(), particle.phi()), particle.pt(), particleAssoc.pt());
728+
}
727729
}
728730

729731
// trackOrigin = RecoDecay::getCharmHadronOrigin(mcParticles, particleAssoc, true);

PWGHF/HFC/Tasks/taskCorrelationDsHadrons.cxx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -749,14 +749,15 @@ struct HfTaskCorrelationDsHadrons {
749749
} else {
750750
registry.fill(HIST("hPtCandMcGenPrompt"), mcParticle.pt());
751751
}
752-
if (mcParticle.originMcGen() == RecoDecay::OriginType::NonPrompt) {
753-
if (useHighDimHistoForEff) {
754-
registry.fill(HIST("hPtCandMcGenNonPrompt"), mcParticle.pt(), collision.numContrib());
755-
} else {
756-
registry.fill(HIST("hPtCandMcGenNonPrompt"), mcParticle.pt());
757-
}
752+
}
753+
if (mcParticle.originMcGen() == RecoDecay::OriginType::NonPrompt) {
754+
if (useHighDimHistoForEff) {
755+
registry.fill(HIST("hPtCandMcGenNonPrompt"), mcParticle.pt(), collision.numContrib());
756+
} else {
757+
registry.fill(HIST("hPtCandMcGenNonPrompt"), mcParticle.pt());
758758
}
759759
}
760+
760761
bool isDaughterInAcceptance = true;
761762
auto daughters = mcParticle.template daughters_as<CandDsMcGen>();
762763
for (const auto& daughter : daughters) {
@@ -786,7 +787,7 @@ struct HfTaskCorrelationDsHadrons {
786787
outputMl[iclass] = candidate.mlProbDsToPiKK()[classMl->at(iclass)];
787788
}
788789
}
789-
if (outputMl[0] < mlOutputPromptMin->at(o2::analysis::findBin(binsPtD, candidate.pt())) || outputMl[0] < mlOutputPromptMax->at(o2::analysis::findBin(binsPtD, candidate.pt())) || outputMl[2] > mlOutputBkg->at(o2::analysis::findBin(binsPtD, candidate.pt()))) {
790+
if (outputMl[0] < mlOutputPromptMin->at(o2::analysis::findBin(binsPtD, candidate.pt())) || outputMl[0] > mlOutputPromptMax->at(o2::analysis::findBin(binsPtD, candidate.pt())) || outputMl[2] > mlOutputBkg->at(o2::analysis::findBin(binsPtD, candidate.pt()))) {
790791
continue;
791792
}
792793

@@ -865,7 +866,7 @@ struct HfTaskCorrelationDsHadrons {
865866
outputMl[iclass] = candidate.mlProbDsToPiKK()[classMl->at(iclass)];
866867
}
867868
}
868-
if (outputMl[0] < mlOutputPromptMin->at(o2::analysis::findBin(binsPtD, candidate.pt())) || outputMl[0] < mlOutputPromptMax->at(o2::analysis::findBin(binsPtD, candidate.pt())) || outputMl[2] > mlOutputBkg->at(o2::analysis::findBin(binsPtD, candidate.pt()))) {
869+
if (outputMl[0] < mlOutputPromptMin->at(o2::analysis::findBin(binsPtD, candidate.pt())) || outputMl[0] > mlOutputPromptMax->at(o2::analysis::findBin(binsPtD, candidate.pt())) || outputMl[2] > mlOutputBkg->at(o2::analysis::findBin(binsPtD, candidate.pt()))) {
869870
continue;
870871
}
871872
auto collision = candidate.template collision_as<soa::Join<aod::Collisions, aod::FT0Mults, aod::EvSels>>();

0 commit comments

Comments
 (0)