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
8 changes: 4 additions & 4 deletions ALICE3/TableProducer/OTF/onTheFlyTOFPID.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/TableProducer/OTF/onTheFlyTOFPID.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -19,7 +19,7 @@
/// being used in the onTheFly tracker task.
///
/// \author David Dobrigkeit Chinellato, UNICAMP
/// \author Nicola Nicassio, University and INFN Bari

Check failure on line 22 in ALICE3/TableProducer/OTF/onTheFlyTOFPID.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

#include <utility>
#include <map>
Expand Down Expand Up @@ -126,10 +126,10 @@

// for handling basic QA histograms if requested
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
static constexpr int kParticles = 5;
std::string particle_names1[kParticles] = {"#it{e}", "#it{#mu}", "#it{#pi}", "#it{K}", "#it{p}"};
std::string particle_names2[kParticles] = {"Elec", "Muon", "Pion", "Kaon", "Prot"};
static constexpr int kIdPion = 2;
static constexpr int kParticles = 5;
std::string particle_names1[kParticles] = {"#it{e}", "#it{#mu}", "#it{#pi}", "#it{K}", "#it{p}"};

Check failure on line 130 in ALICE3/TableProducer/OTF/onTheFlyTOFPID.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
std::string particle_names2[kParticles] = {"Elec", "Muon", "Pion", "Kaon", "Prot"};
static constexpr int kIdPion = 2;

void init(o2::framework::InitContext&)
{
Expand Down Expand Up @@ -499,7 +499,7 @@
float xPv = -100, trackLengthInnerTOF = -1, trackLengthOuterTOF = -1;
if (o2track.propagateToDCA(mcPvVtx, simConfig.dBz))
xPv = o2track.getX();
if (xPv > -99.) {

Check failure on line 502 in ALICE3/TableProducer/OTF/onTheFlyTOFPID.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.
trackLengthInnerTOF = trackLength(o2track, simConfig.innerTOFRadius, simConfig.dBz);
trackLengthOuterTOF = trackLength(o2track, simConfig.outerTOFRadius, simConfig.dBz);
}
Expand All @@ -524,7 +524,7 @@
auto recoTrack = getTrackParCov(track);
if (recoTrack.propagateToDCA(pvVtx, simConfig.dBz))
xPv = recoTrack.getX();
if (xPv > -99.) {

Check failure on line 527 in ALICE3/TableProducer/OTF/onTheFlyTOFPID.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.
trackLengthRecoInnerTOF = trackLength(recoTrack, simConfig.innerTOFRadius, simConfig.dBz);
trackLengthRecoOuterTOF = trackLength(recoTrack, simConfig.outerTOFRadius, simConfig.dBz);
}
Expand Down Expand Up @@ -600,7 +600,7 @@
}
}

for (int ii = 0; ii < 5; ii++) {

Check failure on line 603 in ALICE3/TableProducer/OTF/onTheFlyTOFPID.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.
nSigmaInnerTOF[ii] = -100;
nSigmaOuterTOF[ii] = -100;

Expand Down Expand Up @@ -639,7 +639,7 @@
float transverse_momentum = momentum / std::cosh(pseudorapidity);
h2dOuterTimeResTrack[ii]->Fill(momentum, outerTrackTimeReso);
h2dOuterTimeResTotal[ii]->Fill(momentum, outerTotalTimeReso);
if (ii == 2) {

Check failure on line 642 in ALICE3/TableProducer/OTF/onTheFlyTOFPID.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("h2dRelativePtResolution"), transverse_momentum, 100.0 * pt_resolution / transverse_momentum);
histos.fill(HIST("h2dRelativeEtaResolution"), pseudorapidity, 100.0 * eta_resolution / (std::fabs(pseudorapidity) + 1e-6));
}
Expand All @@ -658,18 +658,18 @@
}

if (plotsConfig.doQAplots) {
for (int ii = 0; ii < 5; ii++) {

Check failure on line 661 in ALICE3/TableProducer/OTF/onTheFlyTOFPID.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.
if (std::fabs(mcParticle.pdgCode()) != pdg->GetParticle(pdgArray[ii])->PdgCode()) {
continue;
}
if (trackLengthRecoInnerTOF > 0) {
for (int iii = 0; iii < 5; iii++) {

Check failure on line 666 in ALICE3/TableProducer/OTF/onTheFlyTOFPID.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.
h2dInnerNsigmaTrue[ii][iii]->Fill(momentum, nSigmaInnerTOF[iii]);
h2dInnerDeltaTrue[ii][iii]->Fill(momentum, deltaTimeInnerTOF[iii]);
}
}
if (trackLengthRecoOuterTOF > 0) {
for (int iii = 0; iii < 5; iii++) {

Check failure on line 672 in ALICE3/TableProducer/OTF/onTheFlyTOFPID.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.
h2dOuterNsigmaTrue[ii][iii]->Fill(momentum, nSigmaOuterTOF[iii]);
h2dOuterDeltaTrue[ii][iii]->Fill(momentum, deltaTimeOuterTOF[iii]);
}
Expand Down
Loading