3 ***********************************************************************
5 SUBROUTINE PYTEST_HIJING(MTEST)
7 C...Purpose: to provide a simple program (disguised as a subroutine) to
8 C...run at installation as a check that the program works as intended.
9 #include "lujets_hijing.inc"
10 #include "ludat1_hijing.inc"
11 #include "ludat2_hijing.inc"
12 #include "ludat3_hijing.inc"
13 #include "pysubs_hijing.inc"
14 #include "pypars_hijing.inc"
16 C...Common initial values. Loop over initiating conditions.
18 IF(MTEST.LE.0) MSTP(122)=0
19 MDCY(LUCOMP_HIJING(111),1)=0
23 C...Reset process type, kinematics cuts, and the flags used.
38 C...Prompt photon production at fixed target.
41 PESUM=SQRT(PZSUM**2+ULMASS_HIJING(211)**2)+ULMASS_HIJING(2212)
45 CALL PYINIT_HIJING('FIXT','pi+','p',PZSUM)
47 C...QCD processes at ISR energies.
48 ELSEIF(IPROC.EQ.2) THEN
54 CALL PYINIT_HIJING('CMS','p','p',PESUM)
56 C...W production + multiple interactions at CERN Collider.
57 ELSEIF(IPROC.EQ.3) THEN
66 CALL PYINIT_HIJING('CMS','p','pbar',PESUM)
68 C...W/Z gauge boson pairs + overlayed events at the Tevatron.
69 ELSEIF(IPROC.EQ.4) THEN
81 CALL PYINIT_HIJING('CMS','p','pbar',PESUM)
83 C...Higgs production at LHC.
84 ELSEIF(IPROC.EQ.5) THEN
93 CALL PYINIT_HIJING('CMS','p','pbar',PESUM)
95 C...Z' production at SSC.
96 ELSEIF(IPROC.EQ.6) THEN
105 CALL PYINIT_HIJING('CMS','p','pbar',PESUM)
107 C...W pair production at 1 TeV e+e- collider.
108 ELSEIF(IPROC.EQ.7) THEN
113 CALL PYINIT_HIJING('CMS','e+','e-',PESUM)
116 C...Generate 20 events of each required type.
120 IF(IPROC.EQ.4) PESUMM=MSTI(41)*PESUM
122 C...Check conservation of energy/momentum/flavour.
124 DEVE=ABS(PLU_HIJING(0,4)-PESUMM)+ABS(PLU_HIJING(0,3)-PZSUM)
125 DEVT=ABS(PLU_HIJING(0,1))+ABS(PLU_HIJING(0,2))
126 DEVQ=ABS(PLU_HIJING(0,6)-PQSUM)
127 IF(DEVE.GT.1E-3*PESUM.OR.DEVT.GT.MAX(0.01,1E-5*PESUM).OR.
129 IF(MERR.NE.0) WRITE(MSTU(11),1000) IPROC,IEV
131 C...Check that all KF codes are known ones, and that partons/particles
132 C...satisfy energy-momentum-mass relation.
134 IF(K(I,1).GT.20) GOTO 110
135 IF(LUCOMP_HIJING(K(I,2)).EQ.0) THEN
136 WRITE(MSTU(11),1100) I
139 PD=P(I,4)**2-P(I,1)**2-P(I,2)**2-P(I,3)**2-P(I,5)**2*
141 IF(ABS(PD).GT.MAX(0.1,0.002*P(I,4)**2,0.002*P(I,5)**2).OR.
142 &(P(I,5).GE.0..AND.P(I,4).LT.0.)) THEN
143 WRITE(MSTU(11),1200) I
148 C...Listing of erronoeus events, and first event of each type.
149 IF(MERR.GE.1) NERR=NERR+1
152 CALL LULIST_HIJING(1)
155 IF(MTEST.GE.1.AND.(MERR.GE.1.OR.IEV.EQ.1)) THEN
156 IF(MERR.GE.1) WRITE(MSTU(11),1400)
157 CALL LULIST_HIJING(1)
161 C...List statistics for each process type.
162 IF(MTEST.GE.1) CALL PYSTAT_HIJING(1)
165 C...Summarize result of run.
166 IF(NERR.EQ.0) WRITE(MSTU(11),1500)
167 IF(NERR.GT.0) WRITE(MSTU(11),1600) NERR
170 C...Formats for information.
171 1000 FORMAT(/5X,'Energy/momentum/flavour nonconservation for process',
173 1100 FORMAT(/5X,'Entry no.',I4,' in following event not known code')
174 1200 FORMAT(/5X,'Entry no.',I4,' in following event has faulty ',
176 1300 FORMAT(/5X,'This is the tenth error experienced! Something is ',
177 &'wrong.'/5X,'Execution will be stopped after listing of event.')
178 1400 FORMAT(5X,'Faulty event follows:')
179 1500 FORMAT(//5X,'End result of run: no errors detected.')
180 1600 FORMAT(//5X,'End result of run:',I2,' errors detected.'/
181 &5X,'This should not have happened!')