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
6 changes: 3 additions & 3 deletions PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#include "Framework/runDataProcessing.h"
#include "ReconstructionDataFormats/Track.h"

#include <TDatabasePDG.h>

Check failure on line 52 in PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
#include <TDirectory.h>
#include <TFile.h>
#include <TH1F.h>
Expand Down Expand Up @@ -440,7 +440,7 @@
candidate.tpcNClsCrossedRows() < crossedRowsToFindableRatio * candidate.tpcNClsFindable() ||
candidate.tpcChi2NCl() > maxChi2NCl ||
candidate.tpcChi2NCl() < settingCutChi2tpcLow ||
candidate.itsChi2NCl() > settingCutChi2NClITS || candidate.dcaXY() > settingCutDCAxy ||
candidate.itsChi2NCl() > settingCutChi2NClITS || candidate.dcaXY() > settingCutDCAxy ||
candidate.dcaZ() > settingCutDCAz) {
return false;
}
Expand Down Expand Up @@ -580,7 +580,7 @@
std::array<float, 3> collisionVertex = getCollisionVertex(collisions, collIdx);
const auto& pca = mFitter.getPCACandidate();
float distance = defaultTodistance;
for (int i = 0; i < 3; i++) {

Check failure on line 583 in PWGLF/TableProducer/Nuspex/he3HadronFemto.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.
distance += (pca[i] - collisionVertex[i]) * (pca[i] - collisionVertex[i]);
}
if (distanceMin < 0 || distance < distanceMin) {
Expand All @@ -602,7 +602,7 @@
std::array<float, 3> collisionVertex = getCollisionVertex(collisions, he3Hadcand.collisionID);

he3Hadcand.momHe3 = std::array{trackHe3.px(), trackHe3.py(), trackHe3.pz()};
for (int i = 0; i < 3; i++)

Check failure on line 605 in PWGLF/TableProducer/Nuspex/he3HadronFemto.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.
he3Hadcand.momHe3[i] = he3Hadcand.momHe3[i] * 2;
he3Hadcand.momHad = std::array{trackHad.px(), trackHad.py(), trackHad.pz()};
float invMass = CommonInite;
Expand All @@ -622,8 +622,8 @@
return false;
}

if(he3Hadcand.recoPtHad() < settingCutPtMinHad || he3Hadcand.recoPtHad() > settingCutPtMaxHad) return false;

if (he3Hadcand.recoPtHad() < settingCutPtMinHad || he3Hadcand.recoPtHad() > settingCutPtMaxHad)
return false;

he3Hadcand.signHe3 = trackHe3.sign();
he3Hadcand.signHad = trackHad.sign();
Expand Down Expand Up @@ -859,10 +859,10 @@
// ==================================================================================================================
double computePrTPCnsig(double InnerParamTPCHad, double SignalTPCHad)
{
double m_BBparamsProton[6] = {-54.42066571222577, 0.2857381250239097, 1.247140602468868, 0.6297483918147729, 2.985438833884555, 0.09};

Check failure on line 862 in PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.

float TPCinnerParam = InnerParamTPCHad;
float expTPCSignal = o2::tpc::BetheBlochAleph((TPCinnerParam / 0.9382721), m_BBparamsProton[0], m_BBparamsProton[1], m_BBparamsProton[2], m_BBparamsProton[3], m_BBparamsProton[4]);

Check failure on line 865 in PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-mass]

Avoid hard-coded particle masses. Use o2::constants::physics::Mass... instead.
double resoTPC{expTPCSignal * m_BBparamsProton[5]};
return ((SignalTPCHad - expTPCSignal) / resoTPC);
}
Expand All @@ -873,7 +873,7 @@
const float kp0 = 1.22204e-02;
const float kp1 = 7.48467e-01;

double fSigmaTOFMassHad = (kp0 * TMath::Exp(kp1 * TMath::Abs(ptHad))) * fExpTOFMassHad;

Check failure on line 876 in PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
double fNSigmaTOFHad = (MassTOFHad - fExpTOFMassHad) / fSigmaTOFMassHad;
return fNSigmaTOFHad;
}
Expand Down Expand Up @@ -907,9 +907,9 @@
{
double PrTPCnsigma = computePrTPCnsig(he3Hadcand.momHadTPC, he3Hadcand.tpcSignalHad);
double PrTOFnsigma = tofNSigmaCalculation(he3Hadcand.massTOFHad, he3Hadcand.recoPtHad());
if (abs(PrTPCnsigma) < 3)

Check failure on line 910 in PWGLF/TableProducer/Nuspex/he3HadronFemto.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 910 in PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return;
if (abs(PrTOFnsigma) < 3)

Check failure on line 912 in PWGLF/TableProducer/Nuspex/he3HadronFemto.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 912 in PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return;

float kstar = computeKstar(he3Hadcand);
Expand Down
Loading