]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ISAJET/code/dblpcm.F
Added the magnetic field as a static member of the AliL3Transform class,
[u/mrichter/AliRoot.git] / ISAJET / code / dblpcm.F
CommitLineData
0795afa3 1#include "isajet/pilot.h"
2 FUNCTION DBLPCM(A,B,C)
3C Calculate com momentum for A-->B+C with double precision.
4C Needed to fix bug on 32-bit machines at high energy.
5C 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
10C 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))
15C Convert back to single precision
16 VAL=DVAL
17 DBLPCM=SQRT(ABS(VAL))/(2.*A)
18 RETURN
19 END