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
3 changes: 1 addition & 2 deletions PWGLF/Tasks/Strangeness/sigmaminustask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using CollisionsFull = soa::Join<aod::Collisions, aod::EvSel>;
using CollisionsFullMC = soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSel>;

struct sigmaminustask {

Check failure on line 33 in PWGLF/Tasks/Strangeness/sigmaminustask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/struct]

Use UpperCamelCase for names of structs.
// Histograms are defined with HistogramRegistry
HistogramRegistry rEventSelection{"eventSelection", {}, OutputObjHandlingPolicy::AnalysisObject, true, true};
HistogramRegistry rSigmaMinus{"sigmaminus", {}, OutputObjHandlingPolicy::AnalysisObject, true, true};
Expand All @@ -41,7 +41,6 @@

Preslice<aod::KinkCands> mPerCol = aod::track::collisionId;


void init(InitContext const&)
{
// Axes
Expand Down Expand Up @@ -74,7 +73,7 @@
rEventSelection.fill(HIST("hVertexZRec"), collision.posZ());
for (const auto& kinkCand : KinkCands) {
auto dauTrack = kinkCand.trackDaug_as<TracksFull>();
if (abs(dauTrack.tpcNSigmaPi()) > cutNSigmaPi) {

Check failure on line 76 in PWGLF/Tasks/Strangeness/sigmaminustask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
continue;
}
rSigmaMinus.fill(HIST("h2MassSigmaMinusPt"), kinkCand.mothSign() * kinkCand.ptMoth(), kinkCand.mSigmaMinus());
Expand All @@ -92,7 +91,7 @@
}

rEventSelection.fill(HIST("hVertexZRec"), collision.posZ());
auto kinkCandPerColl = KinkCands.sliceBy(mPerCol, collision.globalIndex());
auto kinkCandPerColl = KinkCands.sliceBy(mPerCol, collision.globalIndex());
for (const auto& kinkCand : kinkCandPerColl) {
auto dauTrack = kinkCand.trackDaug_as<TracksFull>();
auto mothTrack = kinkCand.trackMoth_as<TracksFull>();
Expand All @@ -100,7 +99,7 @@
LOG(info) << "Skipping kink candidate with opposite sign daughter and mother: " << kinkCand.globalIndex();
continue; // Skip if the daughter has the opposite sign as the mother
}
if (abs(dauTrack.tpcNSigmaPi()) > cutNSigmaPi) {

Check failure on line 102 in PWGLF/Tasks/Strangeness/sigmaminustask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
continue;
}

Expand All @@ -116,11 +115,11 @@
if (!mcTrackPiDau.has_mothers()) {
continue;
}
for (auto& piMother : mcTrackPiDau.mothers_as<aod::McParticles>()) {

Check failure on line 118 in PWGLF/Tasks/Strangeness/sigmaminustask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (piMother.globalIndex() != mcTrackSigma.globalIndex()) {
continue;
}
if (std::abs(mcTrackSigma.pdgCode()) != 3112 || std::abs(mcTrackPiDau.pdgCode()) != 211) {

Check failure on line 122 in PWGLF/Tasks/Strangeness/sigmaminustask.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 122 in PWGLF/Tasks/Strangeness/sigmaminustask.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.
continue;
}
rSigmaMinus.fill(HIST("h2MassPtMCRec"), kinkCand.mothSign() * kinkCand.ptMoth(), kinkCand.mSigmaMinus());
Expand All @@ -129,7 +128,7 @@
}
}
for (const auto& mcPart : particlesMC) {
if (std::abs(mcPart.pdgCode()) != 3112 || std::abs(mcPart.y()) > 0.5) {

Check failure on line 131 in PWGLF/Tasks/Strangeness/sigmaminustask.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 131 in PWGLF/Tasks/Strangeness/sigmaminustask.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.
continue;
}
if (!mcPart.has_daughters()) {
Expand All @@ -137,7 +136,7 @@
}
bool hasSigmaDaughter = false;
for (const auto& daughter : mcPart.daughters_as<aod::McParticles>()) {
if (std::abs(daughter.pdgCode()) == 211) { // Sigma PDG code

Check failure on line 139 in PWGLF/Tasks/Strangeness/sigmaminustask.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 139 in PWGLF/Tasks/Strangeness/sigmaminustask.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.
hasSigmaDaughter = true;
break; // Found a pi daughter, exit loop
}
Expand Down
Loading