diff --git a/eg/inc/TParticle.h b/eg/inc/TParticle.h index 1b74d20f4bf8133c4b1a8a9aaff2a2aed2825e21..6477da76c13b949de01f61cf63dd201dd0232f0a 100644 --- a/eg/inc/TParticle.h +++ b/eg/inc/TParticle.h @@ -1,4 +1,4 @@ -// @(#)root/eg:$Name: $:$Id: TParticle.h,v 1.12 2006/01/18 16:47:43 brun Exp $ +// @(#)root/eg:$Name: $:$Id: TParticle.h,v 1.13 2006/03/06 16:16:22 brun Exp $ // Author: Rene Brun , Federico Carminati 26/04/99 /************************************************************************* @@ -132,8 +132,8 @@ public: Double_t Eta () const { Double_t pmom = P(); - if (pmom != fPz) return 0.5*TMath::Log((pmom+fPz)/(pmom-fPz)); - else return 1.e30; + if (pmom != TMath::Abs(fPz)) return 0.5*TMath::Log((pmom+fPz)/(pmom-fPz)); + else return 1.e30; } Double_t Phi () const { return TMath::Pi()+TMath::ATan2(-fPy,-fPx); } // note that Phi() returns an angle between 0 and 2pi