Subroutine DetJets(vtx) c c general purpose: c --------------- c Find cone jets using PUCELL; the jets are defined within certain c cuts given by the steering parameters c Sort jets by Et (not necessary as PUCELL already sorts jets by Et) c Apply a set of cuts to select forward jets (BFKL like) c These cuts are stored in the common block FORJETS.inc c store the 2 highest Et in the jdiszes common block as: c njet_d: number jet of jets c et1_d,et2_d: Et of the jets c eta1_d,eta2_d: eta of the jets c fjetd: flag for a forward jet (0 = no forward jet c 1 = forward jet) c c Input: main vertex vtx(3) c CALTRU table: cells c SIDAT95: SINISTRA electron c cards: c Conejet_etamax (default 3.2 ) c Conejet_etamin (default -2.0) c Conejet_ptmin (default 2.5 ) c Conejet_seed (default 0.5 ) c Conejet_rcone (default 1. ) c c IMPLICIT NONE #include "caltru.inc" #include "partap.inc" #include "zrevt.inc" #include "conecut.inc" #include "genjet.inc" #include "morsub.inc" #include "jdiszes.inc" #include "sidat95.inc" #include "zescommon.inc" #include "zestmpcommon.inc" #include "zecpbm.inc" real operation(10), energycuts(10) real E,xpos,ypos,zpos,th,ph,R real x,y,z,eta,phi,theta,vtx(3),sircut real e_jet(20),et_jet(20),eta_jet(20),x_jet(20) Integer IErr, NrClus, n,i,ista,k,ierrcl,j Integer nch,ncells,flag,mycand,ierrsira,dtjetnum data ista /100/ parameter (sircut = 0.9) c--- Initialisation do i=1,10 do j=1,1000 p(i,j) = 0. enddo enddo c do i=1,20 do j=1,15 PGJET1(i,j) = 0. enddo enddo c do i=1,20 e_jet(i) = -999.99 et_jet(i) = -999.99 eta_jet(i) = -999.99 x_jet(i) = -999.99 enddo c c c c CALL SIRA95(vtx, SirCut, IerrSira) c c Get the most probable electron found by sinistra assuming that sinistra c has ran. c C CALL FINDIS95(1, SirCut, MYCand, IERRSIRA) c ncells = ZESTMP_NCell_si c c c Fill the four momenta for the cells c nch=0 c c c c Fill the array for the 4-momentum of the particles c This 4-vector is called p(i,j) and stored in the MORSUB common block. c Maybe it is worth to change the name of this array c Do i=1,coutab(Caltru) Call FetTab(CALTRU,ID,I) c c Remove cells belonging to the electron c do 20 j=1,ncells if (Caltru_Cellnr.eq.ZESTMP_CellList_si(j)) goto 100 20 continue c Call CCCxyz(Caltru_CellNr,Xpos,Ypos,Zpos,Ierr) c If (Ierr .eq. 1) . Write(6,*) ' ERROR: CellNr not existing',Caltru_CellNr c Shift cell position to the main vertex Xpos = Xpos - Vtx(1) Ypos = Ypos - Vtx(2) Zpos = Zpos - Vtx(3) Call CCCaPo(Xpos,Ypos,Zpos,R,Th,Ph) c Fill the 4-vector for all stable hadrons nch=nch+1 p(1,nch+ista) = Caltru_E * sin(Th) * cos(Ph) p(2,nch+ista) = Caltru_E * sin(Th) * sin(Ph) p(3,nch+ista) = Caltru_E * cos(Th) p(4,nch+ista) = Caltru_E p(5,nch+ista) = Caltru_Cellnr 100 enddo c c--- reset variables c call Had_to_HCM(nch) c c c Set the cone parameters (radius and energy seed) c c call VFILL(energycuts,10,-1.) call VFILL(operation,10,-1.) c Operation(1)= 0.9 ! Et scheme Operation(2)= conejet_rcone ! cone Operation(3)= conejet_rcone ! cone EnergyCuts(1)= 0.05 ! useless EnergyCuts(2)= 0.10 ! useless ENERGYCUTS(3)= conejet_seed ! (Seed) c c c--- run the jet finder PUCELL c c call pacellgp(Operation,EnergyCuts,NrClus, + IErrCl,nch) c c The number of jets after the cuts defined by the input cards is c njet1; the 4 momentum of the jets is PGJET1. These variables are stored c in the common block GENJET. c DTJetNum = 0 if (njet1.ge.1) then do i=1,njet1 DTJetNum=DTJetNum+1 E_jet(DTJetNum)=PGJET1(i,4) Et_jet(DTJetNum)=PGJET1(i,10) Eta_jet(DTJetNum)=PGJET1(i,6) c T. Haas: Use proper proton beam energy c X_jet(DTJetNum)=PGJET1(i,3) / 820. X_jet(DTJetNum)=PGJET1(i,3) / BEAMOM(1) enddo endif c njet_d = dtjetnum c c sort the jets by transverse energy c call jetsort(et_jet,eta_jet,dtjetnum) c et1_d = et_jet(1) et2_d = et_jet(2) eta1_d = eta_jet(1) eta2_d = eta_jet(2) c c set the bfkl flag c flag = 0 call bfkl_flag(et_jet,eta_jet,x_jet,dtjetnum,flag) Fjetd = flag c c Return End