]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ISAJET/code/dblvec.F
Adding the track fit residuals as a consequence of the ExB distortions (Marian)
[u/mrichter/AliRoot.git] / ISAJET / code / dblvec.F
CommitLineData
0795afa3 1#include "isajet/pilot.h"
2 SUBROUTINE DBLVEC(P,DP)
3C
4C Calculate double precision vector DP for 5-vector P.
5C Exact components are 1,2,5 and larger of +,-
6C Ver 6.44: Always use this, even if IF=SINGLE.
7C
8#if defined(CERNLIB_IMPNONE)
9 IMPLICIT NONE
10#endif
11 REAL P(5)
12 DOUBLE PRECISION DP(5),DPPL,DPMN
13 INTEGER K
14C
15 DO 100 K=1,5
16100 DP(K)=P(K)
17 IF(DP(4)+ABS(DP(3)).EQ.0.) RETURN
18 IF(DP(3).GT.0.) THEN
19 DPPL=DP(4)+DP(3)
20 DPMN=(DP(1)**2+DP(2)**2+DP(5)**2)/DPPL
21 ELSE
22 DPMN=DP(4)-DP(3)
23 DPPL=(DP(1)**2+DP(2)**2+DP(5)**2)/DPMN
24 ENDIF
25 DP(3)=0.5D0*(DPPL-DPMN)
26 DP(4)=0.5D0*(DPPL+DPMN)
27 RETURN
28 END