]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ISAJET/code/logphi.F
changes for proper protection against failed retrieval of CDB Reco object (moved...
[u/mrichter/AliRoot.git] / ISAJET / code / logphi.F
CommitLineData
0795afa3 1#include "isajet/pilot.h"
2 LOGICAL FUNCTION LOGPHI(IERR,DELPH)
3C
4C SET AND CHECK LIMITS FOR JET PHI
5C
6#include "isajet/itapes.inc"
7#include "isajet/jetlim.inc"
8#include "isajet/primar.inc"
9#include "isajet/jetpar.inc"
10#include "isajet/const.inc"
11#include "isajet/dylim.inc"
12#include "isajet/keys.inc"
13#include "isajet/q1q2.inc"
14 DIMENSION DELPH(3)
15 DATA UNDEF/-.9E9/
16C
17 LOGPHI=.TRUE.
18C
19C
20 DO 50 I=1,NJET
21 FIXPHI(I)=.FALSE.
22C
23 IF(PHIMAX(I).LT.UNDEF.AND.PHIMIN(I).LT.UNDEF) THEN
24 PHIMIN(I)=0.
25 PHIMAX(I)=2.*PI
26 DELPH(I)=PHIMAX(I)
27 ELSE
28 IF(PHIMAX(I).LT.UNDEF) FIXPHI(I)=.TRUE.
29C
30 IF(FIXPHI(I)) THEN
31 PHI(I)=PHIMIN(I)
32 PHIMAX(I)=PHIMIN(I)
33 IF(KEYS(3).AND.I.LT.3) THEN
34 LOGPHI=.FALSE.
35 CALL LOGERR(105,I,IERR)
36 ENDIF
37 IF(I.EQ.2) THEN
38 FIXPHI(1)=.TRUE.
39 PHIMIN(1)=PHIMIN(2)
40 PHIMAX(1)=PHIMIN(1)
41 ENDIF
42 ENDIF
43C
44 DELPH(I)=PHIMAX(I)-PHIMIN(I)
45C
46 IF(DELPH(I).GT.2.*PI.OR.DELPH(I).LT.0) THEN
47 LOGPHI=.FALSE.
48 CALL LOGERR(8,I,IERR)
49 ENDIF
50C
51 ENDIF
52C
53 50 CONTINUE
54C
55C
56 IF(KEYS(1).AND.DELPH(1).GT.DELPH(2)) THEN
57 PHIMIN(1)=PHIMIN(2)+PI
58 PHIMAX(1)=PHIMIN(1)+DELPH(2)
59 ENDIF
60C
61 RETURN
62 END