Skip to content
Snippets Groups Projects
Commit b8675706 authored by Rene Brun's avatar Rene Brun
Browse files

Improvement in previous fix in TParticle::Eta in case fPz <0

git-svn-id: http://root.cern.ch/svn/root/trunk@14187 27541ba8-7e3a-0410-8455-c3a389f83636
parent 25a630e4
No related branches found
No related tags found
No related merge requests found
// @(#)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 // Author: Rene Brun , Federico Carminati 26/04/99
/************************************************************************* /*************************************************************************
...@@ -132,8 +132,8 @@ public: ...@@ -132,8 +132,8 @@ public:
Double_t Eta () const Double_t Eta () const
{ {
Double_t pmom = P(); Double_t pmom = P();
if (pmom != fPz) return 0.5*TMath::Log((pmom+fPz)/(pmom-fPz)); if (pmom != TMath::Abs(fPz)) return 0.5*TMath::Log((pmom+fPz)/(pmom-fPz));
else return 1.e30; 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 Double_t Phi () const { return TMath::Pi()+TMath::ATan2(-fPy,-fPx); } // note that Phi() returns an angle between 0 and 2pi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment