]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PYTHIA/jetset/ulangl.F
Containers definition
[u/mrichter/AliRoot.git] / PYTHIA / jetset / ulangl.F
1  
2 C********************************************************************* 
3  
4       FUNCTION ULANGL(X,Y) 
5  
6 C...Purpose: to reconstruct an angle from given x and y coordinates. 
7       COMMON/LUDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200) 
8       SAVE /LUDAT1/ 
9  
10       ULANGL=0. 
11       R=SQRT(X**2+Y**2) 
12       IF(R.LT.1E-20) RETURN 
13       IF(ABS(X)/R.LT.0.8) THEN 
14         ULANGL=SIGN(ACOS(X/R),Y) 
15       ELSE 
16         ULANGL=ASIN(Y/R) 
17         IF(X.LT.0..AND.ULANGL.GE.0.) THEN 
18           ULANGL=PARU(1)-ULANGL 
19         ELSEIF(X.LT.0.) THEN 
20           ULANGL=-PARU(1)-ULANGL 
21         ENDIF 
22       ENDIF 
23  
24       RETURN 
25       END