Bug in TVector3::PseudoRapidity() ?

From: M. Sievers (sieversm@mail.desy.de)
Date: Wed Oct 20 1999 - 14:44:26 MEST


Hi,

it seems to me that the PseudoRapidity in 2.23/04 has a bug. Is there a
minus sign missing? See below the line I changed to get it working.

Bye,
Mike
 


*** PHYSICS_Vector3.cxx.orig    Wed Oct 20 14:32:22 1999
--- PHYSICS_Vector3.cxx Wed Oct 20 14:33:08 1999
***************
*** 274,280 ****
    //return 0.5*log( (m+fZ)/(m-fZ) );
    // guard against Pt=0
    double cosTheta = CosTheta();
!   if (cosTheta*cosTheta < 1) return 0.5* TMath::Log(
(1.0-cosTheta)/(1.0+cosTh
eta) );
    Warning("PseudoRapidity","transvers momentum = 0! return +/- 10e10");
    if (fZ > 0) return 10e10;
    else        return -10e10;
--- 274,280 ----
    //return 0.5*log( (m+fZ)/(m-fZ) );
    // guard against Pt=0
    double cosTheta = CosTheta();
!   if (cosTheta*cosTheta < 1) return -0.5* TMath::Log(
(1.0-cosTheta)/(1.0+cosT
heta) );
    Warning("PseudoRapidity","transvers momentum = 0! return +/- 10e10");
    if (fZ > 0) return 10e10;
    else        return -10e10;


--------------------------------------------------------------------------
Michael Sievers
Michael.Sievers@desy.de
--------------------------------------------------------------------------
esa$ gcc -Wall -o ariane5 ariane4.c
ariane4.c: 666: warning: long float implicitly truncated to unsigned type
esa$ ariane5



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:41 MET