Skip to content

Commit 987c5d6

Browse files
committed
PWGEM/Dilepton: update matchingMFT.cxx
1 parent 38e881f commit 987c5d6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

PWGEM/Dilepton/Tasks/matchingMFT.cxx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include "Common/DataModel/EventSelection.h"
4040
#include "Common/DataModel/Multiplicity.h"
4141
#include "Common/DataModel/Centrality.h"
42+
#include "Common/CCDB/RCTSelectionFlags.h"
4243

4344
using namespace o2;
4445
using namespace o2::soa;
@@ -86,6 +87,14 @@ struct matchingMFT {
8687
Configurable<float> cfgZvtxMin{"cfgZvtxMin", -10.f, "min. Zvtx"};
8788
Configurable<float> cfgZvtxMax{"cfgZvtxMax", 10.f, "max. Zvtx"};
8889

90+
// for RCT
91+
Configurable<bool> cfgRequireGoodRCT{"cfgRequireGoodRCT", false, "require good detector flag in run condtion table"};
92+
Configurable<std::string> cfgRCTLabel{"cfgRCTLabel", "CBT_muon_glo", "select 1 [CBT, CBT_hadron, CBT_muon_glo] see O2Physics/Common/CCDB/RCTSelectionFlags.h"};
93+
Configurable<bool> cfgCheckZDC{"cfgCheckZDC", false, "set ZDC flag for PbPb"};
94+
Configurable<bool> cfgTreatLimitedAcceptanceAsBad{"cfgTreatLimitedAcceptanceAsBad", false, "reject all events where the detectors relevant for the specified Runlist are flagged as LimitedAcceptance"};
95+
96+
o2::aod::rctsel::RCTFlagsChecker rctChecker;
97+
8998
HistogramRegistry fRegistry{"fRegistry"};
9099
static constexpr std::string_view muon_types[5] = {"MFTMCHMID/", "MFTMCHMIDOtherMatch/", "MFTMCH/", "MCHMID/", "MCH/"};
91100

@@ -100,6 +109,7 @@ struct matchingMFT {
100109
ccdb->setLocalObjectValidityChecking();
101110
ccdb->setFatalWhenNull(false);
102111
ccdbApi.init(ccdburl);
112+
rctChecker.init(cfgRCTLabel.value, cfgCheckZDC.value, cfgTreatLimitedAcceptanceAsBad.value);
103113

104114
addHistograms();
105115
}
@@ -609,6 +619,9 @@ struct matchingMFT {
609619
if (!collision.has_mcCollision()) {
610620
continue;
611621
}
622+
if (cfgRequireGoodRCT && !rctChecker.checkTable(collision)) {
623+
continue;
624+
}
612625
const float centralities[3] = {collision.centFT0M(), collision.centFT0A(), collision.centFT0C()};
613626
if (centralities[cfgCentEstimator] < cfgCentMin || cfgCentMax < centralities[cfgCentEstimator]) {
614627
continue;
@@ -637,6 +650,9 @@ struct matchingMFT {
637650
if (!collision.has_mcCollision()) {
638651
continue;
639652
}
653+
if (cfgRequireGoodRCT && !rctChecker.checkTable(collision)) {
654+
continue;
655+
}
640656
const float centralities[3] = {collision.centFT0M(), collision.centFT0A(), collision.centFT0C()};
641657
if (centralities[cfgCentEstimator] < cfgCentMin || cfgCentMax < centralities[cfgCentEstimator]) {
642658
continue;

0 commit comments

Comments
 (0)