A faster getter for Pz()
authorbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 Jan 2010 14:11:57 +0000 (14:11 +0000)
committerbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 Jan 2010 14:11:57 +0000 (14:11 +0000)
STEER/AliExternalTrackParam.cxx

index 9fe6d95..1e4086d 100644 (file)
@@ -1458,11 +1458,7 @@ Double_t AliExternalTrackParam::Pz() const {
   // Returns z-component of momentum
   // Result for (nearly) straight tracks is meaningless !
   //---------------------------------------------------------------------
-
-  Double_t p[3]={kVeryBig,kVeryBig,kVeryBig};
-  GetPxPyPz(p);
-
-  return p[2];
+  return Pt()*GetTgl();
 }
 
 Double_t AliExternalTrackParam::Xv() const {