@@ -63,6 +63,11 @@ 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(cfgcentEstFt0c, bool, false, "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")
6671 O2_DEFINE_CONFIGURABLE(cfgUseAdditionalEventCut, bool, false, "Use additional event cut on mult correlations")
6772 O2_DEFINE_CONFIGURABLE(cfgUseAdditionalTrackCut, bool, false, "Use additional track cut on phi")
6873 O2_DEFINE_CONFIGURABLE(cfgUseNch, bool, false, "Use Nch for flow observables")
@@ -83,7 +88,10 @@ struct FlowGfwTask {
8388 O2_DEFINE_CONFIGURABLE(cfgEvSelkIsGoodITSLayersAll, bool, false, "kIsGoodITSLayersAll")
8489 O2_DEFINE_CONFIGURABLE(cfgOccupancy, bool, false, "Bool for event selection on detector occupancy");
8590 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")
91+ O2_DEFINE_CONFIGURABLE(cfgGlobalplusITS, bool, false, "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,28 @@ struct FlowGfwTask {
183191 kNOOFEVENTSTEPS
184192 };
185193
194+ enum CentEstimators {
195+ kCentFT0C,
196+ kCentFT0A,
197+ kCentFT0M,
198+ kCentFV0A,
199+ kCentFT0CVariant1,
200+ kNoCentEstimators
201+ };
202+
203+ // Contruct Global+ITS sample
204+ static constexpr TrackSelectionFlags::flagtype TrackSelectionITS =
205+ TrackSelectionFlags::kITSNCls | TrackSelectionFlags::kITSChi2NDF |
206+ TrackSelectionFlags::kITSHits;
207+ static constexpr TrackSelectionFlags::flagtype TrackSelectionTPC =
208+ TrackSelectionFlags::kTPCNCls |
209+ TrackSelectionFlags::kTPCCrossedRowsOverNCls |
210+ TrackSelectionFlags::kTPCChi2NDF;
211+ static constexpr TrackSelectionFlags::flagtype TrackSelectionDCA =
212+ TrackSelectionFlags::kDCAz | TrackSelectionFlags::kDCAxy;
213+ static constexpr TrackSelectionFlags::flagtype TrackSelectionDCAXYonly =
214+ TrackSelectionFlags::kDCAxy;
215+
186216 // Additional Event selection cuts - Copy from flowGenericFramework.cxx
187217 TrackSelection myTrackSel;
188218 TF1* fPhiCutLow = nullptr;
@@ -222,6 +252,19 @@ struct FlowGfwTask {
222252 registry.add("hCent", "Centrality distribution", {HistType::kTH1D, {{90, 0, 90}}});
223253 registry.add("cent_vs_Nch", ";Centrality (%); M (|#eta| < 0.8);", {HistType::kTH2D, {axisCentrality, axisNch}});
224254
255+ // Centrality estimators
256+ registry.add("hCentEstimators", "Number of Unfiltered Events;; No. of Events", {HistType::kTH1D, {{kNoCentEstimators, -0.5, static_cast<int>(kNoCentEstimators) - 0.5}}});
257+ registry.get<TH1>(HIST("hCentEstimators"))->GetXaxis()->SetBinLabel(kCentFT0C + 1, "FT0C");
258+ registry.get<TH1>(HIST("hCentEstimators"))->GetXaxis()->SetBinLabel(kCentFT0A + 1, "FT0A");
259+ registry.get<TH1>(HIST("hCentEstimators"))->GetXaxis()->SetBinLabel(kCentFT0M + 1, "FT0M");
260+ registry.get<TH1>(HIST("hCentEstimators"))->GetXaxis()->SetBinLabel(kCentFV0A + 1, "FV0A");
261+ registry.get<TH1>(HIST("hCentEstimators"))->GetXaxis()->SetBinLabel(kCentFT0CVariant1 + 1, "FT0CVar1");
262+ registry.add("hCentFT0C", "FT0C Unfiltered;Centrality FT0C ;Events", kTH1F, {axisCentrality});
263+ registry.add("hCentFT0A", "FT0A Unfiltered;Centrality FT0A ;Events", kTH1F, {axisCentrality});
264+ registry.add("hCentFT0M", "FT0M Unfiltered;Centrality FT0M ;Events", kTH1F, {axisCentrality});
265+ registry.add("hCentFV0A", "FV0A Unfiltered;Centrality FV0A ;Events", kTH1F, {axisCentrality});
266+ registry.add("hCentFT0CVariant1", "FT0CVariant1 Unfiltered;Centrality FT0CVariant1 ;Events", kTH1F, {axisCentrality});
267+
225268 // Before cuts
226269 registry.add("BeforeCut_globalTracks_centT0C", "before cut;Centrality T0C;mulplicity global tracks", {HistType::kTH2D, {axisCentForQA, axisNch}});
227270 registry.add("BeforeCut_PVTracks_centT0C", "before cut;Centrality T0C;mulplicity PV tracks", {HistType::kTH2D, {axisCentForQA, axisNchPV}});
@@ -268,9 +311,17 @@ struct FlowGfwTask {
268311 registry.add("ZNvsZEMcollrest", "ZNvsZEMcoll; ZEM; ZDC energy (GeV)", {HistType::kTH2F, {{{nBinsAmp, -0.5, maxZEM}, {nBinsAmp, -0.5, 2. * maxZN}}}});
269312
270313 // Track plots
271- registry.add("Nch", "N_{ch 0-5%} vs #Events of ;N_{ch 0-5%};No. of Events", {HistType::kTH1D, {axisNch}});
314+ registry.add("Nch", "N_{ch 0-5%} vs #Events;N_{ch 0-5%};No. of Events", {HistType::kTH1D, {axisNch}});
272315 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}});
316+ registry.add("pt_Cen_GlobalOnly", "pt_Cen_Global;Centrality (%); p_{T} (GeV/c);", {HistType::kTH2D, {axisCentrality, axisPt}});
317+ registry.add("phi_Cen_GlobalOnly", "phi_Cen_Global;Centrality (%); #phi;", {HistType::kTH2D, {axisCentrality, axisPhi}});
318+ registry.add("pt_Cen_ITSOnly", "pt_Cen_ITS;Centrality (%); p_{T} (GeV/c);", {HistType::kTH2D, {axisCentrality, axisPt}});
319+ registry.add("phi_Cen_ITSOnly", "phi_Cen_ITS;Centrality (%); #phi;", {HistType::kTH2D, {axisCentrality, axisPhi}});
320+
321+ // Track types
322+ registry.add("GlobalplusITS", "Global plus ITS;Centrality FT0C;Nch", kTH1F, {axisCentrality});
323+ registry.add("Globalonly", "Global only;Centrality FT0C;Nch", kTH1F, {axisCentrality});
324+ registry.add("ITSonly", "ITS only;Centrality FT0C;Nch", kTH1F, {axisCentrality});
274325
275326 // Track QA
276327 registry.add("hPt", "p_{T} distribution before cut", {HistType::kTH1D, {axisPtHist}});
@@ -646,9 +697,15 @@ struct FlowGfwTask {
646697
647698 // Apply process filters
648699 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
700+ Filter trackFilter = ncheckbit(aod::track::v001::detectorMap, (uint8_t)o2::aod::track::ITS) &&
701+ ncheckbit(aod::track::trackCutFlag, TrackSelectionITS) &&
702+ ifnode(ncheckbit(aod::track::v001::detectorMap, (uint8_t)o2::aod::track::TPC),
703+ ncheckbit(aod::track::trackCutFlag, TrackSelectionTPC), true) &&
704+ ifnode(dcaZ > 0.f, nabs(aod::track::dcaZ) <= dcaZ && ncheckbit(aod::track::trackCutFlag, TrackSelectionDCAXYonly),
705+ ncheckbit(aod::track::trackCutFlag, TrackSelectionDCA)) &&
706+ (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls);
707+
708+ using Colls = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs, aod::CentFT0As, aod::CentFT0Ms, aod::CentFV0As, aod::CentFT0CVariant1s>>; // collisions filter
652709 using AodTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksDCA, aod::TracksExtra>>; // tracks filter
653710
654711 using BCsRun3 = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels, aod::Run3MatchedToBCSparse>;
@@ -663,7 +720,31 @@ struct FlowGfwTask {
663720 if (nTotal < 1)
664721 return;
665722
666- const auto centrality = collision.centFT0C();
723+ // Choose centrality estimator -- Only one can be true
724+ float centrality = 0;
725+ if (cfgcentEstFt0c) {
726+ const auto centrality = collision.centFT0C();
727+ registry.fill(HIST("hCentEstimators"), kCentFT0C);
728+ registry.fill(HIST("hCentFT0C"), centrality);
729+ } else if (cfgcentEstFt0a) {
730+ const auto centrality = collision.centFT0A();
731+ registry.fill(HIST("hCentEstimators"), kCentFT0A);
732+ registry.fill(HIST("hCentFT0A"), centrality);
733+ } else if (cfgcentEstFt0m) {
734+ const auto centrality = collision.centFT0M();
735+ registry.fill(HIST("hCentEstimators"), kCentFT0M);
736+ registry.fill(HIST("hCentFT0M"), centrality);
737+ } else if (cfgcentEstFv0a) {
738+ const auto centrality = collision.centFV0A();
739+ registry.fill(HIST("hCentEstimators"), kCentFV0A);
740+ registry.fill(HIST("hCentFV0A"), centrality);
741+ } else if (cfgcentEstFt0cVariant1) {
742+ const auto centrality = collision.centFT0CVariant1();
743+ registry.fill(HIST("hCentEstimators"), kCentFT0CVariant1);
744+ registry.fill(HIST("hCentFT0CVariant1"), centrality);
745+ } else {
746+ return;
747+ }
667748
668749 // fill event QA before cuts
669750 registry.fill(HIST("BeforeCut_globalTracks_centT0C"), collision.centFT0C(), tracks.size());
@@ -785,6 +866,9 @@ struct FlowGfwTask {
785866
786867 // track loop
787868 int globalTracksNch = 0;
869+ int globalPlusitsNch = 0;
870+ int gloabalOnlyNch = 0;
871+ int itsOnlyNch = 0;
788872
789873 for (const auto& track : tracks) {
790874 if (!trackSelected(track))
@@ -814,18 +898,51 @@ struct FlowGfwTask {
814898 registry.fill(HIST("hDCAxy"), track.dcaXY(), track.pt());
815899 }
816900
817- globalTracksNch ++;
901+ globalPlusitsNch ++;
818902
819- if (withinPtRef)
820- fGFW->Fill(track.eta(), 1, track.phi(), wacc * weff, 1);
903+ registry.fill(HIST("GlobalplusITS"), centrality);
821904
822- if (FineBinning == true)
905+ if (cfgGlobalplusITS) {
906+ if (withinPtRef) {
907+ fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 1);
908+ }
909+ }
910+
911+ if (track.hasTPC()) {
912+ if (cfgGlobalonly) {
913+ if (withinPtRef) {
914+ fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 1);
915+ gloabalOnlyNch++;
916+ registry.fill(HIST("Globalonly"), centrality);
917+ registry.fill(HIST("pt_Cen_ITSOnly"), centrality, track.pt());
918+ registry.fill(HIST("phi_Cen_GlobalOnly"), centrality, track.pt());
919+ }
920+ }
921+ } else {
922+ if (cfgITSonly) {
923+ if (withinPtRef) {
924+ fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 1);
925+ itsOnlyNch++;
926+ registry.fill(HIST("ITSonly"), centrality);
927+ registry.fill(HIST("pt_Cen_ITSOnly"), centrality, track.pt());
928+ registry.fill(HIST("phi_Cen_ITSOnly"), centrality, track.pt());
929+ }
930+ }
931+ }
932+
933+ if (cfgFineBinning)
823934 fGFW->Fill(track.eta(), 1, track.phi(), wacc * weff, 1);
824935
825936 } // End of track loop
826937
938+ globalTracksNch = globalPlusitsNch;
939+ globalTracksNch = gloabalOnlyNch;
940+ globalTracksNch = itsOnlyNch;
941+
827942 registry.fill(HIST("Events_per_Centrality_Bin"), centrality);
828- registry.fill(HIST("Global_Tracks_Nch_vs_Cent"), centrality, globalTracksNch);
943+ registry.fill(HIST("GlobalplusITS"), centrality, globalPlusitsNch);
944+ registry.fill(HIST("Globalonly"), centrality, gloabalOnlyNch);
945+ registry.fill(HIST("ITSonly"), centrality, itsOnlyNch);
829946
830947 // Filling c22 with ROOT TProfile
831948 fillProfile(corrconfigs.at(0), HIST("c22"), centrality);
0 commit comments