From 213b275dca3b178e7bd645e8d7415b8ade590e86 Mon Sep 17 00:00:00 2001 From: Durgesh Bhatt Date: Tue, 1 Dec 2026 19:03:39 +0530 Subject: [PATCH] make the weight factor as configurable in the rotational background and added another centrality axis for event mixing --- PWGLF/Tasks/Resonances/deltaAnalysis.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/PWGLF/Tasks/Resonances/deltaAnalysis.cxx b/PWGLF/Tasks/Resonances/deltaAnalysis.cxx index 794abcb4cd5..bea60ea2063 100644 --- a/PWGLF/Tasks/Resonances/deltaAnalysis.cxx +++ b/PWGLF/Tasks/Resonances/deltaAnalysis.cxx @@ -192,8 +192,9 @@ struct DeltaAnalysis { struct : ConfigurableGroup { Configurable enableRotationalBackground{"enableRotationalBackground", true, "Compute rotational background by rotating pion phi near PI"}; - Configurable numberOfRotations{"numberOfRotations", 10, "Number of pion-phi rotations for background"}; - Configurable rotationAngleWindow{"rotationAngleWindow", 6.f, "Pion rotated by angles within PI +/- PI/rotationAngleWindow"}; + Configurable numberOfRotations{"numberOfRotations", 5, "Number of pion-phi rotations for background"}; + Configurable rotationAngleWindow{"rotationAngleWindow", 1.f, "Pion rotated by angles within PI +/- PI/rotationAngleWindow"}; + Configurable applyRotationWeight{"applyRotationWeight", false, "Weight rotated pairs by 1/numberOfRotations"}; } rotBkg; struct : ConfigurableGroup { @@ -202,6 +203,7 @@ struct DeltaAnalysis { ConfigurableAxis cfgMassAxis{"cfgMassAxis", {120, 1.0, 6.0}, "M_{inv} (GeV/#it{c}^{2})"}; ConfigurableAxis cfgMomentumAxis{"cfgMomentumAxis", {50, 0.0, 12.0}, "p (GeV/#it{c})"}; ConfigurableAxis cfgCentAxis{"cfgCentAxis", {VARIABLE_WIDTH, 0.f, 10.f, 20.f, 30.f, 40.f, 50.f, 60.f, 70.f, 80.f, 90.f, 100.f}, "Centrality (%)"}; + ConfigurableAxis cfgCentAxisMixing{"cfgCentAxisMixing", {VARIABLE_WIDTH, 0.f, 10.f, 20.f, 30.f, 40.f, 50.f, 60.f, 70.f, 80.f, 90.f, 100.f}, "Centrality for mixing (%)"}; ConfigurableAxis cfgVtxAxis{"cfgVtxAxis", {VARIABLE_WIDTH, -12.f, -10.f, -9.f, -8.f, -7.f, -6.f, -5.f, -4.f, -3.f, -2.f, -1.f, 0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f, 10.f, 12.f}, "Vertex z [cm]"}; ConfigurableAxis cfgRapAxis{"cfgRapAxis", {20, -1.0, 1.0}, "Rapidity y"}; } axes; @@ -1211,7 +1213,7 @@ struct DeltaAnalysis { } // Rotational background: rotate the pion phi by PI +/- PI/rotationAngleWindow (numberOfRotations - // steps), keep proton, pion pT and pion pz fixed. Default template argument keeps the DATA call + // evenly spaced steps, window ends excluded), keep proton, pion pT and pion pz fixed. Default template argument keeps the DATA call // site (fillInvariantMassHistogramsFromPools) unchanged; processMC calls fillRotationalBackground. template void fillRotationalBackground(int protonSign, int pionSign, float pxProton, float pyProton, float pzProton, float pionPhi, float pionPt, float pzPion, float centrality) @@ -1219,7 +1221,7 @@ struct DeltaAnalysis { if (rotBkg.numberOfRotations <= 0) { return; } - const float weight = 1.f / static_cast(rotBkg.numberOfRotations); + const float weight = rotBkg.applyRotationWeight ? 1.f / static_cast(rotBkg.numberOfRotations) : 1.f; const float rotWindowHalf = o2::constants::math::PI / static_cast(rotBkg.rotationAngleWindow); for (int iRot = 0; iRot < rotBkg.numberOfRotations; ++iRot) { @@ -1228,7 +1230,7 @@ struct DeltaAnalysis { rotAngle = o2::constants::math::PI; } else { rotAngle = (o2::constants::math::PI - rotWindowHalf) + - static_cast(iRot) * (2.f * rotWindowHalf / static_cast(rotBkg.numberOfRotations - 1)); + static_cast(iRot + 1) * (2.f * rotWindowHalf / static_cast(rotBkg.numberOfRotations + 1)); } const float newPhi = RecoDecay::constrainAngle(pionPhi + rotAngle, 0.f); const float pxPionRot = pionPt * std::cos(newPhi); @@ -1598,7 +1600,7 @@ struct DeltaAnalysis { template void runMixingWithBinning(EventCandidates const& collisions, TrackCandidates const& tracks, bool isMC) { - BinningType binning{{axes.cfgVtxAxis, axes.cfgCentAxis}, true}; + BinningType binning{{axes.cfgVtxAxis, axes.cfgCentAxisMixing}, true}; const int nMixedEvents = mixingCfg.cfgNoMixedEvents; auto tracksTuple = std::make_tuple(tracks); SameKindPair mixingPair{binning, nMixedEvents, -1, collisions, tracksTuple, &cache};