]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
The getter Pz() is now inlined. A new faster and also inlined getter Zv().
authorbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 Jan 2010 15:31:12 +0000 (15:31 +0000)
committerbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 Jan 2010 15:31:12 +0000 (15:31 +0000)
STEER/AliExternalTrackParam.cxx
STEER/AliExternalTrackParam.h

index 1e4086d38d34e03d840a4df6b150113cdac606ee..f0f7b484c467ef8d201429b0984c56bb44b4575f 100644 (file)
@@ -1453,14 +1453,6 @@ Double_t AliExternalTrackParam::Py() const {
   return p[1];
 }
 
-Double_t AliExternalTrackParam::Pz() const {
-  //---------------------------------------------------------------------
-  // Returns z-component of momentum
-  // Result for (nearly) straight tracks is meaningless !
-  //---------------------------------------------------------------------
-  return Pt()*GetTgl();
-}
-
 Double_t AliExternalTrackParam::Xv() const {
   //---------------------------------------------------------------------
   // Returns x-component of first track point
@@ -1483,17 +1475,6 @@ Double_t AliExternalTrackParam::Yv() const {
   return r[1];
 }
 
-Double_t AliExternalTrackParam::Zv() const {
-  //---------------------------------------------------------------------
-  // Returns z-component of first track point
-  //---------------------------------------------------------------------
-
-  Double_t r[3]={0.,0.,0.};
-  GetXYZ(r);
-
-  return r[2];
-}
-
 Double_t AliExternalTrackParam::Theta() const {
   // return theta angle of momentum
 
index 87489e980d51dc299e1da5c683e2b4792173ed34..8a6095896e43d57d76182320e34c7df92af913b3 100644 (file)
@@ -96,14 +96,14 @@ class AliExternalTrackParam: public AliVTrack {
   // additional functions for AliVParticle
   Double_t Px() const;
   Double_t Py() const;
-  Double_t Pz() const;
+  Double_t Pz() const {Pt()*GetTgl();}
   Double_t Pt() const { return TMath::Abs(GetSignedPt()); }
   Double_t P() const { return GetP(); }
   Bool_t   PxPyPz(Double_t p[3]) const { return GetPxPyPz(p); }
   
   Double_t Xv() const;
   Double_t Yv() const;
-  Double_t Zv() const;
+  Double_t Zv() const {return GetZ();}
   Bool_t   XvYvZv(Double_t x[3]) const { return GetXYZ(x); }
 
   Double_t OneOverPt() const { return 1./Pt(); }