Skip to content

Commit 331c901

Browse files
jikim1290alibuild
andauthored
[PWGCF] jEPFlowAnalysis.cxx: defining q2 selection function, adding multiplicity dependent selection, adding q2 dependent denominator histograms (#16300)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 4dd04b2 commit 331c901

1 file changed

Lines changed: 48 additions & 4 deletions

File tree

PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@ struct JEPFlowAnalysis {
112112
Configurable<float> cfgVertexZ{"cfgVertexZ", 10.0, "Maximum vertex Z selection"};
113113

114114
Configurable<bool> cfgq2analysis{"cfgq2analysis", false, "ese analysis flag"};
115-
Configurable<float> cfgq2high{"cfgq2high", 10.0, "high q2 selection"};
116-
Configurable<float> cfgq2low{"cfgq2low", 0.0, "low q2 selection"};
115+
Configurable<std::vector<float>> cfgMultq2SelBin{"cfgMultq2SelBin", {0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 100}, ""};
116+
Configurable<std::vector<float>> cfgMultq2high{"cfgMultq2high", {}, ""};
117+
Configurable<std::vector<float>> cfgMultq2low{"cfgMultq2low", {}, ""};
117118

118119
Configurable<std::string> cfgDetName{"cfgDetName", "FT0C", "The name of detector to be analyzed"};
119120
Configurable<std::string> cfgRefAName{"cfgRefAName", "TPCPos", "The name of detector for reference A"};
@@ -153,6 +154,29 @@ struct JEPFlowAnalysis {
153154

154155
THn* effMap = nullptr;
155156

157+
bool q2sel(float q2, bool isHigh)
158+
{
159+
auto it = std::upper_bound(cfgMultq2SelBin->begin(), cfgMultq2SelBin->end(), cent);
160+
int idx = std::distance(cfgMultq2SelBin->begin(), it) - 1;
161+
162+
if (idx < 0) {
163+
idx = 0;
164+
}
165+
if (isHigh) {
166+
if (idx >= static_cast<int>(cfgMultq2high->size())) {
167+
idx = cfgMultq2high->size() - 1;
168+
}
169+
float sel = cfgMultq2high->at(idx);
170+
return q2 > sel;
171+
} else {
172+
if (idx >= static_cast<int>(cfgMultq2low->size())) {
173+
idx = cfgMultq2low->size() - 1;
174+
}
175+
float sel = cfgMultq2low->at(idx);
176+
return q2 < sel;
177+
}
178+
}
179+
156180
template <typename T>
157181
int getdetId(const T& name)
158182
{
@@ -310,6 +334,18 @@ struct JEPFlowAnalysis {
310334
epFlowHistograms.fill(HIST("EpResQvecRefARefBxx"), i + 2, cent, qx_shifted[1] * qx_shifted[2] + qy_shifted[1] * qy_shifted[2]);
311335
epFlowHistograms.fill(HIST("EpResQvecRefARefBxy"), i + 2, cent, qx_shifted[2] * qy_shifted[1] - qx_shifted[1] * qy_shifted[2]);
312336

337+
if (cfgq2analysis) {
338+
if (q2sel(q2Mag, true)) {
339+
epFlowHistograms.fill(HIST("EpResQvecDetRefAxx_q2high"), i + 2, cent, qx_shifted[0] * qx_shifted[1] + qy_shifted[0] * qy_shifted[1]);
340+
epFlowHistograms.fill(HIST("EpResQvecDetRefBxx_q2high"), i + 2, cent, qx_shifted[0] * qx_shifted[2] + qy_shifted[0] * qy_shifted[2]);
341+
epFlowHistograms.fill(HIST("EpResQvecRefARefBxx_q2high"), i + 2, cent, qx_shifted[1] * qx_shifted[2] + qy_shifted[1] * qy_shifted[2]);
342+
} else if (q2sel(q2Mag, false)) {
343+
epFlowHistograms.fill(HIST("EpResQvecDetRefAxx_q2low"), i + 2, cent, qx_shifted[0] * qx_shifted[1] + qy_shifted[0] * qy_shifted[1]);
344+
epFlowHistograms.fill(HIST("EpResQvecDetRefBxx_q2low"), i + 2, cent, qx_shifted[0] * qx_shifted[2] + qy_shifted[0] * qy_shifted[2]);
345+
epFlowHistograms.fill(HIST("EpResQvecRefARefBxx_q2low"), i + 2, cent, qx_shifted[1] * qx_shifted[2] + qy_shifted[1] * qy_shifted[2]);
346+
}
347+
}
348+
313349
for (const auto& track : tracks) {
314350
if (cfgTrkSelFlag && trackSel(track))
315351
continue;
@@ -328,9 +364,9 @@ struct JEPFlowAnalysis {
328364
epFlowHistograms.fill(HIST("SPvnxy"), i + 2, cent, track.pt(), track.eta(), (std::sin(track.phi() * static_cast<float>(i + 2)) * qx_shifted[0] - std::cos(track.phi() * static_cast<float>(i + 2)) * qy_shifted[0]), weight);
329365

330366
if (cfgq2analysis) {
331-
if (q2Mag > cfgq2high) {
367+
if (q2sel(q2Mag, true)) {
332368
epFlowHistograms.fill(HIST("SPvnxx_q2high"), i + 2, cent, track.pt(), track.eta(), (std::cos(track.phi() * static_cast<float>(i + 2)) * qx_shifted[0] + std::sin(track.phi() * static_cast<float>(i + 2)) * qy_shifted[0]), weight);
333-
} else if (q2Mag < cfgq2low) {
369+
} else if (q2sel(q2Mag, false)) {
334370
epFlowHistograms.fill(HIST("SPvnxx_q2low"), i + 2, cent, track.pt(), track.eta(), (std::cos(track.phi() * static_cast<float>(i + 2)) * qx_shifted[0] + std::sin(track.phi() * static_cast<float>(i + 2)) * qy_shifted[0]), weight);
335371
}
336372
}
@@ -397,6 +433,14 @@ struct JEPFlowAnalysis {
397433
epFlowHistograms.add("EpResQvecDetRefBxy", "", {HistType::kTH3F, {axisMod, axisCent, axisQvec}});
398434
epFlowHistograms.add("EpResQvecRefARefBxx", "", {HistType::kTH3F, {axisMod, axisCent, axisQvec}});
399435
epFlowHistograms.add("EpResQvecRefARefBxy", "", {HistType::kTH3F, {axisMod, axisCent, axisQvec}});
436+
if (cfgq2analysis) {
437+
epFlowHistograms.add("EpResQvecDetRefAxx_q2high", "", {HistType::kTH3F, {axisMod, axisCent, axisQvec}});
438+
epFlowHistograms.add("EpResQvecDetRefBxx_q2high", "", {HistType::kTH3F, {axisMod, axisCent, axisQvec}});
439+
epFlowHistograms.add("EpResQvecRefARefBxx_q2high", "", {HistType::kTH3F, {axisMod, axisCent, axisQvec}});
440+
epFlowHistograms.add("EpResQvecDetRefAxx_q2low", "", {HistType::kTH3F, {axisMod, axisCent, axisQvec}});
441+
epFlowHistograms.add("EpResQvecDetRefBxx_q2low", "", {HistType::kTH3F, {axisMod, axisCent, axisQvec}});
442+
epFlowHistograms.add("EpResQvecRefARefBxx_q2low", "", {HistType::kTH3F, {axisMod, axisCent, axisQvec}});
443+
}
400444

401445
epFlowHistograms.add("SPvnxx", "", {HistType::kTHnSparseF, {axisMod, axisCent, axisPt, axisEta, axisQvec}});
402446
epFlowHistograms.add("SPvnxy", "", {HistType::kTHnSparseF, {axisMod, axisCent, axisPt, axisEta, axisQvec}});

0 commit comments

Comments
 (0)