Skip to content

Commit 40cc984

Browse files
hernasabSabrina Hernandez
andauthored
[PWGCF] added event selection (#9800)
Co-authored-by: Sabrina Hernandez <sabrina.gabrielle.hernandez@cern.ch>
1 parent d311d70 commit 40cc984

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

PWGCF/Flow/Tasks/flowZdcTask.cxx

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ using namespace o2::framework::expressions;
4444
using namespace o2::aod::mult;
4545
using namespace o2::aod::evsel;
4646
using ColEvSels = soa::Join<aod::Collisions, aod::EvSels>;
47-
using AodCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs>>;
47+
using AodCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, aod::Mults>>;
4848
using AodTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA>>;
4949
using BCsRun3 = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels, aod::Run3MatchedToBCSparse>;
5050
using AodZDCs = soa::Join<aod::ZDCMults, aod::Zdcs>;
@@ -124,6 +124,7 @@ struct FlowZdcTask {
124124
ConfigurableAxis axisFT0MAmp{"axisFT0MAmp", {10000, 0, 10000}, "axisFT0MAmp"};
125125
ConfigurableAxis ft0cMultHistBin{"ft0cMultHistBin", {501, -0.5, 500.5}, ""};
126126
ConfigurableAxis multHistBin{"multHistBin", {501, -0.5, 500.5}, ""};
127+
ConfigurableAxis axisCent{"axisCent", {10, 0, 100}, "axisCent"};
127128

128129
Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
129130
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) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgCutDCAxy);
@@ -175,10 +176,9 @@ struct FlowZdcTask {
175176
AxisSpec axisVtxcounts{2, -0.5f, 1.5f, "Vtx info (0=no, 1=yes)"};
176177
AxisSpec axisVtxZ{40, -20, 20, "Vertex Z", "VzAxis"};
177178
AxisSpec axisZvert{120, -30.f, 30.f, "Vtx z (cm)"};
178-
AxisSpec axisCent{8, 0.f, 105.f, "centrality"};
179179
AxisSpec axisCentBins{{0, 5., 10., 20., 30., 40., 50., 60., 70., 80.}, "centrality percentile"};
180180
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)"};
181-
AxisSpec axisEvent{6, 0.5, 6.5, "#Event", "EventAxis"};
181+
AxisSpec axisEvent{11, 0.5, 11.5, "#Event", "EventAxis"};
182182
AxisSpec axisMult = {multHistBin, "Mult", "MultAxis"};
183183
AxisSpec axisFT0CMult = {ft0cMultHistBin, "ft0c", "FT0CMultAxis"};
184184

@@ -225,6 +225,10 @@ struct FlowZdcTask {
225225
xAxis->SetBinLabel(4, "kIsGoodZvtxFT0vsPV"); // small difference between z-vertex from PV and from FT0
226226
xAxis->SetBinLabel(5, "kIsVertexITSTPC"); // at least one ITS-TPC track (reject vertices built from ITS-only tracks)
227227
xAxis->SetBinLabel(6, "kIsGoodITSLayersAll"); //"Centrality based on no other collisions in this Readout Frame with per-collision multiplicity above threshold tracks"
228+
xAxis->SetBinLabel(7, "kIsApplyVertexTOFmatched");
229+
xAxis->SetBinLabel(8, "kIsVertexTRDmatched");
230+
xAxis->SetBinLabel(9, "centrality selection");
231+
xAxis->SetBinLabel(10, "isApplyExtraCorrCut");
228232
histos.add("GlobalMult_vs_FT0C", "GlobalMult_vs_FT0C", kTH2F, {axisMult, axisFT0CMult});
229233
histos.add("VtxZHist", "VtxZHist", kTH1D, {axisVtxZ});
230234

@@ -299,6 +303,25 @@ struct FlowZdcTask {
299303
return false;
300304
}
301305
histos.fill(HIST("eventSelectionSteps"), 6);
306+
if (isApplyVertexTOFmatched && !col.selection_bit(o2::aod::evsel::kIsVertexTOFmatched)) {
307+
return false;
308+
}
309+
histos.fill(HIST("eventSelectionSteps"), 7);
310+
311+
if (isApplyVertexTRDmatched && !col.selection_bit(o2::aod::evsel::kIsVertexTRDmatched)) {
312+
return false;
313+
}
314+
histos.fill(HIST("eventSelectionSteps"), 8);
315+
if (col.centFT0C() < 0. || col.centFT0C() > 100.) {
316+
return false;
317+
}
318+
histos.fill(HIST("eventSelectionSteps"), 9);
319+
320+
if (isApplyExtraCorrCut && col.multNTracksPV() > npvTracksCut && col.multFT0C() < (10 * col.multNTracksPV() - ft0cCut)) {
321+
return false;
322+
}
323+
histos.fill(HIST("eventSelectionSteps"), 10);
324+
histos.fill(HIST("eventSelectionSteps"), 11);
302325
return true;
303326
}
304327

@@ -315,8 +338,6 @@ struct FlowZdcTask {
315338
// this is the q vector for the TPC data. it is a complex function
316339
double qTpcReal = 0.0; // Initialize qTPC_real
317340
double qTpcIm = 0.0; // init qTPC_imaginary
318-
if (cent < 0.0 && cent > 70)
319-
return;
320341
std::complex<double> qTPC(0, 0); // Starting with a q-vector of zero
321342
int nTot{0}; // Tracks are already filtered with GlobalTrack || GlobalTrackSDD
322343
for (const auto& track : tracks) {

0 commit comments

Comments
 (0)