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
12 changes: 6 additions & 6 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 @@ -31,7 +31,7 @@
using CollisionsFull = soa::Join<aod::Collisions, aod::EvSel>;
using CollisionsFullMC = soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSels>;

struct lambda1405candidate {

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

View workflow job for this annotation

GitHub Actions / O2 linter

[name/struct]

Use UpperCamelCase for names of structs.
// Columns for Lambda(1405) candidate
bool isSigmaPlus = false; // True if compatible with Sigma+
bool isSigmaMinus = false; // True if compatible with Sigma-
Expand All @@ -49,14 +49,14 @@
int piID = 0; // ID of the pion candidate in MC
};

struct lambda1405analysis {

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

View workflow job for this annotation

GitHub Actions / O2 linter

[name/struct]

Use UpperCamelCase for names of structs.
int lambda1405PdgCode = 102132; // PDG code for Lambda(1405)

Check failure on line 53 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.
lambda1405candidate lambda1405Cand; // Lambda(1405) candidate structure
// Histograms are defined with HistogramRegistry
HistogramRegistry rEventSelection{"eventSelection", {}, OutputObjHandlingPolicy::AnalysisObject, true, true};
HistogramRegistry rLambda1405{"lambda1405", {}, OutputObjHandlingPolicy::AnalysisObject, true, true};
// Configurable for event selection
Configurable<float> cutzvertex{"cutZVertex", 10.0f, "Accepted z-vertex range (cm)"};

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

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<float> cutEtaDaught{"cutEtaDaughter", 0.8f, "Eta cut for daughter tracks"};
Configurable<float> cutDCAtoPVSigma{"cutDCAtoPVSigma", 0.1f, "Max DCA to primary vertex for Sigma candidates (cm)"};
Configurable<float> cutDCAtoPVPiFromSigma{"cutDCAtoPVPiFromSigma", 2., "Min DCA to primary vertex for pion from Sigma candidates (cm)"};
Expand Down Expand Up @@ -178,13 +178,13 @@
if (std::abs(sigmaCand.dcaMothPv()) > cutDCAtoPVSigma || std::abs(sigmaCand.dcaDaugPv()) < cutDCAtoPVPiFromSigma || sigmaRad < cutSigmaRadius) {
return false;
}
if (lambda1405Cand.isSigmaMinus){
rLambda1405.fill(HIST("h2PtMassSigmaBeforeCuts_0"), sigmaCand.mothSign() * sigmaCand.ptMoth(), sigmaCand.mSigmaMinus());
}
if (lambda1405Cand.isSigmaPlus){
rLambda1405.fill(HIST("h2PtMassSigmaBeforeCuts_1"), sigmaCand.mothSign() * sigmaCand.ptMoth(), sigmaCand.mSigmaPlus());
if (lambda1405Cand.isSigmaMinus) {
rLambda1405.fill(HIST("h2PtMassSigmaBeforeCuts_0"), sigmaCand.mothSign() * sigmaCand.ptMoth(), sigmaCand.mSigmaMinus());
}

if (lambda1405Cand.isSigmaPlus) {
rLambda1405.fill(HIST("h2PtMassSigmaBeforeCuts_1"), sigmaCand.mothSign() * sigmaCand.ptMoth(), sigmaCand.mSigmaPlus());
}

for (const auto& piTrack : tracks) {
if (!doLSBkg) {
if (piTrack.sign() == sigmaCand.mothSign()) {
Expand All @@ -203,7 +203,7 @@
float pt = std::hypot(sigmaMom[0] + piMom[0], sigmaMom[1] + piMom[1]);
double massSigma = lambda1405Cand.isSigmaMinus ? sigmaCand.mSigmaMinus() : sigmaCand.mSigmaPlus();
float invMass = RecoDecay::m(std::array{sigmaMom, piMom}, std::array{massSigma, o2::constants::physics::MassPiPlus});
if (invMass < 1.3 || invMass > 1.5) {

Check failure on line 206 in PWGLF/Tasks/Resonances/lambda1405analysis.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.
continue;
}
lambda1405Cand.kinkDauID = kinkDauTrack.globalIndex();
Expand Down Expand Up @@ -275,7 +275,7 @@
auto mcTrackPiKink = mcLabPiKink.mcParticle_as<aod::McParticles>();
auto mcTrackSigma = mcLabSigma.mcParticle_as<aod::McParticles>();
auto mcTrackPi = mcLabPi.mcParticle_as<aod::McParticles>();
if (std::abs(mcTrackPiKink.pdgCode()) != 211 || std::abs(mcTrackSigma.pdgCode()) != 3122 || std::abs(mcTrackPi.pdgCode()) != 211) {

Check failure on line 278 in PWGLF/Tasks/Resonances/lambda1405analysis.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 278 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.
continue; // Skip if not a valid pion or Sigma candidate
}
if (!mcTrackPiKink.has_mothers() || !mcTrackSigma.has_mothers() || !mcTrackPi.has_mothers()) {
Expand Down Expand Up @@ -340,7 +340,7 @@
bool hasSigmaDaughter = false;
int dauPdgCode = 0;
for (const auto& daughter : mcPart.daughters_as<aod::McParticles>()) {
if (std::abs(daughter.pdgCode()) == 3122 || std::abs(daughter.pdgCode()) == 3222) { // Sigma PDG code

Check failure on line 343 in PWGLF/Tasks/Resonances/lambda1405analysis.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 343 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.
hasSigmaDaughter = true;
dauPdgCode = daughter.pdgCode();
break; // Found a Sigma daughter, exit loop
Expand Down
Loading