@@ -58,9 +58,12 @@ struct FlowMc {
5858 O2_DEFINE_CONFIGURABLE (cfgCutPtRefMax, float , 3 .0f , " Maximal pT for ref tracks" )
5959 O2_DEFINE_CONFIGURABLE (cfgCutPtPOIMin, float , 0 .2f , " Minimal pT for poi tracks" )
6060 O2_DEFINE_CONFIGURABLE (cfgCutPtPOIMax, float , 10 .0f , " Maximal pT for poi tracks" )
61+ O2_DEFINE_CONFIGURABLE (cfgCutTPCclu, float , 70 .0f , " minimum TPC clusters" )
62+ O2_DEFINE_CONFIGURABLE (cfgCutITSclu, float , 6 .0f , " minimum ITS clusters" )
6163 O2_DEFINE_CONFIGURABLE (cfgFlowAcceptance, std::string, " " , " CCDB path to acceptance object" )
6264 O2_DEFINE_CONFIGURABLE (cfgFlowEfficiency, std::string, " " , " CCDB path to efficiency object" )
6365 O2_DEFINE_CONFIGURABLE (cfgCentVsIPTruth, std::string, " " , " CCDB path to centrality vs IP truth" )
66+ O2_DEFINE_CONFIGURABLE (cfgIsGlobalTrack, bool , false , " Use global tracks instead of hasTPC&&hasITS" )
6467 O2_DEFINE_CONFIGURABLE (cfgFlowCumulantEnabled, bool , false , " switch of calculating flow" )
6568 O2_DEFINE_CONFIGURABLE (cfgFlowCumulantNbootstrap, int , 30 , " Number of subsamples" )
6669
@@ -97,6 +100,9 @@ struct FlowMc {
97100
98101 void init (InitContext&)
99102 {
103+ // QA histograms
104+ histos.add <TH1>(" hnTPCClu" , " Number of found TPC clusters" , HistType::kTH1D , {{100 , 40 , 180 }});
105+ histos.add <TH1>(" hnITSClu" , " Number of found ITS clusters" , HistType::kTH1D , {{100 , 0 , 20 }});
100106 // pT histograms
101107 histos.add <TH1>(" hImpactParameter" , " hImpactParameter" , HistType::kTH1D , {axisB});
102108 histos.add <TH2>(" hNchVsImpactParameter" , " hNchVsImpactParameter" , HistType::kTH2D , {axisB, axisNch});
@@ -269,7 +275,7 @@ struct FlowMc {
269275 }
270276 }
271277
272- using RecoTracks = soa::Join<aod::TracksIU, aod::TracksExtra>;
278+ using RecoTracks = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TrackSelection >;
273279
274280 void process (aod::McCollision const & mcCollision, aod::BCsWithTimestamps const &, soa::Join<aod::McParticles, aod::ParticlesToTracks> const & mcParticles, RecoTracks const &)
275281 {
@@ -344,7 +350,15 @@ struct FlowMc {
344350 if (mcParticle.has_tracks ()) {
345351 auto const & tracks = mcParticle.tracks_as <RecoTracks>();
346352 for (auto const & track : tracks) {
347- if (track.hasTPC () && track.hasITS ()) {
353+ if (!((track.tpcNClsFound () >= cfgCutTPCclu) && (track.itsNCls () >= cfgCutITSclu))) {
354+ continue ;
355+ }
356+ histos.fill (HIST (" hnTPCClu" ), track.tpcNClsFound ());
357+ histos.fill (HIST (" hnITSClu" ), track.itsNCls ());
358+ if (cfgIsGlobalTrack && track.isGlobalTrack ()) {
359+ validGlobal = true ;
360+ }
361+ if (!cfgIsGlobalTrack && track.hasTPC () && track.hasITS ()) {
348362 validGlobal = true ;
349363 }
350364 if (track.hasTPC () || track.hasITS ()) {
0 commit comments