Skip to content

Commit 8c8e276

Browse files
committed
Add flag for filling NUA histograms
1 parent bbe42cd commit 8c8e276

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

‎PWGEM/Dilepton/Core/Dilepton.h‎

Lines changed: 14 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,10 @@ 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+
676+
}
673677
fRegistry.addClone("Pair/same/uls/", "Pair/same/lspp/");
674678
fRegistry.addClone("Pair/same/uls/", "Pair/same/lsmm/");
675679

@@ -1099,13 +1103,19 @@ struct Dilepton {
10991103
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());
11001104
if (t1.sign() * t2.sign() < 0) { // ULS
11011105
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);
1106+
if(flowcorrectionGroup.cfgFillNUAHist){
1107+
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hNUA"), v12.Phi(), v12.Eta(), collision.posZ(), weight);
1108+
}
11031109
} else if (t1.sign() > 0 && t2.sign() > 0) { // LS++
11041110
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);
1111+
if(flowcorrectionGroup.cfgFillNUAHist){
1112+
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lspp/hNUA"), v12.Phi(), v12.Eta(), collision.posZ(), weight);
1113+
}
11061114
} else if (t1.sign() < 0 && t2.sign() < 0) { // LS--
11071115
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);
1116+
if(flowcorrectionGroup.cfgFillNUAHist){
1117+
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lsmm/hNUA"), v12.Phi(), v12.Eta(), collision.posZ(), weight);
1118+
}
11091119
}
11101120
} else if constexpr (ev_id == 1) {
11111121
if (t1.sign() * t2.sign() < 0) { // ULS

0 commit comments

Comments
 (0)