From b6dc394e3ab1af4b56cb15f8a91d6720ada20699 Mon Sep 17 00:00:00 2001 From: Luzhiyongg <71517277+Luzhiyongg@users.noreply.github.com> Date: Thu, 31 Jul 2025 13:13:51 +0200 Subject: [PATCH 1/3] add multiplicity correlation QA run-by-run --- PWGCF/Flow/Tasks/flowRunbyRun.cxx | 35 ++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowRunbyRun.cxx b/PWGCF/Flow/Tasks/flowRunbyRun.cxx index 620063e1d5d..b930bad7365 100644 --- a/PWGCF/Flow/Tasks/flowRunbyRun.cxx +++ b/PWGCF/Flow/Tasks/flowRunbyRun.cxx @@ -68,6 +68,7 @@ struct FlowRunbyRun { O2_DEFINE_CONFIGURABLE(cfgCutDCAz, float, 2.0f, "max DCA to vertex z") O2_DEFINE_CONFIGURABLE(cfgCutDCAzPtDepEnabled, bool, false, "switch of DCAz pt dependent cut") O2_DEFINE_CONFIGURABLE(cfgUseAdditionalEventCut, bool, false, "Use additional event cut on mult correlations") + O2_DEFINE_CONFIGURABLE(cfgOutputCorrelationQA, bool, false, "Fill correlation QA histograms") O2_DEFINE_CONFIGURABLE(cfgEvSelkNoSameBunchPileup, bool, false, "rejects collisions which are associated with the same found-by-T0 bunch crossing") 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") O2_DEFINE_CONFIGURABLE(cfgEvSelkNoCollInTimeRangeStandard, bool, false, "no collisions in specified time range") @@ -101,6 +102,10 @@ struct FlowRunbyRun { ConfigurableAxis axisEta{"axisEta", {40, -1., 1.}, "eta axis for histograms"}; 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"}; ConfigurableAxis axisIndependent{"axisIndependent", {VARIABLE_WIDTH, 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90}, "X axis for histograms"}; + ConfigurableAxis axisNch{"axisNch", {4000, 0, 4000}, "N_{ch}"}; + ConfigurableAxis axisCentForQA{"axisCentForQA", {100, 0, 100}, "centrality (%)"}; + ConfigurableAxis axisT0C{"axisT0C", {70, 0, 70000}, "N_{ch} (T0C)"}; + ConfigurableAxis axisT0A{"axisT0A", {200, 0, 200000}, "N_{ch} (T0A)"}; Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex; 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 { // Connect to ccdb Service ccdb; - Configurable ccdbNoLaterThan{"ccdbNoLaterThan", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"}; Configurable ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; // Define output @@ -129,6 +133,7 @@ struct FlowRunbyRun { int lastRunNumer = -1; std::vector runNumbers; // vector of run numbers std::map>> th1sList; // map of histograms for all runs + std::map>> th2sList; // map of TH2 histograms for all runs std::map>> th3sList; // map of TH3 histograms for all runs std::map>> profilesList; // map of profiles for all runs enum OutputTH1Names { @@ -142,6 +147,14 @@ struct FlowRunbyRun { hEventCountSpecific, kCount_TH1Names }; + enum OutputTH2Names { + // here are TH2 histograms + hglobalTracks_centT0C = 0, + hglobalTracks_PVTracks, + hglobalTracks_multV0A, + hcentFV0A_centFT0C, + kCount_TH2Names + }; enum OutputTH3Names { hPhiEtaVtxz = 0, kCount_TH3Names @@ -170,14 +183,15 @@ struct FlowRunbyRun { TF1* fT0AV0AMean = nullptr; TF1* fT0AV0ASigma = nullptr; - using AodCollisions = soa::Filtered>; + using AodCollisions = soa::Filtered>; using AodTracks = soa::Filtered>; void init(InitContext const&) { ccdb->setURL(ccdbUrl.value); ccdb->setCaching(true); - ccdb->setCreatedNotAfter(ccdbNoLaterThan.value); + auto now = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + ccdb->setCreatedNotAfter(now); // Add output histograms to the registry runNumbers = cfgRunNumbers; @@ -358,6 +372,15 @@ struct FlowRunbyRun { histos[hEventCountSpecific]->GetXaxis()->SetBinLabel(10, "cfgEvSelV0AT0ACut"); th1sList.insert(std::make_pair(runNumber, histos)); + if (cfgOutputCorrelationQA) { + std::vector> th2s(kCount_TH2Names); + th2s[hglobalTracks_centT0C] = registry.add(Form("%d/globalTracks_centT0C", runNumber), "after cut;Centrality T0C;mulplicity global tracks", {HistType::kTH2D, {axisCentForQA, axisNch}}); + th2s[hglobalTracks_PVTracks] = registry.add(Form("%d/globalTracks_PVTracks", runNumber), "after cut;mulplicity PV tracks;mulplicity global tracks", {HistType::kTH2D, {axisNch, axisNch}}); + th2s[hglobalTracks_multV0A] = registry.add(Form("%d/globalTracks_multV0A", runNumber), "after cut;mulplicity V0A;mulplicity global tracks", {HistType::kTH2D, {axisT0A, axisNch}}); + th2s[hcentFV0A_centFT0C] = registry.add(Form("%d/centFV0A_centFT0C", runNumber), "after cut;Centrality T0C;Centrality V0A", {HistType::kTH2D, {axisCentForQA, axisCentForQA}}); + th2sList.insert(std::make_pair(runNumber, th2s)); + } + std::vector> profiles(kCount_TProfileNames); profiles[c22] = registry.add(Form("%d/c22", runNumber), "", {HistType::kTProfile, {axisIndependent}}); profiles[c22_gap10] = registry.add(Form("%d/c22_gap10", runNumber), "", {HistType::kTProfile, {axisIndependent}}); @@ -511,6 +534,12 @@ struct FlowRunbyRun { th1sList[runNumber][hVtxZ]->Fill(collision.posZ()); th1sList[runNumber][hMult]->Fill(tracks.size()); th1sList[runNumber][hCent]->Fill(collision.centFT0C()); + if (cfgOutputCorrelationQA) { + th2sList[runNumber][hglobalTracks_centT0C]->Fill(collision.centFT0C(), tracks.size()); + th2sList[runNumber][hglobalTracks_PVTracks]->Fill(collision.multNTracksPV(), tracks.size()); + th2sList[runNumber][hglobalTracks_multV0A]->Fill(collision.multFV0A(), tracks.size()); + th2sList[runNumber][hcentFV0A_centFT0C]->Fill(collision.centFT0C(), collision.centFV0A()); + } loadCorrections(bc.timestamp(), runNumber); From 205eeca2133ca5642300204040a72b1f6a04ba21 Mon Sep 17 00:00:00 2001 From: Luzhiyongg <71517277+Luzhiyongg@users.noreply.github.com> Date: Thu, 31 Jul 2025 13:21:02 +0200 Subject: [PATCH 2/3] o2 linter --- PWGCF/Flow/Tasks/flowRunbyRun.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PWGCF/Flow/Tasks/flowRunbyRun.cxx b/PWGCF/Flow/Tasks/flowRunbyRun.cxx index b930bad7365..cd1e89e9894 100644 --- a/PWGCF/Flow/Tasks/flowRunbyRun.cxx +++ b/PWGCF/Flow/Tasks/flowRunbyRun.cxx @@ -478,7 +478,8 @@ struct FlowRunbyRun { th1sList[runNumber][hEventCountSpecific]->Fill(8.5); // V0A T0A 5 sigma cut - if (cfgEvSelV0AT0ACut && (std::fabs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > 5 * fT0AV0ASigma->Eval(collision.multFT0A()))) + float NsigmaV0A = 5.; // 5 sigma cut + if (cfgEvSelV0AT0ACut && (std::fabs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > NsigmaV0A * fT0AV0ASigma->Eval(collision.multFT0A()))) return 0; if (cfgEvSelV0AT0ACut) th1sList[runNumber][hEventCountSpecific]->Fill(9.5); From 999b83affa615226872a598ece30d8331afc2bd1 Mon Sep 17 00:00:00 2001 From: Luzhiyongg <71517277+Luzhiyongg@users.noreply.github.com> Date: Thu, 31 Jul 2025 13:22:23 +0200 Subject: [PATCH 3/3] o2 linter --- PWGCF/Flow/Tasks/flowRunbyRun.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowRunbyRun.cxx b/PWGCF/Flow/Tasks/flowRunbyRun.cxx index cd1e89e9894..9259eb8be9e 100644 --- a/PWGCF/Flow/Tasks/flowRunbyRun.cxx +++ b/PWGCF/Flow/Tasks/flowRunbyRun.cxx @@ -478,8 +478,8 @@ struct FlowRunbyRun { th1sList[runNumber][hEventCountSpecific]->Fill(8.5); // V0A T0A 5 sigma cut - float NsigmaV0A = 5.; // 5 sigma cut - if (cfgEvSelV0AT0ACut && (std::fabs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > NsigmaV0A * fT0AV0ASigma->Eval(collision.multFT0A()))) + float nSigma = 5.; // 5 sigma cut + if (cfgEvSelV0AT0ACut && (std::fabs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > nSigma * fT0AV0ASigma->Eval(collision.multFT0A()))) return 0; if (cfgEvSelV0AT0ACut) th1sList[runNumber][hEventCountSpecific]->Fill(9.5);