From 3fe47d38f0f16324efe10e55f0bcea7449c15ec3 Mon Sep 17 00:00:00 2001 From: Daniel Molnar Date: Mon, 30 Nov 2026 18:59:01 +0100 Subject: [PATCH 1/2] Add sel8 event cut and standard track-quality cuts --- .../Tasks/multiparticleCorrelationsDm.cxx | 94 +++++++++++++++++-- 1 file changed, 86 insertions(+), 8 deletions(-) diff --git a/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsDm.cxx b/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsDm.cxx index d1eabcea2bd..2206aa181e9 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsDm.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsDm.cxx @@ -129,7 +129,7 @@ enum EOccupancyEstimator { }; // *) Main task: -struct MultiparticleCorrelationsDm { // this name is used in lower-case format, to name the TDirectoryFile in AnalysisResults.root +struct MultiparticleCorrelationsDm { // this name is used in lower-case format to name the TDirectoryFile in AnalysisResults.root // *) Base TList to hold all output objects: TString sBaseListName = "Default list name"; // yes, I declare it separately, because I need it also later in BailOut() function @@ -163,6 +163,10 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format, Configurable cfUseZFT0vsPV{"cfUseZFT0vsPV", true, "use this cut"}; Configurable cfUsePrevRof{"cfUsePrevRof", true, " use this cut"}; + // Basic Run 3 event selection: keeps only real collisions (FT0 vertex trigger, TVX) that are not cut + // by a time-frame or ITS readout-frame border ---- always be on for Run 3 data !! + Configurable cfUseSel8{"cfUseSel8", true, "apply the standard Run 3 event selection sel8"}; + // 2D correlation cuts: Configurable cfUseCentralityCorrelationCut{"cfUseCentralityCorrelationCut", false, "reject events in which centFT0C and centFT0M differ too much (relative)"}; Configurable> cfCentralityCorrelationCut{"cfCentralityCorrelationCut", {0.2, 5.}, "{maximum relative difference, floor (%) for the scale}"}; @@ -210,6 +214,21 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format, Configurable cfUseDcaZCut{"cfUseDcaZCut", true, "apply the cut on |dcaZ|"}; Configurable cfDcaZMax{"cfDcaZMax", 3.2, "keep tracks with |dcaZ| < this value [cm]"}; + // Standard track-quality cuts: + // Quality of the TPC track fit: chi2 per TPC cluster. Large values = badly fitted or fake tracks. + Configurable cfUseTpcChi2NClCut{"cfUseTpcChi2NClCut", true, "apply the cut on the TPC chi2 per cluster"}; + Configurable cfTpcChi2NClMax{"cfTpcChi2NClMax", 4., "keep tracks with tpcChi2NCl < this value"}; + // Quality of the ITS track fit: chi2 per ITS cluster. Large values = wrong matching between ITS and TPC. + Configurable cfUseItsChi2NClCut{"cfUseItsChi2NClCut", true, "apply the cut on the ITS chi2 per cluster"}; + Configurable cfItsChi2NClMax{"cfItsChi2NClMax", 36., "keep tracks with itsChi2NCl < this value"}; + // Number of TPC pad rows the track crosses (out of 159). Few crossed rows = short, often fake or split tracks. + Configurable cfUseTpcNClsCrossedRowsCut{"cfUseTpcNClsCrossedRowsCut", true, "apply the cut on the number of TPC crossed rows"}; + Configurable cfTpcNClsCrossedRowsMin{"cfTpcNClsCrossedRowsMin", 70, "keep tracks with tpcNClsCrossedRows >= this value"}; + // Keep only tracks flagged as primary by the central track selection (removes most secondaries from decays and detector material). + Configurable cfUseIsPrimaryTrack{"cfUseIsPrimaryTrack", true, "keep only tracks with isPrimaryTrack() = true"}; + // Keep only tracks that were used to reconstruct the primary vertex of this collision (removes tracks from other, pile-up collisions). + Configurable cfUseIsPVContributor{"cfUseIsPVContributor", true, "keep only tracks with isPVContributor() = true"}; + // binning of the track-quality and charge histograms: Configurable> cfChargeBins{"cfChargeBins", {3, -1.5, 1.5}, "nBins, min, max"}; Configurable> cfDcaXYBins{"cfDcaXYBins", {600, -3., 3.}, "nBins, min, max [cm]"}; @@ -242,6 +261,7 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format, bool fUseITSLayers = true; bool fUseZFT0vsPV = true; bool fUsePrevRof = true; + bool fUseSel8 = true; // standard Run 3 event selection bool fUseCentralityCorrelationCut = false; std::array fCentralityCorrelationCut = {0.2, 5.}; // {maximum relative difference, floor (%)} @@ -270,12 +290,20 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format, bool fUseDcaXYCut = true; float fDcaXYMax = 2.4; // [cm] bool fUseDcaZCut = true; - float fDcaZMax = 3.2; // [cm] - int fCurrentRunNumber = -1; // run number of the weights currently in use - bool fUsePhiWeights = false; // load phi weights - bool fUsePtWeights = false; // load pt weights - bool fUseEtaWeights = false; // load eta weights - bool fVerbose = false; // print the values / collision + float fDcaZMax = 3.2; // [cm] + bool fUseTpcChi2NClCut = true; + float fTpcChi2NClMax = 4.; // maximum TPC chi2 per cluster + bool fUseItsChi2NClCut = true; + float fItsChi2NClMax = 36.; // maximum ITS chi2 per cluster + bool fUseTpcNClsCrossedRowsCut = true; + int fTpcNClsCrossedRowsMin = 70; // minimum number of TPC crossed rows + bool fUseIsPrimaryTrack = true; // only primary tracks + bool fUseIsPVContributor = true; // only tracks that contributed to the primary vertex + int fCurrentRunNumber = -1; // run number of the weights currently in use + bool fUsePhiWeights = false; // load phi weights + bool fUsePtWeights = false; // load pt weights + bool fUseEtaWeights = false; // load eta weights + bool fVerbose = false; // print the values / collision } tc; // you have to prepend "tc." for all objects name in this group later in the code @@ -628,7 +656,7 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format, } } - // Q(n,p), including negative harmonics: Q(-n,p) = conjugate of Q(n,p) !! + // Q(n,p), including negative harmonics: Q(-n,p) = conjugate of Q(n,p) std::complex qv(int n, int p) { if (std::abs(n) > KMaxHarmonic || p < 1 || p > KMaxPower) { @@ -653,6 +681,12 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format, template bool eventCuts(T1 const& collision) { + // *) sel8: standard Run 3 event selection (real collision, not at a time-frame or ITS readout-frame border) + if (tc.fUseSel8) { + if (!collision.sel8()) { + return false; // if at least one event cut is not satisfied + } + } // *) Vertex Z cut if (tc.fUseVertexZCut) { @@ -808,6 +842,41 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format, } } + // *) TPC chi2 per cluster: reject badly fitted tracks + if (tc.fUseTpcChi2NClCut) { + if (!(track.tpcChi2NCl() < tc.fTpcChi2NClMax)) { + return false; // if at least one particle cut is not satisfied + } + } + + // *) ITS chi2 per cluster: reject tracks with a bad ITS-TPC match + if (tc.fUseItsChi2NClCut) { + if (!(track.itsChi2NCl() < tc.fItsChi2NClMax)) { + return false; // if at least one particle cut is not satisfied + } + } + + // *) number of TPC crossed rows: reject short tracks + if (tc.fUseTpcNClsCrossedRowsCut) { + if (!(track.tpcNClsCrossedRows() >= tc.fTpcNClsCrossedRowsMin)) { + return false; // if at least one particle cut is not satisfied + } + } + + // *) primary track flag from the central track selection + if (tc.fUseIsPrimaryTrack) { + if (!track.isPrimaryTrack()) { + return false; // if at least one particle cut is not satisfied + } + } + + // *) track contributed to the primary vertex of this collision + if (tc.fUseIsPVContributor) { + if (!track.isPVContributor()) { + return false; // if at least one particle cut is not satisfied + } + } + } // end of if constexpr (rs != ESim) return true; // all particle cuts passed @@ -1080,6 +1149,14 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format, tc.fDcaXYMax = cfDcaXYMax; tc.fUseDcaZCut = cfUseDcaZCut; tc.fDcaZMax = cfDcaZMax; + tc.fUseTpcChi2NClCut = cfUseTpcChi2NClCut; + tc.fTpcChi2NClMax = cfTpcChi2NClMax; + tc.fUseItsChi2NClCut = cfUseItsChi2NClCut; + tc.fItsChi2NClMax = cfItsChi2NClMax; + tc.fUseTpcNClsCrossedRowsCut = cfUseTpcNClsCrossedRowsCut; + tc.fTpcNClsCrossedRowsMin = cfTpcNClsCrossedRowsMin; + tc.fUseIsPrimaryTrack = cfUseIsPrimaryTrack; + tc.fUseIsPVContributor = cfUseIsPVContributor; // technical event cuts: copy the switches tc.fUseTimeRange = cfUseTimeRange; @@ -1089,6 +1166,7 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format, tc.fUseITSLayers = cfUseITSLayers; tc.fUseZFT0vsPV = cfUseZFT0vsPV; tc.fUsePrevRof = cfUsePrevRof; + tc.fUseSel8 = cfUseSel8; // 2D correlation cuts and validation: copy the switches and values tc.fUseCentralityCorrelationCut = cfUseCentralityCorrelationCut; From 94f4be66064b4142cd67cdc3dfc2acf28fb15442 Mon Sep 17 00:00:00 2001 From: Daniel Molnar Date: Mon, 30 Nov 2026 19:22:43 +0100 Subject: [PATCH 2/2] Add sel8 event cut and standard track-quality cuts corrected --- .../Tasks/multiparticleCorrelationsDm.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsDm.cxx b/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsDm.cxx index 2206aa181e9..aba5a751bbe 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsDm.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsDm.cxx @@ -746,8 +746,8 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format t // *) Occupancy cut, convention: min <= occupancy < max (events without occupancy information, value -1, are rejected for min = 0) if (tc.fUseOccupancyCut) { const float occupancy = getOccupancy(collision); - if (!(tc.fOccupancy[0] <= occupancy && occupancy < tc.fOccupancy[1])) { - return false; // if at least one event cut is not satisfied + if (occupancy < tc.fOccupancy[0] || occupancy >= tc.fOccupancy[1]) { // outside {min, max} + return false; // if at least one event cut is not satisfied } } @@ -1222,7 +1222,7 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format t } // *) Book base list: - TList* temp = new TList(); + auto* temp = new TList(); temp->SetOwner(true); fBaseList.setObject(temp);