|
13 | 13 | /// \brief Analysis of cascades in pp collisions |
14 | 14 | /// \author Roman Nepeivoda (roman.nepeivoda@cern.ch) |
15 | 15 |
|
16 | | -#include <algorithm> |
17 | | -#include <vector> |
18 | | -#include <TPDGCode.h> |
| 16 | +#include "PWGLF/DataModel/cascqaanalysis.h" |
19 | 17 |
|
20 | | -#include "Framework/runDataProcessing.h" |
21 | | -#include "Framework/AnalysisTask.h" |
22 | | -#include "Common/DataModel/TrackSelectionTables.h" |
23 | 18 | #include "PWGLF/DataModel/LFStrangenessTables.h" |
| 19 | +#include "PWGLF/DataModel/mcCentrality.h" |
| 20 | +#include "PWGLF/Utils/inelGt.h" |
| 21 | + |
| 22 | +#include "Common/DataModel/Centrality.h" |
24 | 23 | #include "Common/DataModel/EventSelection.h" |
25 | | -#include "Common/DataModel/PIDResponse.h" |
26 | 24 | #include "Common/DataModel/Multiplicity.h" |
27 | | -#include "Common/DataModel/Centrality.h" |
28 | | -#include "PWGLF/DataModel/cascqaanalysis.h" |
29 | | -#include "TRandom2.h" |
| 25 | +#include "Common/DataModel/PIDResponse.h" |
| 26 | +#include "Common/DataModel/TrackSelectionTables.h" |
| 27 | + |
| 28 | +#include "Framework/AnalysisTask.h" |
30 | 29 | #include "Framework/O2DatabasePDGPlugin.h" |
31 | | -#include "PWGLF/Utils/inelGt.h" |
32 | | -#include "PWGLF/DataModel/mcCentrality.h" |
| 30 | +#include "Framework/runDataProcessing.h" |
| 31 | + |
| 32 | +#include "TRandom2.h" |
| 33 | +#include <TPDGCode.h> |
| 34 | + |
| 35 | +#include <algorithm> |
| 36 | +#include <string> |
| 37 | +#include <vector> |
33 | 38 |
|
34 | 39 | using namespace o2; |
35 | 40 | using namespace o2::framework; |
36 | 41 | using namespace o2::framework::expressions; |
| 42 | +using namespace o2::aod::rctsel; |
37 | 43 |
|
38 | 44 | // using DauTracks = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TracksCovIU, aod::TracksDCA, aod::pidTPCPi, aod::pidTPCPr, aod::pidTPCKa, aod::pidTOFPi, aod::pidTOFPr>; |
39 | 45 | using TrkPidInfo = soa::Join<aod::pidTPCFullPi, aod::pidTPCFullPr, aod::pidTPCFullKa, aod::pidTOFPi, aod::pidTOFPr, aod::pidTOFKa>; |
@@ -79,6 +85,14 @@ struct Cascqaanalysis { |
79 | 85 | Configurable<bool> isNoITSROFrameBorder{"isNoITSROFrameBorder", 1, "ITS ROF border cut"}; |
80 | 86 | Configurable<bool> isNoCollInTimeRangeNarrow{"isNoCollInTimeRangeNarrow", 1, "No collisions in +-2us window"}; |
81 | 87 |
|
| 88 | + Configurable<bool> requireRCTFlagChecker{"requireRCTFlagChecker", true, "Check event quality in run condition table"}; |
| 89 | + Configurable<std::string> cfgEvtRCTFlagCheckerLabel{"cfgEvtRCTFlagCheckerLabel", "CBT_hadronPID", "Evt sel: RCT flag checker label"}; |
| 90 | + Configurable<bool> cfgEvtRCTFlagCheckerZDCCheck{"cfgEvtRCTFlagCheckerZDCCheck", false, "Evt sel: RCT flag checker ZDC check"}; |
| 91 | + Configurable<bool> cfgEvtRCTFlagCheckerFV0Check{"cfgEvtRCTFlagCheckerFV0Check", false, "Evt sel: RCT flag checker FV0 check"}; |
| 92 | + Configurable<bool> cfgEvtRCTFlagCheckerLimitAcceptAsBad{"cfgEvtRCTFlagCheckerLimitAcceptAsBad", false, "Evt sel: RCT flag checker treat Limited Acceptance As Bad"}; |
| 93 | + |
| 94 | + RCTFlagsChecker rctChecker; |
| 95 | + |
82 | 96 | // Cascade selection criteria |
83 | 97 | Configurable<float> scalefactor{"scalefactor", 1.0, "Scaling factor"}; |
84 | 98 | Configurable<double> casccospa{"casccospa", 0.97, "Casc CosPA"}; |
@@ -119,9 +133,9 @@ struct Cascqaanalysis { |
119 | 133 | { |
120 | 134 | TString hCandidateCounterLabels[4] = {"All candidates", "passed topo cuts", "has associated MC particle", "associated with Xi(Omega)"}; |
121 | 135 | TString hNEventsMCLabels[6] = {"All", "z vrtx", "INEL", "INEL>0", "INEL>1", "Associated with rec. collision"}; |
122 | | - TString hNEventsLabels[13] = {"All", "kIsTriggerTVX", "kNoTimeFrameBorder", "kNoITSROFrameBorder", "kIsVertexITSTPC", "kNoSameBunchPileup", "kIsGoodZvtxFT0vsPV", "isVertexTOFmatched", "kNoCollInTimeRangeNarrow", "z vrtx", "INEL", "INEL>0", "INEL>1"}; |
| 136 | + TString hNEventsLabels[14] = {"All", "kIsTriggerTVX", "kNoTimeFrameBorder", "kNoITSROFrameBorder", "kIsVertexITSTPC", "kNoSameBunchPileup", "kIsGoodZvtxFT0vsPV", "isVertexTOFmatched", "kNoCollInTimeRangeNarrow", "z vrtx", "RCTFlagsChecker", "INEL", "INEL>0", "INEL>1"}; |
123 | 137 |
|
124 | | - registry.add("hNEvents", "hNEvents", {HistType::kTH1D, {{13, 0.f, 13.f}}}); |
| 138 | + registry.add("hNEvents", "hNEvents", {HistType::kTH1D, {{14, 0.f, 14.f}}}); |
125 | 139 |
|
126 | 140 | for (int n = 1; n <= registry.get<TH1>(HIST("hNEvents"))->GetNbinsX(); n++) { |
127 | 141 | registry.get<TH1>(HIST("hNEvents"))->GetXaxis()->SetBinLabel(n, hNEventsLabels[n - 1]); |
@@ -169,6 +183,11 @@ struct Cascqaanalysis { |
169 | 183 | registry.add("hFT0MFV0Asignal", "hFT0MFV0Asignal", {HistType::kTH2D, {signalFT0MAxis, signalFV0AAxis}}); |
170 | 184 | registry.add("hFT0MsignalPVContr", "hFT0MsignalPVContr", {HistType::kTH3D, {signalFT0MAxis, multNTracksAxis, eventTypeAxis}}); |
171 | 185 | } |
| 186 | + |
| 187 | + rctChecker.init(cfgEvtRCTFlagCheckerLabel, cfgEvtRCTFlagCheckerZDCCheck, cfgEvtRCTFlagCheckerLimitAcceptAsBad); |
| 188 | + if (cfgEvtRCTFlagCheckerFV0Check) { |
| 189 | + rctChecker.set(o2::aod::rctsel::kFV0Bad); |
| 190 | + } |
172 | 191 | } |
173 | 192 |
|
174 | 193 | Filter preFilter = |
@@ -256,14 +275,14 @@ struct Cascqaanalysis { |
256 | 275 | { |
257 | 276 | // 0 - INEL, 1 - INEL>0, 2 - INEL>1 |
258 | 277 | int evFlag = 0; |
259 | | - registry.fill(HIST("hNEvents"), 10.5); // INEL |
| 278 | + registry.fill(HIST("hNEvents"), 11.5); // INEL |
260 | 279 | if (collision.isInelGt0()) { |
261 | 280 | evFlag += 1; |
262 | | - registry.fill(HIST("hNEvents"), 11.5); // INEL>0 |
| 281 | + registry.fill(HIST("hNEvents"), 12.5); // INEL>0 |
263 | 282 | } |
264 | 283 | if (collision.isInelGt1()) { |
265 | 284 | evFlag += 1; |
266 | | - registry.fill(HIST("hNEvents"), 12.5); // INEL>1 |
| 285 | + registry.fill(HIST("hNEvents"), 13.5); // INEL>1 |
267 | 286 | } |
268 | 287 | return evFlag; |
269 | 288 | } |
@@ -347,6 +366,14 @@ struct Cascqaanalysis { |
347 | 366 | registry.fill(HIST("hZCollision"), collision.posZ()); |
348 | 367 | } |
349 | 368 |
|
| 369 | + // RCTFlagChecker selection |
| 370 | + if (requireRCTFlagChecker && !rctChecker(collision)) { |
| 371 | + return false; |
| 372 | + } |
| 373 | + if (isFillEventSelectionQA) { |
| 374 | + registry.fill(HIST("hNEvents"), 10.5); |
| 375 | + } |
| 376 | + |
350 | 377 | return true; |
351 | 378 | } |
352 | 379 |
|
@@ -483,15 +510,15 @@ struct Cascqaanalysis { |
483 | 510 | uint16_t nchFV0 = getGenNchInFV0Aregion(mcPartSlice); |
484 | 511 |
|
485 | 512 | int evType = 0; |
486 | | - registry.fill(HIST("hNEvents"), 10.5); // INEL |
| 513 | + registry.fill(HIST("hNEvents"), 11.5); // INEL |
487 | 514 | // Rec. collision associated with INEL>0 gen. one |
488 | 515 | if (pwglf::isINELgtNmc(mcPartSlice, 0, pdgDB)) { |
489 | | - registry.fill(HIST("hNEvents"), 11.5); // INEL |
| 516 | + registry.fill(HIST("hNEvents"), 12.5); // INEL |
490 | 517 | evType++; |
491 | 518 | } |
492 | 519 | // Rec. collision associated with INEL>1 gen. one |
493 | 520 | if (pwglf::isINELgtNmc(mcPartSlice, 1, pdgDB)) { |
494 | | - registry.fill(HIST("hNEvents"), 12.5); // INEL |
| 521 | + registry.fill(HIST("hNEvents"), 13.5); // INEL |
495 | 522 | evType++; |
496 | 523 | } |
497 | 524 |
|
|
0 commit comments