Skip to content

Commit 6acb21e

Browse files
[PWGHF] adding sparse for centrality estimation
1 parent a389646 commit 6acb21e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

PWGHF/D2H/Tasks/taskFlowCharmHadrons.cxx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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"};
@@ -254,6 +256,12 @@ 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+
264+
257265
if (occEstimator != 0) {
258266
registry.add("trackOccVsFT0COcc", "trackOccVsFT0COcc; trackOcc; FT0COcc", {HistType::kTH2F, {thnAxisOccupancyITS, thnAxisOccupancyFT0C}});
259267
}
@@ -890,6 +898,11 @@ struct HfTaskFlowCharmHadrons {
890898
occupancy, evtSelFlags[0], evtSelFlags[1], evtSelFlags[2], evtSelFlags[3], evtSelFlags[4]);
891899
}
892900

901+
if (storeCentSparse) {
902+
registry.fill(HIST("hSparseCentEstimators"), o2::hf_centrality::getCentralityColl(collision, centEstimatorsForSparse[0]), o2::hf_centrality::getCentralityColl(collision, centEstimatorsForSparse[1]),
903+
o2::hf_centrality::getCentralityColl(collision, centEstimatorsForSparse[2]), o2::hf_centrality::getCentralityColl(collision, centEstimatorsForSparse[3]));
904+
}
905+
893906
if (!isCollSelected<o2::hf_centrality::CentralityEstimator::FT0C>(collision, bcs, centrality)) {
894907
// no selection on the centrality is applied, but on event selection flags
895908
return;

0 commit comments

Comments
 (0)