diff --git a/Analysis/DumpEvent/src/DumpMCParticleAlg.cpp b/Analysis/DumpEvent/src/DumpMCParticleAlg.cpp
index 56d68151489b3515c6089b9947b7a1ab7a78301a..33c730123ab45553783e328b91197387c31b794e 100644
--- a/Analysis/DumpEvent/src/DumpMCParticleAlg.cpp
+++ b/Analysis/DumpEvent/src/DumpMCParticleAlg.cpp
@@ -93,11 +93,11 @@ StatusCode DumpMCParticleAlg::execute(){
       m_charge[m_nParticles] = particle.getCharge();
       m_time[m_nParticles] = particle.getTime();
       m_mass[m_nParticles] = particle.getMass();
-      const edm4hep::Vector3d& vertex = particle.getVertex();
+      const auto& vertex = particle.getVertex();
       m_vx[m_nParticles] = vertex.x;
       m_vy[m_nParticles] = vertex.y;
       m_vz[m_nParticles] = vertex.z;
-      const edm4hep::Vector3f& momentum = particle.getMomentum();
+      const auto& momentum = particle.getMomentum();
       m_px[m_nParticles] = momentum.x;
       m_py[m_nParticles] = momentum.y;
       m_pz[m_nParticles] = momentum.z;
diff --git a/Digitisers/SimpleDigi/src/TPCDigiAlg.cpp b/Digitisers/SimpleDigi/src/TPCDigiAlg.cpp
index 44f43fc77144d3467a795c195a7da9bbba1e13f9..c6057e548414e27ed26ac1c683964a15bb497c60 100644
--- a/Digitisers/SimpleDigi/src/TPCDigiAlg.cpp
+++ b/Digitisers/SimpleDigi/src/TPCDigiAlg.cpp
@@ -590,7 +590,7 @@ StatusCode TPCDigiAlg::execute()
       if(mcp.isAvailable()){
 
         // get the pt of the MCParticle, this will used later to uses nominal smearing for low momentum rubish
-        const edm4hep::Vector3f momentumMC= mcp.getMomentum() ;
+        const auto& momentumMC= mcp.getMomentum() ;
         ptSqrdMC = momentumMC[0]*momentumMC[0]+momentumMC[1]*momentumMC[1] ;
         
         debug() << " mcp id = " << mcp.id() 
@@ -1057,7 +1057,7 @@ StatusCode TPCDigiAlg::execute()
         auto mcp = (_tpcHitMap[ seed_hit ]).getMCParticle() ;
         if(mcp.isAvailable()) {
           ++_NLostPhysicsTPCHits;
-          const edm4hep::Vector3f mom= mcp.getMomentum() ;
+          const auto& mom= mcp.getMomentum() ;
           double ptSQRD = mom[0]*mom[0]+mom[1]*mom[1] ;
           if( ptSQRD > (0.2*0.2) ) ++_NLostPhysicsAbove02GeVPtTPCHits ;
           if( ptSQRD > 1.0 )  ++_NLostPhysicsAbove1GeVPtTPCHits ;
diff --git a/Reconstruction/RecGenfitAlg/src/GenfitTrack.cpp b/Reconstruction/RecGenfitAlg/src/GenfitTrack.cpp
index 7209847b8864166328e6f454662ccd28aaaf559c..9d1da9c3026c900045846b1704050957715c8026 100644
--- a/Reconstruction/RecGenfitAlg/src/GenfitTrack.cpp
+++ b/Reconstruction/RecGenfitAlg/src/GenfitTrack.cpp
@@ -40,6 +40,7 @@
 
 //cpp
 #include <cfloat>
+#include <type_traits>
 
 const int GenfitTrack::s_PDG[2][5]
 ={{-11,-13,211,321,2212},{11,13,-211,-321,-2212}};
@@ -123,8 +124,8 @@ bool GenfitTrack::createGenfitTrackFromMCParticle(int pidType,
         const edm4hep::MCParticle& mcParticle, double eventStartTime)
 {
     ///get track parameters from McParticle
-    edm4hep::Vector3d mcPocaPos = mcParticle.getVertex();//mm
-    edm4hep::Vector3f mcPocaMom = mcParticle.getMomentum();//GeV
+    const auto& mcPocaPos = mcParticle.getVertex();//mm
+    const auto& mcPocaMom = mcParticle.getMomentum();//GeV
     if(m_debug>=2)std::cout<<"seedPos poca "<< mcPocaPos.x
         <<" "<<mcPocaPos.y<<" "<<mcPocaPos.z<<" mm "<<std::endl;
     if(m_debug>=2)std::cout<<"seedMom poca "<< mcPocaMom.x
@@ -132,7 +133,8 @@ bool GenfitTrack::createGenfitTrackFromMCParticle(int pidType,
 
     ///Pivot to first layer to avoid correction of beam pipe
     edm4hep::Vector3d firstLayerPos(1e9,1e9,1e9);
-    edm4hep::Vector3f firstLayerMom(1e9,1e9,1e9);
+    using MomentumT = std::remove_cv_t<std::remove_reference_t<decltype(mcPocaMom)>>;
+    MomentumT firstLayerMom{1e9,1e9,1e9};
     pivotToFirstLayer(mcPocaPos,mcPocaMom,firstLayerPos,firstLayerMom);
 
     //TODO convert unit
@@ -827,13 +829,3 @@ bool GenfitTrack::storeTrack(edm4hep::MutableReconstructedParticle& recParticle,
 
     return true;
 }
-
-void GenfitTrack::pivotToFirstLayer(edm4hep::Vector3d& pos,
-        edm4hep::Vector3f& mom, edm4hep::Vector3d& firstPos,
-        edm4hep::Vector3f& firstMom)
-{
-    //FIXME, TODO
-    firstPos=pos;
-    firstMom=mom;
-}
-
diff --git a/Reconstruction/RecGenfitAlg/src/GenfitTrack.h b/Reconstruction/RecGenfitAlg/src/GenfitTrack.h
index bcff947944fbca3966818333c6496a6217f1d42c..6daf6ec601691e0396ca9e242e6eb5c1cd57d36f 100644
--- a/Reconstruction/RecGenfitAlg/src/GenfitTrack.h
+++ b/Reconstruction/RecGenfitAlg/src/GenfitTrack.h
@@ -124,8 +124,13 @@ class GenfitTrack {
             int ndfCut=1e9, double chi2Cut=1.e9);
 
     ///A tool to convert track to the first layer of DC
-    void pivotToFirstLayer(edm4hep::Vector3d& pos,edm4hep::Vector3f& mom,
-            edm4hep::Vector3d& firstPos, edm4hep::Vector3f& firstMom);
+    template<typename MomT>
+    void pivotToFirstLayer(const edm4hep::Vector3d& pos, const MomT& mom,
+                           edm4hep::Vector3d& firstPos, MomT& firstMom) {
+        //FIXME, TODO
+        firstPos=pos;
+        firstMom=mom;
+    }
 
     /// Copy a track to event
     //void CopyATrack()const;
diff --git a/Reconstruction/RecGenfitAlg/src/RecGenfitAlgDC.cpp b/Reconstruction/RecGenfitAlg/src/RecGenfitAlgDC.cpp
index 6619c418ebd22f4dc7d21d1be1a52327e8dd2a7d..8dc13f65c0317fed845dd12d82395c21fdd99c93 100644
--- a/Reconstruction/RecGenfitAlg/src/RecGenfitAlgDC.cpp
+++ b/Reconstruction/RecGenfitAlg/src/RecGenfitAlgDC.cpp
@@ -397,7 +397,7 @@ void RecGenfitAlgDC::debugEvent()
     m_mcIndex=iHit;
     int iMcParticle=0;
     for(auto mcParticle : *mcParticleCol){
-        edm4hep::Vector3f mcPocaMom = mcParticle.getMomentum();//GeV
+        const auto& mcPocaMom = mcParticle.getMomentum();//GeV
         float px=mcPocaMom.x;
         float py=mcPocaMom.y;
         float pz=mcPocaMom.z;
diff --git a/Reconstruction/Tracking/src/TruthTracker/TruthTrackerAlg.cpp b/Reconstruction/Tracking/src/TruthTracker/TruthTrackerAlg.cpp
index 977dde6470f74e85953f9ea5493ed1529c4ef0dc..6c2876b8bc9c57dfd233b83c4881450dd57c82ae 100644
--- a/Reconstruction/Tracking/src/TruthTracker/TruthTrackerAlg.cpp
+++ b/Reconstruction/Tracking/src/TruthTracker/TruthTrackerAlg.cpp
@@ -169,7 +169,7 @@ StatusCode TruthTrackerAlg::execute()
         mcParticleVertexSmeared.z=
             CLHEP::RandGauss::shoot(mcParticleVertex.z,m_resVertexZ);
         ///Momentum
-        edm4hep::Vector3f mcParticleMom=mcParticle.getMomentum();//GeV
+        const auto& mcParticleMom=mcParticle.getMomentum();//GeV
         double mcParticlePt=sqrt(mcParticleMom.x*mcParticleMom.x+
                 mcParticleMom.y*mcParticleMom.y);
         //double mcParticlePtSmeared=
diff --git a/Simulation/DetSimCore/src/G4PrimaryCnvTool.cpp b/Simulation/DetSimCore/src/G4PrimaryCnvTool.cpp
index 06528ec5538d1ba7b4fd406650c71e7aaab759f5..9e027750383bbb8c856248f4736275a730b843e0 100644
--- a/Simulation/DetSimCore/src/G4PrimaryCnvTool.cpp
+++ b/Simulation/DetSimCore/src/G4PrimaryCnvTool.cpp
@@ -72,7 +72,7 @@ bool G4PrimaryCnvTool::mutate(G4Event* anEvent) {
             particle_def = particletbl->FindParticle(pdgcode);
         }
         // momentum
-        const edm4hep::Vector3f& momentum = p.getMomentum();
+        const auto& momentum = p.getMomentum();
         G4PrimaryParticle* g4prim = new G4PrimaryParticle(particle_def,
                                                           momentum.x*CLHEP::GeV,
                                                           momentum.y*CLHEP::GeV,