From d0cc016c28f9fb16ed31f655a69a8a8b34766eeb Mon Sep 17 00:00:00 2001 From: sangwoo Date: Thu, 26 Jun 2025 17:21:42 +0900 Subject: [PATCH 1/9] optimized track index selection and fixed PID selection --- PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx | 48 +++++++++++++++----- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx index 51046fcaa16..be25ec5f93d 100644 --- a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx +++ b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx @@ -132,7 +132,9 @@ struct F0980pbpbanalysis { Configurable cfgTOFBetaCut{"cfgTOFBetaCut", 0.0, "cut TOF beta"}; Configurable cfgDeepAngleSel{"cfgDeepAngleSel", true, "Deep Angle cut"}; Configurable cfgDeepAngle{"cfgDeepAngle", 0.04, "Deep Angle cut value"}; - Configurable cfgTrackIndexSel{"cfgTrackIndexSel", false, "Index selection flag"}; + Configurable cfgTrackIndexSelType{"cfgTrackIndexSelType", 1, "Index selection type"}; + Configurable cMaxTiednSigmaPion{"cMaxTiednSigmaPion", 3.0, "Combined nSigma cut for Pion"}; + ConfigurableAxis massAxis{"massAxis", {400, 0.2, 2.2}, "Invariant mass axis"}; ConfigurableAxis ptAxis{"ptAxis", {VARIABLE_WIDTH, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 10.0, 13.0, 20.0}, "Transverse momentum Binning"}; @@ -174,6 +176,12 @@ struct F0980pbpbanalysis { PtlKaon = 1, }; + enum IndexSelList { + None = 0, + woSame = 1, + leq = 2 + }; + TRandom* rn = new TRandom(); // float theta2; @@ -320,15 +328,18 @@ struct F0980pbpbanalysis { } } } else if (cfgSelectPID == PIDList::PIDTest) { - if (track.hasTOF()) { - if (std::fabs(getTofNSigma(track)) > cMaxTOFnSigmaPion) { - return 0; - } - if (std::fabs(getTpcNSigma(track)) > cMaxTPCnSigmaPion) { - return 0; + if (cfgUSETOF) { + if (track.hasTOF()) { + if ((track.tofNSigmaPi() * track.tofNSigmaPi() + track.tpcNSigmaPi() * track.tpcNSigmaPi()) > (cMaxTiednSigmaPion * cMaxTiednSigmaPion)) { + return 0; + } + } else { + if (std::fabs(track.tpcNSigmaPi()) > cMaxTPCnSigmaPionS) { + return 0; + } } } else { - if (std::fabs(getTpcNSigma(track)) > cMaxTPCnSigmaPionS) { + if (std::fabs(track.tpcNSigmaPi()) > cMaxTPCnSigmaPionS) { return 0; } } @@ -336,6 +347,21 @@ struct F0980pbpbanalysis { return 1; } + template + bool indexSelection(const TrackType1 track1, const TrackType2 track2) + { + if (cfgTrackIndexSelType == IndexSelList::woSame) { + if (track2.globalIndex() == track1.globalIndex()) { + return 0; + } + } else if (cfgTrackIndexSelType == IndexSelList::leq) { + if (track2.globalIndex() <= track1.globalIndex()) { + return 0; + } + } + return 1; + } + template bool selectionPair(const TrackType1 track1, const TrackType2 track2) { @@ -420,11 +446,11 @@ struct F0980pbpbanalysis { histos.fill(HIST("QA/TPC_TOF_selected"), getTpcNSigma(trk2), getTofNSigma(trk2)); } - if (cfgTrackIndexSel && cfgSelectPID == PIDList::PIDTest && trk2.globalIndex() <= trk1.globalIndex()) { + if (!indexSelection(trk1, trk2)) { continue; } - if (cfgSelectPID == PIDList::PIDTest && !selectionPair(trk1, trk2)) { + if (!selectionPair(trk1, trk2)) { continue; } @@ -551,4 +577,4 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{ adaptAnalysisTask(cfgc)}; -} +} \ No newline at end of file From ae8110a451703714311ab282c6022e5a47d27646 Mon Sep 17 00:00:00 2001 From: sangwoo Date: Thu, 26 Jun 2025 17:43:19 +0900 Subject: [PATCH 2/9] optimized track index selection and fixed PID selection --- PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx index be25ec5f93d..e1ecd4f3313 100644 --- a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx +++ b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx @@ -330,16 +330,16 @@ struct F0980pbpbanalysis { } else if (cfgSelectPID == PIDList::PIDTest) { if (cfgUSETOF) { if (track.hasTOF()) { - if ((track.tofNSigmaPi() * track.tofNSigmaPi() + track.tpcNSigmaPi() * track.tpcNSigmaPi()) > (cMaxTiednSigmaPion * cMaxTiednSigmaPion)) { + if ((getTpcNSigma(track) * getTpcNSigma(track) + getTofNSigma(track) * getTofNSigma(track)) > (cMaxTiednSigmaPion * cMaxTiednSigmaPion)) { return 0; } } else { - if (std::fabs(track.tpcNSigmaPi()) > cMaxTPCnSigmaPionS) { + if (std::fabs(getTpcNSigma(track)) > cMaxTPCnSigmaPionS) { return 0; } } } else { - if (std::fabs(track.tpcNSigmaPi()) > cMaxTPCnSigmaPionS) { + if (std::fabs(getTpcNSigma(track)) > cMaxTPCnSigmaPionS) { return 0; } } From 28b057cc5324d188a85ed1404800301dd2f841b0 Mon Sep 17 00:00:00 2001 From: sangwoo Date: Thu, 26 Jun 2025 17:53:01 +0900 Subject: [PATCH 3/9] optimized track index selection and fixed PID selection --- PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx | 65 +++++++++----------- 1 file changed, 30 insertions(+), 35 deletions(-) diff --git a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx index e1ecd4f3313..b17fc43cbc0 100644 --- a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx +++ b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx @@ -15,50 +15,46 @@ #include #include -#include + #include -#include #include +#include +#include // #include #include // #include "TLorentzVector.h" -#include "TRandom3.h" -#include "TF1.h" -#include "TVector2.h" -#include "Math/Vector3D.h" -#include "Math/Vector4D.h" -#include "Math/GenVector/Boost.h" -#include - -#include "Framework/runDataProcessing.h" -#include "Framework/AnalysisTask.h" -#include "Framework/AnalysisDataModel.h" -#include "Framework/HistogramRegistry.h" -#include "Framework/StepTHn.h" -#include "Framework/O2DatabasePDGPlugin.h" -#include "Framework/ASoAHelpers.h" -#include "Framework/StaticFor.h" - -#include "Common/DataModel/PIDResponse.h" -#include "Common/DataModel/Multiplicity.h" +#include "Common/Core/TrackSelection.h" +#include "Common/Core/trackUtilities.h" #include "Common/DataModel/Centrality.h" -#include "Common/DataModel/TrackSelectionTables.h" #include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/Multiplicity.h" +#include "Common/DataModel/PIDResponse.h" #include "Common/DataModel/Qvectors.h" +#include "Common/DataModel/TrackSelectionTables.h" -#include "Common/Core/trackUtilities.h" -#include "Common/Core/TrackSelection.h" - +#include "CCDB/BasicCCDBManager.h" +#include "CCDB/CcdbApi.h" #include "CommonConstants/PhysicsConstants.h" - -#include "ReconstructionDataFormats/Track.h" - -#include "DataFormatsParameters/GRPObject.h" #include "DataFormatsParameters/GRPMagField.h" +#include "DataFormatsParameters/GRPObject.h" +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisDataModel.h" +#include "Framework/AnalysisTask.h" +#include "Framework/HistogramRegistry.h" +#include "Framework/O2DatabasePDGPlugin.h" +#include "Framework/StaticFor.h" +#include "Framework/StepTHn.h" +#include "Framework/runDataProcessing.h" +#include "ReconstructionDataFormats/Track.h" -#include "CCDB/CcdbApi.h" -#include "CCDB/BasicCCDBManager.h" +#include "Math/GenVector/Boost.h" +#include "Math/Vector3D.h" +#include "Math/Vector4D.h" +#include "TF1.h" +#include "TRandom3.h" +#include "TVector2.h" +#include // from phi #include "Common/DataModel/PIDResponseITS.h" @@ -135,7 +131,6 @@ struct F0980pbpbanalysis { Configurable cfgTrackIndexSelType{"cfgTrackIndexSelType", 1, "Index selection type"}; Configurable cMaxTiednSigmaPion{"cMaxTiednSigmaPion", 3.0, "Combined nSigma cut for Pion"}; - ConfigurableAxis massAxis{"massAxis", {400, 0.2, 2.2}, "Invariant mass axis"}; ConfigurableAxis ptAxis{"ptAxis", {VARIABLE_WIDTH, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 10.0, 13.0, 20.0}, "Transverse momentum Binning"}; ConfigurableAxis centAxis{"centAxis", {VARIABLE_WIDTH, 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 100}, "Centrality interval"}; @@ -347,7 +342,7 @@ struct F0980pbpbanalysis { return 1; } - template + template bool indexSelection(const TrackType1 track1, const TrackType2 track2) { if (cfgTrackIndexSelType == IndexSelList::woSame) { @@ -357,7 +352,7 @@ struct F0980pbpbanalysis { } else if (cfgTrackIndexSelType == IndexSelList::leq) { if (track2.globalIndex() <= track1.globalIndex()) { return 0; - } + } } return 1; } @@ -577,4 +572,4 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{ adaptAnalysisTask(cfgc)}; -} \ No newline at end of file +} From 3427250daeee72d28a312e24840a9754fafa033f Mon Sep 17 00:00:00 2001 From: sangwoo Date: Thu, 26 Jun 2025 18:08:20 +0900 Subject: [PATCH 4/9] optimized track index selection and fixed PID selection --- PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx index b17fc43cbc0..9048fda89b9 100644 --- a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx +++ b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx @@ -215,6 +215,7 @@ struct F0980pbpbanalysis { template bool eventSelected(TCollision collision) { + constexpr float QvecAmpMin = 1e-4f; if (!collision.sel8()) { return 0; } @@ -237,7 +238,7 @@ struct F0980pbpbanalysis { if (!collision.selection_bit(aod::evsel::kNoSameBunchPileup)) { return 0; } - if (cfgQvecSel && (collision.qvecAmp()[detId] < 1e-4 || collision.qvecAmp()[refAId] < 1e-4 || collision.qvecAmp()[refBId] < 1e-4)) { + if (cfgQvecSel && (collision.qvecAmp()[detId] < QvecAmpMin || collision.qvecAmp()[refAId] < QvecAmpMin || collision.qvecAmp()[refBId] < QvecAmpMin)) { return 0; } if (cfgOccupancySel && (collision.trackOccupancyInTimeRange() > cfgOccupancyMax || collision.trackOccupancyInTimeRange() < cfgOccupancyMin)) { From 1ba1f9546c53806820024e3cd5cfe87237ea484c Mon Sep 17 00:00:00 2001 From: sangwoo Date: Thu, 26 Jun 2025 18:28:15 +0900 Subject: [PATCH 5/9] optimized track index selection and fixed PID selection --- PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx index 9048fda89b9..caf80357b2d 100644 --- a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx +++ b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx @@ -215,7 +215,7 @@ struct F0980pbpbanalysis { template bool eventSelected(TCollision collision) { - constexpr float QvecAmpMin = 1e-4f; + constexpr double QvecAmpMin = 1e-4; if (!collision.sel8()) { return 0; } From 5ae7e2514cba8fce7ec2467be68e06983c8894fd Mon Sep 17 00:00:00 2001 From: sangwoo Date: Fri, 18 Jul 2025 01:30:18 +0900 Subject: [PATCH 6/9] adding EventMixing --- PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx | 114 +++++++++++++++++++ 1 file changed, 114 insertions(+) diff --git a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx index caf80357b2d..b272d2b64ad 100644 --- a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx +++ b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx @@ -47,6 +47,7 @@ #include "Framework/StepTHn.h" #include "Framework/runDataProcessing.h" #include "ReconstructionDataFormats/Track.h" +#include #include "Math/GenVector/Boost.h" #include "Math/Vector3D.h" @@ -135,6 +136,13 @@ struct F0980pbpbanalysis { ConfigurableAxis ptAxis{"ptAxis", {VARIABLE_WIDTH, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 10.0, 13.0, 20.0}, "Transverse momentum Binning"}; ConfigurableAxis centAxis{"centAxis", {VARIABLE_WIDTH, 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 100}, "Centrality interval"}; + //for event mixing + SliceCache cache; + Configurable cfgNMixedEvents{"cfgNMixedEvents", 10, "Number of mixed events per event"}; + ConfigurableAxis mixingAxisVertex{"mixingAxisVertex", {10, -10, 10}, "Vertex axis for mixing bin"}; + ConfigurableAxis mixingAxisMultiplicity{"mixingAxisMultiplicity", {VARIABLE_WIDTH, 0, 10, 20, 50, 100}, "multiplicity percentile for mixing bin"}; + // ConfigurableAxis mixingAxisMultiplicity{"mixingAxisMultiplicity", {2000, 0, 10000}, "TPC multiplicity for bin"}; + TF1* fMultPVCutLow = nullptr; TF1* fMultPVCutHigh = nullptr; @@ -151,6 +159,7 @@ struct F0980pbpbanalysis { double angle; double relPhi; double relPhiRot; + double relPhiMix; // double massPi = o2::constants::physics::MassPionCharged; double massPtl; @@ -191,6 +200,8 @@ struct F0980pbpbanalysis { using EventCandidates = soa::Filtered>; using TrackCandidates = soa::Filtered>; // aod::pidTOFbeta 추가됨 + + using BinningTypeVertexContributor = ColumnBinningPolicy; template int getDetId(const T& name) @@ -482,6 +493,109 @@ struct F0980pbpbanalysis { } } + void processEventMixing(EventCandidates const& collisions, TrackCandidates const& tracks) + { + int nmode = 2; // second order + qVecDetInd = detId * 4 + 3 + (nmode - 2) * cfgNQvec * 4; + + auto trackTuple = std::make_tuple(tracks); + BinningTypeVertexContributor binningOnPositions{{mixingAxisVertex, mixingAxisMultiplicity}, true}; + SameKindPair pair{binningOnPositions, cfgNMixedEvents, -1, collisions, trackTuple, &cache}; + ROOT::Math::PxPyPzMVector ptl1, ptl2, recoPtl; + for (auto& [c1, t1, c2, t2] : pair) { + std::cout << "--------------------------------" << std::endl; + std::cout << "1st collision ID: " << c1.globalIndex() << " 1st collision bcID: "<< c1.bcId() << " 2nd collision ID: " << c2.globalIndex() << " 2nd collision bcID: " << c2.bcId() << std::endl; + if (c1.globalIndex() != c1.index()) { + std::cout << "WARNING: Mixing events with different global indices!" << std::endl; + } + if (cfgCentEst == CentEstList::FT0C) { + centrality = c1.centFT0C(); + } else if (cfgCentEst == CentEstList::FT0M) { + centrality = c1.centFT0M(); + } + if (!eventSelected(c1) || !eventSelected(c2)) { + continue; + } + if (c1.bcId() == c2.bcId()) { + continue; + } + double eventPlaneDet = std::atan2(c1.qvecIm()[qVecDetInd], c1.qvecRe()[qVecDetInd]) / static_cast(nmode); + int total = 0; + int survive = 0; + + for (auto& trk1 : t1) { + if (!trackSelected(trk1)) { + continue; + } + if (!selectionPID(trk1)) { + continue; + } + + for (auto& trk2 : t2) { + if (!trackSelected(trk2)) { + continue; + } + if (!selectionPID(trk2)) { + continue; + } + if (!indexSelection(trk1, trk2)) { + continue; + } + if (!selectionPair(trk1, trk2)) { + continue; + } + ptl1 = ROOT::Math::PxPyPzMVector(trk1.px(), trk1.py(), trk1.pz(), massPtl); + ptl2 = ROOT::Math::PxPyPzMVector(trk2.px(), trk2.py(), trk2.pz(), massPtl); + recoPtl = ptl1 + ptl2; + if (recoPtl.Rapidity() > cfgRapMax || recoPtl.Rapidity() < cfgRapMin) { + continue; + } + + relPhiMix = TVector2::Phi_0_2pi((recoPtl.Phi() - eventPlaneDet) * static_cast(nmode)); + + if (trk1.sign() * trk2.sign() < 0) { + histos.fill(HIST("hInvMass_f0980_MixedUS_EPA"), recoPtl.M(), recoPtl.Pt(), centrality, relPhiMix); + } else if (trk1.sign() > 0 && trk2.sign() > 0) { + histos.fill(HIST("hInvMass_f0980_MixedLSpp_EPA"), recoPtl.M(), recoPtl.Pt(), centrality, relPhiMix); + } else if (trk1.sign() < 0 && trk2.sign() < 0) { + histos.fill(HIST("hInvMass_f0980_MixedLSmm_EPA"), recoPtl.M(), recoPtl.Pt(), centrality, relPhiMix); + } + } + } + // for (auto& [trk1, trk2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(t1, t2))) { + // if (!trackSelected(trk1) || !trackSelected(trk2)) { + // continue; + // } + // if (!selectionPID(trk1) || !selectionPID(trk2)) { + // continue; + // } + // if (!indexSelection(trk1, trk2)) { + // continue; + // } + // if (!selectionPair(trk1, trk2)) { + // continue; + // } + // ptl1 = ROOT::Math::PxPyPzMVector(trk1.px(), trk1.py(), trk1.pz(), massPtl); + // ptl2 = ROOT::Math::PxPyPzMVector(trk2.px(), trk2.py(), trk2.pz(), massPtl); + // recoPtl = ptl1 + ptl2; + // if (recoPtl.Rapidity() > cfgRapMax || recoPtl.Rapidity() < cfgRapMin) { + // continue; + // } + + // relPhiMix = TVector2::Phi_0_2pi((recoPtl.Phi() - eventPlaneDet) * static_cast(nmode)); + + // if (trk1.sign() * trk2.sign() < 0) { + // histos.fill(HIST("hInvMass_f0980_MixedUS_EPA"), recoPtl.M(), recoPtl.Pt(), centrality, relPhiMix); + // } else if (trk1.sign() > 0 && trk2.sign() > 0) { + // histos.fill(HIST("hInvMass_f0980_MixedLSpp_EPA"), recoPtl.M(), recoPtl.Pt(), centrality, relPhiMix); + // } else if (trk1.sign() < 0 && trk2.sign() < 0) { + // histos.fill(HIST("hInvMass_f0980_MixedLSmm_EPA"), recoPtl.M(), recoPtl.Pt(), centrality, relPhiMix); + // } + // } + } + } + PROCESS_SWITCH(F0980pbpbanalysis, processEventMixing, "Process Event mixing", true); + void init(o2::framework::InitContext&) { AxisSpec epAxis = {6, 0.0, o2::constants::math::TwoPI}; From 2ee63b42225059723ae215899f483c00d32a0b82 Mon Sep 17 00:00:00 2001 From: sangwoo Date: Fri, 18 Jul 2025 01:33:28 +0900 Subject: [PATCH 7/9] adding EventMixing --- PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx index b272d2b64ad..d33ae3e4646 100644 --- a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx +++ b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx @@ -136,7 +136,7 @@ struct F0980pbpbanalysis { ConfigurableAxis ptAxis{"ptAxis", {VARIABLE_WIDTH, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 10.0, 13.0, 20.0}, "Transverse momentum Binning"}; ConfigurableAxis centAxis{"centAxis", {VARIABLE_WIDTH, 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 100}, "Centrality interval"}; - //for event mixing + // for event mixing SliceCache cache; Configurable cfgNMixedEvents{"cfgNMixedEvents", 10, "Number of mixed events per event"}; ConfigurableAxis mixingAxisVertex{"mixingAxisVertex", {10, -10, 10}, "Vertex axis for mixing bin"}; @@ -200,7 +200,7 @@ struct F0980pbpbanalysis { using EventCandidates = soa::Filtered>; using TrackCandidates = soa::Filtered>; // aod::pidTOFbeta 추가됨 - + using BinningTypeVertexContributor = ColumnBinningPolicy; template @@ -504,7 +504,7 @@ struct F0980pbpbanalysis { ROOT::Math::PxPyPzMVector ptl1, ptl2, recoPtl; for (auto& [c1, t1, c2, t2] : pair) { std::cout << "--------------------------------" << std::endl; - std::cout << "1st collision ID: " << c1.globalIndex() << " 1st collision bcID: "<< c1.bcId() << " 2nd collision ID: " << c2.globalIndex() << " 2nd collision bcID: " << c2.bcId() << std::endl; + std::cout << "1st collision ID: " << c1.globalIndex() << " 1st collision bcID: " << c1.bcId() << " 2nd collision ID: " << c2.globalIndex() << " 2nd collision bcID: " << c2.bcId() << std::endl; if (c1.globalIndex() != c1.index()) { std::cout << "WARNING: Mixing events with different global indices!" << std::endl; } From bf4ce6e7aac7335aeb712fc3a7cc98409e4a8828 Mon Sep 17 00:00:00 2001 From: sangwoo Date: Fri, 18 Jul 2025 01:37:00 +0900 Subject: [PATCH 8/9] adding EventMixing --- PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx index d33ae3e4646..a706bab3339 100644 --- a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx +++ b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx @@ -503,11 +503,6 @@ struct F0980pbpbanalysis { SameKindPair pair{binningOnPositions, cfgNMixedEvents, -1, collisions, trackTuple, &cache}; ROOT::Math::PxPyPzMVector ptl1, ptl2, recoPtl; for (auto& [c1, t1, c2, t2] : pair) { - std::cout << "--------------------------------" << std::endl; - std::cout << "1st collision ID: " << c1.globalIndex() << " 1st collision bcID: " << c1.bcId() << " 2nd collision ID: " << c2.globalIndex() << " 2nd collision bcID: " << c2.bcId() << std::endl; - if (c1.globalIndex() != c1.index()) { - std::cout << "WARNING: Mixing events with different global indices!" << std::endl; - } if (cfgCentEst == CentEstList::FT0C) { centrality = c1.centFT0C(); } else if (cfgCentEst == CentEstList::FT0M) { @@ -520,8 +515,6 @@ struct F0980pbpbanalysis { continue; } double eventPlaneDet = std::atan2(c1.qvecIm()[qVecDetInd], c1.qvecRe()[qVecDetInd]) / static_cast(nmode); - int total = 0; - int survive = 0; for (auto& trk1 : t1) { if (!trackSelected(trk1)) { From ab4d075b5128a7288343b3b400f05ef7a7a9fa2a Mon Sep 17 00:00:00 2001 From: sangwoo Date: Fri, 18 Jul 2025 01:43:03 +0900 Subject: [PATCH 9/9] adding EventMixing --- PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx index a706bab3339..a28228fc6e8 100644 --- a/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx +++ b/PWGLF/Tasks/Resonances/f0980pbpbanalysis.cxx @@ -502,7 +502,7 @@ struct F0980pbpbanalysis { BinningTypeVertexContributor binningOnPositions{{mixingAxisVertex, mixingAxisMultiplicity}, true}; SameKindPair pair{binningOnPositions, cfgNMixedEvents, -1, collisions, trackTuple, &cache}; ROOT::Math::PxPyPzMVector ptl1, ptl2, recoPtl; - for (auto& [c1, t1, c2, t2] : pair) { + for (const auto& [c1, t1, c2, t2] : pair) { if (cfgCentEst == CentEstList::FT0C) { centrality = c1.centFT0C(); } else if (cfgCentEst == CentEstList::FT0M) { @@ -516,7 +516,7 @@ struct F0980pbpbanalysis { } double eventPlaneDet = std::atan2(c1.qvecIm()[qVecDetInd], c1.qvecRe()[qVecDetInd]) / static_cast(nmode); - for (auto& trk1 : t1) { + for (const auto& trk1 : t1) { if (!trackSelected(trk1)) { continue; } @@ -524,7 +524,7 @@ struct F0980pbpbanalysis { continue; } - for (auto& trk2 : t2) { + for (const auto& trk2 : t2) { if (!trackSelected(trk2)) { continue; }