Skip to content
Merged
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
8 changes: 5 additions & 3 deletions PWGLF/Tasks/QC/v0cascadesqa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@
RCTFlagsChecker rctFlagsChecker{rctConfigurations.cfgRCTLabel.value};

static constexpr float DefaultLifetimeCuts[1][2] = {{30., 20.}};
const float ctauxiPDG = 4.91; // from PDG

Check failure on line 129 in PWGLF/Tasks/QC/v0cascadesqa.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 130 in PWGLF/Tasks/QC/v0cascadesqa.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.

struct : ConfigurableGroup {
std::string prefix = "v0Selections"; // JSON group name
Expand Down Expand Up @@ -205,7 +207,7 @@
Configurable<float> dcabachtopv{"dcabachtopv", .05, "min DCA Bachelor To PV (cm)"};
Configurable<float> cascradius{"cascradius", 0.5, "minimum Cascade radius (cm)"};
Configurable<float> cascradiusMax{"cascradiusMax", 1E5, "maximum Cascade radius (cm)"};
Configurable<float> cascProperLifeTime{"cascProperLifeTime", 3, "maximum lifetime (ctau)"};
Configurable<float> cascProperLifeTime{"cascProperLifeTime", 3, "maximum lifetime (meanctau)"};

// invariant mass selection
Configurable<float> v0MassWindow{"v0MassWindow", 0.008, "#Lambda mass (GeV/#it{c}^{2})"};
Expand Down Expand Up @@ -647,7 +649,7 @@
return false;

// armenteros (for K0s only)
if (v0Type == kK0s && v0Selections.armPodCut > 1e-4 && v0.qtarm() * v0Selections.armPodCut < std::abs(v0.alpha()))

Check failure on line 652 in PWGLF/Tasks/QC/v0cascadesqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return false;

// rapidity
Expand Down Expand Up @@ -761,26 +763,26 @@

// TOF Nsigma
if (v0Type == kK0s) {
if (v0Selections.tofPidNsigmaCutK0Pi < 1e+5 && v0.positiveHasTOF() && std::fabs(v0.tofNSigmaK0PiPlus()) > v0Selections.tofPidNsigmaCutK0Pi) {

Check failure on line 766 in PWGLF/Tasks/QC/v0cascadesqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return false;
}
if (v0Selections.tofPidNsigmaCutK0Pi < 1e+5 && v0.negativeHasTOF() && std::fabs(v0.tofNSigmaK0PiMinus()) > v0Selections.tofPidNsigmaCutK0Pi) {

Check failure on line 769 in PWGLF/Tasks/QC/v0cascadesqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return false;
}
}
if (v0Type == kLambda) {
if (v0Selections.tofPidNsigmaCutLaPr < 1e+5 && v0.positiveHasTOF() && std::fabs(v0.tofNSigmaLaPr()) > v0Selections.tofPidNsigmaCutLaPr) {

Check failure on line 774 in PWGLF/Tasks/QC/v0cascadesqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return false;
}
if (v0Selections.tofPidNsigmaCutLaPi < 1e+5 && v0.negativeHasTOF() && std::fabs(v0.tofNSigmaLaPi()) > v0Selections.tofPidNsigmaCutLaPi) {

Check failure on line 777 in PWGLF/Tasks/QC/v0cascadesqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return false;
}
}
if (v0Type == kAntiLambda) {
if (v0Selections.tofPidNsigmaCutLaPi < 1e+5 && v0.positiveHasTOF() && std::fabs(v0.tofNSigmaLaPi()) > v0Selections.tofPidNsigmaCutLaPi) {

Check failure on line 782 in PWGLF/Tasks/QC/v0cascadesqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return false;
}
if (v0Selections.tofPidNsigmaCutLaPr < 1e+5 && v0.negativeHasTOF() && std::fabs(v0.tofNSigmaLaPr()) > v0Selections.tofPidNsigmaCutLaPr) {

Check failure on line 785 in PWGLF/Tasks/QC/v0cascadesqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return false;
}
}
Expand All @@ -794,7 +796,7 @@
}

int posTRDhits = 0, negTRDhits = 0;
for (unsigned int i = 0; i <= 5; i++) {

Check failure on line 799 in PWGLF/Tasks/QC/v0cascadesqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (posTrackExtra.trdPattern() & (1 << i)) {
posTRDhits++;
}
Expand Down Expand Up @@ -877,9 +879,9 @@
//
// proper lifetime
float distOverTotMom = std::sqrt(std::pow(casc.x() - collision.posX(), 2) + std::pow(casc.y() - collision.posY(), 2) + std::pow(casc.z() - collision.posZ(), 2)) / (casc.p() + 1E-10);
if ((cascType == kXiM || cascType == kXiP) && distOverTotMom * o2::constants::physics::MassXiMinus > cascSelections.cascProperLifeTime)
if ((cascType == kXiM || cascType == kXiP) && distOverTotMom * o2::constants::physics::MassXiMinus > (cascSelections.cascProperLifeTime * ctauxiPDG))
return false;
if ((cascType == kOmegaM || cascType == kOmegaP) && distOverTotMom * o2::constants::physics::MassOmegaMinus > cascSelections.cascProperLifeTime)
if ((cascType == kOmegaM || cascType == kOmegaP) && distOverTotMom * o2::constants::physics::MassOmegaMinus > (cascSelections.cascProperLifeTime * ctauomegaPDG))
return false;

// rapidity
Expand Down
Loading