]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITStrackV2.cxx
Return the most probable momentum if the magnetic field is too weak and the momentum...
[u/mrichter/AliRoot.git] / ITS / AliITStrackV2.cxx
index 1ee79a2562f0a18114bdc3096a096bf46efb8c93..60834d30969a9ff5fecc2df77163e79ee2bfa672 100644 (file)
@@ -760,3 +760,13 @@ PropagateToDCA(AliKalmanTrack *p, Double_t d, Double_t x0) {
 
   return dca;
 } 
+
+Double_t AliITStrackV2::Get1Pt() const {
+  //--------------------------------------------------------------
+  // Returns the inverse Pt (1/GeV/c)
+  // (or 1/"most probable pt", if the field is too weak)
+  //--------------------------------------------------------------
+  if (TMath::Abs(GetLocalConvConst()) > kVeryBigConvConst)
+      return 1./kMostProbableMomentum/TMath::Sqrt(1.+ GetTgl()*GetTgl());
+  return (TMath::Sign(1e-9,fP4) + fP4)*GetLocalConvConst();
+}