Return the most probable momentum if the magnetic field is too weak and the momentum...
[u/mrichter/AliRoot.git] / TPC / AliTPCtrack.cxx
index 3a3a36950748bbe155b572a0a07636a2a6b9e597..d6733b39e26e7f795ec30237d19028935e322937 100644 (file)
@@ -740,3 +740,13 @@ void  AliTPCtrack::UpdatePoints()
   }
   //
 }
+
+Double_t AliTPCtrack::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();
+}