Dear friends, Note that for the pseudo-rapidity (eta) one can write eta=-log(tan(theta/2.)) where theta is the angle (in rad) w.r.t. the beam direction. This makes things a lot easier. Realize however, that by introducing a GetPseudoRapidity() memberfunction one imposes the user to define the z-axis as the beam direction. This may sometimes give limitations. I would say it's better to provide 3-vector components and let the user determine the pseudorap. him/her self. Cheers, Nick. "M. Sievers" wrote: > > 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