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
28 changes: 28 additions & 0 deletions PWGLF/TableProducer/Resonances/resonanceInitializer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
using namespace o2::soa;
using namespace o2::constants::physics;
using namespace o2::constants::math;
using namespace o2::aod::rctsel;

/// Initializer for the resonance candidate producers
struct ResonanceInitializer {
Expand Down Expand Up @@ -103,6 +104,7 @@

/// Event cuts
o2::analysis::CollisonCuts colCuts;

struct : ConfigurableGroup {
Configurable<float> cfgEvtZvtx{"cfgEvtZvtx", 10.f, "Evt sel: Max. z-Vertex (cm)"};
Configurable<int> cfgEvtOccupancyInTimeRangeMax{"cfgEvtOccupancyInTimeRangeMax", -1, "Evt sel: maximum track occupancy"};
Expand All @@ -118,7 +120,12 @@
Configurable<bool> cfgEvtCollInTimeRangeStandard{"cfgEvtCollInTimeRangeStandard", false, "Evt sel: apply NoCollInTimeRangeStandard"};
Configurable<bool> cfgEvtRun2AliEventCuts{"cfgEvtRun2AliEventCuts", true, "Evt sel: apply Run2 AliEventCuts"};
Configurable<bool> cfgEvtRun2INELgtZERO{"cfgEvtRun2INELgtZERO", false, "Evt sel: apply Run2 INELgtZERO"};
Configurable<bool> cfgEvtUseRCTFlagChecker{"cfgEvtUseRCTFlagChecker", false, "Evt sel: use RCT flag checker"};
Configurable<std::string> cfgEvtRCTFlagCheckerLabel{"cfgEvtRCTFlagCheckerLabel", "CBT_hadronPID", "Evt sel: RCT flag checker label"};
Configurable<bool> cfgEvtRCTFlagCheckerZDCCheck{"cfgEvtRCTFlagCheckerZDCCheck", false, "Evt sel: RCT flag checker ZDC check"};
Configurable<bool> cfgEvtRCTFlagCheckerLimitAcceptAsBad{"cfgEvtRCTFlagCheckerLimitAcceptAsBad", false, "Evt sel: RCT flag checker treat Limited Acceptance As Bad"};
} EventCuts;
RCTFlagsChecker rctChecker;

Configurable<std::string> cfgMultName{"cfgMultName", "FT0M", "The name of multiplicity estimator"};

Expand Down Expand Up @@ -216,16 +223,16 @@
int evtPlDetId = cfgEvtPl - evtPlRefAId * 10000 - evtPlRefBId * 100;

// MC Resonance parent filter
Partition<aod::McParticles> selectedMCParticles = (nabs(aod::mcparticle::pdgCode) == 313) // K*

Check warning on line 226 in PWGLF/TableProducer/Resonances/resonanceInitializer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
|| (nabs(aod::mcparticle::pdgCode) == 323) // K*pm

Check warning on line 227 in PWGLF/TableProducer/Resonances/resonanceInitializer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
|| (nabs(aod::mcparticle::pdgCode) == 333) // phi

Check warning on line 228 in PWGLF/TableProducer/Resonances/resonanceInitializer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
|| (nabs(aod::mcparticle::pdgCode) == 9010221) // f_0(980)

Check warning on line 229 in PWGLF/TableProducer/Resonances/resonanceInitializer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
|| (nabs(aod::mcparticle::pdgCode) == 10221) // f_0(1370)

Check warning on line 230 in PWGLF/TableProducer/Resonances/resonanceInitializer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
|| (nabs(aod::mcparticle::pdgCode) == 9030221) // f_0(1500)

Check warning on line 231 in PWGLF/TableProducer/Resonances/resonanceInitializer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
|| (nabs(aod::mcparticle::pdgCode) == 10331) // f_0(1710)

Check warning on line 232 in PWGLF/TableProducer/Resonances/resonanceInitializer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
|| (nabs(aod::mcparticle::pdgCode) == 20223) // f_1(1285)

Check warning on line 233 in PWGLF/TableProducer/Resonances/resonanceInitializer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
|| (nabs(aod::mcparticle::pdgCode) == 20333) // f_1(1420)

Check warning on line 234 in PWGLF/TableProducer/Resonances/resonanceInitializer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
|| (nabs(aod::mcparticle::pdgCode) == 335) // f_1(1525)

Check warning on line 235 in PWGLF/TableProducer/Resonances/resonanceInitializer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
|| (nabs(aod::mcparticle::pdgCode) == 113) // rho(770)
|| (nabs(aod::mcparticle::pdgCode) == 213) // rho(770)pm
|| (nabs(aod::mcparticle::pdgCode) == 3224) // Sigma(1385)+
Expand Down Expand Up @@ -1202,6 +1209,9 @@
colCuts.setApplyRun2AliEventCuts(EventCuts.cfgEvtRun2AliEventCuts);
colCuts.setApplyRun2INELgtZERO(EventCuts.cfgEvtRun2INELgtZERO);
colCuts.printCuts();

rctChecker.init(EventCuts.cfgEvtRCTFlagCheckerLabel, EventCuts.cfgEvtRCTFlagCheckerZDCCheck, EventCuts.cfgEvtRCTFlagCheckerLimitAcceptAsBad);

if (!cfgBypassCCDB) {
ccdb->setURL(ccdbURL.value);
ccdb->setCaching(true);
Expand Down Expand Up @@ -1287,6 +1297,8 @@
// Default event selection
if (!colCuts.isSelected(collision))
return;
if (EventCuts.cfgEvtUseRCTFlagChecker && !rctChecker(collision))
return;
colCuts.fillQA(collision);

resoCollisions(0, collision.posX(), collision.posY(), collision.posZ(), centEst(collision), dBz);
Expand All @@ -1311,6 +1323,8 @@
// Default event selection
if (!colCuts.isSelected(collision))
return;
if (EventCuts.cfgEvtUseRCTFlagChecker && !rctChecker(collision))
return;
colCuts.fillQARun2(collision);

resoCollisions(0, collision.posX(), collision.posY(), collision.posZ(), collision.centRun2V0M(), dBz);
Expand All @@ -1336,6 +1350,8 @@
// Default event selection
if (!colCuts.isSelected(collision))
return;
if (EventCuts.cfgEvtUseRCTFlagChecker && !rctChecker(collision))
return;
colCuts.fillQA(collision);

resoCollisions(0, collision.posX(), collision.posY(), collision.posZ(), centEst(collision), dBz);
Expand All @@ -1361,6 +1377,8 @@
// Default event selection
if (!colCuts.isSelected(collision))
return;
if (EventCuts.cfgEvtUseRCTFlagChecker && !rctChecker(collision))
return;
colCuts.fillQA(collision);

resoCollisions(0, collision.posX(), collision.posY(), collision.posZ(), centEst(collision), dBz);
Expand Down Expand Up @@ -1415,6 +1433,8 @@
// Default event selection
if (!colCuts.isSelected(collision))
return;
if (EventCuts.cfgEvtUseRCTFlagChecker && !rctChecker(collision))
return;
colCuts.fillQA(collision);

resoCollisions(0, collision.posX(), collision.posY(), collision.posZ(), centEst(collision), dBz);
Expand Down Expand Up @@ -1467,6 +1487,8 @@
{
auto bc = collision.bc_as<aod::BCsWithTimestamps>(); /// adding timestamp to access magnetic field later
initCCDB(bc);
if (EventCuts.cfgEvtUseRCTFlagChecker && !rctChecker(collision))
return;
colCuts.fillQA(collision);

resoCollisions(0, collision.posX(), collision.posY(), collision.posZ(), centEst(collision), dBz);
Expand Down Expand Up @@ -1497,6 +1519,8 @@
{
auto bc = collision.bc_as<aod::BCsWithTimestamps>(); /// adding timestamp to access magnetic field later
initCCDB(bc);
if (EventCuts.cfgEvtUseRCTFlagChecker && !rctChecker(collision))
return;
colCuts.fillQA(collision);

resoCollisions(0, collision.posX(), collision.posY(), collision.posZ(), centEst(collision), dBz);
Expand Down Expand Up @@ -1552,6 +1576,8 @@
{
auto bc = collision.bc_as<aod::BCsWithTimestamps>(); /// adding timestamp to access magnetic field later
initCCDB(bc);
if (EventCuts.cfgEvtUseRCTFlagChecker && !rctChecker(collision))
return;
colCuts.fillQA(collision);

resoCollisions(0, collision.posX(), collision.posY(), collision.posZ(), centEst(collision), dBz);
Expand Down Expand Up @@ -1612,6 +1638,8 @@
{
auto bc = collision.bc_as<aod::BCsWithTimestamps>(); /// adding timestamp to access magnetic field later
initCCDB(bc);
if (EventCuts.cfgEvtUseRCTFlagChecker && !rctChecker(collision))
return;
colCuts.fillQA(collision);

resoCollisions(0, collision.posX(), collision.posY(), collision.posZ(), centEst(collision), dBz);
Expand Down
12 changes: 12 additions & 0 deletions PWGLF/TableProducer/Resonances/resonanceModuleInitializer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ using namespace o2::framework::expressions;
using namespace o2::soa;
using namespace o2::constants::physics;
using namespace o2::constants::math;
using namespace o2::aod::rctsel;

/**
* @brief Initializer for the event pool for resonance study
Expand Down Expand Up @@ -107,6 +108,11 @@ struct ResonanceModuleInitializer {
Configurable<bool> cfgEvtNoITSROBorderCut{"cfgEvtNoITSROBorderCut", false, "Evt sel: apply NoITSRO border cut"};
Configurable<bool> cfgEvtRun2AliEventCuts{"cfgEvtRun2AliEventCuts", true, "Evt sel: apply Run2 AliEventCuts"};
Configurable<bool> cfgEvtRun2INELgtZERO{"cfgEvtRun2INELgtZERO", false, "Evt sel: apply Run2 INELgtZERO"};
Configurable<bool> cfgEvtUseRCTFlagChecker{"cfgEvtUseRCTFlagChecker", false, "Evt sel: use RCT flag checker"};
Configurable<std::string> cfgEvtRCTFlagCheckerLabel{"cfgEvtRCTFlagCheckerLabel", "CBT_hadronPID", "Evt sel: RCT flag checker label"};
Configurable<bool> cfgEvtRCTFlagCheckerZDCCheck{"cfgEvtRCTFlagCheckerZDCCheck", false, "Evt sel: RCT flag checker ZDC check"};
Configurable<bool> cfgEvtRCTFlagCheckerLimitAcceptAsBad{"cfgEvtRCTFlagCheckerLimitAcceptAsBad", false, "Evt sel: RCT flag checker treat Limited Acceptance As Bad"};
RCTFlagsChecker rctChecker;

// Spherocity configuration
Configurable<int> cfgTrackSphMin{"cfgTrackSphMin", 10, "Number of tracks for Spherocity Calculation"};
Expand Down Expand Up @@ -169,6 +175,8 @@ struct ResonanceModuleInitializer {
colCuts.setApplyRun2AliEventCuts(cfgEvtRun2AliEventCuts);
colCuts.setApplyRun2INELgtZERO(cfgEvtRun2INELgtZERO);

rctChecker.init(cfgEvtRCTFlagCheckerLabel, cfgEvtRCTFlagCheckerZDCCheck, cfgEvtRCTFlagCheckerLimitAcceptAsBad);

// Configure CCDB access if not bypassed
if (!cfgBypassCCDB) {
ccdb->setURL(ccdbURL.value);
Expand Down Expand Up @@ -531,6 +539,8 @@ struct ResonanceModuleInitializer {
// Default event selection
if (!colCuts.isSelected(collision))
return;
if (cfgEvtUseRCTFlagChecker && !rctChecker(collision))
return;
colCuts.fillQA(collision);
centrality = centEst(collision);

Expand Down Expand Up @@ -574,6 +584,8 @@ struct ResonanceModuleInitializer {
void processRun3MC(soa::Filtered<aod::ResoCollisionCandidatesMC>::iterator const& collision,
aod::McParticles const& mcParticles, GenMCCollisions const&)
{
if (cfgEvtUseRCTFlagChecker && !rctChecker(collision))
return;
fillMCCollision<false>(collision, mcParticles);
}
PROCESS_SWITCH(ResonanceModuleInitializer, processRun3MC, "process MC for RUN3", false);
Expand Down
Loading