@@ -109,7 +109,7 @@ struct HfTaskFlowCharmHadrons {
109109
110110 Configurable<int > harmonic{" harmonic" , 2 , " harmonic number" };
111111 Configurable<int > qVecDetector{" qVecDetector" , 3 , " Detector for Q vector estimation (FV0A: 0, FT0M: 1, FT0A: 2, FT0C: 3, TPC Pos: 4, TPC Neg: 5, TPC Tot: 6)" };
112- Configurable<int > centEstimator{" centEstimator" , 2 , " Centrality estimation (FT0A: 1, FT0C: 2, FT0M: 3, FV0A: 4)" };
112+ Configurable<int > centEstimator{" centEstimator" , 2 , " Centrality estimation (FT0A: 1, FT0C: 2, FT0M: 3, FV0A: 4, NTracksPV: 5, FT0CVariant2: 6 )" };
113113 Configurable<int > selectionFlag{" selectionFlag" , 1 , " Selection Flag for hadron (e.g. 1 for skimming, 3 for topo. and kine., 7 for PID)" };
114114 Configurable<float > centralityMin{" centralityMin" , 0 ., " Minimum centrality accepted in SP/EP computation (not applied in resolution process)" };
115115 Configurable<float > centralityMax{" centralityMax" , 100 ., " Maximum centrality accepted in SP/EP computation (not applied in resolution process)" };
@@ -124,6 +124,8 @@ struct HfTaskFlowCharmHadrons {
124124 Configurable<bool > storeEpCosSin{" storeEpCosSin" , false , " Flag to store cos and sin of EP angle in ThnSparse" };
125125 Configurable<bool > storeCandEta{" storeCandEta" , false , " Flag to store candidates eta" };
126126 Configurable<bool > storeCandSign{" storeCandSign" , false , " Flag to store candidates sign" };
127+ Configurable<bool > storeCentSparse{" storeCentSparse" , false , " Flag to store up to 4 centrality estimators comparison sparse (only applied in resolution process)" };
128+ Configurable<std::vector<int >> centEstimatorsForSparse{" centEstimatorsForSparse" , {1 , 2 , 3 , 4 }, " Centrality estimators to be stored in the centrality sparse (FT0A: 1, FT0C: 2, FT0M: 3, FV0A: 4). Up to 4 estimators can be configured." };
127129 Configurable<int > occEstimator{" occEstimator" , 0 , " Occupancy estimation (0: None, 1: ITS, 2: FT0C)" };
128130 Configurable<bool > saveEpResoHisto{" saveEpResoHisto" , false , " Flag to save event plane resolution histogram" };
129131 Configurable<std::string> ccdbUrl{" ccdbUrl" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
@@ -146,7 +148,7 @@ struct HfTaskFlowCharmHadrons {
146148 using CandXic0DataWMl = soa::Filtered<soa::Join<aod::HfCandToXiPiKf, aod::HfSelToXiPiKf, aod::HfMlToXiPi>>;
147149 using CandD0DataWMl = soa::Filtered<soa::Join<aod::HfCand2Prong, aod::HfSelD0, aod::HfMlD0>>;
148150 using CandD0Data = soa::Filtered<soa::Join<aod::HfCand2Prong, aod::HfSelD0>>;
149- using CollsWithQvecs = soa::Join<aod::Collisions, aod::EvSels, aod::QvectorFT0Cs, aod::QvectorFT0As, aod::QvectorFT0Ms, aod::QvectorFV0As, aod::QvectorBPoss, aod::QvectorBNegs, aod::QvectorBTots, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs>;
151+ using CollsWithQvecs = soa::Join<aod::Collisions, aod::EvSels, aod::QvectorFT0Cs, aod::QvectorFT0As, aod::QvectorFT0Ms, aod::QvectorFV0As, aod::QvectorBPoss, aod::QvectorBNegs, aod::QvectorBTots, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::CentFT0CVariant2s >;
150152 using TracksWithExtra = soa::Join<aod::Tracks, aod::TracksExtra>;
151153
152154 Filter filterSelectDsCandidates = aod::hf_sel_candidate_ds::isSelDsToKKPi >= selectionFlag || aod::hf_sel_candidate_ds::isSelDsToPiKK >= selectionFlag;
@@ -254,6 +256,11 @@ struct HfTaskFlowCharmHadrons {
254256 registry.add (" hCentEventWithCand" , " Centrality distributions with charm candidates;Cent;entries" , HistType::kTH1F , {{100 , 0 .f , 100 .f }});
255257 registry.add (" hCentEventWithCandInSigRegion" , " Centrality distributions with charm candidates in signal range;Cent;entries" , HistType::kTH1F , {{100 , 0 .f , 100 .f }});
256258
259+ if (storeCentSparse) {
260+ std::vector<AxisSpec> axesCent = {thnAxisCent, thnAxisCent, thnAxisCent, thnAxisCent};
261+ registry.add (" hSparseCentEstimators" , " THn with different centrality estimators; Centrality 0; Centrality 1; Centrality 2; Centrality 3" , {HistType::kTHnSparseF , axesCent});
262+ }
263+
257264 if (occEstimator != 0 ) {
258265 registry.add (" trackOccVsFT0COcc" , " trackOccVsFT0COcc; trackOcc; FT0COcc" , {HistType::kTH2F , {thnAxisOccupancyITS, thnAxisOccupancyFT0C}});
259266 }
@@ -878,7 +885,7 @@ struct HfTaskFlowCharmHadrons {
878885 float const xQVecBTot = collision.qvecBTotRe ();
879886 float const yQVecBTot = collision.qvecBTotIm ();
880887
881- centrality = o2::hf_centrality::getCentralityColl (collision, o2::hf_centrality::CentralityEstimator::FT0C );
888+ centrality = o2::hf_centrality::getCentralityColl (collision, centEstimator );
882889 if (storeResoOccu) {
883890 const auto occupancy = o2::hf_occupancy::getOccupancyColl (collision, occEstimator);
884891 registry.fill (HIST (" trackOccVsFT0COcc" ), collision.trackOccupancyInTimeRange (), collision.ft0cOccupancyInTimeRange ());
@@ -890,6 +897,11 @@ struct HfTaskFlowCharmHadrons {
890897 occupancy, evtSelFlags[0 ], evtSelFlags[1 ], evtSelFlags[2 ], evtSelFlags[3 ], evtSelFlags[4 ]);
891898 }
892899
900+ if (storeCentSparse) {
901+ registry.fill (HIST (" hSparseCentEstimators" ), o2::hf_centrality::getCentralityColl (collision, centEstimatorsForSparse->at (0 )), o2::hf_centrality::getCentralityColl (collision, centEstimatorsForSparse->at (1 )),
902+ o2::hf_centrality::getCentralityColl (collision, centEstimatorsForSparse->at (2 )), o2::hf_centrality::getCentralityColl (collision, centEstimatorsForSparse->at (3 )));
903+ }
904+
893905 if (!isCollSelected<o2::hf_centrality::CentralityEstimator::FT0C>(collision, bcs, centrality)) {
894906 // no selection on the centrality is applied, but on event selection flags
895907 return ;
0 commit comments