Skip to content

Commit 17ec5fa

Browse files
authored
[PWGCF] add multiplicity correlation QA run-by-run (#12352)
1 parent 74377ee commit 17ec5fa

File tree

1 file changed

+34
-4
lines changed

1 file changed

+34
-4
lines changed

PWGCF/Flow/Tasks/flowRunbyRun.cxx

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ struct FlowRunbyRun {
6868
O2_DEFINE_CONFIGURABLE(cfgCutDCAz, float, 2.0f, "max DCA to vertex z")
6969
O2_DEFINE_CONFIGURABLE(cfgCutDCAzPtDepEnabled, bool, false, "switch of DCAz pt dependent cut")
7070
O2_DEFINE_CONFIGURABLE(cfgUseAdditionalEventCut, bool, false, "Use additional event cut on mult correlations")
71+
O2_DEFINE_CONFIGURABLE(cfgOutputCorrelationQA, bool, false, "Fill correlation QA histograms")
7172
O2_DEFINE_CONFIGURABLE(cfgEvSelkNoSameBunchPileup, bool, false, "rejects collisions which are associated with the same found-by-T0 bunch crossing")
7273
O2_DEFINE_CONFIGURABLE(cfgEvSelkIsGoodZvtxFT0vsPV, bool, false, "removes collisions with large differences between z of PV by tracks and z of PV from FT0 A-C time difference, use this cut at low multiplicities with caution")
7374
O2_DEFINE_CONFIGURABLE(cfgEvSelkNoCollInTimeRangeStandard, bool, false, "no collisions in specified time range")
@@ -101,6 +102,10 @@ struct FlowRunbyRun {
101102
ConfigurableAxis axisEta{"axisEta", {40, -1., 1.}, "eta axis for histograms"};
102103
ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.2, 2.4, 2.6, 2.8, 3, 3.5, 4, 5, 6, 8, 10}, "pt axis for histograms"};
103104
ConfigurableAxis axisIndependent{"axisIndependent", {VARIABLE_WIDTH, 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90}, "X axis for histograms"};
105+
ConfigurableAxis axisNch{"axisNch", {4000, 0, 4000}, "N_{ch}"};
106+
ConfigurableAxis axisCentForQA{"axisCentForQA", {100, 0, 100}, "centrality (%)"};
107+
ConfigurableAxis axisT0C{"axisT0C", {70, 0, 70000}, "N_{ch} (T0C)"};
108+
ConfigurableAxis axisT0A{"axisT0A", {200, 0, 200000}, "N_{ch} (T0A)"};
104109

105110
Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
106111
Filter trackFilter = ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
@@ -113,7 +118,6 @@ struct FlowRunbyRun {
113118

114119
// Connect to ccdb
115120
Service<ccdb::BasicCCDBManager> ccdb;
116-
Configurable<int64_t> ccdbNoLaterThan{"ccdbNoLaterThan", std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"};
117121
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
118122

119123
// Define output
@@ -129,6 +133,7 @@ struct FlowRunbyRun {
129133
int lastRunNumer = -1;
130134
std::vector<int> runNumbers; // vector of run numbers
131135
std::map<int, std::vector<std::shared_ptr<TH1>>> th1sList; // map of histograms for all runs
136+
std::map<int, std::vector<std::shared_ptr<TH2>>> th2sList; // map of TH2 histograms for all runs
132137
std::map<int, std::vector<std::shared_ptr<TH3>>> th3sList; // map of TH3 histograms for all runs
133138
std::map<int, std::vector<std::shared_ptr<TProfile>>> profilesList; // map of profiles for all runs
134139
enum OutputTH1Names {
@@ -142,6 +147,14 @@ struct FlowRunbyRun {
142147
hEventCountSpecific,
143148
kCount_TH1Names
144149
};
150+
enum OutputTH2Names {
151+
// here are TH2 histograms
152+
hglobalTracks_centT0C = 0,
153+
hglobalTracks_PVTracks,
154+
hglobalTracks_multV0A,
155+
hcentFV0A_centFT0C,
156+
kCount_TH2Names
157+
};
145158
enum OutputTH3Names {
146159
hPhiEtaVtxz = 0,
147160
kCount_TH3Names
@@ -170,14 +183,15 @@ struct FlowRunbyRun {
170183
TF1* fT0AV0AMean = nullptr;
171184
TF1* fT0AV0ASigma = nullptr;
172185

173-
using AodCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, aod::Mults>>;
186+
using AodCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::Mults>>;
174187
using AodTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA>>;
175188

176189
void init(InitContext const&)
177190
{
178191
ccdb->setURL(ccdbUrl.value);
179192
ccdb->setCaching(true);
180-
ccdb->setCreatedNotAfter(ccdbNoLaterThan.value);
193+
auto now = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
194+
ccdb->setCreatedNotAfter(now);
181195

182196
// Add output histograms to the registry
183197
runNumbers = cfgRunNumbers;
@@ -358,6 +372,15 @@ struct FlowRunbyRun {
358372
histos[hEventCountSpecific]->GetXaxis()->SetBinLabel(10, "cfgEvSelV0AT0ACut");
359373
th1sList.insert(std::make_pair(runNumber, histos));
360374

375+
if (cfgOutputCorrelationQA) {
376+
std::vector<std::shared_ptr<TH2>> th2s(kCount_TH2Names);
377+
th2s[hglobalTracks_centT0C] = registry.add<TH2>(Form("%d/globalTracks_centT0C", runNumber), "after cut;Centrality T0C;mulplicity global tracks", {HistType::kTH2D, {axisCentForQA, axisNch}});
378+
th2s[hglobalTracks_PVTracks] = registry.add<TH2>(Form("%d/globalTracks_PVTracks", runNumber), "after cut;mulplicity PV tracks;mulplicity global tracks", {HistType::kTH2D, {axisNch, axisNch}});
379+
th2s[hglobalTracks_multV0A] = registry.add<TH2>(Form("%d/globalTracks_multV0A", runNumber), "after cut;mulplicity V0A;mulplicity global tracks", {HistType::kTH2D, {axisT0A, axisNch}});
380+
th2s[hcentFV0A_centFT0C] = registry.add<TH2>(Form("%d/centFV0A_centFT0C", runNumber), "after cut;Centrality T0C;Centrality V0A", {HistType::kTH2D, {axisCentForQA, axisCentForQA}});
381+
th2sList.insert(std::make_pair(runNumber, th2s));
382+
}
383+
361384
std::vector<std::shared_ptr<TProfile>> profiles(kCount_TProfileNames);
362385
profiles[c22] = registry.add<TProfile>(Form("%d/c22", runNumber), "", {HistType::kTProfile, {axisIndependent}});
363386
profiles[c22_gap10] = registry.add<TProfile>(Form("%d/c22_gap10", runNumber), "", {HistType::kTProfile, {axisIndependent}});
@@ -455,7 +478,8 @@ struct FlowRunbyRun {
455478
th1sList[runNumber][hEventCountSpecific]->Fill(8.5);
456479

457480
// V0A T0A 5 sigma cut
458-
if (cfgEvSelV0AT0ACut && (std::fabs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > 5 * fT0AV0ASigma->Eval(collision.multFT0A())))
481+
float nSigma = 5.; // 5 sigma cut
482+
if (cfgEvSelV0AT0ACut && (std::fabs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > nSigma * fT0AV0ASigma->Eval(collision.multFT0A())))
459483
return 0;
460484
if (cfgEvSelV0AT0ACut)
461485
th1sList[runNumber][hEventCountSpecific]->Fill(9.5);
@@ -511,6 +535,12 @@ struct FlowRunbyRun {
511535
th1sList[runNumber][hVtxZ]->Fill(collision.posZ());
512536
th1sList[runNumber][hMult]->Fill(tracks.size());
513537
th1sList[runNumber][hCent]->Fill(collision.centFT0C());
538+
if (cfgOutputCorrelationQA) {
539+
th2sList[runNumber][hglobalTracks_centT0C]->Fill(collision.centFT0C(), tracks.size());
540+
th2sList[runNumber][hglobalTracks_PVTracks]->Fill(collision.multNTracksPV(), tracks.size());
541+
th2sList[runNumber][hglobalTracks_multV0A]->Fill(collision.multFV0A(), tracks.size());
542+
th2sList[runNumber][hcentFV0A_centFT0C]->Fill(collision.centFT0C(), collision.centFV0A());
543+
}
514544

515545
loadCorrections(bc.timestamp(), runNumber);
516546

0 commit comments

Comments
 (0)