From 5834b802d033ff144d157f921e7f2b9790860208 Mon Sep 17 00:00:00 2001 From: Sawan Sawan Date: Mon, 5 Jan 2026 15:18:48 +0530 Subject: [PATCH 1/7] rebased kstar code --- PWGLF/Tasks/Resonances/kstarqa.cxx | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/PWGLF/Tasks/Resonances/kstarqa.cxx b/PWGLF/Tasks/Resonances/kstarqa.cxx index ffe82bef9b4..4f7b8c70c85 100644 --- a/PWGLF/Tasks/Resonances/kstarqa.cxx +++ b/PWGLF/Tasks/Resonances/kstarqa.cxx @@ -384,10 +384,17 @@ struct Kstarqa { 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}); +<<<<<<< HEAD hInvMass.add("CorrFactors/hSignalLossDenominator", "Kstar generated before event selection", kTH2F, {{ptAxis}, {axisNch}}); hInvMass.add("CorrFactors/hSignalLossNumerator", "Kstar generated after event selection", kTH2F, {{ptAxis}, {axisNch}}); hInvMass.add("CorrFactors/MultiplicityRec", "Multiplicity in generated MC with at least 1 reconstruction", kTH1F, {axisNch}); hInvMass.add("CorrFactors/MultiplicityGen", "Multiplicity in generated MC", kTH1F, {axisNch}); +======= + 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}); +>>>>>>> 087e3b03d (different event/signal loss method) } rEventSelection.add("tracksCheckData", "No. of events in the data", kTH1I, {{10, 0, 10}}); @@ -1701,8 +1708,13 @@ struct Kstarqa { if (!selectionEvent(RecCollision, false)) // don't fill event cut histogram continue; +<<<<<<< HEAD // const auto& mcCollisionRec = RecCollision.mcCollision_as(); // multiplicityRec = mcCollisionRec.centFT0M(); +======= + const auto& mcCollisionRec = RecCollision.mcCollision_as(); + multiplicityRec = mcCollisionRec.centFT0M(); +>>>>>>> 087e3b03d (different event/signal loss method) if (cSelectMultEstimator == kFT0M) { multiplicity1 = RecCollision.centFT0M(); @@ -1777,6 +1789,12 @@ struct Kstarqa { float multiplicity = -1.0; bool isSelectedEvent = false; +<<<<<<< HEAD +======= + float multiplicity = 100.5f; + bool isSelectedEvent = false; + +>>>>>>> 087e3b03d (different event/signal loss method) for (auto const& collision : collisions) { if (!collision.has_mcCollision()) continue; @@ -1802,9 +1820,15 @@ struct Kstarqa { hInvMass.fill(HIST("CorrFactors/hMultiplicityVsMultMC"), multiplicity, multiplicityNch); hInvMass.fill(HIST("CorrFactors/hNrecInGen"), collisions.size()); +<<<<<<< HEAD hInvMass.fill(HIST("CorrFactors/MultiplicityGen"), multiplicityNch); if (isSelectedEvent) { hInvMass.fill(HIST("CorrFactors/MultiplicityRec"), multiplicityNch); +======= + hInvMass.fill(HIST("CorrFactors/MultiplicityGen"), multiplicity); + if (isSelectedEvent) { + hInvMass.fill(HIST("CorrFactors/MultiplicityRec"), multiplicity); +>>>>>>> 087e3b03d (different event/signal loss method) } for (const auto& mcParticle : mcParticles) { @@ -1850,10 +1874,17 @@ struct Kstarqa { mother = daughter1 + daughter2; // Kstar meson hInvMass.fill(HIST("CorrFactors/h2dGenKstar"), multiplicity, mother.Pt()); +<<<<<<< HEAD hInvMass.fill(HIST("CorrFactors/h3dGenKstarVsMultMCVsMultiplicity"), multiplicityNch, multiplicity, mother.Pt()); hInvMass.fill(HIST("CorrFactors/hSignalLossDenominator"), mother.pt(), multiplicityNch); if (isSelectedEvent) { hInvMass.fill(HIST("CorrFactors/hSignalLossNumerator"), mother.pt(), multiplicityNch); +======= + 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); +>>>>>>> 087e3b03d (different event/signal loss method) } } } From 35d650426e60fede12cffe2ee569126cd0cef78e Mon Sep 17 00:00:00 2001 From: Sawan Sawan Date: Mon, 5 Jan 2026 15:19:04 +0530 Subject: [PATCH 2/7] rebased kstar code --- PWGLF/Tasks/Resonances/kstarqa.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PWGLF/Tasks/Resonances/kstarqa.cxx b/PWGLF/Tasks/Resonances/kstarqa.cxx index 4f7b8c70c85..2a7f06edd81 100644 --- a/PWGLF/Tasks/Resonances/kstarqa.cxx +++ b/PWGLF/Tasks/Resonances/kstarqa.cxx @@ -1621,7 +1621,11 @@ struct Kstarqa { } } +<<<<<<< HEAD if (std::abs(mcCollision.posZ()) > selectionConfig.cutzvertex) { +======= + if (std::abs(mcCollision.posZ()) < selectionConfig.cutzvertex) { +>>>>>>> 38263c335 (added another method for event/signal loss corrections) return; } From 52086628449b242b6fa7b877ec006333b0f82964 Mon Sep 17 00:00:00 2001 From: Sawan Sawan Date: Mon, 5 Jan 2026 15:19:17 +0530 Subject: [PATCH 3/7] rebased kstar code --- PWGLF/Tasks/Resonances/kstarqa.cxx | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Resonances/kstarqa.cxx b/PWGLF/Tasks/Resonances/kstarqa.cxx index 2a7f06edd81..58193a2ae9b 100644 --- a/PWGLF/Tasks/Resonances/kstarqa.cxx +++ b/PWGLF/Tasks/Resonances/kstarqa.cxx @@ -384,6 +384,7 @@ struct Kstarqa { 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}); +<<<<<<< HEAD <<<<<<< HEAD hInvMass.add("CorrFactors/hSignalLossDenominator", "Kstar generated before event selection", kTH2F, {{ptAxis}, {axisNch}}); hInvMass.add("CorrFactors/hSignalLossNumerator", "Kstar generated after event selection", kTH2F, {{ptAxis}, {axisNch}}); @@ -395,6 +396,12 @@ struct Kstarqa { 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}); >>>>>>> 087e3b03d (different event/signal loss method) +======= + hInvMass.add("CorrFactors/hSignalLossDenominator3D", "Kstar generated before event selection", kTH3F, {{ptAxis}, {multiplicityAxis}, axisNch}); + hInvMass.add("CorrFactors/hSignalLossNumerator3D", "Kstar generated after event selection", kTH3F, {{ptAxis}, {multiplicityAxis}, axisNch}); + hInvMass.add("CorrFactors/MultiplicityRec2D", "Multiplicity in generated MC with at least 1 reconstruction", kTH2F, {{multiplicityAxis}, axisNch}); + hInvMass.add("CorrFactors/MultiplicityGen2D", "Multiplicity in generated MC", kTH2F, {{multiplicityAxis}, axisNch}); +>>>>>>> 2ddf06887 (minor fix to code) } rEventSelection.add("tracksCheckData", "No. of events in the data", kTH1I, {{10, 0, 10}}); @@ -1621,11 +1628,15 @@ struct Kstarqa { } } +<<<<<<< HEAD <<<<<<< HEAD if (std::abs(mcCollision.posZ()) > selectionConfig.cutzvertex) { ======= if (std::abs(mcCollision.posZ()) < selectionConfig.cutzvertex) { >>>>>>> 38263c335 (added another method for event/signal loss corrections) +======= + if (std::abs(mcCollision.posZ()) > selectionConfig.cutzvertex) { +>>>>>>> 2ddf06887 (minor fix to code) return; } @@ -1822,6 +1833,7 @@ struct Kstarqa { // auto multiplicityGen = -1; // multiplicityGen = mcCollision.centFT0M(); +<<<<<<< HEAD hInvMass.fill(HIST("CorrFactors/hMultiplicityVsMultMC"), multiplicity, multiplicityNch); hInvMass.fill(HIST("CorrFactors/hNrecInGen"), collisions.size()); <<<<<<< HEAD @@ -1833,6 +1845,13 @@ struct Kstarqa { if (isSelectedEvent) { hInvMass.fill(HIST("CorrFactors/MultiplicityRec"), multiplicity); >>>>>>> 087e3b03d (different event/signal loss method) +======= + hInvMass.fill(HIST("CorrFactors/hMultiplicityVsMultMC"), multiplicity, mcCollision.multMCNParticlesEta08()); + hInvMass.fill(HIST("CorrFactors/hNrecInGen"), collisions.size()); + hInvMass.fill(HIST("CorrFactors/MultiplicityGen2D"), multiplicity, mcCollision.multMCNParticlesEta08()); + if (isSelectedEvent) { + hInvMass.fill(HIST("CorrFactors/MultiplicityRec2D"), multiplicity, mcCollision.multMCNParticlesEta08()); +>>>>>>> 2ddf06887 (minor fix to code) } for (const auto& mcParticle : mcParticles) { @@ -1885,10 +1904,14 @@ struct Kstarqa { hInvMass.fill(HIST("CorrFactors/hSignalLossNumerator"), mother.pt(), multiplicityNch); ======= hInvMass.fill(HIST("CorrFactors/h3dGenKstarVsMultMCVsMultiplicity"), mcCollision.multMCNParticlesEta08(), multiplicity, mother.Pt()); - hInvMass.fill(HIST("CorrFactors/hSignalLossDenominator"), mother.pt(), multiplicity); + hInvMass.fill(HIST("CorrFactors/hSignalLossDenominator3D"), mother.pt(), multiplicity, mcCollision.multMCNParticlesEta08()); if (isSelectedEvent) { +<<<<<<< HEAD hInvMass.fill(HIST("CorrFactors/hSignalLossNumerator"), mother.pt(), multiplicity); >>>>>>> 087e3b03d (different event/signal loss method) +======= + hInvMass.fill(HIST("CorrFactors/hSignalLossNumerator3D"), mother.pt(), multiplicity, mcCollision.multMCNParticlesEta08()); +>>>>>>> 2ddf06887 (minor fix to code) } } } From 04fd7b21993dff4f842f6def1672c50d844e09b6 Mon Sep 17 00:00:00 2001 From: Sawan Sawan Date: Mon, 5 Jan 2026 15:19:27 +0530 Subject: [PATCH 4/7] rebased kstar code --- PWGLF/Tasks/Resonances/kstarqa.cxx | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Resonances/kstarqa.cxx b/PWGLF/Tasks/Resonances/kstarqa.cxx index 58193a2ae9b..ec06c10ea40 100644 --- a/PWGLF/Tasks/Resonances/kstarqa.cxx +++ b/PWGLF/Tasks/Resonances/kstarqa.cxx @@ -386,10 +386,14 @@ struct Kstarqa { hInvMass.add("CorrFactors/h3dGenKstarVsMultMCVsMultiplicity", "MC centrality vs centrality vs p_{T}", kTH3D, {axisNch, {101, 0.0f, 101.0f}, ptAxis}); <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> c669bd852 (corrected event loss histograms) hInvMass.add("CorrFactors/hSignalLossDenominator", "Kstar generated before event selection", kTH2F, {{ptAxis}, {axisNch}}); hInvMass.add("CorrFactors/hSignalLossNumerator", "Kstar generated after event selection", kTH2F, {{ptAxis}, {axisNch}}); hInvMass.add("CorrFactors/MultiplicityRec", "Multiplicity in generated MC with at least 1 reconstruction", kTH1F, {axisNch}); hInvMass.add("CorrFactors/MultiplicityGen", "Multiplicity in generated MC", kTH1F, {axisNch}); +<<<<<<< HEAD ======= hInvMass.add("CorrFactors/hSignalLossDenominator", "Kstar generated before event selection", kTH2F, {{ptAxis}, {multiplicityAxis}}); hInvMass.add("CorrFactors/hSignalLossNumerator", "Kstar generated after event selection", kTH2F, {{ptAxis}, {multiplicityAxis}}); @@ -402,6 +406,8 @@ struct Kstarqa { hInvMass.add("CorrFactors/MultiplicityRec2D", "Multiplicity in generated MC with at least 1 reconstruction", kTH2F, {{multiplicityAxis}, axisNch}); hInvMass.add("CorrFactors/MultiplicityGen2D", "Multiplicity in generated MC", kTH2F, {{multiplicityAxis}, axisNch}); >>>>>>> 2ddf06887 (minor fix to code) +======= +>>>>>>> c669bd852 (corrected event loss histograms) } rEventSelection.add("tracksCheckData", "No. of events in the data", kTH1I, {{10, 0, 10}}); @@ -1802,11 +1808,14 @@ struct Kstarqa { hInvMass.fill(HIST("CorrFactors/hGenEvents"), multiplicityNch, 2.5); float multiplicity = -1.0; +<<<<<<< HEAD bool isSelectedEvent = false; <<<<<<< HEAD ======= float multiplicity = 100.5f; +======= +>>>>>>> c669bd852 (corrected event loss histograms) bool isSelectedEvent = false; >>>>>>> 087e3b03d (different event/signal loss method) @@ -1833,6 +1842,7 @@ struct Kstarqa { // auto multiplicityGen = -1; // multiplicityGen = mcCollision.centFT0M(); +<<<<<<< HEAD <<<<<<< HEAD hInvMass.fill(HIST("CorrFactors/hMultiplicityVsMultMC"), multiplicity, multiplicityNch); hInvMass.fill(HIST("CorrFactors/hNrecInGen"), collisions.size()); @@ -1847,11 +1857,18 @@ struct Kstarqa { >>>>>>> 087e3b03d (different event/signal loss method) ======= hInvMass.fill(HIST("CorrFactors/hMultiplicityVsMultMC"), multiplicity, mcCollision.multMCNParticlesEta08()); +======= + hInvMass.fill(HIST("CorrFactors/hMultiplicityVsMultMC"), multiplicity, multiplicityNch); +>>>>>>> c669bd852 (corrected event loss histograms) hInvMass.fill(HIST("CorrFactors/hNrecInGen"), collisions.size()); - hInvMass.fill(HIST("CorrFactors/MultiplicityGen2D"), multiplicity, mcCollision.multMCNParticlesEta08()); + hInvMass.fill(HIST("CorrFactors/MultiplicityGen"), multiplicityNch); if (isSelectedEvent) { +<<<<<<< HEAD hInvMass.fill(HIST("CorrFactors/MultiplicityRec2D"), multiplicity, mcCollision.multMCNParticlesEta08()); >>>>>>> 2ddf06887 (minor fix to code) +======= + hInvMass.fill(HIST("CorrFactors/MultiplicityRec"), multiplicityNch); +>>>>>>> c669bd852 (corrected event loss histograms) } for (const auto& mcParticle : mcParticles) { @@ -1897,6 +1914,7 @@ struct Kstarqa { mother = daughter1 + daughter2; // Kstar meson hInvMass.fill(HIST("CorrFactors/h2dGenKstar"), multiplicity, mother.Pt()); +<<<<<<< HEAD <<<<<<< HEAD hInvMass.fill(HIST("CorrFactors/h3dGenKstarVsMultMCVsMultiplicity"), multiplicityNch, multiplicity, mother.Pt()); hInvMass.fill(HIST("CorrFactors/hSignalLossDenominator"), mother.pt(), multiplicityNch); @@ -1912,6 +1930,12 @@ struct Kstarqa { ======= hInvMass.fill(HIST("CorrFactors/hSignalLossNumerator3D"), mother.pt(), multiplicity, mcCollision.multMCNParticlesEta08()); >>>>>>> 2ddf06887 (minor fix to code) +======= + hInvMass.fill(HIST("CorrFactors/h3dGenKstarVsMultMCVsMultiplicity"), multiplicityNch, multiplicity, mother.Pt()); + hInvMass.fill(HIST("CorrFactors/hSignalLossDenominator"), mother.pt(), multiplicityNch); + if (isSelectedEvent) { + hInvMass.fill(HIST("CorrFactors/hSignalLossNumerator"), mother.pt(), multiplicityNch); +>>>>>>> c669bd852 (corrected event loss histograms) } } } From e1ffc91688a9d41b4b8a0590ce7e8629932e6489 Mon Sep 17 00:00:00 2001 From: Sawan Sawan Date: Mon, 5 Jan 2026 15:19:33 +0530 Subject: [PATCH 5/7] rebased kstar code --- PWGLF/Tasks/Resonances/kstarqa.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PWGLF/Tasks/Resonances/kstarqa.cxx b/PWGLF/Tasks/Resonances/kstarqa.cxx index ec06c10ea40..68eadd8e876 100644 --- a/PWGLF/Tasks/Resonances/kstarqa.cxx +++ b/PWGLF/Tasks/Resonances/kstarqa.cxx @@ -1729,6 +1729,7 @@ struct Kstarqa { if (!selectionEvent(RecCollision, false)) // don't fill event cut histogram continue; +<<<<<<< HEAD <<<<<<< HEAD // const auto& mcCollisionRec = RecCollision.mcCollision_as(); // multiplicityRec = mcCollisionRec.centFT0M(); @@ -1736,6 +1737,10 @@ struct Kstarqa { const auto& mcCollisionRec = RecCollision.mcCollision_as(); multiplicityRec = mcCollisionRec.centFT0M(); >>>>>>> 087e3b03d (different event/signal loss method) +======= + // const auto& mcCollisionRec = RecCollision.mcCollision_as(); + // multiplicityRec = mcCollisionRec.centFT0M(); +>>>>>>> 61d6a6024 (removed unused variable) if (cSelectMultEstimator == kFT0M) { multiplicity1 = RecCollision.centFT0M(); From d51b795b82d5183263f86dad8ad0ce60a26bfb32 Mon Sep 17 00:00:00 2001 From: Sawan Sawan Date: Sat, 3 Jan 2026 10:47:28 +0530 Subject: [PATCH 6/7] added third axis to mass correlation plot --- .../Tasks/Resonances/higherMassResonances.cxx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/PWGLF/Tasks/Resonances/higherMassResonances.cxx b/PWGLF/Tasks/Resonances/higherMassResonances.cxx index f822393101e..ee81cbc35fe 100644 --- a/PWGLF/Tasks/Resonances/higherMassResonances.cxx +++ b/PWGLF/Tasks/Resonances/higherMassResonances.cxx @@ -338,8 +338,8 @@ struct HigherMassResonances { if (config.qAv0) { // Invariant Mass rKzeroShort.add("hMassK0Shortbefore", "hMassK0Shortbefore", kTHnSparseF, {k0ShortMassAxis, ptAxis}); - rKzeroShort.add("hK0ShortMassCorr", "hK0ShortMassCorr", kTH2F, {k0ShortMassAxis, k0ShortMassAxis}); - rKzeroShort.add("hK0ShortMassCorrAfterCut", "hK0ShortMassCorrAfterCut", kTH2F, {k0ShortMassAxis, k0ShortMassAxis}); + rKzeroShort.add("hK0ShortMassCorr", "hK0ShortMassCorr", kTHnSparseF, {k0ShortMassAxis, k0ShortMassAxis, deltaMAxis}); + // rKzeroShort.add("hK0ShortMassCorrAfterCut", "hK0ShortMassCorrAfterCut", kTH2F, {k0ShortMassAxis, k0ShortMassAxis}); rKzeroShort.add("hK0sPtCorrelation", "hK0sPtCorrelation", kTH1F, {{1000, 0.0f, 100.0f}}); rKzeroShort.add("hMassK0ShortSelected", "hMassK0ShortSelected", kTHnSparseF, {k0ShortMassAxis, ptAxis}); // Topological histograms (after the selection) @@ -1034,20 +1034,20 @@ struct HigherMassResonances { mother = daughter1 + daughter2; // invariant mass of Kshort pair isMix = false; + const double deltaMass = deltaM(v1.mK0Short(), v2.mK0Short()); if (config.qAv0) { - rKzeroShort.fill(HIST("hK0ShortMassCorr"), v1.mK0Short(), v2.mK0Short()); + rKzeroShort.fill(HIST("hK0ShortMassCorr"), v1.mK0Short(), v2.mK0Short(), deltaMass); } - const double deltaMass = deltaM(v1.mK0Short(), v2.mK0Short()); if (!config.qAOptimisation) { if (deltaMass > config.cMaxDeltaM) { continue; } } - if (config.qAv0) { - rKzeroShort.fill(HIST("hK0ShortMassCorrAfterCut"), v1.mK0Short(), v2.mK0Short()); - } + // if (config.qAv0) { + // rKzeroShort.fill(HIST("hK0ShortMassCorrAfterCut"), v1.mK0Short(), v2.mK0Short()); + // } const double ptCorr = std::abs(daughter1.Pt() + daughter2.Pt()) / mother.Pt(); if (config.qAv0) { @@ -1555,18 +1555,18 @@ struct HigherMassResonances { mother = daughter1 + daughter2; // invariant mass of Kshort pair isMix = false; + const double deltaMass = deltaM(v1.mK0Short(), v2.mK0Short()); if (config.qAv0) { - rKzeroShort.fill(HIST("hK0ShortMassCorr"), v1.mK0Short(), v2.mK0Short()); + rKzeroShort.fill(HIST("hK0ShortMassCorr"), v1.mK0Short(), v2.mK0Short(), deltaMass); } - const double deltaMass = deltaM(v1.mK0Short(), v2.mK0Short()); if (deltaMass > config.cMaxDeltaM) { continue; } - if (config.qAv0) { - rKzeroShort.fill(HIST("hK0ShortMassCorrAfterCut"), v1.mK0Short(), v2.mK0Short()); - } + // if (config.qAv0) { + // rKzeroShort.fill(HIST("hK0ShortMassCorrAfterCut"), v1.mK0Short(), v2.mK0Short()); + // } const double ptCorr = std::abs(daughter1.Pt() + daughter2.Pt()) / mother.Pt(); if (config.qAv0) { From a211f89a7da7bc92a476e365a5c8429098991439 Mon Sep 17 00:00:00 2001 From: Sawan Sawan Date: Mon, 5 Jan 2026 15:17:59 +0530 Subject: [PATCH 7/7] added deltaR for K0s daughters --- .../Tasks/Resonances/higherMassResonances.cxx | 180 ++++++++++-------- 1 file changed, 96 insertions(+), 84 deletions(-) diff --git a/PWGLF/Tasks/Resonances/higherMassResonances.cxx b/PWGLF/Tasks/Resonances/higherMassResonances.cxx index ee81cbc35fe..60838cec1de 100644 --- a/PWGLF/Tasks/Resonances/higherMassResonances.cxx +++ b/PWGLF/Tasks/Resonances/higherMassResonances.cxx @@ -100,8 +100,7 @@ struct HigherMassResonances { Configurable isApplyDCAv0topv{"isApplyDCAv0topv", false, "DCA V0 to PV"}; Configurable hasTPC{"hasTPC", false, "TPC"}; Configurable isselectTWOKsOnly{"isselectTWOKsOnly", true, "Select only events with two K0s"}; - Configurable isapplyPairRapidityRec{"isapplyPairRapidityRec", false, "Apply pair rapidity cut on reconstructed mother (after already applying rapidity cut on generated mother)"}; - Configurable isapplyPairRapidityGen{"isapplyPairRapidityGen", false, "Apply pair rapidity cut on generated mother (before applying rapidity cut on reconstructed mother)"}; + Configurable isapplyPairRapidityMC{"isapplyPairRapidityMC", false, "Apply pair rapidity cut on reconstructed mother (after already applying rapidity cut on generated mother)"}; Configurable cSelectMultEstimator{"cSelectMultEstimator", 0, "Select multiplicity estimator: 0 - FT0M, 1 - FT0A, 2 - FT0C"}; // Configurable configOccCut{"configOccCut", 1000, "Occupancy cut"}; // Configurable isVertexTOFMatched{"isVertexTOFMatched", false, "Vertex TOF Matched"}; @@ -121,12 +120,15 @@ struct HigherMassResonances { Configurable isNoITSROFrameBorder{"isNoITSROFrameBorder", true, "kNoITSROFrameBorder"}; // Configurable parameters for V0 selection + Configurable confV0PtMin{"confV0PtMin", 0.f, "Minimum transverse momentum of V0"}; + Configurable confV0PtMax{"confV0PtMax", 100.f, "Maximum transverse momentum of V0"}; + Configurable confPiPtMin{"confPiPtMin", 0.1f, "Minimum transverse momentum of pion daughter"}; + Configurable confPiPtMax{"confPiPtMax", 100.f, "Maximum transverse momentum of pion daughter"}; Configurable cMaxDeltaM{"cMaxDeltaM", 0.01f, "Sqrt((m1-mPDG)^2 + (m2-mPDG)^2) < cMaxDeltaM)"}; Configurable confV0DCADaughMax{"confV0DCADaughMax", 1.0f, "DCA b/w V0 daughters"}; Configurable v0DCApostoPV{"v0DCApostoPV", 0.06, "DCA Pos To PV"}; Configurable v0DCAnegtoPV{"v0DCAnegtoPV", 0.06, "DCA Neg To PV"}; Configurable cMaxV0DCA{"cMaxV0DCA", 0.5, "DCA V0 to PV"}; - Configurable confV0PtMin{"confV0PtMin", 0.f, "Minimum transverse momentum of V0"}; Configurable confV0CPAMin{"confV0CPAMin", 0.97f, "Minimum CPA of V0"}; Configurable confV0TranRadV0Min{"confV0TranRadV0Min", 0.5f, "Minimum transverse radius"}; // Configurable confV0TranRadV0Max{"confV0TranRadV0Max", 200.f, "Maximum transverse radius"}; @@ -138,11 +140,11 @@ struct HigherMassResonances { Configurable confDaughPIDCutTPC{"confDaughPIDCutTPC", 5, "PID selections for KS0 daughters"}; Configurable confDaughPIDCutTOF{"confDaughPIDCutTOF", 5, "PID selections for KS0 daughters in TOF"}; Configurable confKsrapidity{"confKsrapidity", 0.5f, "Rapidity cut on K0s"}; - Configurable angSepCut{"angSepCut", 0.01f, "Angular separation cut"}; - Configurable isapplyAngSepCut{"isapplyAngSepCut", false, "Apply angular separation cut"}; // Configurable isStandardV0{"isStandardV0", false, "Standard V0 selection"}; Configurable isApplyEtaCutK0s{"isApplyEtaCutK0s", false, "Apply eta cut on K0s daughters"}; Configurable cfgETAcut{"cfgETAcut", 0.8f, "Track ETA cut"}; + Configurable deltaRDaugherCut{"deltaRDaugherCut", 0.001f, "DeltaR cut on V0 daughters"}; + Configurable deltaRK0sCut{"deltaRK0sCut", false, "Apply deltaR cut between two K0s"}; // Configurable for track selection and multiplicity Configurable cfgPTcut{"cfgPTcut", 0.2f, "Track PT cut"}; @@ -277,7 +279,7 @@ struct HigherMassResonances { hv0label->GetXaxis()->SetBinLabel(1, "All Tracks"); hv0label->GetXaxis()->SetBinLabel(2, "DCA V0 to PV"); hv0label->GetXaxis()->SetBinLabel(3, "y K0s"); - hv0label->GetXaxis()->SetBinLabel(4, "Min V0 pT"); + hv0label->GetXaxis()->SetBinLabel(4, "V0 pT cut"); hv0label->GetXaxis()->SetBinLabel(5, "Daughter DCA"); hv0label->GetXaxis()->SetBinLabel(6, "CosPA"); hv0label->GetXaxis()->SetBinLabel(7, "Decay Radius"); @@ -293,8 +295,11 @@ struct HigherMassResonances { hv0DauLabel->GetXaxis()->SetBinLabel(4, "TPC CRFC"); hv0DauLabel->GetXaxis()->SetBinLabel(5, "TPC Chi2NCL"); hv0DauLabel->GetXaxis()->SetBinLabel(6, "Charge"); - hv0DauLabel->GetXaxis()->SetBinLabel(7, "Eta"); - hv0DauLabel->GetXaxis()->SetBinLabel(8, "PID TPC"); + hv0DauLabel->GetXaxis()->SetBinLabel(7, "Charge"); + hv0DauLabel->GetXaxis()->SetBinLabel(8, "Eta"); + hv0DauLabel->GetXaxis()->SetBinLabel(9, "PID TPC"); + hv0DauLabel->GetXaxis()->SetBinLabel(10, "PID TOF"); + hv0DauLabel->GetXaxis()->SetBinLabel(11, "Pt cut"); std::shared_ptr hv0labelmcrec = hMChists.get(HIST("events_checkrec")); hv0labelmcrec->GetXaxis()->SetBinLabel(1, "All Tracks"); @@ -347,6 +352,7 @@ struct HigherMassResonances { rKzeroShort.add("hV0CosPA", "hV0CosPA", {HistType::kTH1F, {{100, 0.96f, 1.1f}}}); rKzeroShort.add("hLT", "hLT", {HistType::kTH1F, {{100, 0.0f, 50.0f}}}); rKzeroShort.add("angularSeparation", "Angular distribution between two K0s vs pT", {HistType::kTH1F, {{200, 0.0f, 4.0f}}}); + rKzeroShort.add("hDauDeltaR", "Delta R of positive and negative daughers", {HistType::kTHnSparseF, {angleSepAxis, angleSepAxis}}); } rKzeroShort.add("NksProduced", "Number of K0s produced", kTH1I, {{15, -0.5, 14.5}}); @@ -500,7 +506,7 @@ struct HigherMassResonances { } rEventSelection.fill(HIST("htrackscheck_v0"), 2.5); - if (pT < config.confV0PtMin) { + if (pT < config.confV0PtMin || pT > config.confV0PtMax) { return false; } rEventSelection.fill(HIST("htrackscheck_v0"), 3.5); @@ -612,6 +618,12 @@ struct HigherMassResonances { if (std::abs(v0candidate.tofNSigmaK0PiMinus()) > config.confDaughPIDCutTOF && v0candidate.negativeHasTOF()) { return false; } + rEventSelection.fill(HIST("htrackscheck_v0_daughters"), 9.5); + + if (track.pt() < config.confPiPtMin || track.pt() > config.confPiPtMax) { + return false; + } + rEventSelection.fill(HIST("htrackscheck_v0_daughters"), 10.5); if (config.qAPID) { (charge == 1) ? rKzeroShort.fill(HIST("hNSigmaPosPionK0s_after"), track.tpcInnerParam(), track.tpcNSigmaPi()) : rKzeroShort.fill(HIST("hNSigmaNegPionK0s_after"), track.tpcInnerParam(), track.tpcNSigmaPi()); @@ -675,34 +687,13 @@ struct HigherMassResonances { return false; } - // rKzeroShort.fill(HIST("negative_pt"), negTrackExtra.pt()); - // rKzeroShort.fill(HIST("positive_pt"), posTrackExtra.pt()); - // rKzeroShort.fill(HIST("negative_eta"), negTrackExtra.eta()); - // rKzeroShort.fill(HIST("positive_eta"), posTrackExtra.eta()); - // rKzeroShort.fill(HIST("negative_phi"), negTrackExtra.phi()); - // rKzeroShort.fill(HIST("positive_phi"), posTrackExtra.phi()); - return true; - } + // double deltaRDaugherPos = std::sqrt(TVector2::Phi_mpi_pi(posTrackExtra.phi() - negTrackExtra.phi()) * TVector2::Phi_mpi_pi(posTrackExtra.phi() - negTrackExtra.phi()) + (posTrackExtra.eta() - negTrackExtra.eta()) * (posTrackExtra.eta() - negTrackExtra.eta())); + // double deltaRDaugherNeg = std::sqrt(TVector2::Phi_mpi_pi(posTrackExtra.phi() - negTrackExtra.phi()) * TVector2::Phi_mpi_pi(posTrackExtra.phi() - negTrackExtra.phi()) + (posTrackExtra.eta() - negTrackExtra.eta()) * (posTrackExtra.eta() - negTrackExtra.eta())); + + // if (config.qAv0) { + // rKzeroShort.fill(HIST("hDauDeltaR"), deltaRDaugherPos, deltaRDaugherNeg); + // } - // Angular separation cut on KsKs pairs - template - bool applyAngSep(const T1& candidate1, const T2& candidate2) - { - double eta1, eta2, phi1, phi2; - eta1 = candidate1.eta(); - eta2 = candidate2.eta(); - phi1 = candidate1.phi(); - phi2 = candidate2.phi(); - - const double dphi = TVector2::Phi_mpi_pi(phi1 - phi2); - const double deta = eta1 - eta2; - double angle = std::sqrt(dphi * dphi + deta * deta); - if (config.qAv0) { - rKzeroShort.fill(HIST("angularSeparation"), angle); - } - if (config.isapplyAngSepCut && angle > config.angSepCut) { - return false; - } return true; } @@ -976,34 +967,6 @@ struct HigherMassResonances { continue; } - // if (postrack1.hasTOF()) { - // double nTOFSigmaPos1{postrack1.tofNSigmaPi()}; - // if ((std::abs(nTOFSigmaPos1) > config.confDaughPIDCutTOF)) { - // continue; - // } - // } - - // if (negtrack1.hasTOF()) { - // double nTOFSigmaNeg1{negtrack1.tofNSigmaPi()}; - // if (std::abs(nTOFSigmaNeg1) > config.confDaughPIDCutTOF) { - // continue; - // } - // } - - // if (postrack2.hasTOF()) { - // double nTOFSigmaPos2{postrack2.tofNSigmaPi()}; - // if ((std::abs(nTOFSigmaPos2) > config.confDaughPIDCutTOF)) { - // continue; - // } - // } - - // if (negtrack2.hasTOF()) { - // double nTOFSigmaNeg2{negtrack2.tofNSigmaPi()}; - // if (std::abs(nTOFSigmaNeg2) > config.confDaughPIDCutTOF) { - // continue; - // } - // } - if (std::find(v0indexes.begin(), v0indexes.end(), v1.globalIndex()) == v0indexes.end()) { v0indexes.push_back(v1.globalIndex()); } @@ -1019,7 +982,14 @@ struct HigherMassResonances { continue; } - if (!applyAngSep(v1, v2)) { + double deltaRDaugherPos = std::sqrt(TVector2::Phi_mpi_pi(postrack1.phi() - negtrack1.phi()) * TVector2::Phi_mpi_pi(postrack1.phi() - negtrack1.phi()) + (postrack1.eta() - negtrack1.eta()) * (postrack1.eta() - negtrack1.eta())); + double deltaRDaugherNeg = std::sqrt(TVector2::Phi_mpi_pi(postrack2.phi() - negtrack2.phi()) * TVector2::Phi_mpi_pi(postrack2.phi() - negtrack2.phi()) + (postrack2.eta() - negtrack2.eta()) * (postrack2.eta() - negtrack2.eta())); + + if (config.qAv0) { + rKzeroShort.fill(HIST("hDauDeltaR"), deltaRDaugherPos, deltaRDaugherNeg); + } + + if (deltaRDaugherPos < config.deltaRDaugherCut || deltaRDaugherNeg < config.deltaRDaugherCut) { continue; } @@ -1049,19 +1019,27 @@ struct HigherMassResonances { // rKzeroShort.fill(HIST("hK0ShortMassCorrAfterCut"), v1.mK0Short(), v2.mK0Short()); // } - const double ptCorr = std::abs(daughter1.Pt() + daughter2.Pt()) / mother.Pt(); + const double ptCorr = (mother.Pt() - daughter1.Pt() != 0.) ? daughter1.Pt() / (mother.Pt() - daughter1.Pt()) : 0.; if (config.qAv0) { rKzeroShort.fill(HIST("hK0sPtCorrelation"), ptCorr); } - if (!config.isselectTWOKsOnly && !config.qAOptimisation) + double deltaRvalue = std::sqrt(TVector2::Phi_mpi_pi(v1.phi() - v2.phi()) * TVector2::Phi_mpi_pi(v1.phi() - v2.phi()) + (v1.eta() - v2.eta()) * (v1.eta() - v2.eta())); + + if (!config.qAOptimisation) { + if (deltaRvalue < config.deltaRK0sCut) { + continue; + } + } + + if (!config.isselectTWOKsOnly && !config.qAOptimisation) { fillInvMass(mother, multiplicity, daughter1, daughter2, isMix); + } if (!config.isselectTWOKsOnly && config.qAOptimisation) { - double angSepValue = std::sqrt(TVector2::Phi_mpi_pi(v1.phi() - v2.phi()) * TVector2::Phi_mpi_pi(v1.phi() - v2.phi()) + (v1.eta() - v2.eta()) * (v1.eta() - v2.eta())); if (std::abs(mother.Rapidity()) < config.rapidityMotherData) { - hglue.fill(HIST("h3glueInvMassDS"), multiplicity, mother.Pt(), mother.M(), deltaMass, angSepValue, ptCorr); + hglue.fill(HIST("h3glueInvMassDS"), multiplicity, mother.Pt(), mother.M(), deltaMass, deltaRvalue, ptCorr); } for (int i = 0; i < config.cRotations; i++) { @@ -1074,7 +1052,7 @@ struct HigherMassResonances { double pTcorrRot = std::abs(daughterRot.Pt() + daughter2.Pt()) / motherRot.Pt(); if (motherRot.Rapidity() < config.rapidityMotherData) - hglue.fill(HIST("h3glueInvMassRot"), multiplicity, motherRot.Pt(), motherRot.M(), deltaMass, angSepValue, pTcorrRot); + hglue.fill(HIST("h3glueInvMassRot"), multiplicity, motherRot.Pt(), motherRot.M(), deltaMass, deltaRvalue, pTcorrRot); } } } @@ -1162,20 +1140,39 @@ struct HigherMassResonances { continue; } + double deltaRDaugherPos = std::sqrt(TVector2::Phi_mpi_pi(postrack1.phi() - negtrack1.phi()) * TVector2::Phi_mpi_pi(postrack1.phi() - negtrack1.phi()) + (postrack1.eta() - negtrack1.eta()) * (postrack1.eta() - negtrack1.eta())); + double deltaRDaugherNeg = std::sqrt(TVector2::Phi_mpi_pi(postrack2.phi() - negtrack2.phi()) * TVector2::Phi_mpi_pi(postrack2.phi() - negtrack2.phi()) + (postrack2.eta() - negtrack2.eta()) * (postrack2.eta() - negtrack2.eta())); + + if (deltaRDaugherPos < config.deltaRDaugherCut || deltaRDaugherNeg < config.deltaRDaugherCut) { + continue; + } + + if (config.isApplyEtaCutK0s && (t1.eta() < config.confDaughEta || t2.eta() < config.confDaughEta)) { + continue; + } + daughter1 = ROOT::Math::PxPyPzMVector(t1.px(), t1.py(), t1.pz(), o2::constants::physics::MassK0Short); // Kshort daughter2 = ROOT::Math::PxPyPzMVector(t2.px(), t2.py(), t2.pz(), o2::constants::physics::MassK0Short); // Kshort mother = daughter1 + daughter2; // invariant mass of Kshort pair + const double deltaMass = deltaM(t1.mK0Short(), t2.mK0Short()); + + if (!config.qAOptimisation) { + if (deltaMass > config.cMaxDeltaM) { + continue; + } + } + isMix = true; if (!config.qAOptimisation) fillInvMass(mother, multiplicity, daughter1, daughter2, isMix); if (config.qAOptimisation) { - double angSepValue = std::sqrt(TVector2::Phi_mpi_pi(daughter1.phi() - daughter2.phi()) * TVector2::Phi_mpi_pi(daughter1.phi() - daughter2.phi()) + (daughter1.eta() - daughter2.eta()) * (daughter1.eta() - daughter2.eta())); + double deltaRvalue = std::sqrt(TVector2::Phi_mpi_pi(daughter1.phi() - daughter2.phi()) * TVector2::Phi_mpi_pi(daughter1.phi() - daughter2.phi()) + (daughter1.eta() - daughter2.eta()) * (daughter1.eta() - daughter2.eta())); const double deltaMass = deltaM(t1.mK0Short(), t2.mK0Short()); const double ptCorr = std::abs(daughter1.Pt() + daughter2.Pt()) / mother.Pt(); if (std::abs(mother.Rapidity()) < config.rapidityMotherData) { - hglue.fill(HIST("h3glueInvMassME"), multiplicity, mother.Pt(), mother.M(), deltaMass, angSepValue, ptCorr); + hglue.fill(HIST("h3glueInvMassME"), multiplicity, mother.Pt(), mother.M(), deltaMass, deltaRvalue, ptCorr); } } } @@ -1294,7 +1291,7 @@ struct HigherMassResonances { hMChists.fill(HIST("GenEta"), mcParticle.eta()); hMChists.fill(HIST("GenPhi"), mcParticle.phi()); - if (config.isapplyPairRapidityGen && std::abs(lResonanceGen1.Rapidity()) >= config.rapidityMotherData) { + if (config.isapplyPairRapidityMC && std::abs(lResonanceGen1.Rapidity()) >= config.rapidityMotherData) { continue; } @@ -1475,7 +1472,7 @@ struct HigherMassResonances { hMChists.fill(HIST("RecPhi"), mothertrack1.phi()); hMChists.fill(HIST("RecEta"), mothertrack1.eta()); - if (config.isapplyPairRapidityRec && std::abs(mother.Rapidity()) >= config.rapidityMotherData) { + if (config.isapplyPairRapidityMC && std::abs(mother.Rapidity()) >= config.rapidityMotherData) { continue; } @@ -1544,10 +1541,6 @@ struct HigherMassResonances { continue; } - if (!applyAngSep(v1, v2)) { - continue; - } - allConditionsMet = 1; daughter1 = ROOT::Math::PxPyPzMVector(v1.px(), v1.py(), v1.pz(), o2::constants::physics::MassK0Short); // Kshort daughter2 = ROOT::Math::PxPyPzMVector(v2.px(), v2.py(), v2.pz(), o2::constants::physics::MassK0Short); // Kshort @@ -1568,19 +1561,26 @@ struct HigherMassResonances { // rKzeroShort.fill(HIST("hK0ShortMassCorrAfterCut"), v1.mK0Short(), v2.mK0Short()); // } - const double ptCorr = std::abs(daughter1.Pt() + daughter2.Pt()) / mother.Pt(); + const double ptCorr = (mother.Pt() - daughter1.Pt() != 0.) ? daughter1.Pt() / (mother.Pt() - daughter1.Pt()) : 0.; if (config.qAv0) { rKzeroShort.fill(HIST("hK0sPtCorrelation"), ptCorr); } + double deltaRvalue = std::sqrt(TVector2::Phi_mpi_pi(v1.phi() - v2.phi()) * TVector2::Phi_mpi_pi(v1.phi() - v2.phi()) + (v1.eta() - v2.eta()) * (v1.eta() - v2.eta())); + + if (!config.qAOptimisation) { + if (deltaRvalue < config.deltaRK0sCut) { + continue; + } + } + if (!config.isselectTWOKsOnly && !config.qAOptimisation) fillInvMass(mother, multiplicity, daughter1, daughter2, isMix); if (!config.isselectTWOKsOnly && config.qAOptimisation) { - double angSepValue = std::sqrt(TVector2::Phi_mpi_pi(v1.phi() - v2.phi()) * TVector2::Phi_mpi_pi(v1.phi() - v2.phi()) + (v1.eta() - v2.eta()) * (v1.eta() - v2.eta())); if (std::abs(mother.Rapidity()) < config.rapidityMotherData) { - hglue.fill(HIST("h3glueInvMassDS"), multiplicity, mother.Pt(), mother.M(), deltaMass, angSepValue, ptCorr); + hglue.fill(HIST("h3glueInvMassDS"), multiplicity, mother.Pt(), mother.M(), deltaMass, deltaRvalue, ptCorr); } for (int i = 0; i < config.cRotations; i++) { @@ -1591,7 +1591,7 @@ struct HigherMassResonances { motherRot = daughterRot + daughter2; double pTcorrRot = std::abs(daughterRot.Pt() + daughter2.Pt()) / motherRot.Pt(); if (motherRot.Rapidity() < config.rapidityMotherData) - hglue.fill(HIST("h3glueInvMassRot"), multiplicity, motherRot.Pt(), motherRot.M(), deltaMass, angSepValue, pTcorrRot); + hglue.fill(HIST("h3glueInvMassRot"), multiplicity, motherRot.Pt(), motherRot.M(), deltaMass, deltaRvalue, pTcorrRot); } } } @@ -1634,20 +1634,32 @@ struct HigherMassResonances { continue; } + if (config.isApplyEtaCutK0s && (t1.eta() < config.confDaughEta || t2.eta() < config.confDaughEta)) { + continue; + } + daughter1 = ROOT::Math::PxPyPzMVector(t1.px(), t1.py(), t1.pz(), o2::constants::physics::MassK0Short); // Kshort daughter2 = ROOT::Math::PxPyPzMVector(t2.px(), t2.py(), t2.pz(), o2::constants::physics::MassK0Short); // Kshort mother = daughter1 + daughter2; // invariant mass of Kshort pair + const double deltaMass = deltaM(t1.mK0Short(), t2.mK0Short()); + + if (!config.qAOptimisation) { + if (deltaMass > config.cMaxDeltaM) { + continue; + } + } + isMix = true; if (!config.qAOptimisation) fillInvMass(mother, multiplicity, daughter1, daughter2, isMix); if (config.qAOptimisation) { - double angSepValue = std::sqrt(TVector2::Phi_mpi_pi(daughter1.phi() - daughter2.phi()) * TVector2::Phi_mpi_pi(daughter1.phi() - daughter2.phi()) + (daughter1.eta() - daughter2.eta()) * (daughter1.eta() - daughter2.eta())); + double deltaRvalue = std::sqrt(TVector2::Phi_mpi_pi(daughter1.phi() - daughter2.phi()) * TVector2::Phi_mpi_pi(daughter1.phi() - daughter2.phi()) + (daughter1.eta() - daughter2.eta()) * (daughter1.eta() - daughter2.eta())); const double deltaMass = deltaM(t1.mK0Short(), t2.mK0Short()); const double ptCorr = std::abs(daughter1.Pt() + daughter2.Pt()) / mother.Pt(); if (std::abs(mother.Rapidity()) < config.rapidityMotherData) { - hglue.fill(HIST("h3glueInvMassME"), multiplicity, mother.Pt(), mother.M(), deltaMass, angSepValue, ptCorr); + hglue.fill(HIST("h3glueInvMassME"), multiplicity, mother.Pt(), mother.M(), deltaMass, deltaRvalue, ptCorr); } } }