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
2 changes: 1 addition & 1 deletion PWGLF/TableProducer/Nuspex/he3HadronFemto.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/Nuspex/he3HadronFemto.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 @@ -48,7 +48,7 @@
#include "Framework/runDataProcessing.h"
#include "ReconstructionDataFormats/Track.h"

#include <TDatabasePDG.h>

Check failure on line 51 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 All @@ -64,8 +64,8 @@
#include <cstdlib>
#include <iterator> // std::prev
#include <string>
#include <vector>
#include <unordered_set>
#include <vector>

using namespace o2;
using namespace o2::framework;
Expand All @@ -82,7 +82,7 @@

namespace
{
constexpr double betheBlochDefault[1][6]{{-1.e32, -1.e32, -1.e32, -1.e32, -1.e32, -1.e32}};

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

View workflow job for this annotation

GitHub Actions / O2 linter

[name/constexpr-constant]

Use UpperCamelCase for names of constexpr constants. Names of special constants may be prefixed with "k".
static const std::vector<std::string> betheBlochParNames{"p0", "p1", "p2", "p3", "p4", "resolution"};

constexpr int Li4PDG = o2::constants::physics::Pdg::kLithium4;
Expand Down Expand Up @@ -183,7 +183,7 @@
int32_t collisionID = 0;
};

struct he3HadronFemto {

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

View workflow job for this annotation

GitHub Actions / O2 linter

[name/struct]

Use UpperCamelCase for names of structs.

Produces<aod::he3HadronTable> outputDataTable;
Produces<aod::he3HadronTableMC> outputMcTable;
Expand Down Expand Up @@ -566,7 +566,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 569 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 @@ -588,7 +588,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 591 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 Down
Loading