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
10 changes: 5 additions & 5 deletions PWGLF/TableProducer/Strangeness/sigmaHadCorr.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/Strangeness/sigmaHadCorr.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 All @@ -17,9 +17,9 @@
#include "PWGLF/DataModel/LFSigmaHadTables.h"

#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/PIDResponseTOF.h"
#include "Common/DataModel/PIDResponseTPC.h"
#include "Common/DataModel/Multiplicity.h"

#include <CommonConstants/PhysicsConstants.h>
#include <Framework/ASoA.h>
Expand All @@ -37,7 +37,7 @@
#include <Framework/runDataProcessing.h>

#include <Math/GenVector/Boost.h>
#include <TLorentzVector.h>

Check failure on line 40 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
#include <TPDGCode.h>

#include <array>
Expand Down Expand Up @@ -85,9 +85,9 @@
float nSigmaTPCHad = -1; // Number of sigmas for the hadron candidate
float nSigmaTOFHad = -1; // Number of sigmas for the hadron candidate using TOF

int kinkDauID = -1; // ID of the pion from Sigma decay in MC
int sigmaID = -1; // ID of the Sigma candidate in MC
int hadID = -1; // ID of the hadron candidate in MC
int kinkDauID = -1; // ID of the pion from Sigma decay in MC
int sigmaID = -1; // ID of the Sigma candidate in MC
int hadID = -1; // ID of the hadron candidate in MC

int sigmaMotherPDG = -999; // PDG of the direct mother of the Sigma in MC
int sigmaPartonicMotherPDG = -999; // PDG of the first or last partonic ancestor of the Sigma in MC
Expand All @@ -104,7 +104,7 @@
HistogramRegistry rEventSelection{"eventSelection", {}, OutputObjHandlingPolicy::AnalysisObject, true, true};
HistogramRegistry rSigmaHad{"sigmaHad", {}, OutputObjHandlingPolicy::AnalysisObject, true, true};
// Configurable for event selection
Configurable<float> cutzvertex{"cutZVertex", 10.0f, "Accepted z-vertex range (cm)"};

Check failure on line 107 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.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<bool> doSigmaPion{"doSigmaPion", false, "If true, pair Sigma with pions instead of protons"};
Configurable<bool> doSigmaMinus{"doSigmaMinus", true, "If true, pair Sigma- candidates, else Sigma+"};
Expand All @@ -118,7 +118,7 @@
Configurable<float> alphaAPCut{"alphaAPCut", 0., "Alpha AP cut for Sigma candidates"};
Configurable<float> qtAPCutLow{"qtAPCutLow", 0.15, "Lower qT AP cut for Sigma candidates (GeV/c)"};
Configurable<float> qtAPCutHigh{"qtAPCutHigh", 0.2, "Upper qT AP cut for Sigma candidates (GeV/c)"};
Configurable<float> cutEtaDaught{"cutEtaDaughter", 0.8f, "Eta cut for daughter tracks"};

Check failure on line 121 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.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> ptMinTOFKinkDau{"ptMinTOFKinkDau", 0.75f, "Minimum pT to require TOF for kink daughter PID (GeV/c)"};
Configurable<bool> applyTOFPIDKinkDaughter{"applyTOFPIDKinkDaughter", false, "If true, apply TOF PID cut to the kink daughter track"};

Expand Down Expand Up @@ -226,7 +226,7 @@
float massSigma = doSigmaMinus ? o2::constants::physics::MassSigmaMinus : o2::constants::physics::MassSigmaPlus;

float pMother = std::sqrt(sigmaPx * sigmaPx + sigmaPy * sigmaPy + sigmaPz * sigmaPz);
if (pMother < 1e-6f) {

Check failure on line 229 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.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 -999.f;
}
float versorX = sigmaPx / pMother;
Expand All @@ -238,7 +238,7 @@
float A = 4.f * (eChDau * eChDau - a * a);
float B = -4.f * a * K;
float C = 4.f * eChDau * eChDau * massSigma * massSigma - K * K;
if (std::abs(A) < 1e-6f) {

Check failure on line 241 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.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 -999.f;
}
float D = B * B - 4.f * A * C;
Expand Down Expand Up @@ -330,7 +330,7 @@
return mother.pdgCode();
}
int found = findFirstPartonicMotherPDG(mother, mcParticles);
if (found != -999)

Check failure on line 333 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.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 found;
}
return -999;
Expand Down Expand Up @@ -402,11 +402,11 @@
return doSigmaPion ? track.tofNSigmaPi() : track.tofNSigmaPr();
}

TLorentzVector trackSum, PartOneCMS, PartTwoCMS, trackRelK;

Check failure on line 405 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
float getKStar(float sigmaPx, float sigmaPy, float sigmaPz, float pxHad, float pyHad, float pzHad)
{
TLorentzVector part1; // Sigma

Check failure on line 408 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
TLorentzVector part2; // Hadron track (proton/pion)

Check failure on line 409 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
part1.SetXYZM(sigmaPx, sigmaPy, sigmaPz, getSigmaMassForKstar());
part2.SetXYZM(pxHad, pyHad, pzHad, getHadTrackMass());
trackSum = part1 + part2;
Expand Down Expand Up @@ -630,7 +630,7 @@
SliceCache cache;
using BinningTypeNumContrib = ColumnBinningPolicy<aod::collision::PosZ, aod::collision::NumContrib>;
using BinningTypeMultNTracksPV = ColumnBinningPolicy<aod::collision::PosZ, aod::mult::MultNTracksPV>;
BinningTypeNumContrib colBinningNumContrib{{CfgVtxBins, CfgMultBins}, true};
BinningTypeNumContrib colBinningNumContrib{{CfgVtxBins, CfgMultBins}, true};
BinningTypeMultNTracksPV colBinningPVMult{{CfgVtxBins, CfgMultBins}, true};

void processMixedEvent(const CollisionsFull& collisions, const aod::KinkCands& kinkCands, const TracksFull& tracks)
Expand Down
Loading