Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion PWGCF/TableProducer/dptDptFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,9 @@ struct DptDptFilter {
std::string prefix = "cfgEventSelection";
Configurable<int64_t> minOrbit{"minOrbit", -1, "Lowest orbit to track"};
Configurable<int64_t> maxOrbit{"maxOrbit", INT64_MAX, "Highest orbit to track"};
Configurable<std::string> rctSource{"rctSource", "None", "RCT selection source: None,CBT,CBT_hadronPID,CBT_electronPID,CBT_calo,CBT_muon,CBT_muon_glo. Default: None"};
struct : ConfigurableGroup {
std::string prefix = "cfgOccupancySelection";
std::string prefix = "cfgEventSelection.cfgOccupancySelection";
Configurable<std::string> cfgOccupancyEstimation{"cfgOccupancyEstimation", "None", "Occupancy estimation: None, Tracks, FT0C. Default None"};
Configurable<float> cfgMinOccupancy{"cfgMinOccupancy", 0.0f, "Minimum allowed occupancy. Depends on the occupancy estimation"};
Configurable<float> cfgMaxOccupancy{"cfgMaxOccupancy", 1e6f, "Maximum allowed occupancy. Depends on the occupancy estimation"};
Expand Down Expand Up @@ -418,6 +419,15 @@ struct DptDptFilter {
} else {
fCentMultEstimator = getCentMultEstimator(cfgCentMultEstimator);
}
/* RCT information usage */
if (cfgEventSelection.rctSource.value == "None") {
useRctInformation = false;
} else {
/* for the time being we don't require ZDC and treat limited acceptance as faulty */
rctChecker.init(cfgEventSelection.rctSource.value, false, true);
useRctInformation = true;
}

/* the occupancy selection */
fOccupancyEstimation = getOccupancyEstimator(cfgEventSelection.cfgOccupancySelection.cfgOccupancyEstimation);
fMinOccupancy = cfgEventSelection.cfgOccupancySelection.cfgMinOccupancy;
Expand Down
26 changes: 25 additions & 1 deletion PWGCF/TableProducer/dptDptFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "PWGCF/Core/AnalysisConfigurableCuts.h"

#include "Common/CCDB/RCTSelectionFlags.h"
#include "Common/Core/MetadataHelper.h"
#include "Common/Core/RecoDecay.h"
#include "Common/Core/TrackSelection.h"
Expand Down Expand Up @@ -212,6 +213,7 @@ enum CollisionSelectionFlags {
CollSelINT7BIT, ///< INT7 Run 1/2
CollSelSEL7BIT, ///< Sel7 Run 1/2
CollSelTRIGGSELBIT, ///< Accepted by trigger selection
CollSelRCTBIT, ///< Accetped by the RCT information
CollSelOCCUPANCYBIT, ///< occupancy within limits
CollSelCENTRALITYBIT, ///< centrality cut passed
CollSelZVERTEXBIT, ///< zvtx cut passed
Expand All @@ -227,6 +229,7 @@ static const std::map<int, std::string> collisionSelectionExternalNamesMap{
{CollSelINT7BIT, "INT7"},
{CollSelSEL7BIT, "Sel7"},
{CollSelTRIGGSELBIT, "Trigger selection"},
{CollSelRCTBIT, "RCT accepted"},
{CollSelOCCUPANCYBIT, "Occupancy"},
{CollSelCENTRALITYBIT, "Centrality"},
{CollSelZVERTEXBIT, "z vertex"},
Expand Down Expand Up @@ -270,6 +273,12 @@ std::bitset<32> triggerSelectionFlags;
//============================================================================================
o2::common::core::MetadataHelper metadataInfo;

//============================================================================================
// The RCT information access
//============================================================================================
bool useRctInformation = false;
o2::aod::rctsel::RCTFlagsChecker rctChecker;

//============================================================================================
// The DptDptFilter configuration objects
//============================================================================================
Expand Down Expand Up @@ -1155,6 +1164,21 @@ inline bool isEventSelected(CollisionObject const& collision, float& centormult)

bool trigsel = triggerSelection(collision);

bool rctsel = false;
if (useRctInformation) {
if constexpr (framework::has_type_v<aod::evsel::Rct, typename CollisionObject::all_columns>) {
if (rctChecker.checkTable(collision)) {
rctsel = true;
collisionFlags.set(CollSelRCTBIT);
}
} else {
LOGF(fatal, "RCT check required but the dataset does not have RCT information associated. Please, fix it");
}
} else {
collisionFlags.set(CollSelRCTBIT);
rctsel = true;
}

bool occupancysel = occupancySelection(collision);

bool zvtxsel = false;
Expand All @@ -1174,7 +1198,7 @@ inline bool isEventSelected(CollisionObject const& collision, float& centormult)

bool centmultsel = centralitySelection(collision, centormult);

bool accepted = trigsel && occupancysel && zvtxsel && centmultsel;
bool accepted = trigsel && rctsel && occupancysel && zvtxsel && centmultsel;

if (accepted) {
collisionFlags.set(CollSelSELECTED);
Expand Down
Loading