1818
1919#include " PWGCF/Core/AnalysisConfigurableCuts.h"
2020
21+ #include " Common/CCDB/RCTSelectionFlags.h"
2122#include " Common/Core/MetadataHelper.h"
2223#include " Common/Core/RecoDecay.h"
2324#include " Common/Core/TrackSelection.h"
@@ -212,6 +213,7 @@ enum CollisionSelectionFlags {
212213 CollSelINT7BIT, // /< INT7 Run 1/2
213214 CollSelSEL7BIT, // /< Sel7 Run 1/2
214215 CollSelTRIGGSELBIT, // /< Accepted by trigger selection
216+ CollSelRCTBIT, // /< Accetped by the RCT information
215217 CollSelOCCUPANCYBIT, // /< occupancy within limits
216218 CollSelCENTRALITYBIT, // /< centrality cut passed
217219 CollSelZVERTEXBIT, // /< zvtx cut passed
@@ -227,6 +229,7 @@ static const std::map<int, std::string> collisionSelectionExternalNamesMap{
227229 {CollSelINT7BIT, " INT7" },
228230 {CollSelSEL7BIT, " Sel7" },
229231 {CollSelTRIGGSELBIT, " Trigger selection" },
232+ {CollSelRCTBIT, " RCT accepted" },
230233 {CollSelOCCUPANCYBIT, " Occupancy" },
231234 {CollSelCENTRALITYBIT, " Centrality" },
232235 {CollSelZVERTEXBIT, " z vertex" },
@@ -270,6 +273,12 @@ std::bitset<32> triggerSelectionFlags;
270273// ============================================================================================
271274o2::common::core::MetadataHelper metadataInfo;
272275
276+ // ============================================================================================
277+ // The RCT information access
278+ // ============================================================================================
279+ bool useRctInformation = false ;
280+ o2::aod::rctsel::RCTFlagsChecker rctChecker;
281+
273282// ============================================================================================
274283// The DptDptFilter configuration objects
275284// ============================================================================================
@@ -1155,6 +1164,21 @@ inline bool isEventSelected(CollisionObject const& collision, float& centormult)
11551164
11561165 bool trigsel = triggerSelection (collision);
11571166
1167+ bool rctsel = false ;
1168+ if (useRctInformation) {
1169+ if constexpr (framework::has_type_v<aod::evsel::Rct, typename CollisionObject::all_columns>) {
1170+ if (rctChecker.checkTable (collision)) {
1171+ rctsel = true ;
1172+ collisionFlags.set (CollSelRCTBIT);
1173+ }
1174+ } else {
1175+ LOGF (fatal, " RCT check required but the dataset does not have RCT information associated. Please, fix it" );
1176+ }
1177+ } else {
1178+ collisionFlags.set (CollSelRCTBIT);
1179+ rctsel = true ;
1180+ }
1181+
11581182 bool occupancysel = occupancySelection (collision);
11591183
11601184 bool zvtxsel = false ;
@@ -1174,7 +1198,7 @@ inline bool isEventSelected(CollisionObject const& collision, float& centormult)
11741198
11751199 bool centmultsel = centralitySelection (collision, centormult);
11761200
1177- bool accepted = trigsel && occupancysel && zvtxsel && centmultsel;
1201+ bool accepted = trigsel && rctsel && occupancysel && zvtxsel && centmultsel;
11781202
11791203 if (accepted) {
11801204 collisionFlags.set (CollSelSELECTED);
0 commit comments