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
10 changes: 8 additions & 2 deletions 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 All @@ -23,7 +23,7 @@
#include <TFile.h>
#include <TH2F.h>
#include <TPDGCode.h>
#include <TDatabasePDG.h>

Check failure on line 26 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 <cmath>
#include <string>
Expand Down Expand Up @@ -76,20 +76,20 @@

using McIter = aod::McParticles::iterator;
using CollBracket = o2::math_utils::Bracket<int>;
using CollisionsFull = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, aod::FT0Mults>;
using CollisionsFullMC = soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSels, aod::CentFT0Cs, aod::FT0Mults>;
using CollisionsFull = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0As, aod::CentFT0Cs, aod::FT0Mults>;
using CollisionsFullMC = soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSels, aod::CentFT0As, aod::CentFT0Cs, aod::FT0Mults>;
using TrackCandidates = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TracksCovIU, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPr, aod::pidTOFFullPr, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::TOFSignal, aod::TOFEvTime>;
using TrackCandidatesMC = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TracksCovIU, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPr, aod::pidTOFFullPr, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::TOFSignal, aod::TOFEvTime, aod::McTrackLabels>;

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

Check failure on line 86 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 float he3Mass = o2::constants::physics::MassHelium3;
// constexpr float protonMass = o2::constants::physics::MassProton;
// constexpr float pionchargedMass = o2::constants::physics::MassPiPlus;
constexpr int Li4PDG = 1000030040;

Check failure on line 92 in PWGLF/TableProducer/Nuspex/he3HadronFemto.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.
constexpr int ProtonPDG = PDG_t::kProton;
constexpr int He3PDG = o2::constants::physics::Pdg::kHelium3;
constexpr float CommonInite = 0.0f;
Expand Down Expand Up @@ -166,7 +166,7 @@
int32_t collisionID = 0;
};

struct he3HadronFemto {

Check failure on line 169 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 @@ -243,7 +243,10 @@
HistogramRegistry mQaRegistry{
"QA",
{
{"hVtxZBefore", "Vertex distribution in Z before selections;Z (cm)", {HistType::kTH1F, {{400, -20.0, 20.0}}}},
{"hVtxZ", "Vertex distribution in Z;Z (cm)", {HistType::kTH1F, {{400, -20.0, 20.0}}}},
{"hCentralityFT0A", ";Centrality FT0A", {HistType::kTH1F, {{100, 0, 100.0}}}},
{"hCentralityFT0C", ";Centrality FT0C", {HistType::kTH1F, {{100, 0, 100.0}}}},
{"hNcontributor", "Number of primary vertex contributor", {HistType::kTH1F, {{2000, 0.0f, 2000.0f}}}},
{"hTrackSel", "Accepted tracks", {HistType::kTH1F, {{Selections::kAll, -0.5, static_cast<double>(Selections::kAll) - 0.5}}}},
{"hEvents", "; Events;", {HistType::kTH1F, {{3, -0.5, 2.5}}}},
Expand Down Expand Up @@ -360,6 +363,7 @@
bool selectCollision(const Tcollision& collision, const aod::BCsWithTimestamps&)
{
mQaRegistry.fill(HIST("hEvents"), 0);
mQaRegistry.fill(HIST("hVtxZBefore"), collision.posZ());

if constexpr (isMC) {
if (/*!collision.sel8() ||*/ std::abs(collision.posZ()) > settingCutVertex) {
Expand All @@ -383,6 +387,8 @@
mQaRegistry.fill(HIST("hEvents"), 1);
mQaRegistry.fill(HIST("hNcontributor"), collision.numContrib());
mQaRegistry.fill(HIST("hVtxZ"), collision.posZ());
mQaRegistry.fill(HIST("hCentralityFT0A"), collision.centFT0A());
mQaRegistry.fill(HIST("hCentralityFT0C"), collision.centFT0C());
return true;
}

Expand Down
Loading