Skip to content

Commit 0f5bf09

Browse files
JimunLeejimun_lee
andauthored
[PWGLF] Fixed the TOF cutting shape of KstarInOO.cxx (#13755)
Co-authored-by: jimun_lee <jimun.lee@cern.ch>
1 parent b63b8dd commit 0f5bf09

File tree

1 file changed

+52
-5
lines changed

1 file changed

+52
-5
lines changed

PWGLF/Tasks/Resonances/kstarInOO.cxx

Lines changed: 52 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#include <cstddef>
4747
#include <cstdlib>
4848
#include <iostream>
49+
#include <memory>
4950
#include <string>
5051
#include <utility>
5152
#include <vector>
@@ -69,8 +70,8 @@ struct kstarInOO {
6970
Configurable<float> cfgEventVtxCut{"cfgEventVtxCut", 10.0, "V_z cut selection"};
7071
ConfigurableAxis cfgCentAxis{"cfgCentAxis", {VARIABLE_WIDTH, 0.0, 1.0, 5.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0}, "Binning of the centrality axis"};
7172
Configurable<bool> cfgOccupancySel{"cfgOccupancySel", false, "Occupancy selection"};
72-
Configurable<int> cfgOccupancyMax{"cfgOccupancyMax", 999999, "maximum occupancy of tracks in neighbouring collisions in a given time range"};
73-
Configurable<int> cfgOccupancyMin{"cfgOccupancyMin", -100, "minimum occupancy of tracks in neighbouring collisions in a given time range"};
73+
Configurable<float> cfgOccupancyMax{"cfgOccupancyMax", 999999., "maximum occupancy of tracks in neighbouring collisions in a given time range"};
74+
Configurable<float> cfgOccupancyMin{"cfgOccupancyMin", -100., "minimum occupancy of tracks in neighbouring collisions in a given time range"};
7475

7576
// Track Selection
7677
// General
@@ -138,6 +139,7 @@ struct kstarInOO {
138139
const AxisSpec axisDCAxy{binsDCAxy, "DCA_{XY}"};
139140

140141
if (cfgEventCutQA) {
142+
histos.add("hEvent_Cut", "Number of event after cuts", kTH1D, {{12, 0, 12}});
141143
histos.add("hPosZ_BC", "hPosZ_Bc", kTH1F, {{300, -15.0, 15.0}});
142144
histos.add("hPosZ_AC", "hPosZ_AC", kTH1F, {{300, -15.0, 15.0}});
143145
histos.add("hcentFT0C_BC", "centFT0C_BC", kTH1F, {{110, 0.0, 110.0}});
@@ -207,6 +209,24 @@ struct kstarInOO {
207209
histos.add("hMC_USS_KPi_True", "hMC_USS_KPi_True", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis});
208210
histos.add("hMC_USS_PiK_True", "hMC_USS_PiK_True", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis});
209211
}
212+
213+
std::shared_ptr<TH1> hCutFlow = histos.get<TH1>(HIST("hEvent_Cut"));
214+
std::vector<std::string> eventCutLabels = {
215+
"All Events",
216+
"sel8",
217+
Form("|Vz| < %.1f", cfgEventVtxCut.value),
218+
"kIsGoodZvtxFT0vsPV",
219+
"kNoSameBunchPileup",
220+
"kNoTimeFrameBorder",
221+
"kNoITSROFrameBorder",
222+
"kNoCollInTimeRangeStandard",
223+
"kIsGoodITSLayersAll",
224+
Form("Occupancy < %.0f", cfgOccupancyMax.value),
225+
"All passed events"};
226+
for (size_t i = 0; i < eventCutLabels.size(); ++i) {
227+
hCutFlow->GetXaxis()->SetBinLabel(i + 1, eventCutLabels[i].c_str());
228+
}
229+
210230
} // end of init
211231

212232
using EventCandidates = soa::Join<aod::Collisions, aod::EvSels, aod::FT0Mults, aod::MultZeqs, aod::CentFT0Cs>; //, aod::CentFT0Ms, aod::CentFT0As
@@ -235,29 +255,57 @@ struct kstarInOO {
235255
bool eventSelection(const EventType event)
236256
{
237257
if (cfgEventCutQA) {
258+
histos.fill(HIST("hEvent_Cut"), 0);
238259
histos.fill(HIST("hPosZ_BC"), event.posZ());
239260
histos.fill(HIST("hcentFT0C_BC"), event.centFT0C());
240261
}
241262
if (!event.sel8())
242263
return false;
264+
if (cfgEventCutQA)
265+
histos.fill(HIST("hEvent_Cut"), 1);
266+
243267
if (std::abs(event.posZ()) > cfgEventVtxCut)
244268
return false;
269+
if (cfgEventCutQA)
270+
histos.fill(HIST("hEvent_Cut"), 2);
271+
245272
if (!event.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV))
246273
return false;
274+
if (cfgEventCutQA)
275+
histos.fill(HIST("hEvent_Cut"), 3);
276+
247277
if (!event.selection_bit(aod::evsel::kNoSameBunchPileup))
248278
return false;
279+
if (cfgEventCutQA)
280+
histos.fill(HIST("hEvent_Cut"), 4);
281+
249282
if (!event.selection_bit(aod::evsel::kNoTimeFrameBorder))
250283
return false;
284+
if (cfgEventCutQA)
285+
histos.fill(HIST("hEvent_Cut"), 5);
286+
251287
if (!event.selection_bit(aod::evsel::kNoITSROFrameBorder))
252288
return false;
289+
if (cfgEventCutQA)
290+
histos.fill(HIST("hEvent_Cut"), 6);
291+
253292
if (!event.selection_bit(aod::evsel::kNoCollInTimeRangeStandard))
254293
return false;
294+
if (cfgEventCutQA)
295+
histos.fill(HIST("hEvent_Cut"), 7);
296+
255297
if (!event.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll))
256298
return false;
299+
if (cfgEventCutQA)
300+
histos.fill(HIST("hEvent_Cut"), 8);
301+
257302
if (cfgOccupancySel && (event.trackOccupancyInTimeRange() > cfgOccupancyMax || event.trackOccupancyInTimeRange() < cfgOccupancyMin))
258303
return false;
304+
if (cfgEventCutQA)
305+
histos.fill(HIST("hEvent_Cut"), 9);
259306

260307
if (cfgEventCutQA) {
308+
histos.fill(HIST("hEvent_Cut"), 10);
261309
histos.fill(HIST("hPosZ_AC"), event.posZ());
262310
histos.fill(HIST("hcentFT0C_AC"), event.centFT0C());
263311
}
@@ -279,7 +327,6 @@ struct kstarInOO {
279327
histos.fill(HIST("hTPCChi2_BC"), track.tpcChi2NCl());
280328
histos.fill(HIST("QA_track_pT_BC"), track.pt());
281329
}
282-
283330
if (cfgTrackGlobalSel && !track.isGlobalTrack())
284331
return false;
285332
if (track.pt() < cfgTrackMinPt)
@@ -361,7 +408,7 @@ struct kstarInOO {
361408
tofpid = 999;
362409
}
363410
}
364-
if (std::sqrt(tpcpid * tpcpid + tofpid * tofpid) < cfgTrackCircleValue) {
411+
if (tpcpid * tpcpid + tofpid * tofpid < cfgTrackCircleValue) {
365412
tpcPIDPassed = true;
366413
tofPIDPassed = true;
367414
}
@@ -417,7 +464,7 @@ struct kstarInOO {
417464
tofpid = 999;
418465
}
419466
}
420-
if (std::sqrt(tpcpid * tpcpid + tofpid * tofpid) < cfgTrackCircleValue) {
467+
if (tpcpid * tpcpid + tofpid * tofpid < cfgTrackCircleValue) {
421468
tpcPIDPassed = true;
422469
tofPIDPassed = true;
423470
}

0 commit comments

Comments
 (0)