Skip to content
Closed
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
3 changes: 2 additions & 1 deletion PWGLF/Tasks/Strangeness/nonPromptCascade.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@
if (particle.has_mothers()) {
auto mom = particle.template mothers_as<aod::McParticles>()[0];
int pdgCodeMom = mom.pdgCode();
fromBeauty = std::abs(pdgCodeMom) / 5000 == 1 || std::abs(pdgCodeMom) / 500 == 1 || std::abs(pdgCodeMom) == 5;

Check failure on line 133 in PWGLF/Tasks/Strangeness/nonPromptCascade.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.

Check failure on line 133 in PWGLF/Tasks/Strangeness/nonPromptCascade.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.
fromCharm = std::abs(pdgCodeMom) / 4000 == 1 || std::abs(pdgCodeMom) / 400 == 1 || std::abs(pdgCodeMom) == 4;

Check failure on line 134 in PWGLF/Tasks/Strangeness/nonPromptCascade.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.
while (mom.has_mothers()) {
const auto grandma = mom.template mothers_as<aod::McParticles>()[0];
int pdgCodeGrandma = std::abs(grandma.pdgCode());
fromBeauty = fromBeauty || (pdgCodeGrandma / 5000 == 1 || pdgCodeGrandma / 500 == 1 || pdgCodeGrandma == 5);

Check failure on line 138 in PWGLF/Tasks/Strangeness/nonPromptCascade.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.
fromCharm = fromCharm || (pdgCodeGrandma / 4000 == 1 || pdgCodeGrandma / 400 == 1 || pdgCodeGrandma == 4);

Check failure on line 139 in PWGLF/Tasks/Strangeness/nonPromptCascade.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.
mom = grandma;
}
}
Expand Down Expand Up @@ -438,13 +438,13 @@
if (protonTrack.mcParticle().has_mothers() && pionTrack.mcParticle().has_mothers() && bachelor.mcParticle().has_mothers()) {
if (protonTrack.mcParticle().mothersIds()[0] == pionTrack.mcParticle().mothersIds()[0]) {
const auto v0part = protonTrack.mcParticle().template mothers_first_as<aod::McParticles>();
if (std::abs(v0part.pdgCode()) == 3122 && v0part.has_mothers()) {

Check failure on line 441 in PWGLF/Tasks/Strangeness/nonPromptCascade.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 auto motherV0 = v0part.template mothers_as<aod::McParticles>()[0];
if (v0part.mothersIds()[0] == bachelor.mcParticle().mothersIds()[0]) {
if (std::abs(motherV0.pdgCode()) == 3312 || std::abs(motherV0.pdgCode()) == 3334) {

Check failure on line 444 in PWGLF/Tasks/Strangeness/nonPromptCascade.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.
isGoodCascade = true;

isOmega = (std::abs(motherV0.pdgCode()) == 3334);

Check failure on line 447 in PWGLF/Tasks/Strangeness/nonPromptCascade.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.
fromHF = isFromHF(motherV0);
mcParticleID = v0part.mothersIds()[0];
}
Expand Down Expand Up @@ -553,7 +553,7 @@
auto daughters = mom.template daughters_as<aod::McParticles>();
motherDecayDaughters = daughters.size();
for (const auto& d : daughters) {
if (std::abs(d.pdgCode()) == 11 || std::abs(d.pdgCode()) == 13) {

Check failure on line 556 in PWGLF/Tasks/Strangeness/nonPromptCascade.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.
motherDecayDaughters *= -1;
break;
}
Expand Down Expand Up @@ -633,7 +633,7 @@
auto daughters = mom.template daughters_as<aod::McParticles>();
motherDecayDaughters = daughters.size();
for (const auto& d : daughters) {
if (std::abs(d.pdgCode()) == 11 || std::abs(d.pdgCode()) == 13) {

Check failure on line 636 in PWGLF/Tasks/Strangeness/nonPromptCascade.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.
motherDecayDaughters *= -1;
break;
}
Expand Down Expand Up @@ -671,4 +671,5 @@
{
return WorkflowSpec{
adaptAnalysisTask<NonPromptCascadeTask>(cfgc)};
}
}

Check failure on line 675 in PWGLF/Tasks/Strangeness/nonPromptCascade.cxx

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Trailing spaces

Remove the trailing spaces at the end of the line.
Loading