]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ISAJET/code/dblpcm.F
changes for proper protection against failed retrieval of CDB Reco object (moved...
[u/mrichter/AliRoot.git] / ISAJET / code / dblpcm.F
1 #include "isajet/pilot.h"
2       FUNCTION DBLPCM(A,B,C)
3 C          Calculate com momentum for A-->B+C with double precision.
4 C          Needed to fix bug on 32-bit machines at high energy.
5 C          Ver. 7.27: Rewrite order and then take abs value to be sure.
6 #include "isajet/itapes.inc"
7 #if defined(CERNLIB_DOUBLE)
8       DOUBLE PRECISION DA,DB,DC,DVAL
9 #endif
10 C          Convert to double precision
11       DA=A
12       DB=B
13       DC=C
14       DVAL=(DA-(DB+DC))*(DA+(DB+DC))*(DA-(DB-DC))*(DA+(DB-DC))
15 C          Convert back to single precision
16       VAL=DVAL
17       DBLPCM=SQRT(ABS(VAL))/(2.*A)
18       RETURN
19       END