Skip to content
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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/TableProducer/Strangeness/sigmaminustask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
}
PROCESS_SWITCH(sigmaminustask, processData, "Data processing", true);

void processMC(CollisionsFullMC const& collisions, aod::KinkCands const& KinkCands, aod::McTrackLabels const& trackLabelsMC, aod::McParticles const& particlesMC, TracksFull const&)
void processMC(CollisionsFullMC const& collisions, aod::KinkCands const& KinkCands, aod::McTrackLabels const& trackLabelsMC, aod::McParticles const& particlesMC, aod::McCollisions const&, TracksFull const&)
{
for (const auto& collision : collisions) {
if (std::abs(collision.posZ()) > cutzvertex || !collision.sel8()) {
Expand Down Expand Up @@ -149,26 +149,28 @@
if (!mcTrackPiDau.has_mothers()) {
continue;
}
for (auto& piMother : mcTrackPiDau.mothers_as<aod::McParticles>()) {

Check failure on line 152 in PWGLF/TableProducer/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) {

Check failure on line 156 in PWGLF/TableProducer/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 156 in PWGLF/TableProducer/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 (std::abs(mcTrackPiDau.pdgCode()) != 211 && std::abs(mcTrackPiDau.pdgCode()) != 2212) {

Check failure on line 159 in PWGLF/TableProducer/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 159 in PWGLF/TableProducer/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;
}

float MotherMassMC = std::sqrt(piMother.e() * piMother.e() - piMother.p() * piMother.p());

Check failure on line 163 in PWGLF/TableProducer/Strangeness/sigmaminustask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
float MotherpTMC = piMother.pt();
float deltaXMother = mcTrackPiDau.vx() - piMother.vx();
float deltaYMother = mcTrackPiDau.vy() - piMother.vy();
float decayRadiusMC = std::sqrt(deltaXMother * deltaXMother + deltaYMother * deltaYMother);

// Check coherence of MCcollision Id for daughter MCparticle and reconstructed collision
auto mcCollision = mcTrackPiDau.template mcCollision_as<aod::McCollisions>();
bool mcCollisionIdCheck = collision.mcCollisionId() == mcCollision.globalIndex();
bool mcCollisionIdCheck = false;
if (collision.has_mcCollision()) {
mcCollisionIdCheck = collision.mcCollision().globalIndex() == mcTrackPiDau.mcCollisionId();
}

rSigmaMinus.fill(HIST("h2MassPtMCRec"), kinkCand.mothSign() * kinkCand.ptMoth(), kinkCand.mSigmaMinus());
if (mcTrackSigma.pdgCode() > 0) {
Expand Down Expand Up @@ -198,7 +200,7 @@

// Loop over all generated particles to fill MC histograms
for (const auto& mcPart : particlesMC) {
if (std::abs(mcPart.pdgCode()) != 3112 || std::abs(mcPart.y()) > cutEtaMotherMC) { // only sigma mothers and rapidity cut

Check failure on line 203 in PWGLF/TableProducer/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 203 in PWGLF/TableProducer/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 @@ -209,7 +211,7 @@
std::array<float, 3> secVtx;
std::array<float, 3> momDaug;
for (const auto& daughter : mcPart.daughters_as<aod::McParticles>()) {
if (std::abs(daughter.pdgCode()) == 211 || std::abs(daughter.pdgCode()) == 2212) { // Pi or proton daughter

Check failure on line 214 in PWGLF/TableProducer/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 214 in PWGLF/TableProducer/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;
secVtx = {daughter.vx(), daughter.vy(), daughter.vz()};
momDaug = {daughter.px(), daughter.py(), daughter.pz()};
Expand Down
Loading