From 47a4bba30cd1d1952ad82bef48efbadbcef996a6 Mon Sep 17 00:00:00 2001 From: Swati Saha Date: Thu, 30 Apr 2026 21:58:27 +0530 Subject: [PATCH 1/3] Add analysis profiles with weighted average --- .../Tasks/v0ptHadPiKaProt.cxx | 76 ++++++++++++++++--- 1 file changed, 65 insertions(+), 11 deletions(-) diff --git a/PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx b/PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx index 8224f587251..260286df1bc 100644 --- a/PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx +++ b/PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx @@ -154,6 +154,7 @@ struct V0ptHadPiKaProt { Configurable cfgLoadPhiWeights{"cfgLoadPhiWeights", false, "Load phi weights from CCDB to take care of non-uniform acceptance"}; Configurable cfgLoadPtEffWeights{"cfgLoadPtEffWeights", false, "Load pt-dependent efficiency weights from CCDB to take care of detector inefficiency"}; Configurable cfgMinNoOfParticles{"cfgMinNoOfParticles", 4, "Minimum no. of particles for calculating v02(pT)"}; + Configurable cfgV02WeightedFill{"cfgV02WeightedFill", false, "Fill profiles related to v2 with multiplicity-based weights?"}; // pT dep DCAxy and DCAz cuts Configurable cfgUsePtDepDCAxy{"cfgUsePtDepDCAxy", true, "Use pt-dependent DCAxy cut"}; @@ -206,6 +207,7 @@ struct V0ptHadPiKaProt { HistogramRegistry histosAnalysis{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; std::vector>> subSample; std::vector>> subSampleV02; + std::vector>> subSampleV02_weighted; TRandom3* funRndm = new TRandom3(0); // Phi weight histograms initialization @@ -393,12 +395,21 @@ struct V0ptHadPiKaProt { histos.add("Prof_XYZ_prot", "", {HistType::kTProfile2D, {centAxis, ptAxis}}); histos.add("Prof_Z_prot", "", {HistType::kTProfile2D, {centAxis, ptAxis}}); + // check with different normalization for event averaging + if (cfgV02WeightedFill) { + histos.add("Prof_XY_weighted", "", {HistType::kTProfile2D, {centAxis, noAxis}}); + histos.add("Prof_XYZ_weighted_had", "", {HistType::kTProfile2D, {centAxis, ptAxis}}); + histos.add("Prof_Z_weighted_had", "", {HistType::kTProfile2D, {centAxis, ptAxis}}); + } + // initial array subSample.resize(cfgNSubsample); subSampleV02.resize(cfgNSubsample); + subSampleV02_weighted.resize(cfgNSubsample); for (int i = 0; i < cfgNSubsample; i++) { subSample[i].resize(20); subSampleV02[i].resize(9); + subSampleV02_weighted[i].resize(9); } for (int i = 0; i < cfgNSubsample; i++) { subSample[i][0] = std::get>(histos.add(Form("subSample_%d/Prof_A_had", i), "", {HistType::kTProfile2D, {centAxis, ptAxis}})); @@ -434,6 +445,18 @@ struct V0ptHadPiKaProt { subSampleV02[i][6] = std::get>(histosAnalysis.add(Form("subSampleV02_%d/Prof_Z_ka", i), "", {HistType::kTProfile2D, {centAxis, ptAxis}})); subSampleV02[i][7] = std::get>(histosAnalysis.add(Form("subSampleV02_%d/Prof_XYZ_prot", i), "", {HistType::kTProfile2D, {centAxis, ptAxis}})); subSampleV02[i][8] = std::get>(histosAnalysis.add(Form("subSampleV02_%d/Prof_Z_prot", i), "", {HistType::kTProfile2D, {centAxis, ptAxis}})); + + if (cfgV02WeightedFill) { + subSampleV02_weighted[i][0] = std::get>(histosAnalysis.add(Form("subSampleV02_weighted_%d/Prof_XY_weighted", i), "", {HistType::kTProfile2D, {centAxis, noAxis}})); + subSampleV02_weighted[i][1] = std::get>(histosAnalysis.add(Form("subSampleV02_weighted_%d/Prof_XYZ_weighted_had", i), "", {HistType::kTProfile2D, {centAxis, ptAxis}})); + subSampleV02_weighted[i][2] = std::get>(histosAnalysis.add(Form("subSampleV02_weighted_%d/Prof_Z_weighted_had", i), "", {HistType::kTProfile2D, {centAxis, ptAxis}})); + subSampleV02_weighted[i][3] = std::get>(histosAnalysis.add(Form("subSampleV02_weighted_%d/Prof_XYZ_weighted_pi", i), "", {HistType::kTProfile2D, {centAxis, ptAxis}})); + subSampleV02_weighted[i][4] = std::get>(histosAnalysis.add(Form("subSampleV02_weighted_%d/Prof_Z_weighted_pi", i), "", {HistType::kTProfile2D, {centAxis, ptAxis}})); + subSampleV02_weighted[i][5] = std::get>(histosAnalysis.add(Form("subSampleV02_weighted_%d/Prof_XYZ_weighted_ka", i), "", {HistType::kTProfile2D, {centAxis, ptAxis}})); + subSampleV02_weighted[i][6] = std::get>(histosAnalysis.add(Form("subSampleV02_weighted_%d/Prof_Z_weighted_ka", i), "", {HistType::kTProfile2D, {centAxis, ptAxis}})); + subSampleV02_weighted[i][7] = std::get>(histosAnalysis.add(Form("subSampleV02_weighted_%d/Prof_XYZ_weighted_prot", i), "", {HistType::kTProfile2D, {centAxis, ptAxis}})); + subSampleV02_weighted[i][8] = std::get>(histosAnalysis.add(Form("subSampleV02_weighted_%d/Prof_Z_weighted_prot", i), "", {HistType::kTProfile2D, {centAxis, ptAxis}})); + } } if (cfgEvSelMultCorrelation) { @@ -1188,27 +1211,25 @@ struct V0ptHadPiKaProt { } double weight = phiweight * effweight; - // fill subevent C for v2^2 in v02(pT) if (track.sign() != 0 && trkPt < cfgCutPtMaxForV02) { histos.fill(HIST("h3DVtxZetaPhi"), coll.posZ(), trkEta, trkPhi); + + // fill subevent C for v2^2 in v02(pT) if (cfgCutEtaWindowB < trkEta && trkEta < cfgCutEta) { vecQInWinC += weight * TComplex(TMath::Cos(2. * trkPhi), TMath::Sin(2. * trkPhi)); nSumInWinC += weight; } - } - // fill subevent A for v2^2 in v02(pT) - if (track.sign() != 0 && trkPt < cfgCutPtMaxForV02) { + + // fill subevent A for v2^2 in v02(pT) if (-1.0 * cfgCutEta < trkEta && trkEta < -1.0 * cfgCutEtaWindowB) { vecQInWinA += weight * TComplex(TMath::Cos(2. * trkPhi), TMath::Sin(2. * trkPhi)); nSumInWinA += weight; } - } - // fill subevent B for f(pT) in v02(pT) - if (track.sign() != 0 && trkPt < cfgCutPtMaxForV02) { + // fill subevent B for f(pT) in v02(pT) if (std::abs(trkEta) < cfgCutEtaWindowB) { fPtProfileHadInWinB->Fill(trkPt, effweight); - nSumInWinB += 1.0; + nSumInWinB += effweight; } } @@ -1292,6 +1313,7 @@ struct V0ptHadPiKaProt { effweightKaon = 1.0 / getEffKaon(track); // NUE weight for kaon effweightProton = 1.0 / getEffProton(track); // NUE weight for proton } + // fill subevent B for ***identified particles'*** f(pT) in v02(pT) if (track.sign() != 0 && trkPt < cfgCutPtMaxForV02) { if (std::abs(trkEta) < cfgCutEtaWindowB) { @@ -1379,30 +1401,48 @@ struct V0ptHadPiKaProt { if (nSumInWinA > cfgMinNoOfParticles && nSumInWinB > cfgMinNoOfParticles && nSumInWinC > cfgMinNoOfParticles) { double twoParCorr = (vecQInWinA * TComplex::Conjugate(vecQInWinC)).Re(); twoParCorr *= 1.0 / (nSumInWinA * nSumInWinC); - histos.get(HIST("Prof_XY"))->Fill(cent, 0.5, twoParCorr); + histos.get(HIST("Prof_XY"))->Fill(cent, 0.5, twoParCorr); subSampleV02[sampleIndex][0]->Fill(cent, 0.5, twoParCorr); + if (cfgV02WeightedFill) { + histos.get(HIST("Prof_XY_weighted"))->Fill(cent, 0.5, twoParCorr, (nSumInWinA * nSumInWinC)); + subSampleV02_weighted[sampleIndex][0]->Fill(cent, 0.5, twoParCorr, (nSumInWinA * nSumInWinC)); + } // hadrons for (int i = 0; i < cfgNbinsV02pt; i++) { double threeParCorrHad = (vecQInWinA * TComplex::Conjugate(vecQInWinC) * fPtProfileHadInWinB->GetBinContent(i + 1)).Re(); threeParCorrHad *= 1.0 / (nSumInWinA * nSumInWinC * nSumInWinB); + histos.get(HIST("Prof_XYZ_had"))->Fill(cent, fPtProfileHadInWinB->GetBinCenter(i + 1), threeParCorrHad); histos.get(HIST("Prof_Z_had"))->Fill(cent, fPtProfileHadInWinB->GetBinCenter(i + 1), (fPtProfileHadInWinB->GetBinContent(i + 1) / nSumInWinB)); - subSampleV02[sampleIndex][1]->Fill(cent, fPtProfileHadInWinB->GetBinCenter(i + 1), threeParCorrHad); subSampleV02[sampleIndex][2]->Fill(cent, fPtProfileHadInWinB->GetBinCenter(i + 1), (fPtProfileHadInWinB->GetBinContent(i + 1) / nSumInWinB)); + + if (cfgV02WeightedFill) { + histos.get(HIST("Prof_XYZ_weighted_had"))->Fill(cent, fPtProfileHadInWinB->GetBinCenter(i + 1), threeParCorrHad, (nSumInWinA * nSumInWinC)); + histos.get(HIST("Prof_Z_weighted_had"))->Fill(cent, fPtProfileHadInWinB->GetBinCenter(i + 1), (fPtProfileHadInWinB->GetBinContent(i + 1) / nSumInWinB)); + subSampleV02_weighted[sampleIndex][1]->Fill(cent, fPtProfileHadInWinB->GetBinCenter(i + 1), threeParCorrHad, (nSumInWinA * nSumInWinC)); + subSampleV02_weighted[sampleIndex][2]->Fill(cent, fPtProfileHadInWinB->GetBinCenter(i + 1), (fPtProfileHadInWinB->GetBinContent(i + 1) / nSumInWinB)); + } } // pions for (int i = 0; i < cfgNbinsV02pt; i++) { double threeParCorrPi = (vecQInWinA * TComplex::Conjugate(vecQInWinC) * fPtProfilePiInWinB->GetBinContent(i + 1)).Re(); threeParCorrPi *= 1.0 / (nSumInWinA * nSumInWinC * nSumInWinB); + histos.get(HIST("Prof_XYZ_pi"))->Fill(cent, fPtProfilePiInWinB->GetBinCenter(i + 1), threeParCorrPi); histos.get(HIST("Prof_Z_pi"))->Fill(cent, fPtProfilePiInWinB->GetBinCenter(i + 1), (fPtProfilePiInWinB->GetBinContent(i + 1) / nSumInWinB)); - subSampleV02[sampleIndex][3]->Fill(cent, fPtProfilePiInWinB->GetBinCenter(i + 1), threeParCorrPi); subSampleV02[sampleIndex][4]->Fill(cent, fPtProfilePiInWinB->GetBinCenter(i + 1), (fPtProfilePiInWinB->GetBinContent(i + 1) / nSumInWinB)); + + if (cfgV02WeightedFill) { + histos.get(HIST("Prof_XYZ_weighted_pi"))->Fill(cent, fPtProfilePiInWinB->GetBinCenter(i + 1), threeParCorrPi, (nSumInWinA * nSumInWinC)); + histos.get(HIST("Prof_Z_weighted_pi"))->Fill(cent, fPtProfilePiInWinB->GetBinCenter(i + 1), (fPtProfilePiInWinB->GetBinContent(i + 1) / nSumInWinB)); + subSampleV02_weighted[sampleIndex][3]->Fill(cent, fPtProfilePiInWinB->GetBinCenter(i + 1), threeParCorrPi, (nSumInWinA * nSumInWinC)); + subSampleV02_weighted[sampleIndex][4]->Fill(cent, fPtProfilePiInWinB->GetBinCenter(i + 1), (fPtProfilePiInWinB->GetBinContent(i + 1) / nSumInWinB)); + } } // kaons @@ -1414,6 +1454,13 @@ struct V0ptHadPiKaProt { subSampleV02[sampleIndex][5]->Fill(cent, fPtProfileKaInWinB->GetBinCenter(i + 1), threeParCorrKa); subSampleV02[sampleIndex][6]->Fill(cent, fPtProfileKaInWinB->GetBinCenter(i + 1), (fPtProfileKaInWinB->GetBinContent(i + 1) / nSumInWinB)); + + if (cfgV02WeightedFill) { + histos.get(HIST("Prof_XYZ_weighted_ka"))->Fill(cent, fPtProfileKaInWinB->GetBinCenter(i + 1), threeParCorrKa, (nSumInWinA * nSumInWinC)); + histos.get(HIST("Prof_Z_weighted_ka"))->Fill(cent, fPtProfileKaInWinB->GetBinCenter(i + 1), (fPtProfileKaInWinB->GetBinContent(i + 1) / nSumInWinB)); + subSampleV02_weighted[sampleIndex][3]->Fill(cent, fPtProfileKaInWinB->GetBinCenter(i + 1), threeParCorrKa, (nSumInWinA * nSumInWinC)); + subSampleV02_weighted[sampleIndex][4]->Fill(cent, fPtProfileKaInWinB->GetBinCenter(i + 1), (fPtProfileKaInWinB->GetBinContent(i + 1) / nSumInWinB)); + } } // protons @@ -1425,6 +1472,13 @@ struct V0ptHadPiKaProt { subSampleV02[sampleIndex][7]->Fill(cent, fPtProfileProtInWinB->GetBinCenter(i + 1), threeParCorrProt); subSampleV02[sampleIndex][8]->Fill(cent, fPtProfileProtInWinB->GetBinCenter(i + 1), (fPtProfileProtInWinB->GetBinContent(i + 1) / nSumInWinB)); + + if (cfgV02WeightedFill) { + histos.get(HIST("Prof_XYZ_weighted_prot"))->Fill(cent, fPtProfileProtInWinB->GetBinCenter(i + 1), threeParCorrProt, (nSumInWinA * nSumInWinC)); + histos.get(HIST("Prof_Z_weighted_prot"))->Fill(cent, fPtProfileProtInWinB->GetBinCenter(i + 1), (fPtProfileProtInWinB->GetBinContent(i + 1) / nSumInWinB)); + subSampleV02_weighted[sampleIndex][3]->Fill(cent, fPtProfileProtInWinB->GetBinCenter(i + 1), threeParCorrProt, (nSumInWinA * nSumInWinC)); + subSampleV02_weighted[sampleIndex][4]->Fill(cent, fPtProfileProtInWinB->GetBinCenter(i + 1), (fPtProfileProtInWinB->GetBinContent(i + 1) / nSumInWinB)); + } } } From 60948917973b1fba36a7cdf5c2ee7036884f090f Mon Sep 17 00:00:00 2001 From: Swati Saha Date: Thu, 30 Apr 2026 22:47:36 +0530 Subject: [PATCH 2/3] Add analysis profiles with weighted average --- .../Tasks/v0ptHadPiKaProt.cxx | 42 +++++++++++++++---- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx b/PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx index 260286df1bc..c0f553abcb9 100644 --- a/PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx +++ b/PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx @@ -125,6 +125,7 @@ struct V0ptHadPiKaProt { ConfigurableAxis nchAxis1{"nchAxis1", {500, 0.5, 500.5}, "Axis for multiplicity of GlobalTracks/PVTracks"}; ConfigurableAxis nchAxis2{"nchAxis2", {1000, 0.5, 30000.5}, "Axis for multiplicity of FT0A/FT0C/FV0A"}; ConfigurableAxis nchAxis3{"nchAxis3", {1000, 0.5, 100000.5}, "Axis for multiplicity of FT0A/FT0C/FV0A"}; + ConfigurableAxis occuAxis{"occuAxis", {1000, 0.5, 50000.5}, "Axis for occupancy of events"}; Configurable cfgCutPtLower{"cfgCutPtLower", 0.2f, "Lower pT cut"}; Configurable cfgCutPtLowerProt{"cfgCutPtLowerProt", 0.2f, "Lower pT cut"}; Configurable cfgCutPtUpper{"cfgCutPtUpper", 10.0f, "Higher pT cut for inclusive hadron analysis"}; @@ -155,6 +156,7 @@ struct V0ptHadPiKaProt { Configurable cfgLoadPtEffWeights{"cfgLoadPtEffWeights", false, "Load pt-dependent efficiency weights from CCDB to take care of detector inefficiency"}; Configurable cfgMinNoOfParticles{"cfgMinNoOfParticles", 4, "Minimum no. of particles for calculating v02(pT)"}; Configurable cfgV02WeightedFill{"cfgV02WeightedFill", false, "Fill profiles related to v2 with multiplicity-based weights?"}; + Configurable cfgUseDominanceCut{"cfgUseDominanceCut", true, "Require particle selecting species' nSigma to be smallest among other two"}; // pT dep DCAxy and DCAz cuts Configurable cfgUsePtDepDCAxy{"cfgUsePtDepDCAxy", true, "Use pt-dependent DCAxy cut"}; @@ -306,6 +308,7 @@ struct V0ptHadPiKaProt { histos.add("hEventStatData", "Data Event statistics", kTH1F, {{10, 0.0f, 10.0f}}); histos.add("hZvtx_after_sel", ";Z (cm)", kTH1F, {{240, -12, 12}}); histos.add("hCentrality", ";centrality (%)", kTH1F, {{90, 0, 90}}); + histos.add("hOccupancyVsCentrality", "", kTH2F, {{90, 0, 90}, occuAxis}); // before selection histos.add("MultCorrelationPlots/BeforeSelection/His2D_globalTracks_PVTracks_beforeSel", "", {HistType::kTH2D, {nchAxis1, nchAxis1}}); histos.add("MultCorrelationPlots/BeforeSelection/His2D_globalTracks_centFT0C_beforeSel", "", {HistType::kTH2D, {centAxis, nchAxis1}}); @@ -554,7 +557,14 @@ struct V0ptHadPiKaProt { flag = 1; } } else { - if (!(flag2 > 1) && !(combNSigmaPr > combNSigmaPi) && !(combNSigmaPr > combNSigmaKa)) { + + bool passDominance = true; + // Apply condition only if enabled + if (cfgUseDominanceCut) { + passDominance = !(combNSigmaPr > combNSigmaPi) && !(combNSigmaPr > combNSigmaKa); + } + + if (!(flag2 > 1) && passDominance) { if (combNSigmaPr < cfgnSigmaCutCombTPCTOF) { flag = 1; } @@ -601,7 +611,14 @@ struct V0ptHadPiKaProt { flag = 1; } } else { - if (!(flag2 > 1) && !(combNSigmaPi > combNSigmaPr) && !(combNSigmaPi > combNSigmaKa)) { + + bool passDominance = true; + // Apply condition only if enabled + if (cfgUseDominanceCut) { + passDominance = !(combNSigmaPi > combNSigmaPr) && !(combNSigmaPi > combNSigmaKa); + } + + if (!(flag2 > 1) && passDominance) { if (combNSigmaPi < cfgnSigmaCutCombTPCTOF) { flag = 1; } @@ -648,7 +665,14 @@ struct V0ptHadPiKaProt { flag = 1; } } else { - if (!(flag2 > 1) && !(combNSigmaKa > combNSigmaPi) && !(combNSigmaKa > combNSigmaPr)) { + + bool passDominance = true; + // Apply condition only if enabled + if (cfgUseDominanceCut) { + passDominance = !(combNSigmaKa > combNSigmaPi) && !(combNSigmaKa > combNSigmaPr); + } + + if (!(flag2 > 1) && passDominance) { if (combNSigmaKa < cfgnSigmaCutCombTPCTOF) { flag = 1; } @@ -787,6 +811,9 @@ struct V0ptHadPiKaProt { return 0; } + int occupancy = coll.trackOccupancyInTimeRange(); + histos.fill(HIST("hOccupancyVsCentrality"), occupancy); + histos.fill(HIST("hEventStatData"), 6.5); // events with selection bits based on occupancy time pattern if (cfgEvSelUseOcuppancyTimeCut && !(coll.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard))) { @@ -794,7 +821,6 @@ struct V0ptHadPiKaProt { } histos.fill(HIST("hEventStatData"), 7.5); - int occupancy = coll.trackOccupancyInTimeRange(); if (cfgEvSelSetOcuppancyRange && (occupancy < cfgMinOccupancy || occupancy > cfgMaxOccupancy)) { return 0; } @@ -1458,8 +1484,8 @@ struct V0ptHadPiKaProt { if (cfgV02WeightedFill) { histos.get(HIST("Prof_XYZ_weighted_ka"))->Fill(cent, fPtProfileKaInWinB->GetBinCenter(i + 1), threeParCorrKa, (nSumInWinA * nSumInWinC)); histos.get(HIST("Prof_Z_weighted_ka"))->Fill(cent, fPtProfileKaInWinB->GetBinCenter(i + 1), (fPtProfileKaInWinB->GetBinContent(i + 1) / nSumInWinB)); - subSampleV02_weighted[sampleIndex][3]->Fill(cent, fPtProfileKaInWinB->GetBinCenter(i + 1), threeParCorrKa, (nSumInWinA * nSumInWinC)); - subSampleV02_weighted[sampleIndex][4]->Fill(cent, fPtProfileKaInWinB->GetBinCenter(i + 1), (fPtProfileKaInWinB->GetBinContent(i + 1) / nSumInWinB)); + subSampleV02_weighted[sampleIndex][5]->Fill(cent, fPtProfileKaInWinB->GetBinCenter(i + 1), threeParCorrKa, (nSumInWinA * nSumInWinC)); + subSampleV02_weighted[sampleIndex][6]->Fill(cent, fPtProfileKaInWinB->GetBinCenter(i + 1), (fPtProfileKaInWinB->GetBinContent(i + 1) / nSumInWinB)); } } @@ -1476,8 +1502,8 @@ struct V0ptHadPiKaProt { if (cfgV02WeightedFill) { histos.get(HIST("Prof_XYZ_weighted_prot"))->Fill(cent, fPtProfileProtInWinB->GetBinCenter(i + 1), threeParCorrProt, (nSumInWinA * nSumInWinC)); histos.get(HIST("Prof_Z_weighted_prot"))->Fill(cent, fPtProfileProtInWinB->GetBinCenter(i + 1), (fPtProfileProtInWinB->GetBinContent(i + 1) / nSumInWinB)); - subSampleV02_weighted[sampleIndex][3]->Fill(cent, fPtProfileProtInWinB->GetBinCenter(i + 1), threeParCorrProt, (nSumInWinA * nSumInWinC)); - subSampleV02_weighted[sampleIndex][4]->Fill(cent, fPtProfileProtInWinB->GetBinCenter(i + 1), (fPtProfileProtInWinB->GetBinContent(i + 1) / nSumInWinB)); + subSampleV02_weighted[sampleIndex][7]->Fill(cent, fPtProfileProtInWinB->GetBinCenter(i + 1), threeParCorrProt, (nSumInWinA * nSumInWinC)); + subSampleV02_weighted[sampleIndex][8]->Fill(cent, fPtProfileProtInWinB->GetBinCenter(i + 1), (fPtProfileProtInWinB->GetBinContent(i + 1) / nSumInWinB)); } } } From 8c3e8576dd32360165cc5d1f15372d71d6e546eb Mon Sep 17 00:00:00 2001 From: Swati Saha Date: Thu, 30 Apr 2026 22:52:02 +0530 Subject: [PATCH 3/3] Add analysis profiles with weighted average --- PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx b/PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx index c0f553abcb9..3f422e6f7d7 100644 --- a/PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx +++ b/PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx @@ -308,7 +308,8 @@ struct V0ptHadPiKaProt { histos.add("hEventStatData", "Data Event statistics", kTH1F, {{10, 0.0f, 10.0f}}); histos.add("hZvtx_after_sel", ";Z (cm)", kTH1F, {{240, -12, 12}}); histos.add("hCentrality", ";centrality (%)", kTH1F, {{90, 0, 90}}); - histos.add("hOccupancyVsCentrality", "", kTH2F, {{90, 0, 90}, occuAxis}); + histos.add("hOccupancyVsCentrality_before", "", kTH2F, {{90, 0, 90}, occuAxis}); + histos.add("hOccupancyVsCentrality_after", "", kTH2F, {{90, 0, 90}, occuAxis}); // before selection histos.add("MultCorrelationPlots/BeforeSelection/His2D_globalTracks_PVTracks_beforeSel", "", {HistType::kTH2D, {nchAxis1, nchAxis1}}); histos.add("MultCorrelationPlots/BeforeSelection/His2D_globalTracks_centFT0C_beforeSel", "", {HistType::kTH2D, {centAxis, nchAxis1}}); @@ -812,7 +813,7 @@ struct V0ptHadPiKaProt { } int occupancy = coll.trackOccupancyInTimeRange(); - histos.fill(HIST("hOccupancyVsCentrality"), occupancy); + histos.fill(HIST("hOccupancyVsCentrality_before"), occupancy); histos.fill(HIST("hEventStatData"), 6.5); // events with selection bits based on occupancy time pattern @@ -820,6 +821,8 @@ struct V0ptHadPiKaProt { return 0; } + histos.fill(HIST("hOccupancyVsCentrality_after"), occupancy); + histos.fill(HIST("hEventStatData"), 7.5); if (cfgEvSelSetOcuppancyRange && (occupancy < cfgMinOccupancy || occupancy > cfgMaxOccupancy)) { return 0;