2020#define ALICE3_CORE_TRACKUTILITIES_H_
2121
2222#include " ReconstructionDataFormats/Track.h"
23+ #include " Framework/O2DatabasePDGPlugin.h"
24+ #include " Framework/AnalysisHelpers.h"
2325
2426namespace 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>
5961o2::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
0 commit comments