Skip to content
Open
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
5 changes: 3 additions & 2 deletions ALICE3/Tasks/alice3-qa-singleparticle.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 ALICE3/Tasks/alice3-qa-singleparticle.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 @@ -15,6 +15,7 @@
/// \brief Task to monitor the single particle QA, at the particle and track level, showing the tracked and the origin of particles
///

#include <CommonConstants/PhysicsConstants.h>
#include <Framework/ASoA.h>
#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisHelpers.h>
Expand All @@ -27,7 +28,7 @@
#include <Framework/OutputObjHeader.h>
#include <Framework/runDataProcessing.h>

#include <TDatabasePDG.h>

Check failure on line 31 in ALICE3/Tasks/alice3-qa-singleparticle.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 <TH1.h>
#include <TH2.h>
#include <TMCProcess.h>
Expand All @@ -46,12 +47,12 @@

struct Alice3SingleParticle {
Service<o2::framework::O2DatabasePDG> pdg;
Configurable<int> PDG{"PDG", 2212, "PDG code of the particle of interest"};

Check failure on line 50 in ALICE3/Tasks/alice3-qa-singleparticle.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<int> IsStable{"IsStable", 0, "Flag to check stable particles"};

Check failure on line 51 in ALICE3/Tasks/alice3-qa-singleparticle.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.)
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
Configurable<int> ptBins{"pt-bins", 500, "Number of pT bins"};

Check failure on line 53 in ALICE3/Tasks/alice3-qa-singleparticle.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> ptMin{"pt-min", 0.f, "Lower limit in pT"};

Check failure on line 54 in ALICE3/Tasks/alice3-qa-singleparticle.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> ptMax{"pt-max", 10.f, "Upper limit in pT"};

Check failure on line 55 in ALICE3/Tasks/alice3-qa-singleparticle.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<int> etaBins{"eta-bins", 500, "Number of eta bins"};
Configurable<float> etaMin{"eta-min", -3.f, "Lower limit in eta"};
Configurable<float> etaMax{"eta-max", 3.f, "Upper limit in eta"};
Expand Down Expand Up @@ -88,10 +89,10 @@
pdg->AddParticle("triton", "triton", 2.8089218, kTRUE, 0.0, 3, "Nucleus", 1000010030);
pdg->AddAntiParticle("anti-triton", -1000010030);

pdg->AddParticle("helium3", "helium3", 2.80839160743, kTRUE, 0.0, 6, "Nucleus", 1000020030);
pdg->AddParticle("helium3", "helium3", o2::constants::physics::MassHelium3, kTRUE, 0.0, 6, "Nucleus", 1000020030);
pdg->AddAntiParticle("anti-helium3", -1000020030);

pdg->AddParticle("helium4", "helium4", 2.80839160743, kTRUE, 0.0, 6, "Nucleus", 1000020040);
pdg->AddParticle("helium4", "helium4", o2::constants::physics::MassAlpha, kTRUE, 0.0, 6, "Nucleus", 1000020040);
pdg->AddAntiParticle("anti-helium4", -1000020040);

const TString tit = Form("%i", PDG.value);
Expand Down Expand Up @@ -374,7 +375,7 @@
histos.fill(HIST("particle/prodRadius"), std::sqrt(mcParticle.vx() * mcParticle.vx() + mcParticle.vy() * mcParticle.vy()));
histos.fill(HIST("particle/prodVxVy"), mcParticle.vx(), mcParticle.vy());
if (!mcParticle.isPhysicalPrimary()) {
if (mcParticle.getProcess() == 4) {

Check failure on line 378 in ALICE3/Tasks/alice3-qa-singleparticle.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.
histos.fill(HIST("particle/prodVxVyStr"), mcParticle.vx(), mcParticle.vy());
} else {
histos.fill(HIST("particle/prodVxVyMat"), mcParticle.vx(), mcParticle.vy());
Expand Down Expand Up @@ -571,7 +572,7 @@
histos.fill(HIST("particle/prodRadius"), std::sqrt(mcParticle.vx() * mcParticle.vx() + mcParticle.vy() * mcParticle.vy()));
histos.fill(HIST("particle/prodVxVy"), mcParticle.vx(), mcParticle.vy());
if (!mcParticle.isPhysicalPrimary()) {
if (mcParticle.getProcess() == 4) {

Check failure on line 575 in ALICE3/Tasks/alice3-qa-singleparticle.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.
histos.fill(HIST("particle/prodVxVyStr"), mcParticle.vx(), mcParticle.vy());
} else {
histos.fill(HIST("particle/prodVxVyMat"), mcParticle.vx(), mcParticle.vy());
Expand Down Expand Up @@ -693,7 +694,7 @@
histos.fill(HIST("particle/prodRadius"), std::sqrt(mcParticle.vx() * mcParticle.vx() + mcParticle.vy() * mcParticle.vy()));
histos.fill(HIST("particle/prodVxVy"), mcParticle.vx(), mcParticle.vy());
if (!mcParticle.isPhysicalPrimary()) {
if (mcParticle.getProcess() == 4) {

Check failure on line 697 in ALICE3/Tasks/alice3-qa-singleparticle.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.
histos.fill(HIST("particle/prodVxVyStr"), mcParticle.vx(), mcParticle.vy());
} else {
histos.fill(HIST("particle/prodVxVyMat"), mcParticle.vx(), mcParticle.vy());
Expand Down
Loading