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: 6 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 @@ -127,8 +127,8 @@
// 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}"};

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"};

Check failure on line 131 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.
static constexpr int kIdPion = 2;

void init(o2::framework::InitContext&)
Expand Down Expand Up @@ -197,10 +197,10 @@
histos.add("h2dRelativeEtaResolution", "h2dRelativeEtaResolution", kTH2F, {axisEta, axisRelativeEta});

for (int i_true = 0; i_true < kParticles; i_true++) {
std::string name_title_inner_track_res = "h2dInnerTimeResTrack" + particle_names2[i_true] + "VsP";

Check failure on line 200 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 name_title_inner_total_res = "h2dInnerTimeResTotal" + particle_names2[i_true] + "VsP";

Check failure on line 201 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 name_title_outer_track_res = "h2dOuterTimeResTrack" + particle_names2[i_true] + "VsP";

Check failure on line 202 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 name_title_outer_total_res = "h2dOuterTimeResTotal" + particle_names2[i_true] + "VsP";

Check failure on line 203 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.
const AxisSpec axisTrackTimeRes{static_cast<int>(plotsConfig.nBinsTimeRes), 0.0f, +200.0f, "Track time resolution - " + particle_names1[i_true] + " (ps)"};
const AxisSpec axisTotalTimeRes{static_cast<int>(plotsConfig.nBinsTimeRes), 0.0f, +200.0f, "Total time resolution - " + particle_names1[i_true] + " (ps)"};
h2dInnerTimeResTrack[i_true] = histos.add<TH2>(name_title_inner_track_res.c_str(), name_title_inner_track_res.c_str(), kTH2F, {axisMomentum, axisTrackTimeRes});
Expand All @@ -208,8 +208,8 @@
h2dOuterTimeResTrack[i_true] = histos.add<TH2>(name_title_outer_track_res.c_str(), name_title_outer_track_res.c_str(), kTH2F, {axisMomentum, axisTrackTimeRes});
h2dOuterTimeResTotal[i_true] = histos.add<TH2>(name_title_outer_total_res.c_str(), name_title_outer_total_res.c_str(), kTH2F, {axisMomentum, axisTotalTimeRes});
for (int i_hyp = 0; i_hyp < kParticles; i_hyp++) {
std::string name_title_inner = "h2dInnerNsigmaTrue" + particle_names2[i_true] + "Vs" + particle_names2[i_hyp] + "Hypothesis";

Check failure on line 211 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 name_title_outer = "h2dOuterNsigmaTrue" + particle_names2[i_true] + "Vs" + particle_names2[i_hyp] + "Hypothesis";

Check failure on line 212 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 name_title_inner_delta = "h2dInnerDeltaTrue" + particle_names2[i_true] + "Vs" + particle_names2[i_hyp] + "Hypothesis";
std::string name_title_outer_delta = "h2dOuterDeltaTrue" + particle_names2[i_true] + "Vs" + particle_names2[i_hyp] + "Hypothesis";
const AxisSpec axisX{plotsConfig.doSeparationVsPt.value ? axisPt : axisMomentum};
Expand Down Expand Up @@ -498,8 +498,9 @@

float xPv = -100, trackLengthInnerTOF = -1, trackLengthOuterTOF = -1;
static constexpr float xThreshold = -99.f; // Threshold to consider a good propagation of the track
if (o2track.propagateToDCA(mcPvVtx, simConfig.dBz)){
xPv = o2track.getX();}
if (o2track.propagateToDCA(mcPvVtx, simConfig.dBz)) {
xPv = o2track.getX();
}
if (xPv > xThreshold) {
trackLengthInnerTOF = trackLength(o2track, simConfig.innerTOFRadius, simConfig.dBz);
trackLengthOuterTOF = trackLength(o2track, simConfig.outerTOFRadius, simConfig.dBz);
Expand All @@ -523,8 +524,9 @@
// and the (imperfect!) reconstructed track parametrizations
float trackLengthRecoInnerTOF = -1, trackLengthRecoOuterTOF = -1;
auto recoTrack = getTrackParCov(track);
if (recoTrack.propagateToDCA(pvVtx, simConfig.dBz)){
xPv = recoTrack.getX();}
if (recoTrack.propagateToDCA(pvVtx, simConfig.dBz)) {
xPv = recoTrack.getX();
}
if (xPv > xThreshold) {
trackLengthRecoInnerTOF = trackLength(recoTrack, simConfig.innerTOFRadius, simConfig.dBz);
trackLengthRecoOuterTOF = trackLength(recoTrack, simConfig.outerTOFRadius, simConfig.dBz);
Expand Down
Loading