Skip to content

Commit 0210ed1

Browse files
hernasabSabrina Hernandez
andauthored
[PWGCF] added histogram and removed obsolete objects (#10324)
Co-authored-by: Sabrina Hernandez <sabrina.gabrielle.hernandez@cern.ch>
1 parent b1156a4 commit 0210ed1

File tree

1 file changed

+46
-43
lines changed

1 file changed

+46
-43
lines changed

PWGCF/Flow/Tasks/flowZdcTask.cxx

Lines changed: 46 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,9 @@ struct FlowZdcTask {
6464
Configurable<int> nBinsPt{"nBinsPt", 500, "N bins in pT histo"};
6565
Configurable<int> eventSelection{"eventSelection", 1, "event selection"};
6666
Configurable<float> maxZp{"maxZp", 3099.5, "Max ZP signal"};
67-
Configurable<float> vtxCut{"vtxCut", 10.0, "Z vertex cut"};
68-
Configurable<float> etaCut{"etaCut", 0.8, "Eta cut"};
69-
Configurable<float> etaGap{"etaGap", 0.5, "Eta gap"};
70-
Configurable<float> minPt{"minPt", 0.2, "Minimum pt"};
71-
Configurable<float> maxPt{"maxPt", 20.0, "Maximum pt"};
7267
Configurable<float> minTpcNcrossedRows{"minTpcNcrossedRows", 20, "minTpcNcrossedRows"};
7368
Configurable<float> maxZem{"maxZem", 3099.5, "Max ZEM signal"};
7469
// for ZDC info and analysis
75-
Configurable<int> nBinsADC{"nBinsADC", 1000, "nbinsADC"};
7670
Configurable<int> nBinsAmp{"nBinsAmp", 1025, "nbinsAmp"};
7771
Configurable<int> nBinsFT0Amp{"nBinsFT0Amp", 250000, "nbinsAmp"};
7872
Configurable<float> maxZn{"maxZn", 4099.5, "Max ZN signal"};
@@ -82,30 +76,28 @@ struct FlowZdcTask {
8276
Configurable<float> acceptanceZpc{"acceptanceZpc", 0.50, "ZPC acceptance factor"};
8377
Configurable<float> vtxRange{"vtxRange", 10.0f, "Vertex Z range to consider"};
8478
Configurable<float> etaRange{"etaRange", 1.0f, "Eta range to consider"};
79+
Configurable<float> maxNch{"maxNch", 2500, "Max Nch (|eta|<0.8)"};
8580
Configurable<float> npvTracksCut{"npvTracksCut", 1.0f, "Apply extra NPVtracks cut"};
81+
Configurable<int> nBinsTDC{"nBinsTDC", 150, "nbinsTDC"};
82+
Configurable<float> minTdc{"minTdc", -15.0, "minimum TDC"};
83+
Configurable<float> maxTdc{"maxTdc", 15.0, "maximum TDC"};
84+
Configurable<int> nBinsNch{"nBinsNch", 2501, "N bins Nch (|eta|<0.8)"};
8685
// event selection
8786
Configurable<bool> isApplySameBunchPileup{"isApplySameBunchPileup", true, "Enable SameBunchPileup cut"};
8887
Configurable<bool> isApplyGoodZvtxFT0vsPV{"isApplyGoodZvtxFT0vsPV", true, "Enable GoodZvtxFT0vsPV cut"};
8988
Configurable<bool> isApplyVertexITSTPC{"isApplyVertexITSTPC", false, "Enable VertexITSTPC cut"};
9089
Configurable<bool> isApplyVertexTOFmatched{"isApplyVertexTOFmatched", false, "Enable VertexTOFmatched cut"};
9190
Configurable<bool> isApplyVertexTRDmatched{"isApplyVertexTRDmatched", false, "Enable VertexTRDmatched cut"};
9291
Configurable<bool> isApplyExtraCorrCut{"isApplyExtraCorrCut", false, "Enable extra NPVtracks vs FTOC correlation cut"};
93-
Configurable<bool> isApplyExtraPhiCut{"isApplyExtraPhiCut", false, "Enable extra phi cut"};
94-
Configurable<bool> isApplyNoCollInTimeRangeStandard{"isApplyNoCollInTimeRangeStandard", false, "Enable NoCollInTimeRangeStandard cut"};
95-
Configurable<bool> isApplyNoCollInRofStandard{"isApplyNoCollInRofStandard", false, "Enable NoCollInRofStandard cut"};
96-
Configurable<bool> isApplyNoHighMultCollInPrevRof{"isApplyNoHighMultCollInPrevRof", false, "Enable NoHighMultCollInPrevRof cut"};
9792
Configurable<bool> isApplyFT0CbasedOccupancy{"isApplyFT0CbasedOccupancy", false, "Enable FT0CbasedOccupancy cut"};
98-
Configurable<bool> isApplyCentFT0C{"isApplyCentFT0C", false, "Centrality based on FT0C"};
99-
Configurable<bool> isApplyCentFT0CVariant1{"isApplyCentFT0CVariant1", false, "Centrality based on FT0C variant1"};
100-
Configurable<bool> isApplyCentFT0M{"isApplyCentFT0M", false, "Centrality based on FT0A + FT0C"};
101-
Configurable<bool> isApplyCentNGlobal{"isApplyCentNGlobal", false, "Centrality based on global tracks"};
102-
Configurable<bool> isApplyCentMFT{"isApplyCentMFT", false, "Centrality based on MFT tracks"};
10393
Configurable<bool> isGoodITSLayersAll{"isGoodITSLayersAll", false, "Centrality based on no other collisions in this Readout Frame with per-collision multiplicity above threshold tracks"};
10494
Configurable<bool> isOccupancyCut{"isOccupancyCut", true, "Occupancy cut?"};
95+
Configurable<bool> isZEMcut{"isZEMcut", true, "Use ZEM cut?"};
10596
Configurable<float> ft0cCut{"ft0cCut", 1.0f, "Apply extra FT0C cut"};
10697
Configurable<float> minOccCut{"minOccCut", 0, "min Occu cut"};
10798
Configurable<float> maxOccCut{"maxOccCut", 500, "max Occu cut"};
10899
Configurable<float> posZcut{"posZcut", +10.0, "z-vertex position cut"};
100+
Configurable<float> zemCut{"zemCut", 1000., "ZEM cut"};
109101

110102
ConfigurableAxis axisVertex{"axisVertex", {20, -10, 10}, "vertex axis for histograms"};
111103
ConfigurableAxis axisPhi{"axisPhi", {60, 0.0, constants::math::TwoPI}, "phi axis for histograms"};
@@ -141,17 +133,6 @@ struct FlowZdcTask {
141133
// Begin Histogram Registry
142134

143135
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
144-
OutputObj<TProfile> q2RealMean{TProfile("q2_real_mean", "q2 real vs centrality", 10, 0, 100.)};
145-
OutputObj<TProfile> q2ImagMean{TProfile("q2_imag_mean", "q2 imag vs centrality", 10, 0, 100.)};
146-
OutputObj<TProfile> q2After{TProfile("q2after", "q2 recentered vs centrality", 10, 0, 100.)};
147-
OutputObj<TProfile> q2Before{TProfile("q2before", "q2 re vs imag", 10, 0, 100.)};
148-
OutputObj<TProfile> q2ZnaReal{TProfile("Q2_ZNA_real", "q2_ZNA real vs centrality", 10, 0, 100.)};
149-
OutputObj<TProfile> q2ZnaImag{TProfile("Q2_ZNA_imag", "q2_ZNA imag vs centrality", 10, 0, 100.)};
150-
OutputObj<TProfile> q2ZncReal{TProfile("Q2_ZNC_real", "q2_ZNC real vs centrality", 10, 0, 100.)};
151-
OutputObj<TProfile> qZncImag{TProfile("Q2_ZNC_imag", "q2_ZNC imag vs centrality", 10, 0, 100.)};
152-
OutputObj<TProfile> avgQ2TPCRe{TProfile("avgQ2TPCRe", "Average Q2 Real part vs Centrality", 10, 0, 100)};
153-
OutputObj<TProfile> avgQ2TPCIm{TProfile("avgQ2TPCIm", "Average Q2 Imaginary part vs Centrality", 10, 0, 100)};
154-
OutputObj<TProfile> zdcZemEnergy{TProfile("ZDC_ZEM_Energy", "ZDC vs ZEM Energy", 10, 0, 1000)};
155136
OutputObj<TProfile> pCosPsiDifferences{TProfile("pCosPsiDifferences", "Differences in cos(psi) vs Centrality;Centrality;Mean cos(psi) Difference", 200, 0, 100, -1, 1)};
156137
OutputObj<TProfile> pSinPsiDifferences{TProfile("pSinPsiDifferences", "Differences in sin(psi) vs Centrality;Centrality;Mean sin(psi) Difference", 200, 0, 100, -1, 1)};
157138
OutputObj<TProfile> pZNvsFT0Ccent{TProfile("pZNvsFT0Ccent", "ZN Energy vs FT0C Centrality", 100, 0, 100, 0, 500)};
@@ -165,24 +146,14 @@ struct FlowZdcTask {
165146
void init(InitContext const&)
166147
{
167148
// define axes
168-
const AxisSpec axisEta{30, -1.5, +1.5, "#eta"};
169-
const AxisSpec axispt{100, 0, 2, "#pt"};
170-
171-
const AxisSpec axisPt{nBinsPt, 0, 10, "p_{T} (GeV/c)"};
172149
const AxisSpec axisCounter{1, 0, +1, ""};
173-
const AxisSpec axisPhi{100, 0, o2::constants::math::TwoPI, "#phi"};
174150
const AxisSpec axisQ{100, -1, 1, "Q"};
175-
const AxisSpec axisZNA{100, 0, 200, "energy"};
176151
const AxisSpec axisQZNA{100, -1, 1, "Q"};
177152
const AxisSpec axisREQ{100, -1, 1, "real Q"};
178153
const AxisSpec axisIMQ{100, -1, 1, "imag Q"};
179154

180-
AxisSpec axisVtxcounts{2, -0.5f, 1.5f, "Vtx info (0=no, 1=yes)"};
181155
AxisSpec axisVtxZ{40, -20, 20, "Vertex Z", "VzAxis"};
182-
AxisSpec axisZvert{120, -30.f, 30.f, "Vtx z (cm)"};
183-
AxisSpec axisCentBins{{0, 5., 10., 20., 30., 40., 50., 60., 70., 80.}, "centrality percentile"};
184-
AxisSpec axisPtBins{{0., 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.25, 2.5, 2.75, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 8.0, 10., 13., 16., 20.}, "p_{T} (GeV/c)"};
185-
AxisSpec axisEvent{11, 0.5, 11.5, "#Event", "EventAxis"};
156+
AxisSpec axisEvent{12, 0.5, 12.5, "#Event", "EventAxis"};
186157
AxisSpec axisMult = {multHistBin, "Mult", "MultAxis"};
187158
AxisSpec axisFT0CMult = {ft0cMultHistBin, "ft0c", "FT0CMultAxis"};
188159

@@ -218,9 +189,13 @@ struct FlowZdcTask {
218189
"ZP Energy vs FT0C Centrality;Centrality [%];ZP Energy",
219190
kTH2F,
220191
{axisCent, axisZP});
192+
histos.add("hNchvsNPV", ";NPVTracks (|#eta|<1);N_{ch} (|#eta|<0.8);",
193+
kTH2F,
194+
{{{nBinsNch, -0.5, maxNch}, {nBinsNch, -0.5, maxNch}}});
221195
histos.add("revsimag", "revsimag", kTH2F, {axisREQ, axisIMQ}); // for q vector recentering
222196
histos.add("hYield", "Nch vs pT", kTH2F, {axisMultiplicity, axisPt});
223197
histos.add("hGlobalTracks", "hGlobalTracks", kTH1F, {axisMultiplicity});
198+
// event selection steps
224199
histos.add("eventSelectionSteps", "eventSelectionSteps", kTH1D, {axisEvent});
225200
auto hstat = histos.get<TH1>(HIST("eventSelectionSteps"));
226201
auto* xAxis = hstat->GetXaxis();
@@ -230,6 +205,13 @@ struct FlowZdcTask {
230205
xAxis->SetBinLabel(4, "kIsGoodZvtxFT0vsPV"); // small difference between z-vertex from PV and from FT0
231206
xAxis->SetBinLabel(5, "kIsVertexITSTPC"); // at least one ITS-TPC track (reject vertices built from ITS-only tracks)
232207
xAxis->SetBinLabel(6, "kIsApplyVertexTOFmatched"); //"Centrality based on no other collisions in this Readout Frame with per-collision multiplicity above threshold tracks"
208+
xAxis->SetBinLabel(7, "Occupancy Cuts");
209+
xAxis->SetBinLabel(8, "kITSLayersAll");
210+
xAxis->SetBinLabel(9, "kTRDVertexMatched");
211+
xAxis->SetBinLabel(10, "Centrality cut");
212+
xAxis->SetBinLabel(11, "Vertex Z cut");
213+
xAxis->SetBinLabel(12, "Extra Correlation Cut");
214+
233215
histos.add("GlobalMult_vs_FT0C", "GlobalMult_vs_FT0C", kTH2F, {axisMult, axisFT0CMult});
234216
histos.add("VtxZHist", "VtxZHist", kTH1D, {axisVtxZ});
235217

@@ -254,7 +236,6 @@ struct FlowZdcTask {
254236

255237
histos.add("CosPsiDifferences", "Differences in cos(psi);cos(psiZNC) - cos(psiZNA);Entries", {HistType::kTH1F, {{100, -2, 2}}});
256238
histos.add("hSinDifferences", "Differences in sin(psi);sin(psiZNC) - sin(psiZNA);Entries", {HistType::kTH1F, {{100, -2, 2}}});
257-
histos.add("CosPsiDifferencesAvg", "Differences in cos(psi);cos(psiZNC) - cos(psiZNA);Entries", {HistType::kTH2F, {{axisCent}, {100, -2, 2}}});
258239
histos.add("ZDC_energy_vs_ZEM", "ZDCvsZEM; ZEM; ZNA+ZNC+ZPA+ZPC", {HistType::kTH2F, {{{nBinsAmp, -0.5, maxZem}, {nBinsAmp, -0.5, 2. * maxZn}}}});
259240
// common energies information for ZDC
260241
histos.add("ZNCenergy", "ZN energy side c", kTH1F, {axisEnergy});
@@ -266,13 +247,11 @@ struct FlowZdcTask {
266247
histos.add("hFT0CAmp", ";Amplitude;counts", kTH1F, {axisFT0CAmp});
267248
histos.add("hFT0AAmp", ";Amplitude;counts", kTH1F, {axisFT0AAmp});
268249
histos.add("hFT0MAmp", ";Amplitude;counts", kTH1F, {axisFT0MAmp});
269-
histos.add("hMultT0A", ";Amplitude;counts", kTH1F, {{nBinsFT0Amp, 0, 250000}});
270-
histos.add("hMultT0C", ";Amplitude;counts", kTH1F, {{nBinsFT0Amp, 0, 250000}});
271-
histos.add("hMultT0M", ";Amplitude;counts", kTH1F, {{nBinsFT0Amp, 0, 250000}});
272250
histos.add("hZNvsFT0CAmp", "ZN Energy vs FT0C Amplitude", kTH2F, {axisFT0CAmp, axisZN});
273251
histos.add("hZPvsFT0CAmp", "ZP Energy vs FT0C Amplitude", kTH2F, {axisFT0CAmp, axisZP});
274252
histos.add("hZNvsMult", "ZN Energy vs Multiplicity", kTH2F, {axisMultiplicity, axisZN});
275253
histos.add("hZPvsMult", "ZP Energy vs Multiplicity", kTH2F, {axisMultiplicity, axisZP});
254+
histos.add("debunch", ";t_{ZDC}-t_{ZDA};t_{ZDC}+t_{ZDA}", kTH2F, {{{nBinsTDC, minTdc, maxTdc}, {nBinsTDC, minTdc, maxTdc}}});
276255
}
277256
}
278257
template <typename EventCuts>
@@ -313,22 +292,27 @@ struct FlowZdcTask {
313292
if (occuValue < minOccCut || occuValue > maxOccCut)
314293
return false;
315294
}
295+
histos.fill(HIST("eventSelectionSteps"), 7);
316296
if (isGoodITSLayersAll && !col.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) {
317297
return false;
318298
}
299+
histos.fill(HIST("eventSelectionSteps"), 8);
319300
if (isApplyVertexTRDmatched && !col.selection_bit(o2::aod::evsel::kIsVertexTRDmatched)) {
320301
return false;
321302
}
303+
histos.fill(HIST("eventSelectionSteps"), 9);
322304
if (col.centFT0C() < 0. || col.centFT0C() > 100.) {
323305
return false;
324306
}
325-
307+
histos.fill(HIST("eventSelectionSteps"), 10);
326308
if (std::fabs(col.posZ()) > posZcut) {
327309
return false;
328310
}
311+
histos.fill(HIST("eventSelectionSteps"), 11);
329312
if (isApplyExtraCorrCut && col.multNTracksPV() > npvTracksCut && col.multFT0C() < (10 * col.multNTracksPV() - ft0cCut)) {
330313
return false;
331314
}
315+
histos.fill(HIST("eventSelectionSteps"), 12);
332316
return true;
333317
}
334318

@@ -397,6 +381,12 @@ struct FlowZdcTask {
397381
int countEvents = 0; // initialize Counter for the number of events processed
398382
double ft0aAmp = 0;
399383
double ft0cAmp = 0;
384+
float tZNA{0.0};
385+
float tZNC{0.0};
386+
float tZPA{0.0};
387+
float tZPC{0.0};
388+
float tZDCdif{0.0};
389+
float tZDCsum{0.0};
400390
const auto& foundBC = collision.foundBC_as<BCsRun3>();
401391
if (collision.has_foundFT0()) {
402392
auto ft0 = collision.foundFT0();
@@ -423,14 +413,25 @@ struct FlowZdcTask {
423413

424414
histos.get<TH1>(HIST("ZEM1coll"))->Fill(zdcread.amplitudeZEM1());
425415
histos.get<TH1>(HIST("ZEM2coll"))->Fill(zdcread.amplitudeZEM2());
416+
tZNA = foundBC.zdc().timeZNA();
417+
tZNC = foundBC.zdc().timeZNC();
418+
tZPA = foundBC.zdc().timeZPA();
419+
tZPC = foundBC.zdc().timeZPC();
420+
tZDCdif = tZNC + tZPC - tZNA - tZPA;
421+
tZDCsum = tZNC + tZPC + tZNA + tZPA;
426422

427423
float sumZNC = (zdcread.energySectorZNC())[0] + (zdcread.energySectorZNC())[1] + (zdcread.energySectorZNC())[2] + (zdcread.energySectorZNC())[3];
428424
float sumZNA = (zdcread.energySectorZNA())[0] + (zdcread.energySectorZNA())[1] + (zdcread.energySectorZNA())[2] + (zdcread.energySectorZNA())[3];
429425
float sumZPC = (zdcread.energySectorZPC())[0] + (zdcread.energySectorZPC())[1] + (zdcread.energySectorZPC())[2] + (zdcread.energySectorZPC())[3];
430426
float sumZPA = (zdcread.energySectorZPA())[0] + (zdcread.energySectorZPA())[1] + (zdcread.energySectorZPA())[2] + (zdcread.energySectorZPA())[3];
431427
float sumZDC = sumZPA + sumZPC + sumZNA + sumZNC;
432428
float sumZEM = zdcread.amplitudeZEM1() + zdcread.amplitudeZEM2();
433-
429+
// ZEM cut
430+
if (isZEMcut) {
431+
if (sumZEM < zemCut) {
432+
return;
433+
}
434+
}
434435
// common energies
435436
float commonSumZnc = (zdcread.energyCommonZNC()) / acceptanceZnc;
436437
float commonSumZna = (zdcread.energyCommonZNA()) / acceptanceZna;
@@ -451,6 +452,8 @@ struct FlowZdcTask {
451452
histos.fill(HIST("hZPvsFT0CAmp"), ft0cAmp, sumZP);
452453
histos.fill(HIST("hZNvsMult"), nTot, sumZN);
453454
histos.fill(HIST("hZPvsMult"), nTot, sumZP);
455+
histos.fill(HIST("debunch"), tZDCdif, tZDCsum);
456+
histos.fill(HIST("hNchvsNPV"), collision.multNTracksPVeta1(), nTot);
454457

455458
float ratioZN = sumZNC / sumZNA;
456459
float ratioZP = sumZPC / sumZPA;

0 commit comments

Comments
 (0)