Skip to content
Merged
Show file tree
Hide file tree
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
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/Strangeness/Converters/stradautrackstofpidconverter3.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 @@ -18,9 +18,9 @@
#include "PWGLF/DataModel/LFStrangenessPIDTables.h"
#include "PWGLF/DataModel/LFStrangenessTables.h"

#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/runDataProcessing.h"
#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisTask.h>
#include <Framework/runDataProcessing.h>

using namespace o2;
using namespace o2::framework;
Expand All @@ -36,13 +36,13 @@
dautracktofpids.reserve(dauTracks.size());
for (const auto& dauTrack : dauTracks) {
dautracktofpids(
-1,
-1,
dauTrack.straCollisionId(),
dauTrack.dauTrackExtraId(),
dauTrack.tofSignal(),
dauTrack.tofEvTime(),
999.0f, /*dummy event time error for TOF*/
dauTrack.length(),
0.0f);
dauTrack.tofExpMom());
}
straEvTimes.reserve(straEvTimes_000.size());
for (const auto& value : straEvTimes_000) {
Expand Down
6 changes: 5 additions & 1 deletion PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
float findInterceptLength(o2::track::TrackPar track, float magneticField)
{
float length = 1e+6;
for (int iSeg = 0; iSeg < 18; iSeg++) {

Check failure on line 376 in PWGLF/TableProducer/Strangeness/strangenesstofpid.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.
// Detector segmentation loop
float segmentAngle = 20.0f / 180.0f * TMath::Pi();
float theta = static_cast<float>(iSeg) * 20.0f / 180.0f * TMath::Pi();
Expand All @@ -387,7 +387,7 @@
length = thisLength;
}
}
if (length > 1e+5)

Check failure on line 390 in PWGLF/TableProducer/Strangeness/strangenesstofpid.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.
length = -100; // force negative to avoid misunderstandings
return length;
}
Expand Down Expand Up @@ -622,10 +622,10 @@
}

// In case override, don't proceed, please - no CCDB access required
if (propagationConfiguration.d_bz_input > -990) {

Check failure on line 625 in PWGLF/TableProducer/Strangeness/strangenesstofpid.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.
d_bz = propagationConfiguration.d_bz_input;
o2::parameters::GRPMagField grpmag;
if (std::fabs(d_bz) > 1e-5) {

Check failure on line 628 in PWGLF/TableProducer/Strangeness/strangenesstofpid.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.
grpmag.setL3Current(30000.f / (d_bz / 5.0f));
}
o2::base::Propagator::initFieldFromGRP(&grpmag);
Expand Down Expand Up @@ -928,7 +928,7 @@
float velocityPositiveEl, velocityPositivePr, velocityPositivePi, lengthPositive;
velocityPositiveEl = velocityPositivePr = velocityPositivePi = lengthPositive = o2::aod::v0data::kNoTOFValue;

if (pTof.hasTOF && pTof.tofEvTime > -1e+5 && pValidTOF) {

Check failure on line 931 in PWGLF/TableProducer/Strangeness/strangenesstofpid.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.
// method 0: legacy standalone without use of primary particle TOF
if (calculationMethod.value == 0) {
velocityPositiveEl = velocity(posTrack.getP(), o2::constants::physics::MassElectron);
Expand Down Expand Up @@ -1044,7 +1044,7 @@
}
float velocityNegativeEl, velocityNegativePr, velocityNegativePi, lengthNegative;
velocityNegativeEl = velocityNegativePr = velocityNegativePi = lengthNegative = o2::aod::v0data::kNoTOFValue;
if (nTof.hasTOF && nTof.tofEvTime > -1e+5 && nValidTOF) {

Check failure on line 1047 in PWGLF/TableProducer/Strangeness/strangenesstofpid.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.
// method 0: legacy standalone without use of primary particle TOF
if (calculationMethod.value == 0) {
velocityNegativeEl = velocity(negTrack.getP(), o2::constants::physics::MassElectron);
Expand Down Expand Up @@ -1279,7 +1279,7 @@

//_____________________________________________________________________________________________
// Actual calculation
if (pTof.hasTOF && pTof.tofEvTime > -1e+5 && pValidTOF) {

Check failure on line 1282 in PWGLF/TableProducer/Strangeness/strangenesstofpid.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.
float velocityPositivePr, velocityPositivePi, lengthPositive;
velocityPositivePr = velocityPositivePi = lengthPositive = o2::aod::v0data::kNoTOFValue;
if (calculationMethod.value == 0) {
Expand Down Expand Up @@ -1415,7 +1415,7 @@
}
} // end positive

if (nTof.hasTOF && nTof.tofEvTime > -1e+5 && nValidTOF) {

Check failure on line 1418 in PWGLF/TableProducer/Strangeness/strangenesstofpid.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.
float velocityNegativePr, velocityNegativePi, lengthNegative;
velocityNegativePr = velocityNegativePi = lengthNegative = o2::aod::v0data::kNoTOFValue;
// method 0: legacy standalone without use of primary particle TOF
Expand Down Expand Up @@ -1552,7 +1552,7 @@
}
} // end negative

if (bTof.hasTOF && bTof.tofEvTime > -1e+5 && bValidTOF) {

Check failure on line 1555 in PWGLF/TableProducer/Strangeness/strangenesstofpid.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.
float velocityBachelorKa, velocityBachelorPi, lengthBachelor;
velocityBachelorKa = velocityBachelorPi = lengthBachelor = o2::aod::v0data::kNoTOFValue;
// method 0: legacy standalone without use of primary particle TOF
Expand Down Expand Up @@ -1967,7 +1967,11 @@
if (isNewTOFFormat) {
// re-index
for (const auto& dauTrackTOFPID : dauTrackTOFPIDs) {
tofIndices[dauTrackTOFPID.dauTrackExtraId()] = dauTrackTOFPID.globalIndex();
if (dauTrackTOFPID.dauTrackExtraId() >= 0) {
tofIndices[dauTrackTOFPID.dauTrackExtraId()] = dauTrackTOFPID.globalIndex();
} else {
LOGF(warning, "dauTrackTOFPID points to no entry in the DauTrackExtras table (dauTrackExtraId = %i)! This could be intentional (for example, using converters) but please be careful.", dauTrackTOFPID.dauTrackExtraId());
}
}
} else {
// they are actually joinable
Expand Down
Loading