Skip to content

Commit 6340eb6

Browse files
authored
[PWGCF] Add flag for mult. weighting on flow obs. Add additional cent/mult QA (#12066)
1 parent f97585c commit 6340eb6

File tree

1 file changed

+33
-46
lines changed

1 file changed

+33
-46
lines changed

PWGCF/GenericFramework/Tasks/flowGfwLightIons.cxx

Lines changed: 33 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ struct FlowGfwLightIons {
113113
O2_DEFINE_CONFIGURABLE(cfgOccupancySelection, int, 2000, "Max occupancy selection, -999 to disable");
114114
O2_DEFINE_CONFIGURABLE(cfgNoSameBunchPileupCut, bool, true, "kNoSameBunchPileupCut");
115115
O2_DEFINE_CONFIGURABLE(cfgIsGoodZvtxFT0vsPV, bool, true, "kIsGoodZvtxFT0vsPV");
116-
O2_DEFINE_CONFIGURABLE(cfgNoITSROFBorder, bool, true, "kNoITSROFrameBorder");
117-
O2_DEFINE_CONFIGURABLE(cfgNoTimeFrameBorder, bool, true, "kNoTimeFrameBorder");
118116
O2_DEFINE_CONFIGURABLE(cfgIsGoodITSLayersAll, bool, true, "kIsGoodITSLayersAll");
119117
O2_DEFINE_CONFIGURABLE(cfgNoCollInTimeRangeStandard, bool, true, "kNoCollInTimeRangeStandard");
120118
O2_DEFINE_CONFIGURABLE(cfgDoOccupancySel, bool, true, "Bool for event selection on detector occupancy");
@@ -124,6 +122,7 @@ struct FlowGfwLightIons {
124122
O2_DEFINE_CONFIGURABLE(cfgMagField, float, 99999, "Configurable magnetic field; default CCDB will be queried");
125123
O2_DEFINE_CONFIGURABLE(cfgFixedMultMin, int, 1, "Minimum for fixed nch range");
126124
O2_DEFINE_CONFIGURABLE(cfgFixedMultMax, int, 3000, "Maximum for fixed nch range");
125+
O2_DEFINE_CONFIGURABLE(cfgUseMultiplicityFlowWeights, bool, true, "Enable or disable the use of multiplicity-based event weighting");
127126
O2_DEFINE_CONFIGURABLE(cfgUseDensityDependentCorrection, bool, false, "Use density dependent efficiency correction based on Run 2 measurements");
128127
Configurable<std::vector<double>> cfgTrackDensityP0{"cfgTrackDensityP0", std::vector<double>{0.7217476707, 0.7384792571, 0.7542625668, 0.7640680200, 0.7701951667, 0.7755299053, 0.7805901710, 0.7849446786, 0.7957356586, 0.8113039262, 0.8211968966, 0.8280558878, 0.8329342135}, "parameter 0 for track density efficiency correction"};
129128
Configurable<std::vector<double>> cfgTrackDensityP1{"cfgTrackDensityP1", std::vector<double>{-2.169488e-05, -2.191913e-05, -2.295484e-05, -2.556538e-05, -2.754463e-05, -2.816832e-05, -2.846502e-05, -2.843857e-05, -2.705974e-05, -2.477018e-05, -2.321730e-05, -2.203315e-05, -2.109474e-05}, "parameter 1 for track density efficiency correction"};
@@ -195,8 +194,6 @@ struct FlowGfwLightIons {
195194
kNoCollTRStd,
196195
kVtxITSTPC,
197196
kGoodITSLayers,
198-
kNoITSROFBorder,
199-
kNoTFBorder,
200197
kMultCuts,
201198
kTrackCent
202199
};
@@ -331,10 +328,10 @@ struct FlowGfwLightIons {
331328
return n;
332329
});
333330
AxisSpec bAxis = {bbinning, "#it{b}"};
334-
AxisSpec t0cAxis = {70, 0, 70000, "N_{ch} (T0C)"};
335-
AxisSpec t0aAxis = {200, 0, 200, "N_{ch} (T0A)"};
336-
AxisSpec v0aAxis = {200, 0, 200, "N_{ch} (V0A)"};
337-
AxisSpec multpvAxis = {4000, 0, 4000, "N_{ch} (PV)"};
331+
AxisSpec t0cAxis = {1000, 0, 10000, "N_{ch} (T0C)"};
332+
AxisSpec t0aAxis = {500, 0, 500, "N_{ch} (T0A)"};
333+
AxisSpec v0aAxis = {500, 0, 500, "N_{ch} (V0A)"};
334+
AxisSpec multpvAxis = {600, 0, 600, "N_{ch} (PV)"};
338335
AxisSpec dcaZAXis = {200, -2, 2, "DCA_{z} (cm)"};
339336
AxisSpec dcaXYAXis = {200, -0.5, 0.5, "DCA_{xy} (cm)"};
340337
std::vector<double> timebinning(289);
@@ -401,10 +398,16 @@ struct FlowGfwLightIons {
401398
registry.add("eventQA/before/globalTracks_centT0C", "", {HistType::kTH2D, {centAxis, nchAxis}});
402399
registry.add("eventQA/before/PVTracks_centT0C", "", {HistType::kTH2D, {centAxis, multpvAxis}});
403400
registry.add("eventQA/before/multT0C_centT0C", "", {HistType::kTH2D, {centAxis, t0cAxis}});
401+
402+
registry.add("eventQA/before/centT0M_centT0C", "", {HistType::kTH2D, {centAxis, centAxis}});
403+
registry.add("eventQA/before/centV0A_centT0C", "", {HistType::kTH2D, {centAxis, centAxis}});
404+
registry.add("eventQA/before/centGlobal_centT0C", "", {HistType::kTH2D, {centAxis, centAxis}});
405+
registry.add("eventQA/before/centNTPV_centT0C", "", {HistType::kTH2D, {centAxis, centAxis}});
406+
registry.add("eventQA/before/centMFT_centT0C", "", {HistType::kTH2D, {centAxis, centAxis}});
404407
}
405408

406409
registry.addClone("eventQA/before/", "eventQA/after/");
407-
registry.add("eventQA/eventSel", "Number of Events;; Counts", {HistType::kTH1D, {{13, 0.5, 13.5}}});
410+
registry.add("eventQA/eventSel", "Number of Events;; Counts", {HistType::kTH1D, {{11, 0.5, 11.5}}});
408411
registry.get<TH1>(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(kFilteredEvent, "Filtered event");
409412
registry.get<TH1>(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(kSel8, "sel8");
410413
registry.get<TH1>(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(kOccupancy, "occupancy");
@@ -414,8 +417,6 @@ struct FlowGfwLightIons {
414417
registry.get<TH1>(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(kNoCollTRStd, "kNoCollInTimeRangeStandard");
415418
registry.get<TH1>(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(kVtxITSTPC, "kIsVertexITSTPC");
416419
registry.get<TH1>(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(kGoodITSLayers, "kIsGoodITSLayersAll");
417-
registry.get<TH1>(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(kNoITSROFBorder, "kNoITSROFBorder");
418-
registry.get<TH1>(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(kNoTFBorder, "kNoTimeFrameBorder");
419420
registry.get<TH1>(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(kMultCuts, "after Mult cuts");
420421
registry.get<TH1>(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(kTrackCent, "has track + within cent");
421422
if (!cfgRunByRun && cfgFillWeights) {
@@ -627,23 +628,6 @@ struct FlowGfwLightIons {
627628
th1sList[run][hEventSel]->Fill(kGoodITSLayers);
628629
}
629630

630-
if (cfgNoITSROFBorder) {
631-
if (!collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) {
632-
return 0;
633-
}
634-
registry.fill(HIST("eventQA/eventSel"), kNoITSROFBorder);
635-
if (cfgRunByRun)
636-
th1sList[run][hEventSel]->Fill(kNoITSROFBorder);
637-
}
638-
639-
if (cfgNoTimeFrameBorder) {
640-
if (!collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) {
641-
return 0;
642-
}
643-
registry.fill(HIST("eventQA/eventSel"), kNoTFBorder);
644-
if (cfgRunByRun)
645-
th1sList[run][hEventSel]->Fill(kNoTFBorder);
646-
}
647631
float vtxz = -999;
648632
if (collision.numContrib() > 1) {
649633
vtxz = collision.posZ();
@@ -715,20 +699,18 @@ struct FlowGfwLightIons {
715699
profiles[pfCorr22] = registry.add<TProfile>(Form("%d/corr22", run), "", {HistType::kTProfile, {(cfgUseNch) ? nchAxis : centAxis}});
716700
tpfsList.insert(std::make_pair(run, profiles));
717701
}
718-
histos[hEventSel] = registry.add<TH1>(Form("%d/eventSel", run), "Number of Events;; Counts", {HistType::kTH1D, {{13, 0.5, 13.5}}});
719-
histos[hEventSel]->GetXaxis()->SetBinLabel(1, "Filtered event");
720-
histos[hEventSel]->GetXaxis()->SetBinLabel(2, "sel8");
721-
histos[hEventSel]->GetXaxis()->SetBinLabel(3, "occupancy");
722-
histos[hEventSel]->GetXaxis()->SetBinLabel(4, "kTVXinTRD");
723-
histos[hEventSel]->GetXaxis()->SetBinLabel(5, "kNoSameBunchPileup");
724-
histos[hEventSel]->GetXaxis()->SetBinLabel(6, "kIsGoodZvtxFT0vsPV");
725-
histos[hEventSel]->GetXaxis()->SetBinLabel(7, "kNoCollInTimeRangeStandard");
726-
histos[hEventSel]->GetXaxis()->SetBinLabel(8, "kIsVertexITSTPC");
727-
histos[hEventSel]->GetXaxis()->SetBinLabel(9, "kIsGoodITSLayersAll");
728-
histos[hEventSel]->GetXaxis()->SetBinLabel(10, "kNoITSROFBorder");
729-
histos[hEventSel]->GetXaxis()->SetBinLabel(11, "kNoTimeFrameBorder");
730-
histos[hEventSel]->GetXaxis()->SetBinLabel(12, "after Mult cuts");
731-
histos[hEventSel]->GetXaxis()->SetBinLabel(13, "has track + within cent");
702+
histos[hEventSel] = registry.add<TH1>(Form("%d/eventSel", run), "Number of Events;; Counts", {HistType::kTH1D, {{11, 0.5, 11.5}}});
703+
histos[hEventSel]->GetXaxis()->SetBinLabel(kFilteredEvent, "Filtered event");
704+
histos[hEventSel]->GetXaxis()->SetBinLabel(kSel8, "sel8");
705+
histos[hEventSel]->GetXaxis()->SetBinLabel(kOccupancy, "occupancy");
706+
histos[hEventSel]->GetXaxis()->SetBinLabel(kTVXTRD, "kTVXinTRD");
707+
histos[hEventSel]->GetXaxis()->SetBinLabel(kNoSamebunchPU, "kNoSameBunchPileup");
708+
histos[hEventSel]->GetXaxis()->SetBinLabel(kZVtxFT0PV, "kIsGoodZvtxFT0vsPV");
709+
histos[hEventSel]->GetXaxis()->SetBinLabel(kNoCollTRStd, "kNoCollInTimeRangeStandard");
710+
histos[hEventSel]->GetXaxis()->SetBinLabel(kVtxITSTPC, "kIsVertexITSTPC");
711+
histos[hEventSel]->GetXaxis()->SetBinLabel(kGoodITSLayers, "kIsGoodITSLayersAll");
712+
histos[hEventSel]->GetXaxis()->SetBinLabel(kMultCuts, "after Mult cuts");
713+
histos[hEventSel]->GetXaxis()->SetBinLabel(kTrackCent, "has track + within cent");
732714
th1sList.insert(std::make_pair(run, histos));
733715
std::vector<std::shared_ptr<TH3>> histos3d(kCount_TH3Names);
734716
histos3d[hNUAref] = registry.add<TH3>(Form("%d/phi_eta_vtxz_ref", run), "", {HistType::kTH3D, {phiAxis, etaAxis, vtxAxis}});
@@ -749,10 +731,10 @@ struct FlowGfwLightIons {
749731
continue;
750732
auto val = fGFW->Calculate(corrconfigs.at(l_ind), 0, kFALSE).real() / dnx;
751733
if (std::abs(val) < 1) {
752-
(dt == kGen) ? fFCgen->FillProfile(corrconfigs.at(l_ind).Head.c_str(), centmult, val, dnx, rndm) : fFC->FillProfile(corrconfigs.at(l_ind).Head.c_str(), centmult, val, dnx, rndm);
753-
(dt == kGen) ? fFCptgen->fillVnPtProfiles(centmult, val, dnx, rndm, o2::analysis::gfw::configs.GetpTCorrMasks()[l_ind]) : fFCpt->fillVnPtProfiles(centmult, val, dnx, rndm, o2::analysis::gfw::configs.GetpTCorrMasks()[l_ind]);
734+
(dt == kGen) ? fFCgen->FillProfile(corrconfigs.at(l_ind).Head.c_str(), centmult, val, (cfgUseMultiplicityFlowWeights) ? dnx : 1.0, rndm) : fFC->FillProfile(corrconfigs.at(l_ind).Head.c_str(), centmult, val, (cfgUseMultiplicityFlowWeights) ? dnx : 1.0, rndm);
735+
(dt == kGen) ? fFCptgen->fillVnPtProfiles(centmult, val, (cfgUseMultiplicityFlowWeights) ? dnx : 1.0, rndm, o2::analysis::gfw::configs.GetpTCorrMasks()[l_ind]) : fFCpt->fillVnPtProfiles(centmult, val, (cfgUseMultiplicityFlowWeights) ? dnx : 1.0, rndm, o2::analysis::gfw::configs.GetpTCorrMasks()[l_ind]);
754736
if (cfgRunByRun && cfgFillFlowRunByRun && dt != kGen && l_ind == 0) {
755-
tpfsList[run][pfCorr22]->Fill(centmult, val, dnx);
737+
tpfsList[run][pfCorr22]->Fill(centmult, val, (cfgUseMultiplicityFlowWeights) ? dnx : 1.0);
756738
}
757739
}
758740
continue;
@@ -763,7 +745,7 @@ struct FlowGfwLightIons {
763745
continue;
764746
auto val = fGFW->Calculate(corrconfigs.at(l_ind), i - 1, kFALSE).real() / dnx;
765747
if (std::abs(val) < 1)
766-
(dt == kGen) ? fFCgen->FillProfile(Form("%s_pt_%i", corrconfigs.at(l_ind).Head.c_str(), i), centmult, val, dnx, rndm) : fFC->FillProfile(Form("%s_pt_%i", corrconfigs.at(l_ind).Head.c_str(), i), centmult, val, dnx, rndm);
748+
(dt == kGen) ? fFCgen->FillProfile(Form("%s_pt_%i", corrconfigs.at(l_ind).Head.c_str(), i), centmult, val, (cfgUseMultiplicityFlowWeights) ? dnx : 1.0, rndm) : fFC->FillProfile(Form("%s_pt_%i", corrconfigs.at(l_ind).Head.c_str(), i), centmult, val, (cfgUseMultiplicityFlowWeights) ? dnx : 1.0, rndm);
767749
}
768750
}
769751
return;
@@ -1032,6 +1014,11 @@ struct FlowGfwLightIons {
10321014
registry.fill(HIST("eventQA/") + HIST(FillTimeName[ft]) + HIST("globalTracks_centT0C"), collision.centFT0C(), xaxis.multiplicity);
10331015
registry.fill(HIST("eventQA/") + HIST(FillTimeName[ft]) + HIST("PVTracks_centT0C"), collision.centFT0C(), collision.multNTracksPV());
10341016
registry.fill(HIST("eventQA/") + HIST(FillTimeName[ft]) + HIST("multT0C_centT0C"), collision.centFT0C(), collision.multFT0C());
1017+
registry.fill(HIST("eventQA/") + HIST(FillTimeName[ft]) + HIST("centT0M_centT0C"), collision.centFT0C(), collision.centFT0M());
1018+
registry.fill(HIST("eventQA/") + HIST(FillTimeName[ft]) + HIST("centV0A_centT0C"), collision.centFT0C(), collision.centFV0A());
1019+
registry.fill(HIST("eventQA/") + HIST(FillTimeName[ft]) + HIST("centGlobal_centT0C"), collision.centFT0C(), collision.centNGlobal());
1020+
registry.fill(HIST("eventQA/") + HIST(FillTimeName[ft]) + HIST("centNTPV_centT0C"), collision.centFT0C(), collision.centNTPV());
1021+
registry.fill(HIST("eventQA/") + HIST(FillTimeName[ft]) + HIST("centMFT_centT0C"), collision.centFT0C(), collision.centMFT());
10351022
}
10361023
registry.fill(HIST("eventQA/") + HIST(FillTimeName[ft]) + HIST("globalTracks_PVTracks"), collision.multNTracksPV(), xaxis.multiplicity);
10371024
registry.fill(HIST("eventQA/") + HIST(FillTimeName[ft]) + HIST("globalTracks_multT0A"), collision.multFT0A(), xaxis.multiplicity);

0 commit comments

Comments
 (0)