All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
pxord.f
Go to the documentation of this file.
1 CDECK ID>, PXORD.
2 ******............................................................******
3  SUBROUTINE pxord(EPSLON,NJET,NTRAK,JETLIS,PJ)
4 ******............................................................******
5 *
6 *** Routine to put jets into order and eliminate tose less than EPSLON
7 *.
8 *. Modification Log.
9 *. 22-Apr-97: D. Chrisman - Dimension ELIST and INDEX with MXPROT
10 *. instead of 100.
11 *.
12  IMPLICIT NONE
13  INTEGER mxtrak,mxprot
14  parameter(mxtrak=200,mxprot=100)
15  INTEGER i, j, index(mxprot)
16  REAL ptemp(4,mxprot), elist(mxprot)
17  INTEGER njet,ntrak
18  LOGICAL jetlis(mxprot,mxtrak)
19  LOGICAL logtmp(mxprot,mxtrak)
20  REAL epslon,pj(4,mxprot)
21 *** Puts jets in order of energy: 1 = highest energy etc.
22 *** Then Eliminate jets with energy below EPSLON
23 *
24 *** Copy input arrays.
25  DO 100 i=1,njet
26  DO 110 j=1,4
27  ptemp(j,i)=pj(j,i)
28 110 CONTINUE
29  DO 120 j=1,ntrak
30  logtmp(i,j)=jetlis(i,j)
31 120 CONTINUE
32 100 CONTINUE
33  DO 150 i=1,njet
34  elist(i)=pj(4,i)
35 150 CONTINUE
36 *** Sort the energies...
37  CALL pxsorv(njet,elist,index,'I')
38 *** Fill PJ and JETLIS according to sort ( sort is in ascending order!!)
39  DO 200 i=1, njet
40  DO 210 j=1,4
41  pj(j,i)=ptemp(j,index(njet+1-i))
42 210 CONTINUE
43  DO 220 j=1,ntrak
44  jetlis(i,j)=logtmp(index(njet+1-i),j)
45 220 CONTINUE
46 200 CONTINUE
47 ** Jets are now in order
48 *** Now eliminate jets with less than Epsilon energy
49  DO 300, i=1, njet
50  IF (pj(4,i) .LT. epslon) THEN
51  njet=njet-1
52  pj(4,i)=0.
53  ENDIF
54 300 CONTINUE
55  RETURN
56  END
subroutine pxord(EPSLON, NJET, NTRAK, JETLIS, PJ)
Definition: pxord.f:3
subroutine pxsorv(ISZ, ARY, KIX, COPT)
Definition: pxsorv.f:2