From 24736c1105c30dca2934b51e5c0dc31d39ae420b Mon Sep 17 00:00:00 2001 From: sarjeeta gami Date: Thu, 17 Oct 2024 14:28:32 +0530 Subject: [PATCH] PWGLF : imrovement of combinatorial bkg to reduce CPU usage --- PWGLF/Tasks/Resonances/kstarpbpb.cxx | 35 +--------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/PWGLF/Tasks/Resonances/kstarpbpb.cxx b/PWGLF/Tasks/Resonances/kstarpbpb.cxx index f3eff07b363..71136bff67e 100644 --- a/PWGLF/Tasks/Resonances/kstarpbpb.cxx +++ b/PWGLF/Tasks/Resonances/kstarpbpb.cxx @@ -105,7 +105,6 @@ struct kstarpbpb { Configurable confMaxRot{"confMaxRot", 7.0 * TMath::Pi() / 6.0, "Maximum of rotation"}; Configurable nBkgRotations{"nBkgRotations", 9, "Number of rotated copies (background) per each original candidate"}; Configurable fillRotation{"fillRotation", true, "fill rotation"}; - Configurable fillRotation1{"fillRotation1", false, "fill rotation"}; Configurable like{"like", true, "fill rotation"}; Configurable fillOccupancy{"fillOccupancy", false, "fill Occupancy"}; Configurable cfgOccupancyCut{"cfgOccupancyCut", 500, "Occupancy cut"}; @@ -194,9 +193,6 @@ struct kstarpbpb { if (fillRotation) { histos.add("hRotation", "hRotation", kTH1F, {{360, 0.0, 2.0 * TMath::Pi()}}); } - if (fillRotation1) { - histos.add("hRotation1", "hRotation1", kTH1F, {{360, 0.0, 2.0 * TMath::Pi()}}); - } // Event selection cut additional - Alex if (additionalEvsel) { fMultPVCutLow = new TF1("fMultPVCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x - 2.5*([4]+[5]*x+[6]*x*x+[7]*x*x*x+[8]*x*x*x*x)", 0, 100); @@ -316,7 +312,7 @@ struct kstarpbpb { ConfigurableAxis axisEPAngle{"axisEPAngle", {9, -TMath::Pi() / 2, TMath::Pi() / 2}, "event plane angle"}; using BinningTypeVertexContributor = ColumnBinningPolicy; - ROOT::Math::PxPyPzMVector KstarMother, daughter1, daughter2, kaonrot, kstarrot, pionrot, kstarrot1; + ROOT::Math::PxPyPzMVector KstarMother, daughter1, daughter2, kaonrot, kstarrot; void processSameEvent(EventCandidates::iterator const& collision, TrackCandidates const& tracks, aod::BCs const&) { @@ -501,35 +497,6 @@ struct kstarpbpb { histos.fill(HIST("hSparseV2SASameEventRotational_V2"), kstarrot.M(), kstarrot.Pt(), v2Rot, centrality); } } - if (fillRotation1) { - for (int nrotbkg = 0; nrotbkg < nBkgRotations; nrotbkg++) { - auto anglestart = confMinRot; - auto angleend = confMaxRot; - auto anglestep = (angleend - anglestart) / (1.0 * (nBkgRotations - 1)); - auto rotangle = anglestart + nrotbkg * anglestep; - histos.fill(HIST("hRotation1"), rotangle); - if (track1kaon && track2pion) { - auto rotpionPx = track2.px() * std::cos(rotangle) - track2.py() * std::sin(rotangle); - auto rotpionPy = track2.px() * std::sin(rotangle) + track2.py() * std::cos(rotangle); - pionrot = ROOT::Math::PxPyPzMVector(rotpionPx, rotpionPy, track2.pz(), massPi); - daughter2 = ROOT::Math::PxPyPzMVector(track1.px(), track1.py(), track1.pz(), massKa); - } else if (track1pion && track2kaon) { - auto rotpionPx = track1.px() * std::cos(rotangle) - track1.py() * std::sin(rotangle); - auto rotpionPy = track1.px() * std::sin(rotangle) + track1.py() * std::cos(rotangle); - pionrot = ROOT::Math::PxPyPzMVector(rotpionPx, rotpionPy, track1.pz(), massPi); - daughter2 = ROOT::Math::PxPyPzMVector(track2.px(), track2.py(), track2.pz(), massKa); - } else { - continue; - } - kstarrot1 = pionrot + daughter2; - if (TMath::Abs(kstarrot1.Rapidity()) > confRapidity) { - continue; - } - auto phiminuspsiRot1 = GetPhiInRange(kstarrot1.Phi() - psiFT0C); - auto v2Rot1 = TMath::Cos(2.0 * phiminuspsiRot1); - histos.fill(HIST("hSparseV2SASameEventRotational1_V2"), kstarrot1.M(), kstarrot1.Pt(), v2Rot1, centrality); - } - } } } }