-
Notifications
You must be signed in to change notification settings - Fork 0
/
djangoh_h.f
17599 lines (17326 loc) · 601 KB
/
djangoh_h.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
C
PROGRAM HSMAIN
C
C
C***********************************************************************
C
C
C H E R A C L E S
C
C
C EVENT GENERATOR FOR DEEP-INELASTIC E-P SCATTERING
C INCLUDING RADIATIVE CORRECTIONS
C
C***********************************************************************
C
C AUTHORS:
C H. SPIESBERGER, A. KWIATKOWSKI
C II. INSTITUT FUER THEORETISCHE PHYSIK,
C UNIVERSITAET HAMBURG
C FRG
C
C H.-J.MOEHRING
C SEKTION PHYSIK
C UNIVERSITAET LEIPZIG
C FRG
C
C with extensions by T. Martini (for hadron polarization, 2012+13)
C Last modification for muon scattering at Compass
C
C VERSION 4.6.13, May, 27, 2016
C
C***********************************************************************
C
IMPLICIT DOUBLE PRECISION (A-H,M,O-Z)
EXTERNAL HSNCG1,HSNCG2,HSTSK1,HSTSK2,HSK1TS,HSK1K3
EXTERNAL HSCCG1,HSCCG2,HSCCKL,HSCCQI,HSCCQF
EXTERNAL HSELG1,HSELG2,HSELK1,HSELK2,HSELCO
CHARACTER*19 FNAME,FNAMET
PARAMETER (NCHN2=1,NCHC2=2,NCHE2=3)
PARAMETER (NCHN31=6,NCHN32=7,NCHN33=8,NCHN34=9)
PARAMETER (NCHC31=12,NCHC32=13,NCHC33=14)
PARAMETER (NCHE31=15,NCHE32=16,NCHE33=17)
COMMON /HSUNTS/ LUNTES,LUNDAT,LUNIN,LUNOUT,LUNRND
COMMON /HSOPTN/ INT2(5),INT3(15),ISAM2(5),ISAM3(15),
* IOPLOT,IPRINT,ICUT
COMMON /HSGSW/ SW,CW,SW2,CW2
* ,MW,MZ,MH,ME,MMY,MTAU,MU,MD,MS,MC,MB,MT
* ,MW2,MZ2,MH2,ME2,MMY2,MTAU2,MU2,MD2,MS2,MC2,MB2,MT2
COMMON /HSELAB/ SP,EELE,PELE,EPRO,PPRO
COMMON /HSCUTS/ XMIN,XMAX,Q2MIN,Q2MAX,YMIN,YMAX,WMIN,GMIN
COMMON /HSTCUT/ THEMIN,THEMAX,CTHMIN,CTHCON
COMMON /HSPCUT/ PTMIN,PTXM0
COMMON /HSISGM/ TCUTQ,TCUTQS
COMMON /HSPARL/ LPAR(20),LPARIN(12)
COMMON /HSSTRP/ ICODE,ILIB,ILQMOD,IDPVR
COMMON /HSPDFO/ IPDFOP,IFLOPT,LQCD,LTM,LHT
COMMON /HSELEP/ IDIPOL
COMMON /HSNUCL/ HNA,HNZ,INUMOD
COMMON /HSPARM/ POLARI,HPOLAR,LLEPT,LQUA
COMMON /HSWGTC/ IWEIGS
COMMON /HSONLY/ IHSONL
COMMON /HSLTYP/ LEPIN1
C---
PARAMETER(NDIM2=2,NBIN2=50)
PARAMETER(NREG2N=2500)
C--- NREG2N=NBIN2**NDIM2
LOGICAL LGLO2,LLOC2
double precision ntot2
COMMON /HSSNC2/ SIG2,SIG2E,T2GGMA,T2GMAX(NREG2N),
+ XX2(50,2),
+ FFGO2,DNCG2,FFLO2,DNCL2,GOLD2,
+ NM2(NREG2N),NDO2,
+ NTOT2,NCAL2,NCA12,NCA22,IBIM2,JCOR2,
+ LGLO2,LLOC2
PARAMETER(NREG2C=2500)
C--- NREG2C=NBIN2**NDIM2
LOGICAL LGLO2C,LLOC2C
double precision ntot2c
COMMON /HSSCC2/ SIG2C,SIG2EC,T2GMAC,T2MAXC(NREG2C),
+ XX2C(50,2),
+ FFGO2C,DNCG2C,FFLO2C,DNCL2C,GOLD2C,
+ NM2C(NREG2C),NDO2C,
+ NTOT2C,NCAL2C,NCA12C,NCA22C,IBIM2C,JCOR2C,
+ LGLO2C,LLOC2C
PARAMETER(NREG2E=50)
PARAMETER(NDIM1=1)
C--- NREG2E=NBIN2**NDIM1
LOGICAL LGLO2E,LLOC2E
double precision ntot2e
COMMON /HSSEL2/ SIG2L,SIG2EE,T2GMAE,T2MAXE(NREG2E),
+ XX2E(50,1),
+ FFGO2E,DNCG2E,FFLO2E,DNCL2E,GOLD2E,
+ NM2E(NREG2E),NDO2E,
+ NTOT2E,NCAL2E,NCA12E,NCA22E,IBIM2E,JCOR2E,
+ LGLO2E,LLOC2E
PARAMETER(NDIM31=5,NBIN31=6,NREG31=7776)
C--- NREG31=NBIN31**NDIM31
LOGICAL LGLO31,LLOC31
double precision ntot31
COMMON /HSSN31/ SIG31,SIG31E,T31GMA,T31MAX(NREG31),
+ XX31(50,NDIM31),
+ FFGO31,DNCG31,FFLO31,DNCL31,GOLD31,
+ SI31,SI2N31,SWGT31,SCHI31,IT31,
+ NM31(NREG31),NDO31,
+ NTOT31,NCAL31,NCA131,NCA231,IBIM31,JCOR31,
+ LGLO31,LLOC31
PARAMETER(NDIM32=5,NBIN32=6,NREG32=7776)
C--- NREG32=NBIN32**NDIM32
LOGICAL LGLO32,LLOC32
double precision ntot32
COMMON /HSSN32/ SIG32,SIG32E,T32GMA,T32MAX(NREG32),
+ XX32(50,NDIM32),
+ FFGO32,DNCG32,FFLO32,DNCL32,GOLD32,
+ SI32,SI2N32,SWGT32,SCHI32,IT32,
+ NM32(NREG32),NDO32,
+ NTOT32,NCAL32,NCA132,NCA232,IBIM32,JCOR32,
+ LGLO32,LLOC32
PARAMETER(NDIM33=5,NBIN33=6,NREG33=7776)
C--- NREG33=NBIN33**NDIM33
LOGICAL LGLO33,LLOC33
double precision ntot33
COMMON /HSSN33/ SIG33,SIG33E,T33GMA,T33MAX(NREG33),
+ XX33(50,NDIM33),
+ FFGO33,DNCG33,FFLO33,DNCL33,GOLD33,
+ SI33,SI2N33,SWGT33,SCHI33,IT33,
+ NM33(NREG33),NDO33,
+ NTOT33,NCAL33,NCA133,NCA233,IBIM33,JCOR33,
+ LGLO33,LLOC33
PARAMETER(NDIM34=5,NBIN34=6,NREG34=7776)
C--- NREG34=NBIN34**NDIM34
LOGICAL LGLO34,LLOC34
double precision ntot34
COMMON /HSSN34/ SIG34,SIG34E,T34GMA,T34MAX(NREG34),
+ XX34(50,NDIM34),
+ FFGO34,DNCG34,FFLO34,DNCL34,GOLD34,
+ SI34,SI2N34,SWGT34,SCHI34,IT34,
+ NM34(NREG34),NDO34,
+ NTOT34,NCAL34,NCA134,NCA234,IBIM34,JCOR34,
+ LGLO34,LLOC34
PARAMETER(NDM3CC=5)
PARAMETER(NBN31C=6,NRG31C=7776)
C--- NRG31C=NBN31C**NDM3CC
LOGICAL LGL31C,LLC31C
double precision ntt31c
COMMON /HSSC31/ SIG31C,SG31EC,T31GMC,T31MXC(NRG31C),
+ XX31C(50,5),
+ FFG31C,DNG31C,FFL31C,DNL31C,GLD31C,
+ SI31C,S2N31C,SWT31C,SCH31C,IT31C,
+ NM31C(NRG31C),NDO31C,
+ NTT31C,NCL31C,NC131C,NC231C,IBM31C,JCR31C,
+ LGL31C,LLC31C
PARAMETER(NBN32C=6,NRG32C=7776)
C--- NRG32C=NBN32C**NDM3CC
LOGICAL LGL32C,LLC32C
double precision ntt32c
COMMON /HSSC32/ SIG32C,SG32EC,T32GMC,T32MXC(NRG32C),
+ XX32C(50,5),
+ FFG32C,DNG32C,FFL32C,DNL32C,GLD32C,
+ SI32C,S2N32C,SWT32C,SCH32C,IT32C,
+ NM32C(NRG32C),NDO32C,
+ NTT32C,NCL32C,NC132C,NC232C,IBM32C,JCR32C,
+ LGL32C,LLC32C
PARAMETER(NBN33C=6,NRG33C=7776)
C--- NRG33C=NBN33C**NDM3CC
LOGICAL LGL33C,LLC33C
double precision ntt33c
COMMON /HSSC33/ SIG33C,SG33EC,T33GMC,T33MXC(NRG33C),
+ XX33C(50,5),
+ FFG33C,DNG33C,FFL33C,DNL33C,GLD33C,
+ SI33C,S2N33C,SWT33C,SCH33C,IT33C,
+ NM33C(NRG33C),NDO33C,
+ NTT33C,NCL33C,NC133C,NC233C,IBM33C,JCR33C,
+ LGL33C,LLC33C
PARAMETER(NDM3EL=4)
PARAMETER(NBN31E=8,NRG31E=4096)
C--- NRG31E=NBN31E**NDM3EL
LOGICAL LGL31E,LLC31E
double precision ntt31e
COMMON /HSSE31/ SIG31L,SG31EE,T31GME,T31MXE(NRG31E),
+ XX31E(50,4),
+ FFG31E,DNG31E,FFL31E,DNL31E,GLD31E,
+ SI31E,S2N31E,SWT31E,SCH31E,IT31E,
+ NM31E(NRG31E),NDO31E,
+ NTT31E,NCL31E,NC131E,NC231E,IBM31E,JCR31E,
+ LGL31E,LLC31E
PARAMETER(NBN32E=8,NRG32E=4096)
C--- NRG32E=NBN32E**NDM3EL
LOGICAL LGL32E,LLC32E
double precision ntt32e
COMMON /HSSE32/ SIG32L,SG32EE,T32GME,T32MXE(NRG32E),
+ XX32E(50,4),
+ FFG32E,DNG32E,FFL32E,DNL32E,GLD32E,
+ SI32E,S2N32E,SWT32E,SCH32E,IT32E,
+ NM32E(NRG32E),NDO32E,
+ NTT32E,NCL32E,NC132E,NC232E,IBM32E,JCR32E,
+ LGL32E,LLC32E
PARAMETER(NBN33E=8,NRG33E=4096)
C--- NRG33E=NBN33E**NDM3EL
LOGICAL LGL33E,LLC33E
double precision ntt33e
COMMON /HSSE33/ SIG33L,SG33EE,T33GME,T33MXE(NRG33E),
+ XX33E(50,4),
+ FFG33E,DNG33E,FFL33E,DNL33E,GLD33E,
+ SI33E,S2N33E,SWT33E,SCH33E,IT33E,
+ NM33E(NRG33E),NDO33E,
+ NTT33E,NCL33E,NC133E,NC233E,IBM33E,JCR33E,
+ LGL33E,LLC33E
C-------------------------
CHARACTER*45 CHNAME
COMMON /HSNAMC/ CHNAME(20)
COMMON /HSNUME/ SIGTOT,SIGTRR,SIGG(20),SIGGRR(20),NEVENT,NEVE(20)
COMMON /SPPASS/ NSOPH,NSPOUT,NFAILP,NSPACC
COMMON /DJPASS/ NTOTDJ,NPASDJ,NFAILL
COMMON /HSVGLP/ NPOVEG,NUMINT,NPHYP
COMMON /HSRDIO/ ISDINP,ISDOUT
COMMON /VGRES/ S1,S2,S3,S4
COMMON /HSIRCT/ DELEPS,DELTA,EGMIN,IOPEGM
REAL PYSTOP,PYSLAM
COMMON /HYSTFU/ PYSTOP,PYSLAM,NPYMAX,NPYMIN
COMMON /HSALFS/ PAR111,PAR112,PARL11,PARL19,MST111,MST115
REAL PAR111,PAR112,PARL11,PARL19
INTEGER MST111,MST115
CHARACTER*80 LHAPATHI
CHARACTER*232 LHAPATH
COMMON /LHAPDFC/ LHAPATH
SAVE /LHAPDFC/
CHARACTER*80 OUTFILENAM
COMMON /HSOUTF/ OUTFILENAM,ICH
COMMON /LEPTOU/ CUTDJ(14),LST(40),PARL(30),XDJ,YDJ,W2DJ,Q2DJ,UDJ
REAL CUTDJ, PARL, XDJ,YDJ,W2DJ,Q2DJ,UDJ
CHARACTER*80 TITLE
CHARACTER*10 CODE,CODEWD
DIMENSION CODE(40)
DIMENSION UIO(97)
DIMENSION INT2C(5),ISAM2C(5),INT3C(15),ISAM3C(15)
C---for date and time, used as seeds for random number generator
integer today(3), now(3)
C
C-------------------------------
C---INITIALIZE DEFAULTS NOT YET INITIALIZED IN BLOCK DATA
C---AND SET STARTING VALUES FOR VARIOUS COUNTERS
DATA FNAME /' HERACLES DATA FILE'/
DATA INT2C,ISAM2C,INT3C,ISAM3C /40*0/
DATA CODE/
1'TITLE ','EL-BEAM ','PR-BEAM ','KINEM-CUTS','EGAM-MIN ',
2'INT-OPT-NC','INT-OPT-CC','INT-POINTS','HYP-CUBES ','GSW-PARAM ',
3'STRUCTFUNC','NFLAVORS ','SAM-OPT-NC','SAM-OPT-CC','RNDM-SEEDS',
4'GSW-MASS ','THMIN-QRAD','FLONG ','ALFAS ',' ',
5'EP-DIPOLE ','NUCLEUS ','NUCL-MOD ','LHAPATH ','OUTFILENAM',
6'THETA-CUT ','PT-CUT ','POLPDF ',' ',' ',
7'WEIGHTS ',' ',' ',' ',' ',
8'INT-ONLY ','TEST-OPT ','IOUNITS ','START ','STOP '/
DATA TITLE/' '/
C
C---ACCURACY FOR INTEGRATING THE NON-RADIATIVE CONTRIBUTION
DATA EPSO /1D-4/
C
C---DEFINE VEGAS PARAMETERS
DATA ACCVEG,IPRVEG,IGRVEG /1D-5, 3, 1/
DATA NPOIN /20/
DATA IWEIGR/0D0/
C
C---INITIALIZE AND TEST THE RANDOM NUMBER GENERATOR
CALL HSRNST(12,34,56,78)
C CALL HSRNTE(1)
C
C---for version 4.6.9: fix output units,
C and changed to avoid conflict with output units used in polpdf.f
LUNOUT=6
LUNDAT=9
LUNRND=8
C---for version 4.6.10: move output file definitions to where
C file name is known, only set default name here,
C see code word OUTFILENAM
C OPEN(LUNDAT,FILE='djh.dat',STATUS='UNKNOWN',FORM='UNFORMATTED')
C OPEN(LUNRND,FILE='djhrnd.dat',STATUS='UNKNOWN',FORM='FORMATTED')
OUTFILENAM='djangoh-default-output'
ICH=INDEX(OUTFILENAM,' ')-1
IODEF=0
C---PRINT THE TITLE
WRITE(LUNOUT,9)
9 FORMAT(
1'**************************************************',
2'*****************************',
3//,10X,' HERACLES '
4//,10X,' Event generator for deep-inelastic e-P collisions '
5 /,10X,' including radiative corrections '
6//,10X,' VERSION 4.6.13, 27.05.2016 '//
8//,10X,' H. Spiesberger '//
9' **************************************************',
1'****************************',//)
C
C***********************************************************************
C READ INPUT DATA
C
C STRUCTURE OF INPUT:
C 1) CODEWD (A10)
C 2) CORRESPONDING DATA (FORMAT FREE)
C***********************************************************************
C
1 CONTINUE
READ(LUNIN,90,END=4) CODEWD
WRITE(LUNOUT,91) CODEWD
DO 2 ISW=1,40
IF(CODEWD.EQ.CODE(ISW))GO TO 3
2 CONTINUE
WRITE(LUNOUT,92)
GO TO 1
3 GO TO(
C------------------------------------------------------------------
C TITLE , EL-BEAM , PR-BEAM , KINEM-CUTS, EGAM-MIN ,
1 100 , 200 , 300 , 400 , 500 ,
C
C------------------------------------------------------------------
C INT-OPT-NC, INT-OPT-CC, INT-POINTS, HYP-CUBES , GSW-PARAM ,
2 600 , 700 , 800 , 900 , 1000 ,
C
C------------------------------------------------------------------
C STRUCTFUNC, NFLAVORS , SAM-OPT-NC, SAM-OPT-CC, RNDM-SEEDS,
3 1100 , 1200 , 1300 , 1400 , 1500 ,
C
C------------------------------------------------------------------
C GSW-MASS , THMIN-QRAD, FLONG , ALFAS , ,
4 1600 , 1700 , 1800 , 1900 , 2000 ,
C
C------------------------------------------------------------------
C EP-DIPOLE , NUCLEUS , NUCL-MOD , LHAPATH , OUTFILENAM,
5 2100 , 2200 , 2300 , 2400 , 2500 ,
C
C------------------------------------------------------------------
C THETA-CUT , PT-CUT , POLPDF , , ,
6 2600 , 2700 , 2800 , 2900 , 3000 ,
C
C------------------------------------------------------------------
C WEIGHTS , , , , ,
7 3100 , 3200 , 3300 , 3400 , 3500 ,
C
C------------------------------------------------------------------
C INT-ONLY , TEST-OPT , IOUNITS , START , STOP )
8 3600 , 3700 , 3800 , 3900 , 4000 )
C
C------------------------------------------------------------------
9,ISW
GO TO 1
4 CONTINUE
WRITE(LUNOUT,93)
GO TO 4000
C
90 FORMAT(A10)
91 FORMAT(//' *****NEXT CONTROL CARD ***** ',A10/)
92 FORMAT(/,' UNKNOWN CODEWORD - CONTROL CARD IGNORED')
93 FORMAT(/,' UNEXPECTED END OF INPUT - STOP ASSUMED.')
C
C***********************************************************************
C CONTROL CARD: CODEWD = TITLE
C DEFINES THE TITLE OF THE JOB
C***********************************************************************
100 CONTINUE
READ(LUNIN,190) TITLE
WRITE(LUNOUT,191) TITLE
GO TO 1
190 FORMAT(A80)
191 FORMAT(/,6X,A80,/)
C
C***********************************************************************
C CONTROL CARD: CODEWD = EL-BEAM
C DEFINES THE PROPERTIES OF THE ELECTRON BEAM
C
C EELE = ENERGY OF THE ELECTRON BEAM
C POLARI = DEGREE OF ELECTRON BEAM POLARIZATION
C LLEPT = -1 ELECTRON BEAM
C = +1 POSITRON BEAM
C LLEPT = -3 muon- BEAM
C = +4 muon+ BEAM
C***********************************************************************
200 CONTINUE
READ(LUNIN,*) EELE, POLARI, LLEPT
WRITE(LUNOUT,'(5X,2(A,1PE12.3,5X),A,I3)')
* ' EELE=',EELE,'POLARI=',POLARI,'LLEPT=',LLEPT
C...27.05.2016: new option for muon scattering via this input
IF (LLEPT.EQ.-1) THEN
LEPIN1=11
ELSEIF (LLEPT.EQ.1) THEN
LEPIN1=-11
ELSEIF (LLEPT.EQ.-3) THEN
LEPIN1=13
ELSEIF (LLEPT.EQ.3) THEN
LEPIN1=-13
ENDIF
LEPIN=LEPIN1
IF (LLEPT.EQ.-3) LLEPT=-1
IF (LLEPT.EQ.3) LLEPT=1
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = PR-BEAM
C DEFINES THE PROPERTIES OF THE PROTON BEAM
C
C EPRO = ENERGY OF THE PROTON BEAM
C HPOLAR = DEGREE OF PROTON BEAM POLARIZATION
C***********************************************************************
300 CONTINUE
READ(LUNIN,*) EPRO,HPOLAR
WRITE(LUNOUT,'(5X,2(A,1PE12.3,5X))')
* ' EPRO=',EPRO,'HPOLAR=',HPOLAR
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = KINEM-CUTS
C
C ICUT : DEFINITION OF THE KINEMATICAL CUTS FOR INTEGRATION
C ICUT=1 : LOWER CUT IN Q**2, Y-LIMITS IGNORED
C =2 : LOWER CUT IN W, Y-LIMITS IGNORED
C =3 : CUT IN (YMIN,YMAX)
C
C NOTE : FINAL SETTING OF CUTS
C ACCORDING TO THE MOST RESTRICTIVE CONDITIONS
C IN SUBROUTINE HSPRLG
C***********************************************************************
400 CONTINUE
READ(LUNIN,*) ICUT, XMIN,XMAX, YMIN,YMAX, Q2MIN,Q2MAX, WMIN
WRITE(LUNOUT,'(5X,A/4X,I3,2X,4(1PE13.4))')
& ' ICUT, XMIN, XMAX, YMIN, YMAX ',
& ICUT, XMIN,XMAX, YMIN,YMAX
WRITE(LUNOUT,'(11X,A/9X,3(1PE13.4))')
& ' Q2MIN, Q2MAX, WMIN ',
& Q2MIN,Q2MAX, WMIN
IF (XMIN.GT.XMAX) THEN
WRITE(LUNOUT,'(5X,A)') ' ****** XMIN > XMAX: EXECUTION STOPPED'
STOP
ENDIF
IF (YMIN.GT.YMAX) THEN
WRITE(LUNOUT,'(5X,A)') ' ****** YMIN > YMAX: EXECUTION STOPPED'
STOP
ENDIF
IF (Q2MIN.GT.Q2MAX) THEN
WRITE(LUNOUT,'(5X,A)')
& ' ****** Q2MIN > Q2MAX: EXECUTION STOPPED'
STOP
ENDIF
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = EGAM-MIN
C***********************************************************************
500 CONTINUE
READ(LUNIN,*) EGMIN
WRITE(LUNOUT,'(5X,A,3X,1PE13.4)') ' EGMIN = ',EGMIN
IF(EGMIN.GT.0D0) IOPEGM=1
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = INT-OPT-NC
C
C DEFINES THE CONTRIBUTIONS TO THE NEUTRAL CURRENT
C CROSS SECTION FOR WHICH THE INTEGRATED CROSS SECTION
C HAS TO BE CALCULATED AND THE SAMPLING PROCEDURE
C PREPARED
C
C INC2 : NEUTRAL CURRENT NON-RADIATIVE CONTRIBUTION
C INC31 : NEUTRAL CURRENT CHANNEL 1 (LEPTONIC INITIAL
C STATE RADIATION)
C INC32 : NEUTRAL CURRENT CHANNEL 2 (LEPTONIC FINAL
C STATE RADIATION)
C INC33 : NEUTRAL CURRENT CHANNEL 3 (COMPTON PART)
C INC34 : NEUTRAL CURRENT CHANNEL 4 (QUARKONIC RADIATION)
C IEL2 : ELASTIC EP NON-RADIATIVE CONTRIBUTION
C IEL31 : ELASTIC TAIL, CHANNEL 15 (LEPTONIC INITIAL
C STATE RADIATION)
C IEL32 : ELASTIC TAIL, CHANNEL 16 (LEPTONIC FINAL
C STATE RADIATION)
C IEL33 : ELASTIC TAIL, CHANNEL 17 (COMPTON PART)
C***********************************************************************
600 CONTINUE
READ(LUNIN,*) INC2,INC31,INC32,INC33,INC34,
+ IEL2,IEL31,IEL32,IEL33
WRITE(LUNOUT,'(5X,A,3X,I5)')
+ ' INC2 = ' ,INC2
WRITE(LUNOUT,'(2(5X,A,3X,I5))')
+ ' INC31 = ',INC31,' INC32 = ',INC32
WRITE(LUNOUT,'(2(5X,A,3X,I5))')
+ ' INC33 = ',INC33,' INC34 = ' ,INC34
WRITE(LUNOUT,'(5X,A,3X,I5)')
+ ' IEL2 = ' ,IEL2
WRITE(LUNOUT,'(2(5X,A,3X,I5))')
+ ' IEL31 = ',IEL31,' IEL32 = ',IEL32
WRITE(LUNOUT,'(5X,A,3X,I5)')
+ ' IEL33 = ',IEL33
INT2(1)=INC2
INT2(3)=IEL2
INT3(1)=INC31
INT3(2)=INC32
INT3(3)=INC33
INT3(4)=INC34
INT3(10)=IEL31
INT3(11)=IEL32
INT3(12)=IEL33
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = INT-OPT-CC
C
C DEFINES THE CONTRIBUTIONS TO THE CHARGED CURRENT
C CROSS SECTION FOR WHICH THE INTEGRATED CROSS SECTION
C HAS TO BE CALCULATED AND THE SAMPLING PROCEDURE
C PREPARED
C
C ICC2 : CHARGED CURRENT NON-RADIATIVE CONTRIBUTION
C ICC31 : CHARGED CURRENT CHANNEL 1 (KP)
C ICC32 : CHARGED CURRENT CHANNEL 2 (KQ)
C ICC33 : CHARGED CURRENT CHANNEL 3 (KQS)
C***********************************************************************
700 CONTINUE
READ(LUNIN,*) ICC2,ICC31,ICC32,ICC33
WRITE(LUNOUT,'(2(5X,A,3X,I5))')
+ ' ICC2 = ' ,ICC2, ' ICC31 = ',ICC31
+ , ' ICC32 = ' ,ICC32, ' ICC33 = ',ICC33
INT2(2)=ICC2
INT3(7)=ICC31
INT3(8)=ICC32
INT3(9)=ICC33
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = INT-POINTS
C
C NUMBER OF INTEGRATION POINTS FOR VEGAS
C DEFAULT: 1000
C***********************************************************************
800 CONTINUE
READ(LUNIN,*) NPOVEG
WRITE(LUNOUT,'(5X,A,5X,4I6)') ' NPOVEG', NPOVEG
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = HYP-CUBES
C
C NPHYP = NUMBER OF POINTS TO BE SAMPLED PER HYPERCUBE
C FOR ESTIMATION OF THE LOCAL MAXIMA
C***********************************************************************
900 CONTINUE
READ(LUNIN,*) NPHYP
IF(NPHYP.LT.3) NPHYP=3
WRITE(LUNOUT,'(5X,A/5X,4I6)') ' NPHYP', NPHYP
NPOIN=NPHYP
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = GSW-PARAM
C
C INPUT FOR DEFINITION OF GSW-PARAMETERS AND
C DEFINITION OF THOSE CONTRIBUTIONS
C TO BE INCLUDED INTO THE ACTUAL CALCULATION
C OF SOFT AND VIRTUAL CORRECTIONS
C
C COMPARE SUBROUTINE HSSETP( 0/1 = NO/YES)
C
C LPARIN( 1) = 1 : ELWEAK PARAMETERS SET WITH FIXED W-, Z-MASS
C 2 : ELWEAK PARAMETERS SET WITH FIXED G/MU, Z-MASS
C LPARIN( 2) = 0 : ONLY BORN TERM WITHOUT ANY CORRECTIONS
C 1 : BORN TERM INCLUDING CORRECTIONS
C ACCORDING TO THE FOLLOWING PARAMETERS
C ( 0/1 = NO/YES)
C LPARIN( 3) : SOFT PHOTON EXPONENTIATION AND HIGHER ORDER TERMS
C IN DELTA_R
C LPARIN( 4) : LEPTONIC QED CORRECTIONS (VIRT. + REAL BREMSSTR.)
C LPARIN( 5) : QUARKONIC QED CORRECTIONS (VIRT. + REAL BREMSSTR.)
C LPARIN( 6) : LEPTON-QUARK INTERFERENCE (VIRT. + REAL BREMSSTR.)
C LPARIN( 7) : FERMIONIC CONTRIBUTIONS TO PHOTON SELF ENERGY
C LPARIN( 8) : FERMIONIC CONTRIBUTION TO GAM-Z MIXING TERM
C OF THE SELF ENERGY
C LPARIN( 9) : FERMIONIC CONTRIBUTIONS TO THE Z-SELF-ENERGY
C LPARIN(10) : FERMIONIC CONTRIBUTIONS TO THE W-SELF-ENERGY
C LPARIN(11) : PURELY WEAK CONTRIBUTIONS TO THE SELF ENERGIES,
C VERTEX CORRECTIONS AND BOXES
C LPARIN(12) : Z-EXCHANGE INCLUDED
C***********************************************************************
1000 CONTINUE
READ(LUNIN,*) (LPARIN(I),I=1,11)
WRITE(LUNOUT,'(5X,20I2)') (LPARIN(I),I=1,11)
LPARIN(12)=1
C---REDEFINITION FOR INTERNAL USE
LPAR(1)=1
LPAR(2)=LPARIN(2)
LPAR(3)=LPARIN(3)
LPAR(4)=LPARIN(1)
LPAR(7)=LPARIN(7)
LPAR(8)=LPARIN(8)
LPAR(9)=LPARIN(9)
LPAR(10)=LPARIN(10)
LPAR(11)=0
IF(LPARIN(4).EQ.1 .OR. LPARIN(5).EQ.1 .OR. LPARIN(6).EQ.1)
& LPAR(11)=1
LPAR(12)=LPARIN(4)
LPAR(13)=LPARIN(5)
LPAR(14)=LPARIN(6)
LPAR(15)=LPARIN(11)
LPAR(16)=LPARIN(11)
LPAR(17)=LPARIN(12)
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = STRUCTFUNC
C
C DEFINES THE PARAMETRIZATION OF PARTON DENSITIES
C OR STRUCTURE FUNCTIONS
C APPLIED IN THE ACTUAL CALCULATION
C
C***********************************************************************
1100 CONTINUE
READ(LUNIN,*) ILQMOD,ILIB,ICODE
IPDFOP=0
IF (ILQMOD.LE.1) IPDFOP=1
WRITE(LUNOUT,'(5X,A,I7)') ' ILQMOD = ',ILQMOD
WRITE(LUNOUT,'(5X,A,I7)') ' ILIB = ',ILIB
WRITE(LUNOUT,'(5X,A,I7)') ' ICODE = ',ICODE
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = NFLAVORS
C***********************************************************************
1200 CONTINUE
READ(LUNIN,*) NPYMIN,NPYMAX
IF(NPYMIN.GT.6) NPYMIN=6
IF(NPYMAX.LT.NPYMIN) NPYMAX=NPYMIN
IF(NPYMAX.LE.0) NPYMAX=6
WRITE(LUNOUT,'(5X,A,I6)') ' NPYMIN = ',NPYMIN
WRITE(LUNOUT,'(5X,A,I6)') ' NPYMAX = ',NPYMAX
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = SAM-OPT-NC
C
C DEFINES THE NEUTRAL CURRENT CONTRIBUTIONS REQUESTED IN
C EVENT SAMPLING
C ISNC2 : NEUTRAL CURRENT NON-RADIATIVE CONTRIBUTION
C ISNC31: NEUTRAL CURRENT CHANNEL 1 (LEPTONIC INITIAL
C STATE RADIATION)
C ISNC32: NEUTRAL CURRENT CHANNEL 2 (LEPTONIC FINAL
C STATE RADIATION)
C ISNC33: NEUTRAL CURRENT CHANNEL 3 (COMPTON PART)
C ISNC34: NEUTRAL CURRENT CHANNEL 4 (QUARKONIC RADIATION)
C ISEL2 : ELASTIC EP NON-RADIATIVE CONTRIBUTION
C ISEL31: ELASTIC TAIL, CHANNEL 1 (LEPTONIC INITIAL
C STATE RADIATION)
C ISEL32: ELASTIC TAIL, CHANNEL 2 (LEPTONIC FINAL
C STATE RADIATION)
C ISEL33: ELASTIC TAIL, CHANNEL 3 (COMPTON PART)
C***********************************************************************
1300 CONTINUE
READ(LUNIN,*) ISNC2,ISNC31,ISNC32,ISNC33,ISNC34
+ ,ISEL2,ISEL31,ISEL32,ISEL33
WRITE(LUNOUT,'(5X,A,3X,I5)')
+ ' ISNC2 = ' ,ISNC2
WRITE(LUNOUT,'(2(5X,A,3X,I5))')
+ ' ISNC31 = ',ISNC31,' ISNC32 = ' ,ISNC32
WRITE(LUNOUT,'(2(5X,A,3X,I5))')
+ ' ISNC33 = ',ISNC33,' ISNC34 = ' ,ISNC34
WRITE(LUNOUT,'(5X,A,3X,I5)')
+ ' ISEL2 = ' ,ISEL2
WRITE(LUNOUT,'(2(5X,A,3X,I5))')
+ ' ISEL31 = ',ISEL31,' ISEL32 = ' ,ISEL32
WRITE(LUNOUT,'(5X,A,3X,I5)')
+ ' ISEL33 = ',ISEL33
ISAM2(1)=ISNC2
ISAM2(3)=ISEL2
ISAM3(1)=ISNC31
ISAM3(2)=ISNC32
ISAM3(3)=ISNC33
ISAM3(4)=ISNC34
ISAM3(10)=ISEL31
ISAM3(11)=ISEL32
ISAM3(12)=ISEL33
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = SAM-OPT-CC
C
C DEFINES THE CHARGED CURRENT CONTRIBUTIONS REQUESTED IN
C EVENT SAMPLING
C
C ISCC2 : CHARGED CURRENT NON-RADIATIVE CONTRIBUTION
C ISCC31 : CHARGED CURRENT CHANNEL 1 (KP)
C ISCC32 : CHARGED CURRENT CHANNEL 2 (KQ)
C ISCC33 : CHARGED CURRENT CHANNEL 3 (KQS)
C***********************************************************************
1400 CONTINUE
READ(LUNIN,*) ISCC2,ISCC31,ISCC32,ISCC33
WRITE(LUNOUT,'(2(5X,A,3X,I5))')
+ ' ISCC2 = ' ,ISCC2, ' ISCC31 = ',ISCC31
+ , ' ISCC32 = ' ,ISCC32, ' ISCC33 = ',ISCC33
ISAM2(2)=ISCC2
ISAM3(7)=ISCC31
ISAM3(8)=ISCC32
ISAM3(9)=ISCC33
C---CHANNELS NOT YET DEFINED
ISAM3(8)=0
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = RNDM-SEEDS
C
C INPUT / OUTPUT OF ACTUAL RANDOM NUMBER SEEDS
C***********************************************************************
1500 CONTINUE
READ(LUNIN,*) ISDINP,ISDOUT
WRITE(LUNOUT,'(5X,A,I6)') ' ISDINP = ',ISDINP
WRITE(LUNOUT,'(5X,A,I6)') ' ISDOUT = ',ISDOUT
IF(ISDINP.GT.0) THEN
READ(LUNRND,*) UIO
READ(LUNRND,*) CIO,CDIO,CMIO,IIO,JIO
CALL HSRNIN(UIO,CIO,CDIO,CMIO,IIO,JIO)
elseif (isdinp.lt.0) then
write(lunout,'(5x,A)') ' Use ranlux with date and time as seed'
call idate(today) ! today(1)=day, (2)=month, (3)=year
call itime(now) ! now(1)=hour, (2)=minute, (3)=second
initseed = today(1)+10*today(2)+today(3)+now(1)+5*now(3)
write(lunout,'(5X,A,I12)') ' SEED = ', initseed
call rndmq (idum1,idum2,initseed,' ')
ENDIF
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = GSW-MASS
C
C ELECTROWEAK MASS PARAMETERS
C***********************************************************************
1600 CONTINUE
READ(LUNIN,*) MW,MZ,MH,MT
LPAR(5)=1
WRITE(LUNOUT,'(5X,A,4F12.4)') ' MW, MZ, MH, MT = ',MW,MZ,MH,MT
GOTO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = THMIN-QRAD
C
C DEFINES THE ANGULAR CUTS FOR HARD QUARKONIC BREMSSTRAHLUNG
C
C TCUTQ : INITIAL STATE RADIATION
C TCUTQS : FINAL STATE RADIATION
C
C***********************************************************************
1700 CONTINUE
READ(LUNIN,*) TCUTQ,TCUTQS
WRITE(LUNOUT,'(2(5X,A,F10.4,A))')
& ' TCUTQ = ', TCUTQ, ' RAD',
& ' TCUTQS = ', TCUTQS, ' RAD'
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = FLONG
C
C INCLUDE THE LONGITUDINAL STRUCTURE FUNCTION (FOR IPART < 1000)
C
C***********************************************************************
1800 CONTINUE
READ(LUNIN,*) IFLOPT,PARL11,PARL19
WRITE(LUNOUT,'(5X,A,I5,A,F10.4,A,F10.4)')
& ' IFLOPT = ', IFLOPT,
& ' PARL11 =', PARL11,
& ' PARL19 =', PARL19
CALL DIFLOP
GO TO 1
1900 CONTINUE
C
C***********************************************************************
C CONTROL CARD: CODEWD = ALFAS
C
C DEFINITION OF ALPHA_S IN THE CALCULATION OF THE LONGITUDINAL
C STRUCTURE FUNCTION
C
C***********************************************************************
READ(LUNIN,*) MST111,MST115,PAR111,PAR112
WRITE(LUNOUT,'(5X,A,I5)') ' MST111 = ', MST111
WRITE(LUNOUT,'(5X,A,I5)') ' MST115 = ', MST115
WRITE(LUNOUT,'(5X,A,F10.4)') ' PAR111 = ', PAR111
WRITE(LUNOUT,'(5X,A,F10.4)') ' PAR112 = ', PAR112
CALL DIALFS
GO TO 1
2000 CONTINUE
2100 CONTINUE
C
C***********************************************************************
C CONTROL CARD: CODEWD = EP-DIPOLE
C
C INCLUDE PARAMETRIZATION OF STEIN ET AL. FOR THE DEVIATION
C OF THE DIPOLE FORM FACTOR FOR ELASTIC EP SCATTERING
C
C***********************************************************************
READ(LUNIN,*) IDIPOL
WRITE(LUNOUT,'(5X,A,I5)') ' IDIPOL = ', IDIPOL
GO TO 1
2200 CONTINUE
C
C***********************************************************************
C CONTROL CARD: CODEWD = NUCLEUS
C
C SCATTERING OFF HEAVY NUCLEI
C
C***********************************************************************
READ(LUNIN,*) EPRO,HNA,HNZ
WRITE(LUNOUT,'(5X,A,1PE13.3)') ' E PER NUCLEON=',EPRO
WRITE(LUNOUT,'(5X,A,F5.0)') ' A-NUCLEUS=',HNA
WRITE(LUNOUT,'(5X,A,F5.0)') ' Z-NUCLEUS=',HNZ
GO TO 1
2300 CONTINUE
C
C***********************************************************************
C CONTROL CARD: CODEWD = NUCL-MOD
C
C MODEL FOR NUCLEAR PARTON DISTRIBUTIONS
C
C***********************************************************************
READ(LUNIN,*) INUMOD
WRITE(LUNOUT,'(5X,A,I5)') ' INUMOD=',INUMOD
GO TO 1
2400 CONTINUE
C
C***********************************************************************
C CONTROL CARD: CODEWD = LHAPATH
C
C PATH NAME FOR GRID FILES OF LHAPDF LIBRARY
C
C***********************************************************************
READ(LUNIN,2590) LHAPATHI
LHAPATH=LHAPATHI
WRITE(LUNOUT,'(5X,A,A)') ' LHAPATH=',LHAPATHI
GOTO 1
2590 FORMAT(A80)
2500 CONTINUE
C
C***********************************************************************
C CONTROL CARD: CODEWD = OUTFILENAM
C
C FILE NAME TO REDIRECT STANDARD OUTPUT VIA LUNOUT (D=6)
C
C***********************************************************************
READ(LUNIN,2590) OUTFILENAM
ICH=INDEX(OUTFILENAM,' ')-1
IODEF=1
WRITE(LUNOUT,'(5X,A,A)') ' OUTFILENAM=',OUTFILENAM
C...Open files when reading input is finished
GOTO 1
2600 CONTINUE
C
C***********************************************************************
C CONTROL CARD: CODEWD = THETA-CUT
C
C CUT ON MINIMUM ELECTRON SCATTERING ANGLE (MASSES NEGLECTED)
C
C***********************************************************************
READ(LUNIN,*) THEMIN,THEMAX
WRITE(LUNOUT,'(5X,A,F12.4)') ' THETA-MIN = ', THEMIN
WRITE(LUNOUT,'(5X,A,F12.4)') ' THETA-MAX = ', THEMAX
GO TO 1
2700 CONTINUE
C
C***********************************************************************
C CONTROL CARD: CODEWD = PT-CUT
C
C CUT ON MINIMUM ELECTRON SCATTERING ANGLE (MASSES NEGLECTED)
C
C***********************************************************************
READ(LUNIN,*) PTMIN
WRITE(LUNOUT,'(5X,A,F12.4)') ' PT-MIN = ', PTMIN
GO TO 1
2800 CONTINUE
C
C***********************************************************************
C CONTROL CARD: CODEWD = POLPDF
C
C CODE FOR PARAMETRIZATION OF POLARIZED PARTON DISTRIBUTIONS
C
C***********************************************************************
READ(LUNIN,*) IDPVR
WRITE(LUNOUT,'(5X,A,I8)') ' IDPVR = ', IDPVR
GO TO 1
2900 CONTINUE
3000 CONTINUE
3100 CONTINUE
C
C***********************************************************************
C CONTROL CARD: CODEWD = WEIGHTS
C
C USE EXTERNALLY DEFINED WEIGHT IN EVENT GENERATION
C
C***********************************************************************
READ(LUNIN,*) IWEIGR
WRITE(LUNOUT,'(5X,A,I5)') ' IWEIGS = ', IWEIGR
C...for initialization keep
IWEIGS=0
GO TO 1
3200 CONTINUE
3300 CONTINUE
3400 CONTINUE
3500 CONTINUE
C
C***********************************************************************
C CONTROL CARD: CODEWD = INT-ONLY
C
C PERFORM ONLY INTEGRATION, NO ETIMATION OF MAXIMA
C IOPLOT < 0: NO CALL TO HSESTM
C IOPLOT >= 0: CALL TO HSESTM
C***********************************************************************
3600 CONTINUE
READ(LUNIN,*) IOPLOT
WRITE(LUNOUT,'(5X,A,5X,I3)') ' INTOPT', IOPLOT
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = TEST-OPT
C
C DEFINE AMOUNT OUTPUT FOR TEST RUNS
C
C IPRINT : DIFFERENT QUANTITY OF TEST OUTPUT FOR IPRINT GT. 0
C
C***********************************************************************
3700 CONTINUE
READ(LUNIN,*) IPRINT
WRITE(LUNOUT,'(5X,A,5X,I3)') ' IPRINT',
* IPRINT
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = IOUNITS
C
C I / O UNITS
C
C LUNOUT: FOR STANDARD INPUT
C LUNRND: IN-/OUTPUT FOR RANDOM NUMBER SEED
C LUNDAT: IN-OUTPUT OF SAMPLING INFORMATION
C
C disabled as of version 4.6.9 onwards
C
C***********************************************************************
3800 CONTINUE
c LUOOLD=LUNOUT
READ(LUNIN,*) LDUMY1,LDUMY2,LDUMY3
c IF (LUNOUT.NE.LUOOLD) THEN
c WRITE(LUOOLD,'(5X,A,I3,A)')
c * ' ******* WARNING: LOGICAL UNIT FOR STANDARD OUTPUT CHANGED TO '
c * ,LUNOUT
c * ,' THE FOLLOWING OUTPUT IS WRITTEN TO THIS UNIT'
c ENDIF
c WRITE(LUNOUT,'(5X,A,5X,5I3)')
c * ' LUNOUT,LUNRND,LUNDAT'
c * ,LUNOUT,LUNRND,LUNDAT
c OPEN(LUNDAT,FILE='djh.dat',STATUS='UNKNOWN',FORM='UNFORMATTED')
c OPEN(LUNRND,FILE='djhrnd.dat',STATUS='UNKNOWN',FORM='FORMATTED')
WRITE(LUNOUT,'(5X,A)')
* ' ******* WARNING: CODEWORD IOUNITS IS DISABLED '
GO TO 1
C
C***********************************************************************
C CONTROL CARD: CODEWD = START
C STARTS THE SAMPLING OF EVENTS AND STANDARD HISTOGRAM
C OUTPUT
C
C NEVENT : NUMBER OF EVENTS TO BE SAMPLED
C***********************************************************************
3900 CONTINUE
READ(LUNIN,*) NEVENT
WRITE(LUNOUT,'(5X,A,I12,/)') ' NEVENT =',NEVENT
INFOCA=0
DO 3921 I=1,5
IF(NEVENT.LE.0) ISAM2(I)=0
IF(INT2(I).GT.0) INFOCA=1
3921 CONTINUE
DO 3922 I=1,15
IF(NEVENT.LE.0) ISAM3(I)=0
IF(INT3(I).GT.0) INFOCA=1
3922 CONTINUE
C
C---Now we can open output files
IF (IODEF.EQ.1) THEN
WRITE(6,'(5X,A)')
* '***** All output is redirected to file '
WRITE(6,'(5X,A,A)') ' OUTFILENAM = '
* ,OUTFILENAM(1:ICH)//'_out.dat'
WRITE(6,'(5X,A)')
* '***** from now on '
OPEN(LUNOUT,FILE=OUTFILENAM(1:ICH)//'_out.dat',STATUS='NEW')
ENDIF
OPEN(LUNDAT,FILE=OUTFILENAM(1:ICH)//'_smp.dat',STATUS='UNKNOWN',
* FORM='UNFORMATTED')
OPEN(LUNRND,FILE=OUTFILENAM(1:ICH)//'_rnd.dat'
* ,STATUS='UNKNOWN', FORM='FORMATTED')
C---PRINT THE TITLE ALSO TO FILE
WRITE(LUNOUT,9)
C---DO THE NECESSARY INITIALIZATION / PRINT PARAMETERS
CALL HSPRLG
C
C---CHECK CONSISTENCY OF INPUT DATA FILE
IF(INFOCA.EQ.1) THEN
READ(LUNDAT,ERR=3999,END=3999,IOSTAT=IOS) FNAMET
IF(FNAME.EQ.FNAMET) THEN
READ(LUNDAT,ERR=3999,END=3999,IOSTAT=IOS)
& INT2C,INT3C,ISAM2C,ISAM3C