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
4 changes: 2 additions & 2 deletions PWGLF/TableProducer/Common/kinkBuilder.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -462,7 +462,7 @@
return false;
hSelDaugQA->Fill(5.f, isPositive);

if (candidate.tpcNClsCrossedRows() <= 0.8 * candidate.tpcNClsFindable())

Check failure on line 465 in PWGLF/TableProducer/Common/kinkBuilder.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;
hSelDaugQA->Fill(6.f, isPositive);

Expand Down Expand Up @@ -691,7 +691,7 @@
std::abs(genPart.pdgCode())) != mothMatchPdgCodes.end();

canBeDaug = false;
for (auto mother : genPart.template mothers_as<aod::McParticles>()) {

Check failure on line 694 in PWGLF/TableProducer/Common/kinkBuilder.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 (std::find(
mothMatchPdgCodes.begin(),
mothMatchPdgCodes.end(),
Expand Down Expand Up @@ -835,8 +835,8 @@
if (decayChannel < 0) {
continue; // Skip candidates that do not match the decay channels of interest
}
hRecCandidatesRecoPt->Fill(decayChannel, trackMoth.pt()); // Decay channel match bin
hRecCandidatesGenPt->Fill(decayChannel, genMothPart.pt()); // Decay channel match bin
hRecCandidatesRecoPt->Fill(decayChannel, trackMoth.pt()); // Decay channel match bin
hRecCandidatesGenPt->Fill(decayChannel, genMothPart.pt()); // Decay channel match bin
hRecCandidatesDeltaPt->Fill((trackMoth.pt() - genMothPart.pt()) / genMothPart.pt(), genMothPart.pt()); // Decay channel match bin
}
bool isAccepted = false;
Expand Down
44 changes: 22 additions & 22 deletions PWGLF/Tasks/Resonances/lambda1405analysis.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGLF/Tasks/Resonances/lambda1405analysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -91,18 +91,18 @@
float bachPiNSigTof = -1; // Number of sigmas for the pion candidate using Tof
int kinkDauId = 0; // Id of the pion from Sigma decay in MC
int sigmaId = 0; // Id of the Sigma candidate in MC
int bachPiId = 0; // Id of the pion candidate in MC
int bachPiId = 0; // Id of the pion candidate in MC

float cent = -1; // Centrality of the collision
float pvContrib = -1; // Number of contributors to the primary vertex
float cent = -1; // Centrality of the collision
float pvContrib = -1; // Number of contributors to the primary vertex

float scalarProd = -1; // Scalar product for flow analysis
};

struct lambda1405analysis {
int lambda1405PdgCode = 102132; // PDG code for Lambda(1405)

Check failure on line 103 in PWGLF/Tasks/Resonances/lambda1405analysis.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.
int sigmaMinusPdgCode = 3112; // PDG code for Lambda(1405)

Check failure on line 104 in PWGLF/Tasks/Resonances/lambda1405analysis.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.
int sigmaPlusPdgCode = 3222; // PDG code for Lambda(1405)

Check failure on line 105 in PWGLF/Tasks/Resonances/lambda1405analysis.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.
Produces<aod::Lambda1405Cands> outputDataTable; // Output table for Lambda(1405) candidates
Produces<aod::Lambda1405Flow> outputDataFlowTable; // Output table for Lambda(1405) flow analysis
Produces<aod::Lambda1405CandsMC> outputDataTableMC; // Output table for Lambda(1405) candidates in MC
Expand Down Expand Up @@ -623,18 +623,18 @@
}

auto kinkDauMom = std::array{sigmaCand.pxDaug(), sigmaCand.pyDaug(), sigmaCand.pzDaug()};
auto sigmaMom = std::array{sigmaCand.pxMoth(), sigmaCand.pyMoth(), sigmaCand.pzMoth()};
auto sigmaMom = std::array{sigmaCand.pxMoth(), sigmaCand.pyMoth(), sigmaCand.pzMoth()};
// Sigma properties
lambda1405Cand.sigmaId = sigmaCand.globalIndex();
lambda1405Cand.sigmaId = sigmaCand.globalIndex();
lambda1405Cand.sigmaMinusMass = sigmaCand.mSigmaMinus();
lambda1405Cand.sigmaPlusMass = sigmaCand.mSigmaPlus();
lambda1405Cand.xiMinusMass = sigmaCand.mXiMinus();
lambda1405Cand.sigmaSign = sigmaCand.mothSign();
lambda1405Cand.sigmaAlphaAP = alphaAP(sigmaMom, kinkDauMom);
lambda1405Cand.sigmaQtAP = qtAP(sigmaMom, kinkDauMom);
lambda1405Cand.sigmaPt = sigmaCand.ptMoth();
lambda1405Cand.sigmaRadius = sigmaRad;
lambda1405Cand.dcaSigmaToPv = sigmaCand.dcaMothPv();
lambda1405Cand.sigmaPlusMass = sigmaCand.mSigmaPlus();
lambda1405Cand.xiMinusMass = sigmaCand.mXiMinus();
lambda1405Cand.sigmaSign = sigmaCand.mothSign();
lambda1405Cand.sigmaAlphaAP = alphaAP(sigmaMom, kinkDauMom);
lambda1405Cand.sigmaQtAP = qtAP(sigmaMom, kinkDauMom);
lambda1405Cand.sigmaPt = sigmaCand.ptMoth();
lambda1405Cand.sigmaRadius = sigmaRad;
lambda1405Cand.dcaSigmaToPv = sigmaCand.dcaMothPv();

if (lambda1405Cand.sigmaQtAP < funcMinQtAlphaAP.Eval(lambda1405Cand.sigmaAlphaAP) ||
lambda1405Cand.sigmaQtAP > funcMaxQtAlphaAP.Eval(lambda1405Cand.sigmaAlphaAP)) {
Expand All @@ -659,7 +659,7 @@

// Collision properties
lambda1405Cand.pvContrib = collision.numContrib();
if constexpr ( requires{collision.centFT0C();} ) {
if constexpr (requires { collision.centFT0C(); }) {
lambda1405Cand.cent = collision.centFT0C();
} else {
lambda1405Cand.cent = -1; // Not available
Expand Down Expand Up @@ -720,7 +720,7 @@
lambda1405Cand.px = sigmaMom[0] + piMom[0];
lambda1405Cand.py = sigmaMom[1] + piMom[1];
lambda1405Cand.pz = sigmaMom[2] + piMom[2];

lambda1405Cand.phi = std::atan2(lambda1405Cand.py, lambda1405Cand.px);
lambda1405Cand.scalarProd = -1;
if constexpr (requires { collision.qvecFT0CRe(); }) {
Expand All @@ -736,13 +736,13 @@
std::hypot(sigmaCand.pxMoth(), sigmaCand.pyMoth()) > funcMaxSigmaPtVsL1405Pt.Eval(lambda1405Cand.pt())) {
continue;
}

if (piTrack.pt() < funcMinBachPiPtVsL1405Pt.Eval(lambda1405Cand.pt()) ||
piTrack.pt() > funcMaxBachPiPtVsL1405Pt.Eval(lambda1405Cand.pt())) {
piTrack.pt() > funcMaxBachPiPtVsL1405Pt.Eval(lambda1405Cand.pt())) {
continue;
}
rSelections.fill(HIST("hSelectionsL1405"), 4); // Pt correlations

if (lambda1405Cand.pt() < cutMinPtL1405) {
continue;
}
Expand Down Expand Up @@ -787,7 +787,7 @@
for (const auto& sigmaCand : sigmaCands) {
std::vector<lambda1405candidate> selectedCandidates;
constructCollCandidates(collision, sigmaCand, tracks, selectedCandidates);
for (auto& lambda1405Cand : selectedCandidates) {

Check failure on line 790 in PWGLF/Tasks/Resonances/lambda1405analysis.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 (lambda1405Cand.isSigmaMinus) {
rLambda1405.fill(HIST("h2SigmaMinusMassVsLambdaMass"), lambda1405Cand.massL1405, lambda1405Cand.sigmaMinusMass);
} else {
Expand Down Expand Up @@ -962,9 +962,9 @@
auto genSigma = labelSigma.template mcParticle_as<aod::McParticles>();
auto genKinkDaug = labelKinkDaug.template mcParticle_as<aod::McParticles>();

bool isSigmaMinusKink = checkSigmaKinkMC(genSigma, genKinkDaug, sigmaMinusPdgCode, 211, particlesMC);
bool isSigmaPlusToPiKink = checkSigmaKinkMC(genSigma, genKinkDaug, sigmaPlusPdgCode, 211, particlesMC);
bool isSigmaPlusToPrKink = checkSigmaKinkMC(genSigma, genKinkDaug, sigmaPlusPdgCode, 2212, particlesMC);
bool isSigmaMinusKink = checkSigmaKinkMC(genSigma, genKinkDaug, sigmaMinusPdgCode, 211, particlesMC);
bool isSigmaPlusToPiKink = checkSigmaKinkMC(genSigma, genKinkDaug, sigmaPlusPdgCode, 211, particlesMC);
bool isSigmaPlusToPrKink = checkSigmaKinkMC(genSigma, genKinkDaug, sigmaPlusPdgCode, 2212, particlesMC);

if (!isSigmaMinusKink && !isSigmaPlusToPiKink && !isSigmaPlusToPrKink) {
continue; // Skip if not a valid Sigma kink decay
Expand All @@ -972,8 +972,8 @@

std::vector<lambda1405candidate> selectedCandidates;
constructCollCandidates(collision, sigmaCand, tracksPerCol, selectedCandidates);
for (auto& lambda1405Cand : selectedCandidates) {

Check failure on line 975 in PWGLF/Tasks/Resonances/lambda1405analysis.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.
rLambda1405.fill(HIST("hRecoL1405"), 0., lambda1405Cand.pt()); // All reconstructed
rLambda1405.fill(HIST("hRecoL1405"), 0., lambda1405Cand.pt()); // All reconstructed

// Do MC association
auto labelBachPi = trackLabelsMC.rawIteratorAt(lambda1405Cand.bachPiId);
Expand Down
Loading