@@ -63,11 +63,16 @@ struct FlowGfwTask {
6363 O2_DEFINE_CONFIGURABLE (cfgCutITSclu, float , 5 .0f , " minimum ITS clusters" )
6464 O2_DEFINE_CONFIGURABLE (cfgMinCentFT0C, float , 0 .0f , " Minimum FT0C Centrality" )
6565 O2_DEFINE_CONFIGURABLE (cfgMaxCentFT0C, float , 100 .0f , " Maximum FT0C Centrality" )
66- O2_DEFINE_CONFIGURABLE (cfgUseAdditionalEventCut, bool , false , " Use additional event cut on mult correlations" )
67- O2_DEFINE_CONFIGURABLE (cfgUseAdditionalTrackCut, bool , false , " Use additional track cut on phi" )
68- O2_DEFINE_CONFIGURABLE (cfgUseNch, bool , false , " Use Nch for flow observables" )
66+ O2_DEFINE_CONFIGURABLE (cfgcentEstFt0c, bool , true , " Centrality estimator based on FT0C signal" )
67+ O2_DEFINE_CONFIGURABLE (cfgcentEstFt0a, bool , false , " Centrality estimator based on FT0A signal" )
68+ O2_DEFINE_CONFIGURABLE (cfgcentEstFt0m, bool , false , " A centrality estimator based on FT0A+FT0C signals." )
69+ O2_DEFINE_CONFIGURABLE (cfgcentEstFv0a, bool , false , " Centrality estimator based on FV0A signal" )
70+ O2_DEFINE_CONFIGURABLE (cfgcentEstFt0cVariant1, bool , false , " A variant of FT0C" )
71+ O2_DEFINE_CONFIGURABLE (cfgUseAdditionalEventCut, bool , true , " Use additional event cut on mult correlations" )
72+ O2_DEFINE_CONFIGURABLE (cfgUseAdditionalTrackCut, bool , true , " Use additional track cut on phi" )
73+ O2_DEFINE_CONFIGURABLE (cfgUseNch, bool , true , " Use Nch for flow observables" )
6974 O2_DEFINE_CONFIGURABLE (cfgNbootstrap, int , 10 , " Number of subsamples" )
70- O2_DEFINE_CONFIGURABLE (cfgOutputNUAWeights, bool , false , " Fill and output NUA weights" )
75+ O2_DEFINE_CONFIGURABLE (cfgOutputNUAWeights, bool , true , " Fill and output NUA weights" )
7176 O2_DEFINE_CONFIGURABLE (cfgEfficiency, std::string, " " , " CCDB path to efficiency object" )
7277 O2_DEFINE_CONFIGURABLE (cfgAcceptance, std::string, " " , " CCDB path to acceptance object" )
7378 O2_DEFINE_CONFIGURABLE (cfgMagnetField, std::string, " GLO/Config/GRPMagField" , " CCDB path to Magnet field object" )
@@ -81,9 +86,12 @@ struct FlowGfwTask {
8186 O2_DEFINE_CONFIGURABLE (cfgIsGoodZvtxFT0vsPV, bool , false , " kIsGoodZvtxFT0vsPV" );
8287 O2_DEFINE_CONFIGURABLE (cfgNoCollInTimeRangeStandard, bool , false , " kNoCollInTimeRangeStandard" );
8388 O2_DEFINE_CONFIGURABLE (cfgEvSelkIsGoodITSLayersAll, bool , false , " kIsGoodITSLayersAll" )
84- O2_DEFINE_CONFIGURABLE (cfgOccupancy, bool , false , " Bool for event selection on detector occupancy" );
85- O2_DEFINE_CONFIGURABLE (cfgMultCut, bool , false , " Use additional event cut on mult correlations" );
86- O2_DEFINE_CONFIGURABLE (FineBinning, bool , false , " Manually change to fine binning" )
89+ O2_DEFINE_CONFIGURABLE (cfgOccupancy, bool , true , " Bool for event selection on detector occupancy" );
90+ O2_DEFINE_CONFIGURABLE (cfgMultCut, bool , true , " Use additional event cut on mult correlations" );
91+ O2_DEFINE_CONFIGURABLE (cfgGlobalplusITS, bool , true , " Global and ITS tracks" )
92+ O2_DEFINE_CONFIGURABLE (cfgGlobalonly, bool , false , " Global only tracks" )
93+ O2_DEFINE_CONFIGURABLE (cfgITSonly, bool , false , " ITS only tracks" )
94+ O2_DEFINE_CONFIGURABLE (cfgFineBinning, bool , false , " Manually change to fine binning" )
8795 O2_DEFINE_CONFIGURABLE (cfgTrackSelRun3ITSMatch, bool , false , " System check: Run3ITSMatch" )
8896 O2_DEFINE_CONFIGURABLE (cfgTrackSel, bool , false , " System check: track selection" )
8997
@@ -183,6 +191,19 @@ struct FlowGfwTask {
183191 kNOOFEVENTSTEPS
184192 };
185193
194+ // Contruct Global+ITS sample
195+ static constexpr TrackSelectionFlags::flagtype TrackSelectionITS =
196+ TrackSelectionFlags::kITSNCls | TrackSelectionFlags::kITSChi2NDF |
197+ TrackSelectionFlags::kITSHits ;
198+ static constexpr TrackSelectionFlags::flagtype TrackSelectionTPC =
199+ TrackSelectionFlags::kTPCNCls |
200+ TrackSelectionFlags::kTPCCrossedRowsOverNCls |
201+ TrackSelectionFlags::kTPCChi2NDF ;
202+ static constexpr TrackSelectionFlags::flagtype TrackSelectionDCA =
203+ TrackSelectionFlags::kDCAz | TrackSelectionFlags::kDCAxy ;
204+ static constexpr TrackSelectionFlags::flagtype TrackSelectionDCAXYonly =
205+ TrackSelectionFlags::kDCAxy ;
206+
186207 // Additional Event selection cuts - Copy from flowGenericFramework.cxx
187208 TrackSelection myTrackSel;
188209 TF1* fPhiCutLow = nullptr ;
@@ -268,9 +289,18 @@ struct FlowGfwTask {
268289 registry.add (" ZNvsZEMcollrest" , " ZNvsZEMcoll; ZEM; ZDC energy (GeV)" , {HistType::kTH2F , {{{nBinsAmp, -0.5 , maxZEM}, {nBinsAmp, -0.5 , 2 . * maxZN}}}});
269290
270291 // Track plots
271- registry.add (" Nch" , " N_{ch 0-5%} vs #Events of ;N_{ch 0-5%};No. of Events" , {HistType::kTH1D , {axisNch}});
292+ registry.add (" Nch" , " N_{ch 0-5%} vs #Events;N_{ch 0-5%};No. of Events" , {HistType::kTH1D , {axisNch}});
272293 registry.add (" Events_per_Centrality_Bin" , " Events_per_Centrality_Bin;Centrality FT0C;No. of Events" , kTH1F , {axisCentrality});
273- registry.add (" Global_Tracks_Nch_vs_Cent" , " Global Tracks;Centrality (%); M (|#eta| < 0.8);" , {HistType::kTH2D , {axisCentrality, axisNch}});
294+ registry.add (" pt_Cen_GlobalOnly" , " pt_Cen_Global;Centrality (%); p_{T} (GeV/c);" , {HistType::kTH2D , {axisCentrality, axisPt}});
295+ registry.add (" phi_Cen_GlobalOnly" , " phi_Cen_Global;Centrality (%); #phi;" , {HistType::kTH2D , {axisCentrality, axisPhi}});
296+ registry.add (" pt_Cen_ITSOnly" , " pt_Cen_ITS;Centrality (%); p_{T} (GeV/c);" , {HistType::kTH2D , {axisCentrality, axisPt}});
297+ registry.add (" phi_Cen_ITSOnly" , " phi_Cen_ITS;Centrality (%); #phi;" , {HistType::kTH2D , {axisCentrality, axisPhi}});
298+
299+
300+ // Track types
301+ registry.add (" GlobalplusITS" , " Global plus ITS;Centrality FT0C;Nch" , kTH1F , {axisCentrality});
302+ registry.add (" Globalonly" , " Global only;Centrality FT0C;Nch" , kTH1F , {axisCentrality});
303+ registry.add (" ITSonly" , " ITS only;Centrality FT0C;Nch" , kTH1F , {axisCentrality});
274304
275305 // Track QA
276306 registry.add (" hPt" , " p_{T} distribution before cut" , {HistType::kTH1D , {axisPtHist}});
@@ -646,9 +676,15 @@ struct FlowGfwTask {
646676
647677 // Apply process filters
648678 Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex && (aod::cent::centFT0C > cfgMinCentFT0C) && (aod::cent::centFT0C < cfgMaxCentFT0C);
649- Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t ) true )) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgCutDCAxy);
650-
651- using Colls = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs, aod::CentFT0As, aod::CentFT0Ms>>; // collisions filter
679+ Filter trackFilter = ncheckbit(aod::track::v001::detectorMap, (uint8_t )o2::aod::track::ITS) &&
680+ ncheckbit (aod::track::trackCutFlag, TrackSelectionITS) &&
681+ ifnode (ncheckbit(aod::track::v001::detectorMap, (uint8_t )o2::aod::track::TPC),
682+ ncheckbit(aod::track::trackCutFlag, TrackSelectionTPC), true) &&
683+ ifnode(dcaZ > 0 .f, nabs(aod::track::dcaZ) <= dcaZ && ncheckbit(aod::track::trackCutFlag, TrackSelectionDCAXYonly),
684+ ncheckbit(aod::track::trackCutFlag, TrackSelectionDCA)) &&
685+ (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls);
686+
687+ using Colls = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs, aod::CentFT0As, aod::CentFT0Ms, aod::CentFV0As, aod::CentFT0CVariant1s>>; // collisions filter
652688 using AodTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksDCA, aod::TracksExtra>>; // tracks filter
653689
654690 using BCsRun3 = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels, aod::Run3MatchedToBCSparse>;
@@ -663,7 +699,14 @@ struct FlowGfwTask {
663699 if (nTotal < 1 )
664700 return ;
665701
666- const auto centrality = collision.centFT0C ();
702+ // Choose centrality estimator -- Only one can be true
703+ float centrality = 0 ;
704+ if (cfgcentEstFt0c){const auto centrality = collision.centFT0C ();}
705+ else if (cfgcentEstFt0a) {const auto centrality = collision.centFT0A ();}
706+ else if (cfgcentEstFt0m) {const auto centrality = collision.centFT0M ();}
707+ else if (cfgcentEstFv0a) {const auto centrality = collision.centFV0A ();}
708+ else if (cfgcentEstFt0cVariant1) {const auto centrality = collision.centFT0CVariant1 ();}
709+ else {return ;}
667710
668711 // fill event QA before cuts
669712 registry.fill (HIST (" BeforeCut_globalTracks_centT0C" ), collision.centFT0C (), tracks.size ());
@@ -785,6 +828,9 @@ struct FlowGfwTask {
785828
786829 // track loop
787830 int globalTracksNch = 0 ;
831+ int globalPlusitsNch = 0 ;
832+ int gloabalOnlyNch = 0 ;
833+ int itsOnlyNch = 0 ;
788834
789835 for (const auto & track : tracks) {
790836 if (!trackSelected (track))
@@ -814,18 +860,56 @@ struct FlowGfwTask {
814860 registry.fill (HIST (" hDCAxy" ), track.dcaXY (), track.pt ());
815861 }
816862
817- globalTracksNch ++;
863+ globalPlusitsNch ++;
818864
819- if (withinPtRef)
820- fGFW ->Fill (track.eta (), 1 , track.phi (), wacc * weff, 1 );
865+ registry.fill (HIST (" GlobalplusITS" ), centrality);
866+
867+ if (cfgGlobalplusITS){
868+ if (withinPtRef){
869+ fGFW ->Fill (track.eta (),fPtAxis ->FindBin (track.pt ()) - 1 , track.phi (), wacc * weff, 1 );
870+ }
871+ }
821872
822- if (FineBinning == true )
873+ if (track.hasTPC ()){
874+ if (cfgGlobalonly)
875+ {
876+ if (withinPtRef){
877+ fGFW ->Fill (track.eta (),fPtAxis ->FindBin (track.pt ()) - 1 , track.phi (), wacc * weff, 1 );
878+ gloabalOnlyNch++;
879+ registry.fill (HIST (" Globalonly" ), centrality);
880+ registry.fill (HIST (" pt_Cen_ITSOnly" ), centrality, track.pt ());
881+ registry.fill (HIST (" phi_Cen_GlobalOnly" ), centrality, track.pt ());
882+
883+ }
884+ }
885+ }
886+ else
887+ {
888+ if (cfgITSonly)
889+ {
890+ if (withinPtRef){
891+ fGFW ->Fill (track.eta (),fPtAxis ->FindBin (track.pt ()) - 1 , track.phi (), wacc * weff, 1 );
892+ itsOnlyNch++;
893+ registry.fill (HIST (" ITSonly" ), centrality);
894+ registry.fill (HIST (" pt_Cen_ITSOnly" ), centrality, track.pt ());
895+ registry.fill (HIST (" phi_Cen_ITSOnly" ), centrality, track.pt ());
896+ }
897+ }
898+ }
899+
900+ if (cfgFineBinning)
823901 fGFW ->Fill (track.eta (), 1 , track.phi (), wacc * weff, 1 );
824902
825903 } // End of track loop
826904
905+ globalTracksNch = globalPlusitsNch;
906+ globalTracksNch = gloabalOnlyNch;
907+ globalTracksNch = itsOnlyNch;
908+
827909 registry.fill (HIST (" Events_per_Centrality_Bin" ), centrality);
828- registry.fill (HIST (" Global_Tracks_Nch_vs_Cent" ), centrality, globalTracksNch);
910+ registry.fill (HIST (" GlobalplusITS" ), centrality, globalPlusitsNch);
911+ registry.fill (HIST (" Globalonly" ), centrality, gloabalOnlyNch);
912+ registry.fill (HIST (" ITSonly" ), centrality, itsOnlyNch);
829913
830914 // Filling c22 with ROOT TProfile
831915 fillProfile (corrconfigs.at (0 ), HIST (" c22" ), centrality);
@@ -897,7 +981,7 @@ struct FlowGfwTask {
897981 }
898982
899983 } // End of process
900- PROCESS_SWITCH (FlowGfwTask, processData, " Process analysis for Run 3 data" , false );
984+ PROCESS_SWITCH (FlowGfwTask, processData, " Process analysis for Run 3 data" , true );
901985
902986 // Filter the Reconstructed tracks
903987 Filter mytrackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && (nabs(aod::track::dcaXY) < cfgCutDCAxy);
0 commit comments