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
23 changes: 7 additions & 16 deletions PWGLF/TableProducer/Strangeness/hStrangeCorrelationFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
#define BIT_CHECK(var, nbit) ((var) & (1 << (nbit)))

struct HStrangeCorrelationFilter {
const float ctauxiPDG = 4.91; // from PDG

Check failure on line 52 in PWGLF/TableProducer/Strangeness/hStrangeCorrelationFilter.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
const float ctauomegaPDG = 2.461; // from PDG

Check failure on line 53 in PWGLF/TableProducer/Strangeness/hStrangeCorrelationFilter.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.

Service<o2::ccdb::BasicCCDBManager> ccdb;

Expand All @@ -65,6 +65,7 @@
Configurable<float> strangedEdxNSigma{"strangedEdxNSigma", 4, "Nsigmas for strange decay daughters"};
Configurable<float> strangedEdxNSigmaTight{"strangedEdxNSigmaTight", 3, "Nsigmas for strange decay daughters"};
Configurable<std::string> zorroMask{"zorroMask", "", "zorro trigger class to select on (empty: none)"};
Configurable<float> nSigmaNearXiMassCenter{"nSigmaNearXiMassCenter", 0, "for Oemga analysis only, to check if candidate mass is around Xi"};

// used for event selections in Pb-Pb
Configurable<int> cfgCutOccupancyHigh{"cfgCutOccupancyHigh", 3000, "High cut on TPC occupancy"};
Expand Down Expand Up @@ -442,7 +443,7 @@

bool physicalPrimary = false;
float origPt = -1;
float pdgCode = -9999;

Check failure on line 446 in PWGLF/TableProducer/Strangeness/hStrangeCorrelationFilter.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
if constexpr (requires { assoc.mcParticle(); }) {
if (assoc.has_mcParticle()) {
auto mcParticle = assoc.mcParticle();
Expand Down Expand Up @@ -515,9 +516,6 @@
// for real data processing
void processTriggers(soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms, aod::CentFT0Cs, aod::PVMults>::iterator const& collision, soa::Filtered<FullTracks> const& tracks, aod::BCsWithTimestamps const&)
{
// Load parameters for sideband subtraction
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
initParametersFromCCDB(bc);
if (((doPPAnalysis && !isCollisionSelected(collision))) || (!doPPAnalysis && !isCollisionSelectedPbPb(collision))) {
return;
}
Expand All @@ -539,9 +537,6 @@
// for MC processing
void processTriggersMC(soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms, aod::CentFT0Cs, aod::PVMults>::iterator const& collision, soa::Filtered<FullTracksMC> const& tracks, aod::McParticles const&, aod::BCsWithTimestamps const&)
{
// Load parameters for sideband subtraction
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
initParametersFromCCDB(bc);
if (((doPPAnalysis && !isCollisionSelected(collision))) || (!doPPAnalysis && !isCollisionSelectedPbPb(collision))) {
return;
}
Expand Down Expand Up @@ -571,7 +566,6 @@
{
// Load parameters for sideband subtraction
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
initParametersFromCCDB(bc);
// Perform basic event selection
if (!collision.sel8()) {
return;
Expand Down Expand Up @@ -600,7 +594,6 @@
{
// Load parameters for sideband subtraction
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
initParametersFromCCDB(bc);
// Perform basic event selection
if (!collision.sel8()) {
return;
Expand Down Expand Up @@ -629,7 +622,6 @@
{
// Load parameters for sideband subtraction
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
initParametersFromCCDB(bc);
// Perform basic event selection
if (!collision.sel8()) {
return;
Expand Down Expand Up @@ -657,7 +649,6 @@
{
// Load parameters for sideband subtraction
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
initParametersFromCCDB(bc);
// Perform basic event selection
if (!collision.sel8()) {
return;
Expand Down Expand Up @@ -948,11 +939,11 @@
bool trueLambda = false;
bool trueAntiLambda = false;
v0PhysicalPrimary = v0.isPhysicalPrimary();
if (v0.pdgCode() == 310)

Check failure on line 942 in PWGLF/TableProducer/Strangeness/hStrangeCorrelationFilter.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
trueK0Short = true;
if (v0.pdgCode() == 3122)

Check failure on line 944 in PWGLF/TableProducer/Strangeness/hStrangeCorrelationFilter.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
trueLambda = true;
if (v0.pdgCode() == -3122)

Check failure on line 946 in PWGLF/TableProducer/Strangeness/hStrangeCorrelationFilter.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
trueAntiLambda = true;
if (compatibleK0Short && (!doTrueSelectionInMass || (trueK0Short && v0PhysicalPrimary)))
histos.fill(HIST("h3dMassK0Short"), v0.pt(), v0.mK0Short(), cent);
Expand Down Expand Up @@ -1127,15 +1118,15 @@
histos.fill(HIST("h3dMassXiMinus"), casc.pt(), casc.mXi(), cent);
if (compatibleXiPlus)
histos.fill(HIST("h3dMassXiPlus"), casc.pt(), casc.mXi(), cent);
if (compatibleOmegaMinus)
if (compatibleOmegaMinus && std::abs(massNSigmaXi) > nSigmaNearXiMassCenter)
histos.fill(HIST("h3dMassOmegaMinus"), casc.pt(), casc.mOmega(), cent);
if (compatibleOmegaPlus)
if (compatibleOmegaPlus && std::abs(massNSigmaXi) > nSigmaNearXiMassCenter)
histos.fill(HIST("h3dMassOmegaPlus"), casc.pt(), casc.mOmega(), cent);

if (!fillTableOnlyWithCompatible ||
( // start major condition check
((compatibleXiMinus > 0 || compatibleXiPlus > 0) && std::abs(massNSigmaXi) < maxMassNSigma) ||
((compatibleOmegaMinus > 0 || compatibleOmegaPlus > 0) && std::abs(massNSigmaOmega) < maxMassNSigma)) // end major condition check
((compatibleOmegaMinus > 0 || compatibleOmegaPlus > 0) && std::abs(massNSigmaOmega) < maxMassNSigma && std::abs(massNSigmaXi) > nSigmaNearXiMassCenter)) // end major condition check
) {
assocCascades(casc.collisionId(), casc.globalIndex(),
compatibleXiMinus, compatibleXiPlus, compatibleOmegaMinus, compatibleOmegaPlus,
Expand Down Expand Up @@ -1303,27 +1294,27 @@
bool trueOmegaMinus = false;
bool trueOmegaPlus = false;
cascPhysicalPrimary = casc.isPhysicalPrimary();
if (casc.pdgCode() == 3312)

Check failure on line 1297 in PWGLF/TableProducer/Strangeness/hStrangeCorrelationFilter.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
trueXiMinus = true;
if (casc.pdgCode() == -3312)

Check failure on line 1299 in PWGLF/TableProducer/Strangeness/hStrangeCorrelationFilter.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
trueXiPlus = true;
if (casc.pdgCode() == 3334)

Check failure on line 1301 in PWGLF/TableProducer/Strangeness/hStrangeCorrelationFilter.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
trueOmegaMinus = true;
if (casc.pdgCode() == -3334)

Check failure on line 1303 in PWGLF/TableProducer/Strangeness/hStrangeCorrelationFilter.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
trueOmegaPlus = true;
if (compatibleXiMinus && (!doTrueSelectionInMass || (trueXiMinus && cascPhysicalPrimary)))
histos.fill(HIST("h3dMassXiMinus"), casc.pt(), casc.mXi(), cent);
if (compatibleXiPlus && (!doTrueSelectionInMass || (trueXiPlus && cascPhysicalPrimary)))
histos.fill(HIST("h3dMassXiPlus"), casc.pt(), casc.mXi(), cent);
if (compatibleOmegaMinus && (!doTrueSelectionInMass || (trueOmegaMinus && cascPhysicalPrimary)))
if (compatibleOmegaMinus && (!doTrueSelectionInMass || (trueOmegaMinus && cascPhysicalPrimary)) && std::abs(massNSigmaXi) > nSigmaNearXiMassCenter)
histos.fill(HIST("h3dMassOmegaMinus"), casc.pt(), casc.mOmega(), cent);
if (compatibleOmegaPlus && (!doTrueSelectionInMass || (trueOmegaPlus && cascPhysicalPrimary)))
if (compatibleOmegaPlus && (!doTrueSelectionInMass || (trueOmegaPlus && cascPhysicalPrimary)) && std::abs(massNSigmaXi) > nSigmaNearXiMassCenter)
histos.fill(HIST("h3dMassOmegaPlus"), casc.pt(), casc.mOmega(), cent);

if (!fillTableOnlyWithCompatible ||
( // start major condition check
((compatibleXiMinus > 0 || compatibleXiPlus > 0) && std::abs(massNSigmaXi) < maxMassNSigma) ||
((compatibleOmegaMinus > 0 || compatibleOmegaPlus > 0) && std::abs(massNSigmaOmega) < maxMassNSigma)) // end major condition check
((compatibleOmegaMinus > 0 || compatibleOmegaPlus > 0) && std::abs(massNSigmaOmega) < maxMassNSigma && std::abs(massNSigmaXi) > nSigmaNearXiMassCenter)) // end major condition check
) {
assocCascades(casc.collisionId(), casc.globalIndex(),
compatibleXiMinus, compatibleXiPlus, compatibleOmegaMinus, compatibleOmegaPlus,
Expand Down
Loading
Loading