Skip to content

Commit 77e7096

Browse files
authored
PWGCF: flow-pb-pb: modify filter conditions (#4656)
* modify filter conditions * modify the code according to the reviews of PR#4562
1 parent 07d565c commit 77e7096

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

PWGCF/Flow/Tasks/FlowPbPbTask.cxx

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ struct FlowPbPbTask {
6161
ConfigurableAxis axisMultiplicity{"axisMultiplicity", {VARIABLE_WIDTH, 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90}, "centrality axis for histograms"};
6262

6363
Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
64-
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls);
64+
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls);
6565

6666
// Corrections
6767
TH1D* mEfficiency = nullptr;
@@ -328,7 +328,7 @@ struct FlowPbPbTask {
328328
correctionsLoaded = true;
329329
}
330330

331-
bool setCurrentParticleWeights(float& weight_nue, float& weight_nua, const float& phi, const float& eta, const float& pt, const float& vtxz)
331+
bool setCurrentParticleWeights(float& weight_nue, float& weight_nua, float phi, float eta, float pt, float vtxz)
332332
{
333333
float eff = 1.;
334334
if (mEfficiency)
@@ -370,38 +370,35 @@ struct FlowPbPbTask {
370370
double sum_ptSquare_wSquare_WithinGap08 = 0., sum_pt_wSquare_WithinGap08 = 0.;
371371

372372
for (auto& track : tracks) {
373-
double pt = track.pt();
374-
double eta = track.eta();
375-
double phi = track.phi();
376373
if (cfgOutputNUAWeights)
377-
fWeights->Fill(phi, eta, vtxz, pt, cent, 0);
378-
if (!setCurrentParticleWeights(weff, wacc, phi, eta, pt, vtxz))
374+
fWeights->Fill(track.phi(), track.eta(), vtxz, track.pt(), cent, 0);
375+
if (!setCurrentParticleWeights(weff, wacc, track.phi(), track.eta(), track.pt(), vtxz))
379376
continue;
380-
bool WithinPtPOI = (cfgCutPtPOIMin < pt) && (pt < cfgCutPtPOIMax); // within POI pT range
381-
bool WithinPtRef = (cfgCutPtMin < pt) && (pt < cfgCutPtMax); // within RF pT range
382-
bool WithinEtaGap08 = (eta >= -0.4) && (eta <= 0.4);
377+
bool WithinPtPOI = (cfgCutPtPOIMin < track.pt()) && (track.pt() < cfgCutPtPOIMax); // within POI pT range
378+
bool WithinPtRef = (cfgCutPtMin < track.pt()) && (track.pt() < cfgCutPtMax); // within RF pT range
379+
bool WithinEtaGap08 = (track.eta() >= -0.4) && (track.eta() <= 0.4);
383380
if (WithinPtRef) {
384-
registry.fill(HIST("hPhi"), phi);
381+
registry.fill(HIST("hPhi"), track.phi());
385382
registry.fill(HIST("hEta"), track.eta());
386-
registry.fill(HIST("hPt"), pt);
383+
registry.fill(HIST("hPt"), track.pt());
387384
weffEvent += weff;
388385
waccEvent += wacc;
389-
ptSum += weff * pt;
386+
ptSum += weff * track.pt();
390387
TrackNum++;
391388
if (WithinEtaGap08) {
392-
ptSum_Gap08 += weff * pt;
393-
sum_pt_wSquare_WithinGap08 += weff * weff * pt;
394-
sum_ptSquare_wSquare_WithinGap08 += weff * weff * pt * pt;
389+
ptSum_Gap08 += weff * track.pt();
390+
sum_pt_wSquare_WithinGap08 += weff * weff * track.pt();
391+
sum_ptSquare_wSquare_WithinGap08 += weff * weff * track.pt() * track.pt();
395392
weffEvent_WithinGap08 += weff;
396393
weffEventSquare_WithinGap08 += weff * weff;
397394
}
398395
}
399396
if (WithinPtRef)
400-
fGFW->Fill(track.eta(), fPtAxis->FindBin(pt) - 1, phi, wacc * weff, 1);
397+
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 1);
401398
if (WithinPtPOI)
402-
fGFW->Fill(track.eta(), fPtAxis->FindBin(pt) - 1, phi, wacc * weff, 2);
399+
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 2);
403400
if (WithinPtPOI && WithinPtRef)
404-
fGFW->Fill(track.eta(), fPtAxis->FindBin(pt) - 1, phi, wacc * weff, 4);
401+
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 4);
405402
}
406403

407404
double WeffEvent_diff_WithGap08 = weffEvent_WithinGap08 * weffEvent_WithinGap08 - weffEventSquare_WithinGap08;

0 commit comments

Comments
 (0)