From 9da57e13f2c0595a311cd33fd0d9add9bd000832 Mon Sep 17 00:00:00 2001 From: Sawan Sawan Date: Wed, 31 Dec 2025 11:28:10 +0530 Subject: [PATCH 1/3] added sel8 configurable, to remove it during MC checks --- PWGLF/Tasks/Resonances/kstarqa.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Resonances/kstarqa.cxx b/PWGLF/Tasks/Resonances/kstarqa.cxx index 7d530010757..18fb2df2477 100644 --- a/PWGLF/Tasks/Resonances/kstarqa.cxx +++ b/PWGLF/Tasks/Resonances/kstarqa.cxx @@ -78,6 +78,7 @@ struct Kstarqa { struct : ConfigurableGroup { // Configurables for event selections Configurable isINELgt0{"isINELgt0", true, "INEL>0 selection"}; + Configurable isSel8{"isSel8", false, "Event selection sel8"}; Configurable isTriggerTVX{"isTriggerTVX", false, "TriggerTVX"}; Configurable isGoodZvtxFT0vsPV{"isGoodZvtxFT0vsPV", false, "IsGoodZvtxFT0vsPV"}; Configurable isApplyOccCut{"isApplyOccCut", true, "Apply occupancy cut"}; @@ -446,7 +447,7 @@ struct Kstarqa { if (fillHist) rEventSelection.fill(HIST("hEventCut"), 1); - if (!collision.sel8()) + if (selectionConfig.isSel8 && !collision.sel8()) return false; if (fillHist) rEventSelection.fill(HIST("hEventCut"), 2); From 5373a330242a2c2def275a0b22257248376f2e57 Mon Sep 17 00:00:00 2001 From: Sawan Sawan Date: Wed, 31 Dec 2025 12:43:29 +0530 Subject: [PATCH 2/3] different event/signal loss method --- PWGLF/Tasks/Resonances/kstarqa.cxx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Resonances/kstarqa.cxx b/PWGLF/Tasks/Resonances/kstarqa.cxx index 18fb2df2477..0849722b6f5 100644 --- a/PWGLF/Tasks/Resonances/kstarqa.cxx +++ b/PWGLF/Tasks/Resonances/kstarqa.cxx @@ -378,8 +378,13 @@ struct Kstarqa { hGenEvents->GetYaxis()->SetBinLabel(2, "Generated events with Mc collision V_{z} cut"); hGenEvents->GetYaxis()->SetBinLabel(3, "Generated events with Mc INEL>0"); hGenEvents->GetYaxis()->SetBinLabel(4, "Generated events with at least one reconstructed event"); + hInvMass.add("CorrFactors/h2dGenKstar", "Centrality vs p_{T}", kTH2D, {{101, 0.0f, 101.0f}, ptAxis}); hInvMass.add("CorrFactors/h3dGenKstarVsMultMCVsMultiplicity", "MC centrality vs centrality vs p_{T}", kTH3D, {axisNch, {101, 0.0f, 101.0f}, ptAxis}); + hInvMass.add("CorrFactors/hSignalLossDenominator", "Kstar generated before event selection", kTH2F, {{ptAxis}, {multiplicityAxis}}); + hInvMass.add("CorrFactors/hSignalLossNumerator", "Kstar generated after event selection", kTH2F, {{ptAxis}, {multiplicityAxis}}); + hInvMass.add("CorrFactors/MultiplicityRec", "Multiplicity in generated MC with at least 1 reconstruction", kTH1F, {multiplicityAxis}); + hInvMass.add("CorrFactors/MultiplicityGen", "Multiplicity in generated MC", kTH1F, {multiplicityAxis}); } rEventSelection.add("tracksCheckData", "No. of events in the data", kTH1I, {{10, 0, 10}}); @@ -1673,12 +1678,13 @@ struct Kstarqa { auto multiplicityRec = -1; bool isSelectedEvent = false; auto multiplicity1 = -999.; + for (const auto& RecCollision : recCollisions) { if (!RecCollision.has_mcCollision()) continue; if (!selectionEvent(RecCollision, false)) // don't fill event cut histogram continue; - // multiplicity1 = RecCollision.centFT0M(); + const auto& mcCollisionRec = RecCollision.mcCollision_as(); multiplicityRec = mcCollisionRec.centFT0M(); @@ -1752,6 +1758,8 @@ struct Kstarqa { hInvMass.fill(HIST("CorrFactors/hGenEvents"), mcCollision.multMCNParticlesEta08(), 2.5); float multiplicity = 100.5f; + bool isSelectedEvent = false; + for (auto const& collision : collisions) { if (!selectionEvent(collision, false)) // don't fill event cut histogram continue; @@ -1767,10 +1775,15 @@ struct Kstarqa { } else { multiplicity = collision.centFT0M(); // default } + isSelectedEvent = true; } hInvMass.fill(HIST("CorrFactors/hMultiplicityVsMultMC"), multiplicity, mcCollision.multMCNParticlesEta08()); hInvMass.fill(HIST("CorrFactors/hNrecInGen"), collisions.size()); + hInvMass.fill(HIST("CorrFactors/MultiplicityGen"), multiplicity); + if (isSelectedEvent) { + hInvMass.fill(HIST("CorrFactors/MultiplicityRec"), multiplicity); + } for (const auto& mcParticle : mcParticles) { @@ -1816,6 +1829,10 @@ struct Kstarqa { hInvMass.fill(HIST("CorrFactors/h2dGenKstar"), multiplicity, mother.Pt()); hInvMass.fill(HIST("CorrFactors/h3dGenKstarVsMultMCVsMultiplicity"), mcCollision.multMCNParticlesEta08(), multiplicity, mother.Pt()); + hInvMass.fill(HIST("CorrFactors/hSignalLossDenominator"), mother.pt(), multiplicity); + if (isSelectedEvent) { + hInvMass.fill(HIST("CorrFactors/hSignalLossNumerator"), mother.pt(), multiplicity); + } } } } From 0e58dd28db024a5cb6b27efdeddc9e07a5f38f37 Mon Sep 17 00:00:00 2001 From: Sawan Sawan Date: Wed, 31 Dec 2025 14:42:24 +0530 Subject: [PATCH 3/3] added another method for event/signal loss corrections --- PWGLF/Tasks/Resonances/kstarqa.cxx | 41 +++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/PWGLF/Tasks/Resonances/kstarqa.cxx b/PWGLF/Tasks/Resonances/kstarqa.cxx index 0849722b6f5..590c246c6bb 100644 --- a/PWGLF/Tasks/Resonances/kstarqa.cxx +++ b/PWGLF/Tasks/Resonances/kstarqa.cxx @@ -347,6 +347,10 @@ struct Kstarqa { hInvMass.add("hAllKstarGenCollisisons1Rec", "All generated Kstar in events with at least one rec event in rapidity in 0.5", kTH2F, {{multiplicityAxis}, {ptAxis}}); hInvMass.add("hAllRecCollisions", "All reconstructed events", kTH1F, {multiplicityAxis}); hInvMass.add("hAllRecCollisionsCalib", "All reconstructed events", kTH1F, {multiplicityAxis}); + hInvMass.add("sigEvLossFromGenRec/MultiplicityGen", "Multiplicity in generated MC", kTH1F, {multiplicityAxis}); + hInvMass.add("sigEvLossFromGenRec/MultiplicityRec", "Multiplicity in generated MC with at least 1 reconstruction", kTH1F, {multiplicityAxis}); + hInvMass.add("sigEvLossFromGenRec/hSignalLossDenominator", "Kstar generated before event selection", kTH2F, {{ptAxis}, {multiplicityAxis}}); + hInvMass.add("sigEvLossFromGenRec/hSignalLossNumerator", "Kstar generated after event selection", kTH2F, {{ptAxis}, {multiplicityAxis}}); if (doprocessEvtLossSigLossMC || doprocessEvtLossSigLossMCPhi) { hInvMass.add("MCcorrections/hSignalLossDenominator", "Kstar generated before event selection", kTH2F, {{ptAxis}, {multiplicityAxis}}); @@ -1611,15 +1615,23 @@ struct Kstarqa { } } - const auto evtReconstructedAndSelected = std::find(selectedEvents.begin(), selectedEvents.end(), mcCollision.globalIndex()) != selectedEvents.end(); - hInvMass.fill(HIST("hAllGenCollisions"), multiplicity); - if (!evtReconstructedAndSelected) { // Check that the event is reconstructed and that the reconstructed events pass the selection + if (std::abs(mcCollision.posZ()) < selectionConfig.cutzvertex) { return; } + + const auto evtReconstructedAndSelected = std::find(selectedEvents.begin(), selectedEvents.end(), mcCollision.globalIndex()) != selectedEvents.end(); + hInvMass.fill(HIST("hAllGenCollisions"), multiplicity); + // if (!evtReconstructedAndSelected) { // Check that the event is reconstructed and that the reconstructed events pass the selection + // return; + // } double genMultiplicity = mcCollision.centFT0M(); - hInvMass.fill(HIST("h1GenMult2"), genMultiplicity); - hInvMass.fill(HIST("hAllGenCollisions1Rec"), multiplicity); - rEventSelection.fill(HIST("eventsCheckGen"), 3.5); + hInvMass.fill(HIST("sigEvLossFromGenRec/MultiplicityGen"), genMultiplicity); + if (evtReconstructedAndSelected) { + hInvMass.fill(HIST("sigEvLossFromGenRec/MultiplicityRec"), genMultiplicity); + hInvMass.fill(HIST("h1GenMult2"), genMultiplicity); + hInvMass.fill(HIST("hAllGenCollisions1Rec"), multiplicity); + rEventSelection.fill(HIST("eventsCheckGen"), 3.5); + } for (const auto& mcParticle : mcParticles) { @@ -1637,7 +1649,8 @@ struct Kstarqa { if (std::abs(mcParticle.pdgCode()) != o2::constants::physics::kK0Star892) { continue; } - hInvMass.fill(HIST("hAllKstarGenCollisisons1Rec"), multiplicity, mcParticle.pt()); + if (evtReconstructedAndSelected) + hInvMass.fill(HIST("hAllKstarGenCollisisons1Rec"), multiplicity, mcParticle.pt()); auto kDaughters = mcParticle.daughters_as(); if (kDaughters.size() != selectionConfig.noOfDaughters) { @@ -1662,11 +1675,15 @@ struct Kstarqa { } if (passkaon && passpion) { mother = daughter1 + daughter2; // Kstar meson - hInvMass.fill(HIST("hk892GenpT"), mcParticle.pt(), multiplicity); - hInvMass.fill(HIST("hk892GenpT2"), mother.Pt(), multiplicity); - hInvMass.fill(HIST("hk892GenpTCalib1"), mcParticle.pt(), genMultiplicity); - hInvMass.fill(HIST("hk892GenpTCalib2"), mother.Pt(), genMultiplicity); - hInvMass.fill(HIST("h1genmass"), mother.M()); + hInvMass.fill(HIST("sigEvLossFromGenRec/hSignalLossDenominator"), mother.Pt(), genMultiplicity); + if (evtReconstructedAndSelected) { + hInvMass.fill(HIST("hk892GenpT"), mcParticle.pt(), multiplicity); + hInvMass.fill(HIST("hk892GenpT2"), mother.Pt(), multiplicity); + hInvMass.fill(HIST("hk892GenpTCalib1"), mcParticle.pt(), genMultiplicity); + hInvMass.fill(HIST("hk892GenpTCalib2"), mother.Pt(), genMultiplicity); + hInvMass.fill(HIST("h1genmass"), mother.M()); + hInvMass.fill(HIST("sigEvLossFromGenRec/hSignalLossNumerator"), mother.Pt(), genMultiplicity); + } } } }