2424#include " Common/Core/TrackSelection.h"
2525#include " Common/Core/TrackSelectionDefaults.h"
2626#include " Common/DataModel/TrackSelectionTables.h"
27- #include " Common/DataModel/Centrality.h"
28- #include " Common/DataModel/Multiplicity.h"
29- #include < TF1.h>
3027
3128using namespace o2 ;
3229using namespace o2 ::framework;
@@ -40,19 +37,11 @@ struct FlowPtEfficiency {
4037 O2_DEFINE_CONFIGURABLE (cfgCutPtMin, float , 0 .2f , " Minimal pT for tracks" )
4138 O2_DEFINE_CONFIGURABLE (cfgCutPtMax, float , 1000 .0f , " Maximal pT for tracks" )
4239 O2_DEFINE_CONFIGURABLE (cfgCutEta, float , 0 .8f , " Eta range for tracks" )
43- O2_DEFINE_CONFIGURABLE (cfgTriggerkTVXinTRD, bool , false , " TRD triggered" )
44- O2_DEFINE_CONFIGURABLE (cfgEvSelkNoSameBunchPileup, bool , false , " rejects collisions which are associated with the same found-by-T0 bunch crossing" )
45- O2_DEFINE_CONFIGURABLE (cfgEvSelkIsGoodZvtxFT0vsPV, bool , false , " removes collisions with large differences between z of PV by tracks and z of PV from FT0 A-C time difference, use this cut at low multiplicities with caution" )
46- O2_DEFINE_CONFIGURABLE (cfgEvSelkNoCollInTimeRangeStandard, bool , false , " no collisions in specified time range" )
47- O2_DEFINE_CONFIGURABLE (cfgEvSelkIsGoodITSLayersAll, bool , false , " cut time intervals with dead ITS staves" )
48- O2_DEFINE_CONFIGURABLE (cfgEvSelMultCorrelation, bool , false , " Multiplicity correlation cut" )
49- O2_DEFINE_CONFIGURABLE (cfgEvSelV0AT0ACut, bool , false , " V0A T0A 5 sigma cut" )
50- O2_DEFINE_CONFIGURABLE (cfgEvSelOccupancy, bool , false , " Occupancy cut" )
51- O2_DEFINE_CONFIGURABLE (cfgCutOccupancyHigh, int , 3000 , " High cut on TPC occupancy" )
52- O2_DEFINE_CONFIGURABLE (cfgCutOccupancyLow, int , 0 , " Low cut on TPC occupancy" )
40+ O2_DEFINE_CONFIGURABLE (cfgkIsTrackGlobal, bool , false , " GlobalTrack requirement for tracks" )
5341 O2_DEFINE_CONFIGURABLE (cfgTrkSelRun3ITSMatch, bool , false , " GlobalTrackRun3ITSMatching::Run3ITSall7Layers selection" )
5442 O2_DEFINE_CONFIGURABLE (cfgCutChi2prTPCcls, float , 2 .5f , " max chi2 per TPC clusters" )
5543 O2_DEFINE_CONFIGURABLE (cfgCutTPCclu, float , 70 .0f , " minimum TPC clusters" )
44+ O2_DEFINE_CONFIGURABLE (cfgCutITSclu, float , 5 .0f , " minimum ITS clusters" )
5645 O2_DEFINE_CONFIGURABLE (cfgCutTPCcrossedrows, float , 70 .0f , " minimum TPC crossed rows" )
5746 O2_DEFINE_CONFIGURABLE (cfgCutDCAxy, float , 0 .2f , " DCAxy cut for tracks" )
5847 O2_DEFINE_CONFIGURABLE (cfgCutDCAz, float , 2 .0f , " DCAz cut for tracks" )
@@ -64,12 +53,12 @@ struct FlowPtEfficiency {
6453 ConfigurableAxis axisPt{" axisPt" , {VARIABLE_WIDTH, 0.2 , 0.25 , 0.30 , 0.40 , 0.45 , 0.50 , 0.55 , 0.60 , 0.65 , 0.70 , 0.75 , 0.80 , 0.85 , 0.90 , 0.95 , 1.00 , 1.10 , 1.20 , 1.30 , 1.40 , 1.50 , 1.60 , 1.70 , 1.80 , 1.90 , 2.00 , 2.20 , 2.40 , 2.60 , 2.80 , 3.00 }, " pt axis for histograms" };
6554
6655 // Filter the tracks
67- Filter trackFilter = ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == ( uint8_t ) true )) && ( nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls);
56+ Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls);
6857 using MyTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TracksDCA, aod::McTrackLabels>>;
6958
7059 // Filter for collisions
7160 Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
72- using MyCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, aod::Mults >>;
61+ using MyCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels>>;
7362
7463 // Filter for MCParticle
7564 Filter particleFilter = (nabs(aod::mcparticle::eta) < cfgCutEta) && (aod::mcparticle::pt > cfgCutPtMin) && (aod::mcparticle::pt < cfgCutPtMax);
@@ -81,14 +70,6 @@ struct FlowPtEfficiency {
8170
8271 // Additional filters for tracks
8372 TrackSelection myTrackSel;
84- // Additional track selection cuts - Copy from flowGenericFramework.cxx
85- TF1* fMultPVCutLow = nullptr ;
86- TF1* fMultPVCutHigh = nullptr ;
87- TF1* fMultCutLow = nullptr ;
88- TF1* fMultCutHigh = nullptr ;
89- TF1* fMultMultPVCut = nullptr ;
90- TF1* fT0AV0AMean = nullptr ;
91- TF1* fT0AV0ASigma = nullptr ;
9273
9374 // Define the output
9475 HistogramRegistry registry{" registry" };
@@ -129,84 +110,17 @@ struct FlowPtEfficiency {
129110 myTrackSel.SetMaxDcaXY (cfgCutDCAxy);
130111 }
131112 myTrackSel.SetMinNClustersTPC (cfgCutTPCclu);
113+ myTrackSel.SetMinNClustersITS (cfgCutITSclu);
132114 myTrackSel.SetMinNCrossedRowsTPC (cfgCutTPCcrossedrows);
133115 if (!cfgCutDCAzPtDepEnabled)
134116 myTrackSel.SetMaxDcaZ (cfgCutDCAz);
135-
136- if (cfgEvSelMultCorrelation) {
137- fMultPVCutLow = new TF1 (" fMultPVCutLow" , " [0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x - 3.5*([5]+[6]*x+[7]*x*x+[8]*x*x*x+[9]*x*x*x*x)" , 0 , 100 );
138- fMultPVCutLow ->SetParameters (3257.29 , -121.848 , 1.98492 , -0.0172128 , 6.47528e-05 , 154.756 , -1.86072 , -0.0274713 , 0.000633499 , -3.37757e-06 );
139- fMultPVCutHigh = new TF1 (" fMultPVCutHigh" , " [0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x + 3.5*([5]+[6]*x+[7]*x*x+[8]*x*x*x+[9]*x*x*x*x)" , 0 , 100 );
140- fMultPVCutHigh ->SetParameters (3257.29 , -121.848 , 1.98492 , -0.0172128 , 6.47528e-05 , 154.756 , -1.86072 , -0.0274713 , 0.000633499 , -3.37757e-06 );
141-
142- fMultCutLow = new TF1 (" fMultCutLow" , " [0]+[1]*x+[2]*x*x+[3]*x*x*x - 2.*([4]+[5]*x+[6]*x*x+[7]*x*x*x+[8]*x*x*x*x)" , 0 , 100 );
143- fMultCutLow ->SetParameters (1654.46 , -47.2379 , 0.449833 , -0.0014125 , 150.773 , -3.67334 , 0.0530503 , -0.000614061 , 3.15956e-06 );
144- fMultCutHigh = new TF1 (" fMultCutHigh" , " [0]+[1]*x+[2]*x*x+[3]*x*x*x + 3.*([4]+[5]*x+[6]*x*x+[7]*x*x*x+[8]*x*x*x*x)" , 0 , 100 );
145- fMultCutHigh ->SetParameters (1654.46 , -47.2379 , 0.449833 , -0.0014125 , 150.773 , -3.67334 , 0.0530503 , -0.000614061 , 3.15956e-06 );
146- }
147- if (cfgEvSelV0AT0ACut) {
148- fT0AV0AMean = new TF1 (" fT0AV0AMean" , " [0]+[1]*x" , 0 , 200000 );
149- fT0AV0AMean ->SetParameters (-1601.0581 , 9.417652e-01 );
150- fT0AV0ASigma = new TF1 (" fT0AV0ASigma" , " [0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x" , 0 , 200000 );
151- fT0AV0ASigma ->SetParameters (463.4144 , 6.796509e-02 , -9.097136e-07 , 7.971088e-12 , -2.600581e-17 );
152- }
153- }
154-
155- template <typename TCollision>
156- bool eventSelected (TCollision collision, const int multTrk, const float centrality)
157- {
158- if (cfgTriggerkTVXinTRD && collision.alias_bit (kTVXinTRD )) {
159- // TRD triggered
160- return 0 ;
161- }
162- if (cfgEvSelkNoSameBunchPileup && !collision.selection_bit (o2::aod::evsel::kNoSameBunchPileup )) {
163- // rejects collisions which are associated with the same "found-by-T0" bunch crossing
164- // https://indico.cern.ch/event/1396220/#1-event-selection-with-its-rof
165- return 0 ;
166- }
167- if (cfgEvSelkIsGoodZvtxFT0vsPV && !collision.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV )) {
168- // removes collisions with large differences between z of PV by tracks and z of PV from FT0 A-C time difference
169- // use this cut at low multiplicities with caution
170- return 0 ;
171- }
172- if (cfgEvSelkNoCollInTimeRangeStandard && !collision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard )) {
173- // no collisions in specified time range
174- return 0 ;
175- }
176- if (cfgEvSelkIsGoodITSLayersAll && !collision.selection_bit (o2::aod::evsel::kIsGoodITSLayersAll )) {
177- // from Jan 9 2025 AOT meeting
178- // cut time intervals with dead ITS staves
179- return 0 ;
180- }
181-
182- if (cfgEvSelOccupancy) {
183- auto occupancy = collision.trackOccupancyInTimeRange ();
184- if (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)
185- return 0 ;
186- }
187-
188- if (cfgEvSelMultCorrelation) {
189- auto multNTracksPV = collision.multNTracksPV ();
190- if (multNTracksPV < fMultPVCutLow ->Eval (centrality))
191- return 0 ;
192- if (multNTracksPV > fMultPVCutHigh ->Eval (centrality))
193- return 0 ;
194- if (multTrk < fMultCutLow ->Eval (centrality))
195- return 0 ;
196- if (multTrk > fMultCutHigh ->Eval (centrality))
197- return 0 ;
198- }
199-
200- // V0A T0A 5 sigma cut
201- if (cfgEvSelV0AT0ACut && (std::fabs (collision.multFV0A () - fT0AV0AMean ->Eval (collision.multFT0A ())) > 5 * fT0AV0ASigma ->Eval (collision.multFT0A ())))
202- return 0 ;
203-
204- return 1 ;
205117 }
206118
207119 template <typename TTrack>
208120 bool trackSelected (TTrack track)
209121 {
122+ if (cfgkIsTrackGlobal && !track.isGlobalTrack ())
123+ return false ;
210124 if (cfgCutDCAzPtDepEnabled && (track.dcaZ () > (0 .004f + 0 .013f / track.pt ())))
211125 return false ;
212126 return myTrackSel.IsSelected (track);
@@ -225,9 +139,6 @@ struct FlowPtEfficiency {
225139 if (!std::count (cfgRunNumberList.value .begin (), cfgRunNumberList.value .end (), runNumber))
226140 return ;
227141 }
228- const auto cent = collision.centFT0C ();
229- if (!eventSelected (collision, tracks.size (), cent))
230- return ;
231142 for (const auto & track : tracks) {
232143 if (!trackSelected (track))
233144 continue ;
0 commit comments