Skip to content

Commit cba6bc8

Browse files
authored
[PWGLF] add eta and primary cut to mc closure (#11337)
1 parent d537962 commit cba6bc8

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

PWGLF/Tasks/Strangeness/cascadecorrelations.cxx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,11 @@ struct CascadeCorrelations {
521521
{"MC/hGenMultNoReco", "hGenMultNoReco", {HistType::kTH1I, {{100, 0, 100, "Number of generated charged primaries"}}}},
522522
{"MC/hGenMultOneReco", "hGenMultOneReco", {HistType::kTH1I, {{100, 0, 100, "Number of generated charged primaries"}}}},
523523
{"MC/hSplitEvents", "hSplitEvents", {HistType::kTH1I, {{10, 0, 10, "Number of rec. events per gen event"}}}},
524+
525+
// debug
526+
{"MC/hPhi", "hPhi", {HistType::kTH1F, {{180, 0, TwoPI}}}},
527+
{"MC/hEta", "hEta", {HistType::kTH1F, {{100, -2, 2}}}},
528+
{"MC/hRapidity", "hRapidity", {HistType::kTH1F, {{100, -2, 2}}}},
524529
},
525530
};
526531

@@ -924,7 +929,8 @@ struct CascadeCorrelations {
924929
} // collisions
925930
} // process mixed events
926931

927-
Filter genCascadesFilter = nabs(aod::mcparticle::pdgCode) == 3312;
932+
Configurable<float> etaGenCascades{"etaGenCascades", 0.8, "min/max of eta for generated cascades"};
933+
Filter genCascadesFilter = (nabs(aod::mcparticle::pdgCode) == 3312 && nabs(aod::mcparticle::eta) < etaGenCascades);
928934

929935
void processMC(aod::McCollision const&, soa::SmallGroups<soa::Join<aod::McCollisionLabels, MyCollisionsMult>> const& collisions, soa::Filtered<aod::McParticles> const& genCascades, aod::McParticles const& mcParticles)
930936
{
@@ -947,6 +953,15 @@ struct CascadeCorrelations {
947953
return;
948954
}
949955

956+
// QA
957+
for (auto& casc : genCascades) {
958+
if (!casc.isPhysicalPrimary())
959+
continue;
960+
registry.fill(HIST("MC/hPhi"), casc.phi());
961+
registry.fill(HIST("MC/hEta"), casc.eta());
962+
registry.fill(HIST("MC/hRapidity"), casc.y());
963+
}
964+
950965
for (auto& [c0, c1] : combinations(genCascades, genCascades)) { // combinations automatically applies strictly upper in case of 2 identical tables
951966
// Define the trigger as the particle with the highest pT. As we can't swap the cascade tables themselves, we swap the addresses and later dereference them
952967
auto* triggerAddress = &c0;
@@ -959,6 +974,9 @@ struct CascadeCorrelations {
959974

960975
double dphi = RecoDecay::constrainAngle(trigger.phi() - assoc.phi(), -PIHalf);
961976

977+
if (!trigger.isPhysicalPrimary() || !assoc.isPhysicalPrimary())
978+
continue; // require the cascades to be primaries
979+
962980
if (trigger.pdgCode() < 0) { // anti-trigg --> Plus
963981
if (assoc.pdgCode() < 0) { // anti-assoc --> Plus
964982
registry.fill(HIST("MC/hMCPlusPlus"), dphi, trigger.y() - assoc.y(), trigger.pt(), assoc.pt(), vtxz, FT0mult);

0 commit comments

Comments
 (0)