From b8675706be8b6f1ba89d90372d3c8a01500aeeca Mon Sep 17 00:00:00 2001
From: Rene Brun <Rene.Brun@cern.ch>
Date: Mon, 6 Mar 2006 21:50:09 +0000
Subject: [PATCH] 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
---
 eg/inc/TParticle.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eg/inc/TParticle.h b/eg/inc/TParticle.h
index 1b74d20f4bf..6477da76c13 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
-- 
GitLab