Skip to content

Commit 68e5fb9

Browse files
committed
fixed generated event with atleast one reconstruction boolean
1 parent b67b046 commit 68e5fb9

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

PWGLF/Tasks/Resonances/kstarqa.cxx

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,10 @@ struct Kstarqa {
361361
hInvMass.add("hAllKstarGenCollisisons1Rec", "All generated Kstar in events with at least one rec event in rapidity in 0.5", kTH2F, {{multiplicityAxis}, {ptAxis}});
362362
hInvMass.add("hAllRecCollisions", "All reconstructed events", kTH1F, {multiplicityAxis});
363363
hInvMass.add("hAllRecCollisionsCalib", "All reconstructed events", kTH1F, {multiplicityAxis});
364-
hInvMass.add("sigEvLossFromGenRec/MultiplicityGen", "Multiplicity in generated MC", kTH1F, {multiplicityAxis});
365-
hInvMass.add("sigEvLossFromGenRec/MultiplicityRec", "Multiplicity in generated MC with at least 1 reconstruction", kTH1F, {multiplicityAxis});
366-
hInvMass.add("sigEvLossFromGenRec/hSignalLossDenominator", "Kstar generated before event selection", kTH2F, {{ptAxis}, {multiplicityAxis}});
367-
hInvMass.add("sigEvLossFromGenRec/hSignalLossNumerator", "Kstar generated after event selection", kTH2F, {{ptAxis}, {multiplicityAxis}});
364+
// hInvMass.add("sigEvLossFromGenRec/MultiplicityGen", "Multiplicity in generated MC", kTH1F, {multiplicityAxis});
365+
// hInvMass.add("sigEvLossFromGenRec/MultiplicityRec", "Multiplicity in generated MC with at least 1 reconstruction", kTH1F, {multiplicityAxis});
366+
// hInvMass.add("sigEvLossFromGenRec/hSignalLossDenominator", "Kstar generated before event selection", kTH2F, {{ptAxis}, {multiplicityAxis}});
367+
// hInvMass.add("sigEvLossFromGenRec/hSignalLossNumerator", "Kstar generated after event selection", kTH2F, {{ptAxis}, {multiplicityAxis}});
368368

369369
if (doprocessEvtLossSigLossMC || doprocessEvtLossSigLossMCPhi) {
370370
hInvMass.add("MCcorrections/hSignalLossDenominator", "Kstar generated before event selection", kTH2F, {{ptAxis}, {multiplicityAxis}});
@@ -1636,17 +1636,17 @@ struct Kstarqa {
16361636

16371637
const auto evtReconstructedAndSelected = std::find(selectedEvents.begin(), selectedEvents.end(), mcCollision.globalIndex()) != selectedEvents.end();
16381638
hInvMass.fill(HIST("hAllGenCollisions"), multiplicity);
1639-
// if (!evtReconstructedAndSelected) { // Check that the event is reconstructed and that the reconstructed events pass the selection
1640-
// return;
1641-
// }
1642-
double genMultiplicity = mcCollision.centFT0M();
1643-
hInvMass.fill(HIST("sigEvLossFromGenRec/MultiplicityGen"), genMultiplicity);
1644-
if (evtReconstructedAndSelected) {
1645-
hInvMass.fill(HIST("sigEvLossFromGenRec/MultiplicityRec"), genMultiplicity);
1646-
hInvMass.fill(HIST("h1GenMult2"), genMultiplicity);
1647-
hInvMass.fill(HIST("hAllGenCollisions1Rec"), multiplicity);
1648-
rEventSelection.fill(HIST("eventsCheckGen"), 4.5);
1639+
if (!evtReconstructedAndSelected) { // Check that the event is reconstructed and that the reconstructed events pass the selection
1640+
return;
16491641
}
1642+
double genMultiplicity = mcCollision.centFT0M();
1643+
// hInvMass.fill(HIST("sigEvLossFromGenRec/MultiplicityGen"), genMultiplicity);
1644+
// if (evtReconstructedAndSelected) {
1645+
// hInvMass.fill(HIST("sigEvLossFromGenRec/MultiplicityRec"), genMultiplicity);
1646+
hInvMass.fill(HIST("h1GenMult2"), genMultiplicity);
1647+
hInvMass.fill(HIST("hAllGenCollisions1Rec"), multiplicity);
1648+
rEventSelection.fill(HIST("eventsCheckGen"), 4.5);
1649+
// }
16501650

16511651
for (const auto& mcParticle : mcParticles) {
16521652

@@ -1664,8 +1664,8 @@ struct Kstarqa {
16641664
if (std::abs(mcParticle.pdgCode()) != o2::constants::physics::kK0Star892) {
16651665
continue;
16661666
}
1667-
if (evtReconstructedAndSelected)
1668-
hInvMass.fill(HIST("hAllKstarGenCollisisons1Rec"), multiplicity, mcParticle.pt());
1667+
// if (evtReconstructedAndSelected)
1668+
hInvMass.fill(HIST("hAllKstarGenCollisisons1Rec"), multiplicity, mcParticle.pt());
16691669

16701670
auto kDaughters = mcParticle.daughters_as<aod::McParticles>();
16711671
if (kDaughters.size() != configGp.noOfDaughters) {
@@ -1690,15 +1690,15 @@ struct Kstarqa {
16901690
}
16911691
if (passkaon && passpion) {
16921692
mother = daughter1 + daughter2; // Kstar meson
1693-
hInvMass.fill(HIST("sigEvLossFromGenRec/hSignalLossDenominator"), mother.Pt(), genMultiplicity);
1694-
if (evtReconstructedAndSelected) {
1695-
hInvMass.fill(HIST("hk892GenpT"), mcParticle.pt(), multiplicity);
1696-
hInvMass.fill(HIST("hk892GenpT2"), mother.Pt(), multiplicity);
1697-
hInvMass.fill(HIST("hk892GenpTCalib1"), mcParticle.pt(), genMultiplicity);
1698-
hInvMass.fill(HIST("hk892GenpTCalib2"), mother.Pt(), genMultiplicity);
1699-
hInvMass.fill(HIST("h1genmass"), mother.M());
1700-
hInvMass.fill(HIST("sigEvLossFromGenRec/hSignalLossNumerator"), mother.Pt(), genMultiplicity);
1701-
}
1693+
// hInvMass.fill(HIST("sigEvLossFromGenRec/hSignalLossDenominator"), mother.Pt(), genMultiplicity);
1694+
// if (evtReconstructedAndSelected) {
1695+
hInvMass.fill(HIST("hk892GenpT"), mcParticle.pt(), multiplicity);
1696+
hInvMass.fill(HIST("hk892GenpT2"), mother.Pt(), multiplicity);
1697+
hInvMass.fill(HIST("hk892GenpTCalib1"), mcParticle.pt(), genMultiplicity);
1698+
hInvMass.fill(HIST("hk892GenpTCalib2"), mother.Pt(), genMultiplicity);
1699+
hInvMass.fill(HIST("h1genmass"), mother.M());
1700+
// hInvMass.fill(HIST("sigEvLossFromGenRec/hSignalLossNumerator"), mother.Pt(), genMultiplicity);
1701+
// }
17021702
}
17031703
}
17041704
}

0 commit comments

Comments
 (0)