All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
pxsear.f
Go to the documentation of this file.
1 CDECK ID>, PXSEAR.
2 ******............................................................******
3  SUBROUTINE pxsear(COSR,NTRAK,PU,PP,VSEED,NJET,
4  + jetlis,pj,unstbl,ierr)
5 ******............................................................******
6 *
7  IMPLICIT NONE
8  INTEGER mxtrak, mxprot
9  parameter(mxtrak=200,mxprot=100)
10  INTEGER ntrak, ierr
11  REAL cosr,pu(3,mxtrak),pp(4,mxtrak),vseed(3)
12  LOGICAL unstbl
13  LOGICAL jetlis(mxprot,mxtrak)
14  INTEGER njet
15  REAL pj(4,mxprot)
16 *** Using VSEED as a trial axis , look for a stable jet.
17 *** Check stable jets against those already found and add to PJ.
18 *** Will try up to MXITER iterations to get a stable set of particles
19 *** in the cone.
20  INTEGER mu,n,iter
21  LOGICAL pxsame,pxnew,ok
22  LOGICAL newlis(mxtrak),oldlis(mxtrak)
23  REAL oaxis(3),naxis(3),pnew(4)
24  INTEGER mxiter
25  parameter(mxiter = 30)
26 *
27  DO 100 mu=1,3
28  oaxis(mu) = vseed(mu)
29 100 CONTINUE
30  DO 110 n = 1,ntrak
31  oldlis(n) = .false.
32 110 CONTINUE
33  DO 120 iter = 1,mxiter
34  CALL pxtry(cosr,ntrak,pu,pp,oaxis,naxis,pnew,newlis,ok)
35 *** Return immediately if there were no particles in the cone.
36  IF (.NOT.ok) THEN
37  RETURN
38  ENDIF
39  IF(pxsame(newlis,oldlis,ntrak)) THEN
40 *** We have a stable jet.
41  IF (pxnew(newlis,jetlis,ntrak,njet)) THEN
42 *** And the jet is a new one. So add it to our arrays.
43 *** Check arrays are big anough...
44  IF (njet .EQ. mxprot) THEN
45  WRITE (6,*) ' PXCONE: Found more than MXPROT proto-jets'
46  ierr = -1
47  RETURN
48  ENDIF
49  njet = njet + 1
50  DO 130 n = 1,ntrak
51  jetlis(njet,n) = newlis(n)
52 130 CONTINUE
53  DO 140 mu=1,4
54  pj(mu,njet)=pnew(mu)
55 140 CONTINUE
56  ENDIF
57  RETURN
58  ENDIF
59 *** The jet was not stable, so we iterate again
60  DO 150 n=1,ntrak
61  oldlis(n)=newlis(n)
62 150 CONTINUE
63  DO 160 mu=1,3
64  oaxis(mu)=naxis(mu)
65 160 CONTINUE
66 120 CONTINUE
67  unstbl = .true.
68  RETURN
69  END
LOGICAL function pxnew(TSTLIS, JETLIS, NTRAK, NJET)
Definition: pxnew.f:3
subroutine pxsear(COSR, NTRAK, PU, PP, VSEED, NJET, JETLIS, PJ, UNSTBL, IERR)
Definition: pxsear.f:3
subroutine pxtry(COSR, NTRAK, PU, PP, OAXIS, NAXIS, PNEW, NEWLIS, OK)
Definition: pxtry.f:3
LOGICAL function pxsame(LIST1, LIST2, N)
Definition: pxsame.f:3