|
17 | 17 | #include "PWGLF/DataModel/LFStrangenessTables.h" |
18 | 18 |
|
19 | 19 | #include "Common/CCDB/EventSelectionParams.h" |
| 20 | +#include "Common/CCDB/RCTSelectionFlags.h" |
20 | 21 | #include "Common/CCDB/TriggerAliases.h" |
21 | 22 | #include "Common/CCDB/ctpRateFetcher.h" |
22 | 23 | #include "Common/Core/RecoDecay.h" |
@@ -85,6 +86,15 @@ struct Derivedcascadeanalysis { |
85 | 86 | Configurable<std::string> irSource{"irSource", "T0VTX", "Estimator of the interaction rate (Recommended: pp --> T0VTX, Pb-Pb --> ZNC hadronic)"}; |
86 | 87 | Configurable<std::string> ccdburl{"ccdburl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; |
87 | 88 |
|
| 89 | + o2::aod::rctsel::RCTFlagsChecker rctFlagsChecker{rctConfigurations.cfgRCTLabel.value}; |
| 90 | + |
| 91 | + struct : ConfigurableGroup { |
| 92 | + std::string prefix = "rctConfigurations"; // JSON group name |
| 93 | + Configurable<std::string> cfgRCTLabel{"cfgRCTLabel", "", "Which detector condition requirements? (CBT, CBT_hadronPID, CBT_electronPID, CBT_calo, CBT_muon, CBT_muon_glo)"}; |
| 94 | + Configurable<bool> cfgCheckZDC{"cfgCheckZDC", false, "Include ZDC flags in the bit selection (for Pb-Pb only)"}; |
| 95 | + Configurable<bool> cfgTreatLimitedAcceptanceAsBad{"cfgTreatLimitedAcceptanceAsBad", false, "reject all events where the detectors relevant for the specified Runlist are flagged as LimitedAcceptance"}; |
| 96 | + } rctConfigurations; |
| 97 | + |
88 | 98 | struct : ConfigurableGroup { |
89 | 99 | std::string prefix = "qa"; |
90 | 100 | Configurable<bool> doFillNsigmaTPCHistPionBach{"doFillNsigmaTPCHistPionBach", false, ""}; |
@@ -114,6 +124,7 @@ struct Derivedcascadeanalysis { |
114 | 124 | Configurable<bool> doNoCollInRofStandardCut{"doNoCollInRofStandardCut", true, "Enable an evevnt selection which rejects a collision if there are other events within the same ITS ROF with mult above threshold"}; |
115 | 125 | Configurable<bool> doMultiplicityCorrCut{"doMultiplicityCorrCut", false, "Enable multiplicity vs centrality correlation cut"}; |
116 | 126 | Configurable<bool> doITSallLayersCut{"doITSallLayersCut", false, "Enable event selection which rejects collisions when ITS was rebooting."}; |
| 127 | + Configurable<bool> doCBTselection{"doCBTselection", true, "Require only events with good PID (CBT_hadronPID)"}; |
117 | 128 | Configurable<int> minOccupancy{"minOccupancy", -1, "Minimal occupancy"}; |
118 | 129 | Configurable<int> maxOccupancy{"maxOccupancy", -1, "Maximal occupancy"}; |
119 | 130 | Configurable<float> minOccupancyFT0{"minOccupancyFT0", -1, "Minimal occupancy"}; |
@@ -311,13 +322,15 @@ struct Derivedcascadeanalysis { |
311 | 322 | SETBIT(selectionCheckMask, 11); |
312 | 323 | } |
313 | 324 |
|
| 325 | + rctFlagsChecker.init(rctConfigurations.cfgRCTLabel.value, rctConfigurations.cfgCheckZDC, rctConfigurations.cfgTreatLimitedAcceptanceAsBad); |
| 326 | + |
314 | 327 | histos.add("hEventVertexZ", "hEventVertexZ", kTH1F, {vertexZ}); |
315 | 328 | histos.add("hEventMultFt0C", "", kTH1F, {{500, 0, 5000}}); |
316 | 329 | histos.add("hEventCentrality", "hEventCentrality", kTH1F, {{101, 0, 101}}); |
317 | 330 |
|
318 | 331 | histos.add("hEventSelection", "hEventSelection", kTH1F, {{22, 0, 22}}); |
319 | 332 | // TODO adjust labels |
320 | | - std::array<TString, 22> eventSelLabelRun3 = {"all", "sel8", "TVX", "PV_{z}", "cent", "kNoSameBunchPileup", "kIsGoodZvtxFT0vsPV", "kIsVertexITSTPC", "kIsVertexTOFmatched", "kIsVertexTRDmatched", "kNoITSROFrameBorder", "kNoTimeFrameBorder", "MultCorrCut", "kNoCollInTimeRangeStrict", "kNoCollInTimeRangeStandard", "min Occup", "mxOccup", "kNoCollInRofStrict", "kNoCollInRofStandard", "kIsGoodITSLayersAll", "occupFt0", "-"}; |
| 333 | + std::array<TString, 22> eventSelLabelRun3 = {"all", "sel8", "TVX", "PV_{z}", "cent", "kNoSameBunchPileup", "kIsGoodZvtxFT0vsPV", "kIsVertexITSTPC", "kIsVertexTOFmatched", "kIsVertexTRDmatched", "kNoITSROFrameBorder", "kNoTimeFrameBorder", "MultCorrCut", "kNoCollInTimeRangeStrict", "kNoCollInTimeRangeStandard", "min Occup", "mxOccup", "kNoCollInRofStrict", "kNoCollInRofStandard", "kIsGoodITSLayersAll", "occupFt0", "CBT sel"}; |
321 | 334 | std::array<TString, 22> eventSelLabelRun2 = {"all", "sel8", "TVX", "PV_{z}", "cent", "sel7", "kINT7", "kNoIncompleteDAQ", "kNoInconsistentVtx", "kNoPileupFromSPD", "kNoV0PFPileup", "kNoPileupInMultBins", "kNoPileupMV", "kNoPileupTPC", "kNoV0MOnVsOfPileup", "kNoSPDOnVsOfPileup", "kNoSPDClsVsTklBG", "INEL0", "-", "-", "-", "-"}; |
322 | 335 | for (int i = 1; i <= histos.get<TH1>(HIST("hEventSelection"))->GetNbinsX(); i++) { |
323 | 336 | if (doprocessCascades || doprocessCascadesMCrec || doprocessCascadesMCforEff) { |
@@ -798,6 +811,13 @@ struct Derivedcascadeanalysis { |
798 | 811 | } |
799 | 812 |
|
800 | 813 | interactionRate = rateFetcher.fetch(ccdb.service, coll.timestamp(), coll.runNumber(), irSource) * 1.e-3; |
| 814 | + |
| 815 | + if (eventSelectionRun3Flags.doCBTselection && !rctConfigurations.cfgRCTLabel.value.empty() && !rctFlagsChecker(coll)) { |
| 816 | + return false; |
| 817 | + } |
| 818 | + if (fillHists) { |
| 819 | + histos.fill(HIST("hEventSelection"), 21.5 /* Pass CBT condition */); |
| 820 | + } |
801 | 821 | } else { |
802 | 822 | centrality = eventSelectionRun2Flags.useSPDTrackletsCent ? coll.centRun2SPDTracklets() : coll.centRun2V0M(); |
803 | 823 |
|
|
0 commit comments