Skip to content

Commit 859be45

Browse files
author
jimun_lee
committed
[PWGLF] Fixed the TOF cutting shape of KstarInOO.cxx
1 parent 726d76e commit 859be45

File tree

1 file changed

+49
-3
lines changed

1 file changed

+49
-3
lines changed

PWGLF/Tasks/Resonances/kstarInOO.cxx

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ struct kstarInOO {
6868
Configurable<float> cfgEventVtxCut{"cfgEventVtxCut", 10.0, "V_z cut selection"};
6969
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"};
7070
Configurable<bool> cfgOccupancySel{"cfgOccupancySel", false, "Occupancy selection"};
71-
Configurable<int> cfgOccupancyMax{"cfgOccupancyMax", 999999, "maximum occupancy of tracks in neighbouring collisions in a given time range"};
72-
Configurable<int> cfgOccupancyMin{"cfgOccupancyMin", -100, "minimum occupancy of tracks in neighbouring collisions in a given time range"};
71+
Configurable<float> cfgOccupancyMax{"cfgOccupancyMax", 999999., "maximum occupancy of tracks in neighbouring collisions in a given time range"};
72+
Configurable<float> cfgOccupancyMin{"cfgOccupancyMin", -100., "minimum occupancy of tracks in neighbouring collisions in a given time range"};
7373

7474
// Track Selection
7575
// General
@@ -137,6 +137,7 @@ struct kstarInOO {
137137
const AxisSpec axisDCAxy{binsDCAxy, "DCA_{XY}"};
138138

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

211230
using EventCandidates = soa::Join<aod::Collisions, aod::EvSels, aod::FT0Mults, aod::MultZeqs, aod::CentFT0Cs>; //, aod::CentFT0Ms, aod::CentFT0As
@@ -234,29 +253,57 @@ struct kstarInOO {
234253
bool eventSelection(const EventType event)
235254
{
236255
if (cfgEventCutQA) {
256+
histos.fill(HIST("hEvent_Cut"), 0);
237257
histos.fill(HIST("hPosZ_BC"), event.posZ());
238258
histos.fill(HIST("hcentFT0C_BC"), event.centFT0C());
239259
}
240260
if (!event.sel8())
241261
return false;
262+
if (cfgEventCutQA)
263+
histos.fill(HIST("hEvent_Cut"), 1);
264+
242265
if (std::abs(event.posZ()) > cfgEventVtxCut)
243266
return false;
267+
if (cfgEventCutQA)
268+
histos.fill(HIST("hEvent_Cut"), 2);
269+
244270
if (!event.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV))
245271
return false;
272+
if (cfgEventCutQA)
273+
histos.fill(HIST("hEvent_Cut"), 3);
274+
246275
if (!event.selection_bit(aod::evsel::kNoSameBunchPileup))
247276
return false;
277+
if (cfgEventCutQA)
278+
histos.fill(HIST("hEvent_Cut"), 4);
279+
248280
if (!event.selection_bit(aod::evsel::kNoTimeFrameBorder))
249281
return false;
282+
if (cfgEventCutQA)
283+
histos.fill(HIST("hEvent_Cut"), 5);
284+
250285
if (!event.selection_bit(aod::evsel::kNoITSROFrameBorder))
251286
return false;
287+
if (cfgEventCutQA)
288+
histos.fill(HIST("hEvent_Cut"), 6);
289+
252290
if (!event.selection_bit(aod::evsel::kNoCollInTimeRangeStandard))
253291
return false;
292+
if (cfgEventCutQA)
293+
histos.fill(HIST("hEvent_Cut"), 7);
294+
254295
if (!event.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll))
255296
return false;
297+
if (cfgEventCutQA)
298+
histos.fill(HIST("hEvent_Cut"), 8);
299+
256300
if (cfgOccupancySel && (event.trackOccupancyInTimeRange() > cfgOccupancyMax || event.trackOccupancyInTimeRange() < cfgOccupancyMin))
257301
return false;
302+
if (cfgEventCutQA)
303+
histos.fill(HIST("hEvent_Cut"), 9);
258304

259305
if (cfgEventCutQA) {
306+
histos.fill(HIST("hEvent_Cut"), 10);
260307
histos.fill(HIST("hPosZ_AC"), event.posZ());
261308
histos.fill(HIST("hcentFT0C_AC"), event.centFT0C());
262309
}
@@ -278,7 +325,6 @@ struct kstarInOO {
278325
histos.fill(HIST("hTPCChi2_BC"), track.tpcChi2NCl());
279326
histos.fill(HIST("QA_track_pT_BC"), track.pt());
280327
}
281-
282328
if (cfgTrackGlobalSel && !track.isGlobalTrack())
283329
return false;
284330
if (track.pt() < cfgTrackMinPt)

0 commit comments

Comments
 (0)