SubRoutine CFilpagp (icellpa,Err) Implicit None C C ********************************************************* C C PURPOSE: Fill CluCom from Caltru for the CDF algorithm. C CALLED FROM: CCCOFL C COMMUNICATION: C AUTHOR: Paul de Jong, NIKHEF-H, 08-01-1992. C ********************************************************* C --DATE--:--NAME--:--MODIFICATIONS------------------------ c 17.3.93 : G.C. : hadrons in HCM C ********************************************************* C #include "ckey.inc" #include "clupar.inc" #include "clucom.inc" #include "cpspar.inc" #include "cfound.inc" #include "cdfcom.inc" #include "zrunit.inc" #include "partap.inc" #include "morsub.inc" C INTEGER I, J, Err, Ielc, Ipart, Idum REAL Phi,X,Y,Z,R,Et,E LOGICAL ERROR, First real eta,pi,cellnr integer ievj,iend Data First /.TRUE./ Data ievj/49/ integer icellpa,maxcell C C Call ModIn ('CFilHa',Idum) pi=4.*atan(1.) C Err=0 Do 25 J=1,5 Do 10 I=1,Nsblock KC(I,J)=0 VC(I,J)=0. PC(I,J)=0. 10 Continue 25 Continue c Call CleTab(CPsPar) C C Loop over all hit cells. C ievj=ievj+1 Npart=0 Nseed=0 Nnoseed=0 c--------------- Do 200 I=1,icellpa c maxcell=100+icellpa maxcell=100 C---------------- E = p(4,i+maxcell) ETA = p(6,i+maxcell) Et = p(7,i+maxcell) PHI = p(8,i+maxcell) cellnr=p(5,i+maxcell) if(E.gt.1000.) goto 200 If (Imode.EQ.1) Then If (Et.LT.EtSneedcut) GoTo 200 Else if (Imode.EQ.2) Then If (E.LT.ESneedcut) GoTo 200 Endif Ipart=0 If (Npart.EQ.0) Then Ipart=1 GoTo 400 Endif Do 300 J=1,Npart If (Imode.EQ.1) Then If (PC(J,3).GT.Et) GoTo 300 Else if (Imode.EQ.2) Then If (PC(J,4).GT.E) GoTo 300 Endif Ipart=J GoTo 301 300 Continue 301 If (Ipart.EQ.0) Ipart=Npart+1 Do 500 J=Npart,Ipart,-1 PC(J+1,1)=PC(J,1) PC(J+1,2)=PC(J,2) PC(J+1,3)=PC(J,3) PC(J+1,4)=PC(J,4) PC(J+1,5)=PC(J,5) KC(J+1,1)=KC(J,1) KC(J+1,2)=KC(J,2) VC(J+1,5)=VC(J,5) 500 Continue 400 PC(Ipart,1)=eta PC(Ipart,2)=Phi PC(Ipart,3)=ET PC(Ipart,4)=E PC(Ipart,5)=0. KC(Ipart,1)=0 if (cellnr.eq.0) then VC(Ipart,5)=i else VC(Ipart,5)=cellnr endif Npart=Npart+1 If (Imode.EQ.1) Then If (PC(Ipart,3).GT.EtSeedcut) Then KC(Ipart,2)=2 Nseed=Nseed+1 Else if (PC(Ipart,3).GT.EtSNeedcut) Then KC(Ipart,2)=0 Nnoseed=Nnoseed+1 Else KC(Ipart,2)=0 Endif Else if (Imode.EQ.2) Then If (PC(Ipart,4).GT.ESeedcut) Then KC(Ipart,2)=2 Nseed=Nseed+1 Else if (PC(Ipart,4).GT.ESNeedcut) Then KC(Ipart,2)=0 Nnoseed=Nnoseed+1 Else KC(Ipart,2)=0 Endif Endif 200 Continue Call ModOut ('CFilHa') c RETURN END