Skip to content

Commit 0e58dd2

Browse files
author
Sawan Sawan
committed
added another method for event/signal loss corrections
1 parent 5373a33 commit 0e58dd2

File tree

1 file changed

+29
-12
lines changed

1 file changed

+29
-12
lines changed

PWGLF/Tasks/Resonances/kstarqa.cxx

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,10 @@ struct Kstarqa {
347347
hInvMass.add("hAllKstarGenCollisisons1Rec", "All generated Kstar in events with at least one rec event in rapidity in 0.5", kTH2F, {{multiplicityAxis}, {ptAxis}});
348348
hInvMass.add("hAllRecCollisions", "All reconstructed events", kTH1F, {multiplicityAxis});
349349
hInvMass.add("hAllRecCollisionsCalib", "All reconstructed events", kTH1F, {multiplicityAxis});
350+
hInvMass.add("sigEvLossFromGenRec/MultiplicityGen", "Multiplicity in generated MC", kTH1F, {multiplicityAxis});
351+
hInvMass.add("sigEvLossFromGenRec/MultiplicityRec", "Multiplicity in generated MC with at least 1 reconstruction", kTH1F, {multiplicityAxis});
352+
hInvMass.add("sigEvLossFromGenRec/hSignalLossDenominator", "Kstar generated before event selection", kTH2F, {{ptAxis}, {multiplicityAxis}});
353+
hInvMass.add("sigEvLossFromGenRec/hSignalLossNumerator", "Kstar generated after event selection", kTH2F, {{ptAxis}, {multiplicityAxis}});
350354

351355
if (doprocessEvtLossSigLossMC || doprocessEvtLossSigLossMCPhi) {
352356
hInvMass.add("MCcorrections/hSignalLossDenominator", "Kstar generated before event selection", kTH2F, {{ptAxis}, {multiplicityAxis}});
@@ -1611,15 +1615,23 @@ struct Kstarqa {
16111615
}
16121616
}
16131617

1614-
const auto evtReconstructedAndSelected = std::find(selectedEvents.begin(), selectedEvents.end(), mcCollision.globalIndex()) != selectedEvents.end();
1615-
hInvMass.fill(HIST("hAllGenCollisions"), multiplicity);
1616-
if (!evtReconstructedAndSelected) { // Check that the event is reconstructed and that the reconstructed events pass the selection
1618+
if (std::abs(mcCollision.posZ()) < selectionConfig.cutzvertex) {
16171619
return;
16181620
}
1621+
1622+
const auto evtReconstructedAndSelected = std::find(selectedEvents.begin(), selectedEvents.end(), mcCollision.globalIndex()) != selectedEvents.end();
1623+
hInvMass.fill(HIST("hAllGenCollisions"), multiplicity);
1624+
// if (!evtReconstructedAndSelected) { // Check that the event is reconstructed and that the reconstructed events pass the selection
1625+
// return;
1626+
// }
16191627
double genMultiplicity = mcCollision.centFT0M();
1620-
hInvMass.fill(HIST("h1GenMult2"), genMultiplicity);
1621-
hInvMass.fill(HIST("hAllGenCollisions1Rec"), multiplicity);
1622-
rEventSelection.fill(HIST("eventsCheckGen"), 3.5);
1628+
hInvMass.fill(HIST("sigEvLossFromGenRec/MultiplicityGen"), genMultiplicity);
1629+
if (evtReconstructedAndSelected) {
1630+
hInvMass.fill(HIST("sigEvLossFromGenRec/MultiplicityRec"), genMultiplicity);
1631+
hInvMass.fill(HIST("h1GenMult2"), genMultiplicity);
1632+
hInvMass.fill(HIST("hAllGenCollisions1Rec"), multiplicity);
1633+
rEventSelection.fill(HIST("eventsCheckGen"), 3.5);
1634+
}
16231635

16241636
for (const auto& mcParticle : mcParticles) {
16251637

@@ -1637,7 +1649,8 @@ struct Kstarqa {
16371649
if (std::abs(mcParticle.pdgCode()) != o2::constants::physics::kK0Star892) {
16381650
continue;
16391651
}
1640-
hInvMass.fill(HIST("hAllKstarGenCollisisons1Rec"), multiplicity, mcParticle.pt());
1652+
if (evtReconstructedAndSelected)
1653+
hInvMass.fill(HIST("hAllKstarGenCollisisons1Rec"), multiplicity, mcParticle.pt());
16411654

16421655
auto kDaughters = mcParticle.daughters_as<aod::McParticles>();
16431656
if (kDaughters.size() != selectionConfig.noOfDaughters) {
@@ -1662,11 +1675,15 @@ struct Kstarqa {
16621675
}
16631676
if (passkaon && passpion) {
16641677
mother = daughter1 + daughter2; // Kstar meson
1665-
hInvMass.fill(HIST("hk892GenpT"), mcParticle.pt(), multiplicity);
1666-
hInvMass.fill(HIST("hk892GenpT2"), mother.Pt(), multiplicity);
1667-
hInvMass.fill(HIST("hk892GenpTCalib1"), mcParticle.pt(), genMultiplicity);
1668-
hInvMass.fill(HIST("hk892GenpTCalib2"), mother.Pt(), genMultiplicity);
1669-
hInvMass.fill(HIST("h1genmass"), mother.M());
1678+
hInvMass.fill(HIST("sigEvLossFromGenRec/hSignalLossDenominator"), mother.Pt(), genMultiplicity);
1679+
if (evtReconstructedAndSelected) {
1680+
hInvMass.fill(HIST("hk892GenpT"), mcParticle.pt(), multiplicity);
1681+
hInvMass.fill(HIST("hk892GenpT2"), mother.Pt(), multiplicity);
1682+
hInvMass.fill(HIST("hk892GenpTCalib1"), mcParticle.pt(), genMultiplicity);
1683+
hInvMass.fill(HIST("hk892GenpTCalib2"), mother.Pt(), genMultiplicity);
1684+
hInvMass.fill(HIST("h1genmass"), mother.M());
1685+
hInvMass.fill(HIST("sigEvLossFromGenRec/hSignalLossNumerator"), mother.Pt(), genMultiplicity);
1686+
}
16701687
}
16711688
}
16721689
}

0 commit comments

Comments
 (0)