Skip to content

Commit 5fffa74

Browse files
committed
Update
1 parent ffc284f commit 5fffa74

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

ALICE3/Core/TrackUtilities.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#define ALICE3_CORE_TRACKUTILITIES_H_
2121

2222
#include "ReconstructionDataFormats/Track.h"
23+
#include "Framework/O2DatabasePDGPlugin.h"
24+
#include "Framework/AnalysisHelpers.h"
2325

2426
namespace o2::upgrade
2527
{
@@ -32,7 +34,7 @@ void convertMCParticleToO2Track(McParticleType& particle,
3234
o2::track::TrackParCov& o2track,
3335
const o2::framework::Service<o2::framework::O2DatabasePDG>& pdg)
3436
{
35-
auto pdgInfo = pdg->GetParticle(particle.pdgCode());
37+
const auto pdgInfo = pdg->GetParticle(particle.pdgCode());
3638
int charge = 0;
3739
if (pdgInfo != nullptr) {
3840
charge = pdgInfo->Charge() / 3;
@@ -44,7 +46,7 @@ void convertMCParticleToO2Track(McParticleType& particle,
4446
o2::math_utils::rotateZInv(particle.vx(), particle.vy(), x, params[0], s, c);
4547
params[1] = particle.vz();
4648
params[2] = 0.; // since alpha = phi
47-
auto theta = 2. * std::atan(std::exp(-particle.eta()));
49+
const auto theta = 2. * std::atan(std::exp(-particle.eta()));
4850
params[3] = 1. / std::tan(theta);
4951
params[4] = charge / particle.pt();
5052

@@ -59,7 +61,7 @@ template <typename McParticleType>
5961
o2::track::TrackParCov convertMCParticleToO2Track(McParticleType& particle,
6062
const o2::framework::Service<o2::framework::O2DatabasePDG>& pdg)
6163
{
62-
TrackParCov o2track;
64+
o2::track::TrackParCov o2track;
6365
convertMCParticleToO2Track(particle, o2track, pdg);
6466
}
6567

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ struct OnTheFlyTracker {
276276
mapPdgLut.insert(std::make_pair(1000010030, lutTrChar));
277277
mapPdgLut.insert(std::make_pair(1000020030, lutHe3Char));
278278
}
279-
for (auto e : mapPdgLut) {
279+
for (const auto& e : mapPdgLut) {
280280
if (!mSmearer.loadTable(e.first, e.second)) {
281281
LOG(fatal) << "Having issue with loading the LUT " << e.first << " " << e.second;
282282
}

0 commit comments

Comments
 (0)