Skip to content

Commit 94ef071

Browse files
omassenalibuild
andauthored
[PWGEM] Add Flag for creating and filling NUA hist. (#18118)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent d374d67 commit 94ef071

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

‎PWGEM/Dilepton/Core/Dilepton.h‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ struct Dilepton {
326326

327327
struct : o2::framework::ConfigurableGroup {
328328
std::string prefix = "flowcorrection_group";
329+
o2::framework::Configurable<bool> cfgFillNUAHist{"cfgFillNUAHist", true, "flag to fill the NUA correction hist"};
329330
o2::framework::Configurable<bool> cfgApplyWeightNUA{"cfgApplyWeightNUA", false, "flag to apply q-vector Non-uniform acceptance weighting"};
330331
o2::framework::Configurable<std::string> nuaPath{"nuaPath", "Users/o/omassen/Dielectron/NUAWeights/LHC23_PbPb_pass5", "Path to NUA-weights file"};
331332
o2::framework::ConfigurableAxis ConfNUAPhiBins{"ConfNUAPhiBins", {60, -M_PI, M_PI}, "NUA histogram bins - phi-angle"};
@@ -669,7 +670,9 @@ struct Dilepton {
669670
const o2::framework::AxisSpec axis_sp{ConfSPBins, Form("#vec{u}_{%d,ll} #upoint #vec{Q}_{%d}^{%s}", nmod, nmod, qvec_det_names[cfgQvecEstimator].data())};
670671

671672
fRegistry.add("Pair/same/uls/hs", "dilepton", o2::framework::HistType::kTHnSparseD, {axis_mass, axis_pt, axis_dca, axis_y, axis_sp}, true);
672-
fRegistry.add("Pair/same/uls/hNUA", "NUA Histogram;#phi (rad.);#eta;VtxZ;", o2::framework::HistType::kTH3D, {flowcorrectionGroup.ConfNUAPhiBins, flowcorrectionGroup.ConfNUAEtaBins, flowcorrectionGroup.ConfNUAZVtxBins}, true);
673+
if (flowcorrectionGroup.cfgFillNUAHist) {
674+
fRegistry.add("Pair/same/uls/hNUA", "NUA Histogram;#phi (rad.);#eta;VtxZ;", o2::framework::HistType::kTH3D, {flowcorrectionGroup.ConfNUAPhiBins, flowcorrectionGroup.ConfNUAEtaBins, flowcorrectionGroup.ConfNUAZVtxBins}, true);
675+
}
673676
fRegistry.addClone("Pair/same/uls/", "Pair/same/lspp/");
674677
fRegistry.addClone("Pair/same/uls/", "Pair/same/lsmm/");
675678

@@ -1099,13 +1102,19 @@ struct Dilepton {
10991102
float sp = RecoDecay::dotProd(std::array<float, 2>{static_cast<float>(std::cos(nmod * v12.Phi())), static_cast<float>(std::sin(nmod * v12.Phi()))}, qvectors[nmod][cfgQvecEstimator]) / getSPresolution(collision.centFT0C(), collision.trackOccupancyInTimeRange());
11001103
if (t1.sign() * t2.sign() < 0) { // ULS
11011104
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hs"), v12.M(), v12.Pt(), pair_dca, v12.Rapidity(), sp, weight);
1102-
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hNUA"), v12.Phi(), v12.Eta(), collision.posZ(), weight);
1105+
if (flowcorrectionGroup.cfgFillNUAHist) {
1106+
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hNUA"), v12.Phi(), v12.Eta(), collision.posZ(), weight);
1107+
}
11031108
} else if (t1.sign() > 0 && t2.sign() > 0) { // LS++
11041109
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lspp/hs"), v12.M(), v12.Pt(), pair_dca, v12.Rapidity(), sp, weight);
1105-
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lspp/hNUA"), v12.Phi(), v12.Eta(), collision.posZ(), weight);
1110+
if (flowcorrectionGroup.cfgFillNUAHist) {
1111+
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lspp/hNUA"), v12.Phi(), v12.Eta(), collision.posZ(), weight);
1112+
}
11061113
} else if (t1.sign() < 0 && t2.sign() < 0) { // LS--
11071114
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lsmm/hs"), v12.M(), v12.Pt(), pair_dca, v12.Rapidity(), sp, weight);
1108-
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lsmm/hNUA"), v12.Phi(), v12.Eta(), collision.posZ(), weight);
1115+
if (flowcorrectionGroup.cfgFillNUAHist) {
1116+
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lsmm/hNUA"), v12.Phi(), v12.Eta(), collision.posZ(), weight);
1117+
}
11091118
}
11101119
} else if constexpr (ev_id == 1) {
11111120
if (t1.sign() * t2.sign() < 0) { // ULS

0 commit comments

Comments
 (0)