All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
ynjet.f
Go to the documentation of this file.
1 CDECK ID>, YNJET.
2  SUBROUTINE ynjet(YCUT,NJET,IERR)
3 C
4 C ROUTINE TO RETURN THE NUMBER OF JETS FOR A GIVEN YCUT
5 C
6 C LAST MOD : 21-Jun-98
7 C
8 C Modification Log.
9 C 08-Oct-97 D. Chrisman, Increase NYCLMX from 250 to 500.
10 C 21-Jun-98 D. Chrisman, Want to be able to handle more than 10 jets.
11 C Introduce parameter NJETMX. Use this
12 C in declaration of PJET and YREC in order to remove
13 C hard coded numbers. Also replace the hard
14 C coded number in the "D0 5001" loop with the
15 C parameter NJETMX.
16 C
17  IMPLICIT NONE
18 C IMPLICIT NONE
19  INTEGER njet,ierr,nyclmx,njetmx,imodeo,njeto,nto,i
20  parameter(nyclmx = 500, njetmx = 20)
21  REAL ycut,yrec(njetmx),pint(10,nyclmx),pjet(10,njetmx,njetmx)
22  INTEGER histor(2,nyclmx)
23  COMMON /ycl/yrec,pjet,histor
24  COMMON /yint/ imodeo,nto,njeto,pint
25  ierr = -1
26 C
27 CHECK IF CALL WAS MADE TO YKERN
28 C
29  IF(imodeo.LE.0 .OR. imodeo.GT.7) THEN
30  WRITE(6,111)
31  111 FORMAT(' #### YNJET: YKERN MUST BE CALLED FIRST ! ####')
32  njet = -1
33  RETURN
34  ENDIF
35 C
36 CHECK IF INPUT MAKES SENSE
37 C
38  IF(ycut.LE.0. .OR. ycut.GT.1.) THEN
39  WRITE(6,1) ycut
40  1 FORMAT(' #### YNJET: INPUT YCUT=',e12.4,' INVALID ####')
41  njet = -1
42  RETURN
43  ENDIF
44 C
45  njet = 1
46  DO 5001 i=1,njetmx
47  IF(ycut.LT.yrec(i)) njet = i+1
48  5001 CONTINUE
49  ierr = 0
50  RETURN
51  END
subroutine ynjet(YCUT, NJET, IERR)
Definition: ynjet.f:2