Skip to content

Commit 8905bc8

Browse files
committed
adding q2 analysis
1 parent 101affa commit 8905bc8

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ struct JEPFlowAnalysis {
111111
Configurable<std::string> cfgShiftPath{"cfgShiftPath", "Users/j/junlee/Qvector/QvecCalib/Shift", "Path for Shift"};
112112
Configurable<float> cfgVertexZ{"cfgVertexZ", 10.0, "Maximum vertex Z selection"};
113113

114+
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"};
117+
114118
Configurable<std::string> cfgDetName{"cfgDetName", "FT0C", "The name of detector to be analyzed"};
115119
Configurable<std::string> cfgRefAName{"cfgRefAName", "TPCPos", "The name of detector for reference A"};
116120
Configurable<std::string> cfgRefBName{"cfgRefBName", "TPCNeg", "The name of detector for reference B"};
@@ -120,6 +124,7 @@ struct JEPFlowAnalysis {
120124
ConfigurableAxis cfgAxisEta{"cfgAxisEta", {20, -1, 1}, ""};
121125
ConfigurableAxis cfgAxisCos{"cfgAxisCos", {102, -1.02, 1.02}, ""};
122126
ConfigurableAxis cfgAxisQvec{"cfgAxisQvec", {200, -5.0, 5.0}, ""};
127+
ConfigurableAxis cfgAxisQ2{"cfgAxisQ2", {100, 0, 10}, ""};
123128

124129
ConfigurableAxis cfgAxisCentMC{"cfgAxisCentMC", {5, 0, 100}, ""};
125130
ConfigurableAxis cfgAxisVtxZMC{"cfgAxisVtxZMC", {20, -10, 10}, ""};
@@ -141,6 +146,8 @@ struct JEPFlowAnalysis {
141146

142147
float minQvecAmp = 1e-5;
143148
float minChg = 0.1;
149+
float q2Mag;
150+
144151
std::vector<TProfile3D*> shiftprofile{};
145152
std::string fullCCDBShiftCorrPath;
146153

@@ -284,6 +291,8 @@ struct JEPFlowAnalysis {
284291
float resNumB = helperEP.GetResolution(eps[0], eps[2], i + 2);
285292
float resDenom = helperEP.GetResolution(eps[1], eps[2], i + 2);
286293

294+
q2Mag = std::sqrt(pow(qx_shifted[0], 2) + pow(qy_shifted[0], 2));
295+
287296
epFlowHistograms.fill(HIST("EpDet"), i + 2, cent, eps[0]);
288297
epFlowHistograms.fill(HIST("EpRefA"), i + 2, cent, eps[1]);
289298
epFlowHistograms.fill(HIST("EpRefB"), i + 2, cent, eps[2]);
@@ -292,6 +301,8 @@ struct JEPFlowAnalysis {
292301
epFlowHistograms.fill(HIST("EpResDetRefB"), i + 2, cent, resNumB);
293302
epFlowHistograms.fill(HIST("EpResRefARefB"), i + 2, cent, resDenom);
294303

304+
epFlowHistograms.fill(HIST("hQ2"), i + 2, cent, q2Mag);
305+
295306
epFlowHistograms.fill(HIST("EpResQvecDetRefAxx"), i + 2, cent, qx_shifted[0] * qx_shifted[1] + qy_shifted[0] * qy_shifted[1]);
296307
epFlowHistograms.fill(HIST("EpResQvecDetRefAxy"), i + 2, cent, qx_shifted[1] * qy_shifted[0] - qx_shifted[0] * qy_shifted[1]);
297308
epFlowHistograms.fill(HIST("EpResQvecDetRefBxx"), i + 2, cent, qx_shifted[0] * qx_shifted[2] + qy_shifted[0] * qy_shifted[2]);
@@ -315,6 +326,14 @@ struct JEPFlowAnalysis {
315326

316327
epFlowHistograms.fill(HIST("SPvnxx"), 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);
317328
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);
329+
330+
if (cfgq2analysis) {
331+
if (q2Mag > cfgq2high) {
332+
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) {
334+
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);
335+
}
336+
}
318337
}
319338
}
320339
}
@@ -351,6 +370,7 @@ struct JEPFlowAnalysis {
351370
AxisSpec axisEta{cfgAxisEta, "eta"};
352371
AxisSpec axisCos{cfgAxisCos, "cos"};
353372
AxisSpec axisQvec{cfgAxisQvec, "Qvec"};
373+
AxisSpec axisQ2{cfgAxisQ2, "Q2"};
354374

355375
AxisSpec axisCentMC{cfgAxisCentMC, "cent"};
356376
AxisSpec axisVtxZMC{cfgAxisVtxZMC, "vtxz"};
@@ -366,6 +386,8 @@ struct JEPFlowAnalysis {
366386
epFlowHistograms.add("EpResDetRefB", "", {HistType::kTH3F, {axisMod, axisCent, axisEvtPl}});
367387
epFlowHistograms.add("EpResRefARefB", "", {HistType::kTH3F, {axisMod, axisCent, axisEvtPl}});
368388

389+
epFlowHistograms.add("hQ2", "", {HistType::kTH3F, {axisMod, axisCent, axisQ2}});
390+
369391
epFlowHistograms.add("vncos", "", {HistType::kTHnSparseF, {axisMod, axisCent, axisPt, axisCos}});
370392
epFlowHistograms.add("vnsin", "", {HistType::kTHnSparseF, {axisMod, axisCent, axisPt, axisCos}});
371393

@@ -378,6 +400,10 @@ struct JEPFlowAnalysis {
378400

379401
epFlowHistograms.add("SPvnxx", "", {HistType::kTHnSparseF, {axisMod, axisCent, axisPt, axisEta, axisQvec}});
380402
epFlowHistograms.add("SPvnxy", "", {HistType::kTHnSparseF, {axisMod, axisCent, axisPt, axisEta, axisQvec}});
403+
if (cfgq2analysis) {
404+
epFlowHistograms.add("SPvnxx_q2high", "", {HistType::kTHnSparseF, {axisMod, axisCent, axisPt, axisEta, axisQvec}});
405+
epFlowHistograms.add("SPvnxx_q2low", "", {HistType::kTHnSparseF, {axisMod, axisCent, axisPt, axisEta, axisQvec}});
406+
}
381407

382408
epFlowHistograms.add("hCentrality", "", {HistType::kTH1F, {axisCent}});
383409
epFlowHistograms.add("hVertex", "", {HistType::kTH1F, {axisVertex}});

0 commit comments

Comments
 (0)