Skip to content

Commit eb3dc97

Browse files
authored
[PWGCF] Make the GFW eta gap configurable in flowEseTask (#18813)
1 parent debb3ad commit eb3dc97

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

‎PWGCF/Flow/Tasks/flowEseTask.cxx‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
#include <array>
6464
#include <chrono>
6565
#include <cmath>
66+
#include <complex>
6667
#include <cstddef>
6768
#include <cstdint>
6869
#include <cstdlib>
@@ -151,6 +152,8 @@ struct FlowEseTask {
151152
Configurable<std::string> cfgAccCorPath{"cfgAccCorPath", "", "path for pseudo acceptance correction"};
152153

153154
struct : ConfigurableGroup {
155+
Configurable<float> cfgGfwPtMin{"cfgGfwPtMin", 0.2f, "Lower inclusive pT limit for GFW reference and POI tracks"};
156+
Configurable<float> cfgGfwPtMax{"cfgGfwPtMax", 3.0f, "Upper exclusive pT limit for GFW reference and POI tracks"};
154157
Configurable<double> cfgGfwEtaGap{"cfgGfwEtaGap", 0.3, "Full eta gap between the GFW subevents for v2 and v3"};
155158
Configurable<bool> cfgGfwEffCor{"cfgGfwEffCor", false, "flag to apply charged-track efficiency correction for EP and GFW"};
156159
Configurable<std::string> cfgGfwEffCorPath{"cfgGfwEffCorPath", "", "CCDB path to charged-track efficiency correction for EP and GFW"};
@@ -415,6 +418,8 @@ struct FlowEseTask {
415418
histos.get<TH1>(HIST("QA/hPhiNUA"))->Sumw2();
416419
histos.get<TH3>(HIST("QA/hPtCentStage"))->Sumw2();
417420
histos.get<TH1>(HIST("QA/hCorrectionSummary"))->Sumw2();
421+
histos.add("psi2/h_Ref03Gap22PtPt", "Inclusive pair correlation;p_{T}^{-#eta};p_{T}^{+#eta};Centrality (%)", {HistType::kTProfile3D, {ptAxis, ptAxis, centAxis}});
422+
histos.add("psi3/h_Ref03Gap32PtPt", "Inclusive pair correlation;p_{T}^{-#eta};p_{T}^{+#eta};Centrality (%)", {HistType::kTProfile3D, {ptAxis, ptAxis, centAxis}});
418423
histos.add("psi2/h_Ref03Gap22", "", {HistType::kTProfile, {centAxis}});
419424
histos.add("psi2/h_PoiN03Gap22", "", {HistType::kTProfile2D, {ptAxis, centAxis}});
420425
histos.add("psi2/h_PoiP03Gap22", "", {HistType::kTProfile2D, {ptAxis, centAxis}});
@@ -596,6 +601,9 @@ struct FlowEseTask {
596601
fMultPVCutHigh->SetParameters(2834.66, -87.0127, 0.915126, -0.00330136, 332.513, -12.3476, 0.251663, -0.00272819, 1.12242e-05);
597602

598603
const int nPtBins = histos.get<TProfile2D>(HIST("psi2/h_PoiN03Gap22"))->GetXaxis()->GetNbins();
604+
if (!(cfgGfwParam.cfgGfwPtMin.value >= 0.f && cfgGfwParam.cfgGfwPtMin.value < cfgGfwParam.cfgGfwPtMax.value)) {
605+
LOGF(fatal, "GFW requires 0 <= cfgGfwPtMin < cfgGfwPtMax");
606+
}
599607
const double halfEtaGap = cfgGfwParam.cfgGfwEtaGap.value / 2.0;
600608
gfwState.fGFW->AddRegion("refN03", -0.8, -halfEtaGap, 1, GFWRefMask);
601609
gfwState.fGFW->AddRegion("refP03", halfEtaGap, 0.8, 1, GFWRefMask);
@@ -972,10 +980,18 @@ struct FlowEseTask {
972980
esePlane = helperEP.GetEventPlane(collision.qvecFT0CReVec()[harmonicIndex], collision.qvecFT0CImVec()[harmonicIndex], nmode);
973981
}
974982

983+
struct PairBin {
984+
double weight = 0.;
985+
std::complex<double> q2{}, q3{};
986+
};
987+
std::vector<PairBin> negative, positive;
988+
const double halfGap = cfgGfwParam.cfgGfwEtaGap.value / 2.;
975989
TProfile2D* histPoiN22 = nullptr;
976990
if (fillGfw) {
977991
gfwState.fGFW->Clear();
978992
histPoiN22 = histos.get<TProfile2D>(HIST("psi2/h_PoiN03Gap22")).get();
993+
negative.resize(histPoiN22->GetNbinsX());
994+
positive.resize(negative.size());
979995
}
980996
if (fillEse || fillGfw) {
981997
for (const auto& trk : track) {
@@ -1030,12 +1046,40 @@ struct FlowEseTask {
10301046
histos.fill(HIST("QA/hCorrectionSummary"), 8.0);
10311047
}
10321048
const int ptBin = histPoiN22->GetXaxis()->FindBin(trk.pt()) - 1;
1049+
// Keep the full pT axis for offline windows on both subevents.
1050+
const double eta = trk.eta();
1051+
if (ptBin >= 0 && ptBin < histPoiN22->GetNbinsX() &&
1052+
std::abs(eta) < 0.8 && std::abs(eta) > halfGap &&
1053+
std::isfinite(trackWeight) && trackWeight > 0.) {
1054+
auto& bin = eta < 0. ? negative[ptBin] : positive[ptBin];
1055+
bin.weight += trackWeight;
1056+
bin.q2 += std::polar(trackWeight, 2. * trk.phi());
1057+
bin.q3 += std::polar(trackWeight, 3. * trk.phi());
1058+
}
1059+
if (trk.pt() < cfgGfwParam.cfgGfwPtMin.value || trk.pt() >= cfgGfwParam.cfgGfwPtMax.value) {
1060+
continue;
1061+
}
10331062
gfwState.fGFW->Fill(trk.eta(), ptBin, trk.phi(), trackWeight, GFWRefMask);
10341063
gfwState.fGFW->Fill(trk.eta(), ptBin, trk.phi(), trackWeight, GFWPoiMask);
10351064
}
10361065
}
10371066

10381067
if (fillGfw) {
1068+
for (size_t i = 0; i < negative.size(); ++i) {
1069+
if (negative[i].weight == 0.) {
1070+
continue;
1071+
}
1072+
for (size_t j = 0; j < positive.size(); ++j) {
1073+
const double pairs = negative[i].weight * positive[j].weight;
1074+
if (pairs == 0.) {
1075+
continue;
1076+
}
1077+
const double ptN = histPoiN22->GetXaxis()->GetBinCenter(i + 1);
1078+
const double ptP = histPoiN22->GetXaxis()->GetBinCenter(j + 1);
1079+
histos.fill(HIST("psi2/h_Ref03Gap22PtPt"), ptN, ptP, centrality, std::real(negative[i].q2 * std::conj(positive[j].q2)) / pairs, pairs);
1080+
histos.fill(HIST("psi3/h_Ref03Gap32PtPt"), ptN, ptP, centrality, std::real(negative[i].q3 * std::conj(positive[j].q3)) / pairs, pairs);
1081+
}
1082+
}
10391083
double denominator = gfwState.fGFW->Calculate(gfwState.corrRef22, 0, true).real();
10401084
if (denominator > 0.0) {
10411085
const double correlation = gfwState.fGFW->Calculate(gfwState.corrRef22, 0, false).real() / denominator;

0 commit comments

Comments
 (0)