|
16 | 16 | /// \modified by Roman Nepeivoda (roman.nepeivoda@cern.ch) |
17 | 17 | /// \since June 1, 2023 |
18 | 18 |
|
| 19 | +#include <algorithm> |
| 20 | +#include <vector> |
| 21 | + |
19 | 22 | #include "Framework/runDataProcessing.h" |
20 | 23 | #include "Framework/AnalysisTask.h" |
21 | 24 | #include "Common/DataModel/TrackSelectionTables.h" |
@@ -57,6 +60,7 @@ struct cascqaanalysis { |
57 | 60 | Configurable<bool> isTriggerTVX{"isTriggerTVX", 1, "TVX trigger"}; |
58 | 61 | Configurable<bool> isNoTimeFrameBorder{"isNoTimeFrameBorder", 1, "TF border cut"}; |
59 | 62 | Configurable<bool> isNoITSROFrameBorder{"isNoITSROFrameBorder", 1, "ITS ROF border cut"}; |
| 63 | + Configurable<bool> isNoCollInTimeRangeNarrow{"isNoCollInTimeRangeNarrow", 1, "No collisions in +-2us window"}; |
60 | 64 |
|
61 | 65 | // Cascade selection criteria |
62 | 66 | Configurable<float> scalefactor{"scalefactor", 1.0, "Scaling factor"}; |
@@ -115,9 +119,9 @@ struct cascqaanalysis { |
115 | 119 |
|
116 | 120 | TString hCandidateCounterLabels[4] = {"All candidates", "passed topo cuts", "has associated MC particle", "associated with Xi(Omega)"}; |
117 | 121 | TString hNEventsMCLabels[6] = {"All", "z vrtx", "INEL", "INEL>0", "INEL>1", "Associated with rec. collision"}; |
118 | | - TString hNEventsLabels[12] = {"All", "kIsTriggerTVX", "kNoTimeFrameBorder", "kNoITSROFrameBorder", "kIsVertexITSTPC", "kNoSameBunchPileup", "kIsGoodZvtxFT0vsPV", "isVertexTOFmatched", "z vrtx", "INEL", "INEL>0", "INEL>1"}; |
| 122 | + TString hNEventsLabels[13] = {"All", "kIsTriggerTVX", "kNoTimeFrameBorder", "kNoITSROFrameBorder", "kIsVertexITSTPC", "kNoSameBunchPileup", "kIsGoodZvtxFT0vsPV", "isVertexTOFmatched", "kNoCollInTimeRangeNarrow", "z vrtx", "INEL", "INEL>0", "INEL>1"}; |
119 | 123 |
|
120 | | - registry.add("hNEvents", "hNEvents", {HistType::kTH1F, {{12, 0.f, 12.f}}}); |
| 124 | + registry.add("hNEvents", "hNEvents", {HistType::kTH1F, {{13, 0.f, 13.f}}}); |
121 | 125 |
|
122 | 126 | for (Int_t n = 1; n <= registry.get<TH1>(HIST("hNEvents"))->GetNbinsX(); n++) { |
123 | 127 | registry.get<TH1>(HIST("hNEvents"))->GetXaxis()->SetBinLabel(n, hNEventsLabels[n - 1]); |
@@ -174,7 +178,7 @@ struct cascqaanalysis { |
174 | 178 | aod::cascdata::dcaV0daughters < dcav0dau && |
175 | 179 | aod::cascdata::dcacascdaughters < dcacascdau); |
176 | 180 |
|
177 | | - Partition<DauTracks> pvContribTracksIUEta1 = (nabs(aod::track::eta) < 1.0f) && ((aod::track::flags & (uint32_t)o2::aod::track::PVContributor) == (uint32_t)o2::aod::track::PVContributor); |
| 181 | + Partition<DauTracks> pvContribTracksIUEta1 = (nabs(aod::track::eta) < 1.0f) && ((aod::track::flags & static_cast<uint32_t>(o2::aod::track::PVContributor)) == static_cast<uint32_t>(o2::aod::track::PVContributor)); |
178 | 182 | Partition<DauTracks> globalTracksIUEta05 = (nabs(aod::track::eta) < 0.5f) && (requireGlobalTrackInFilter()); |
179 | 183 |
|
180 | 184 | template <class TCascTracksTo, typename TCascade> |
@@ -252,14 +256,14 @@ struct cascqaanalysis { |
252 | 256 | { |
253 | 257 | // 0 - INEL, 1 - INEL>0, 2 - INEL>1 |
254 | 258 | int evFlag = 0; |
255 | | - registry.fill(HIST("hNEvents"), 9.5); // INEL |
| 259 | + registry.fill(HIST("hNEvents"), 10.5); // INEL |
256 | 260 | if (collision.isInelGt0()) { |
257 | 261 | evFlag += 1; |
258 | | - registry.fill(HIST("hNEvents"), 10.5); // INEL>0 |
| 262 | + registry.fill(HIST("hNEvents"), 11.5); // INEL>0 |
259 | 263 | } |
260 | 264 | if (collision.isInelGt1()) { |
261 | 265 | evFlag += 1; |
262 | | - registry.fill(HIST("hNEvents"), 11.5); // INEL>1 |
| 266 | + registry.fill(HIST("hNEvents"), 12.5); // INEL>1 |
263 | 267 | } |
264 | 268 | return evFlag; |
265 | 269 | } |
@@ -326,13 +330,20 @@ struct cascqaanalysis { |
326 | 330 | if (isFillEventSelectionQA) { |
327 | 331 | registry.fill(HIST("hNEvents"), 7.5); |
328 | 332 | } |
| 333 | + // kNoCollInTimeRangeNarrow selection |
| 334 | + if (isNoCollInTimeRangeNarrow && !collision.selection_bit(aod::evsel::kNoCollInTimeRangeNarrow)) { |
| 335 | + return false; |
| 336 | + } |
| 337 | + if (isFillEventSelectionQA) { |
| 338 | + registry.fill(HIST("hNEvents"), 8.5); |
| 339 | + } |
329 | 340 |
|
330 | 341 | // Z vertex selection |
331 | 342 | if (TMath::Abs(collision.posZ()) > cutzvertex) { |
332 | 343 | return false; |
333 | 344 | } |
334 | 345 | if (isFillEventSelectionQA) { |
335 | | - registry.fill(HIST("hNEvents"), 8.5); |
| 346 | + registry.fill(HIST("hNEvents"), 9.5); |
336 | 347 | registry.fill(HIST("hZCollision"), collision.posZ()); |
337 | 348 | } |
338 | 349 |
|
@@ -472,15 +483,15 @@ struct cascqaanalysis { |
472 | 483 | uint16_t nchFV0 = GetGenNchInFV0Aregion(mcPartSlice); |
473 | 484 |
|
474 | 485 | int evType = 0; |
475 | | - registry.fill(HIST("hNEvents"), 9.5); // INEL |
| 486 | + registry.fill(HIST("hNEvents"), 10.5); // INEL |
476 | 487 | // Rec. collision associated with INEL>0 gen. one |
477 | 488 | if (pwglf::isINELgtNmc(mcPartSlice, 0, pdgDB)) { |
478 | | - registry.fill(HIST("hNEvents"), 10.5); // INEL |
| 489 | + registry.fill(HIST("hNEvents"), 11.5); // INEL |
479 | 490 | evType++; |
480 | 491 | } |
481 | 492 | // Rec. collision associated with INEL>1 gen. one |
482 | 493 | if (pwglf::isINELgtNmc(mcPartSlice, 1, pdgDB)) { |
483 | | - registry.fill(HIST("hNEvents"), 11.5); // INEL |
| 494 | + registry.fill(HIST("hNEvents"), 12.5); // INEL |
484 | 495 | evType++; |
485 | 496 | } |
486 | 497 |
|
|
0 commit comments