C   28/03/97 703282248  MEMBER NAME  JEOSUM1  (JADE56.S)    FORTRAN
C   28/03/97            MEMBER NAME  $$COPY   (JADE56.S)    FORTRAN
//F11JOL   JOB 00010221,F11OLS,CLASS=E,MSGLEVEL=(1,0),TIME=(0,15)
//*MAIN ORG=EXT,RELPRI=LOW
// EXEC FLG
//LKED.SYSLIB DD
//            DD
//            DD DSN=F22ELS.CL11,DISP=SHR,UNIT=FAST
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR,UNIT=FAST
//LKED.SYSIN DD *
  INCLUDE SYSLIB(ECOPY)
//*                INPUT
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*           DSN=F11OLS.TR12GAM.NEU86.ETABAND
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*           DSN=F11OLS.TR22GAM.NEU86RS2
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*           DSN=F11OLS.RED1.NR1558
//*        DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.RED1.NR1559
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.MSTEV18.TEST1
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.TR12GAM.KREHBIEL
//*           DD DISP=SHR,DSN=F11OLS.TR3NGAM.NEU86EW1
//*           DD DISP=SHR,DSN=F11OLS.TR4NGAM.D435
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.UNIGAM.E100D8.SF6
//*           DD DISP=SHR,DSN=F11OLS.UNIGAM.E200D8.SF6
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.MCTRACK.BSUM15
//GO.FT02F001 DD DISP=SHR,DSN=F11OLS.ETAP2286.TJELM8A
//            DD DISP=SHR,DSN=F11OLS.ETAP2286.TJELM8B
//            DD DISP=SHR,DSN=F11OLS.ETAP2286.TJELM8C
//            DD DISP=SHR,DSN=F11OLS.ETAP2286.TJELM7A
//            DD DISP=SHR,DSN=F11OLS.ETAP2286.TJELM7B
//            DD DISP=SHR,DSN=F11OLS.ETAP2286.TJELM9A
//            DD DISP=SHR,DSN=F11OLS.ETAP2286.TJELM9B
//*           DD DISP=SHR,DSN=F11OLS.ETAP2286.TJELM10A
//*           DD DISP=SHR,DSN=F11OLS.ETAP2286.TJELM10B
//*               OUTPUT
//*O.FT03F001 DD DUMMY
//*O.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAP2286.NR6T1
//* .FT03F001 DD DISP=SHR,DSN=F11OLS.ETAP1286.NR6T9
//GO.FT03F001 DD DISP=SHR,DSN=F11OLS.MCTRACK.BSUM7
//*O.FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*   DSN=F11OLS.MCTRACK.BSUM9,
//*        MSVGP=VJA2,UNIT=3330V
//*O.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*  SPACE=(TRK,(70,10),RLSE),DSN=F11OLS.TR12GAM.KREHCIEL
//*O.FT03F001 DD UNIT=TAPE,DISP=(NEW,KEEP),LABEL=(1,NL),
//*  DCB=(R01DCB.VBS,LRECL=6229,BLKSIZE=6233,DEN=4),
//*  DSN=YEN08150,VOL=SER=F11105
//*O.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*   DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*     DSN=F11OLS.ETAPMM86.SUM1TO4
//*O.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*   DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*     DSN=F11OLS.ETAPMM86.ENGLOSX.BSUM1T9
//*O.FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR12GAM.MNEU86.ETABAND,
//*        MSVGP=VTMP,UNIT=3330V
//*O.FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*   DSN=F11OLS.MSLUMI17.T181T200,
//*        MSVGP=VTMP,UNIT=3330V
C   28/03/97            MEMBER NAME  $COPY    (JADE56.S)    FORTRAN
//F11JOL   JOB 00010221,F11OLS,CLASS=E,MSGLEVEL=(1,0),TIME=(0,15)
//*MAIN ORG=EXT,RELPRI=LOW
// EXEC FLG
//LKED.SYSLIB DD
//            DD
//            DD DSN=F22ELS.CL11,DISP=SHR,UNIT=FAST
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR,UNIT=FAST
//LKED.SYSIN DD *
  INCLUDE SYSLIB(ECOPY)
//*                INPUT
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*           DSN=F11OLS.TR12GAM.NEU86.ETABAND
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*           DSN=F11OLS.TR22GAM.NEU86RS2
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*           DSN=F11OLS.RED1.NR1558
//*        DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.RED1.NR1559
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.MSTEV18.TEST1
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.TR12GAM.KREHBIEL
//*           DD DISP=SHR,DSN=F11OLS.TR3NGAM.NEU86EW1
//*           DD DISP=SHR,DSN=F11OLS.TR4NGAM.D435
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.UNIGAM.E100D8.SF6
//*           DD DISP=SHR,DSN=F11OLS.UNIGAM.E200D8.SF6
//GO.FT02F001 DD DISP=SHR,DSN=F11OLS.ETAPRI86.NR30
//            DD DISP=SHR,DSN=F11OLS.ETAPRI86.NR31
//            DD DISP=SHR,DSN=F11OLS.ETAPRI86.NR32
//            DD DISP=SHR,DSN=F11OLS.ETAPRI86.NR33
//            DD DISP=SHR,DSN=F11OLS.ETAPRI86.NR34
//            DD DISP=SHR,DSN=F11OLS.ETAPRI86.NR35
//            DD DISP=SHR,DSN=F11OLS.ETAPRI86.NR36
//            DD DISP=SHR,DSN=F11OLS.ETAPRI86.NR37
//            DD DISP=SHR,DSN=F11OLS.ETAPRI86.NR38
//            DD DISP=SHR,DSN=F11OLS.ETAPRI86.NR39
//            DD DISP=SHR,DSN=F11OLS.ETAPRI86.NR40
//*           DD DISP=SHR,DSN=F11OLS.ETAPRI86.NR29
//*           DD DISP=SHR,DSN=F11OLS.ETAPRI86.NR16
//*           DD DISP=SHR,DSN=F11OLS.ETAPRI86.NR17
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.ETAP1286.NR67A
//*           DD DISP=SHR,DSN=F11OLS.ETAP1286.NR67B
//*           DD DISP=SHR,DSN=F11OLS.ETAP1286.NR8A
//*           DD DISP=SHR,DSN=F11OLS.ETAP1286.NR8B
//*           DD DISP=SHR,DSN=F11OLS.ETAP1286.NR9A
//*           DD DISP=SHR,DSN=F11OLS.ETAP1286.NR9B
//*               OUTPUT
//*O.FT03F001 DD DUMMY
//*O.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAP2286.NR6T1
//* .FT03F001 DD DISP=SHR,DSN=F11OLS.ETAP1286.NR6T9
//GO.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAPRI.SUM10
//*O.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*  SPACE=(TRK,(70,10),RLSE),DSN=F11OLS.TR12GAM.KREHCIEL
//*O.FT03F001 DD UNIT=TAPE,DISP=(NEW,KEEP),LABEL=(1,NL),
//*  DCB=(R01DCB.VBS,LRECL=6229,BLKSIZE=6233,DEN=4),
//*  DSN=YEN08150,VOL=SER=F11105
//*O.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*   DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*     DSN=F11OLS.ETAPMM86.SUM1TO4
//*O.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*   DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*     DSN=F11OLS.ETAPMM86.ENGLOSX.BSUM1T9
//*O.FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*   DSN=F11OLS.MCTRACK.SUM8,
//*        MSVGP=VJAD,UNIT=3330V
//*O.FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*   DSN=F11OLS.ETAPRI.SUM17,
//*        MSVGP=VTMP,UNIT=3330V
//*O.FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*   DSN=F11OLS.MSLUMI17.T181T200,
//*        MSVGP=VTMP,UNIT=3330V
C   28/03/97            MEMBER NAME  $COPYU   (JADE56.S)    FORTRAN
//F11JOL   JOB 00010622,F11OLS,CLASS=E,MSGLEVEL=(1,0),TIME=(0,15)
//*MAIN ORG=EXT,RELPRI=LOW
// EXEC FLG
//LKED.SYSLIB DD
//            DD
//            DD DSN=F22ELS.CL11,DISP=SHR,UNIT=FAST
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR,UNIT=FAST
//LKED.SYSIN DD *
  INCLUDE SYSLIB(ECOPY)
//*                INPUT
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*           DSN=F11OLS.TR12GAM.NEU86.ETABAND
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*           DSN=F11OLS.TR22GAM.NEU86RS2
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*           DSN=F11OLS.RED1.NR1558
//*        DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.RED1.NR1559
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.MSTEV18.TEST1
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.TR12GAM.KREHBIEL
//*           DD DISP=SHR,DSN=F11OLS.TR3NGAM.NEU86EW1
//*           DD DISP=SHR,DSN=F11OLS.TR4NGAM.D435
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.UNIGAM.E100D8.SF6
//*           DD DISP=SHR,DSN=F11OLS.UNIGAM.E200D8.SF6
//GO.FT02F001 DD DISP=SHR,DSN=F11OLS.UNIGAM87.E100D1
//            DD DISP=SHR,DSN=F11OLS.UNIGAM87.E100D2
//            DD DISP=SHR,DSN=F11OLS.UNIGAM87.E100D3
//            DD DISP=SHR,DSN=F11OLS.UNIGAM87.E100D4
//            DD DISP=SHR,DSN=F11OLS.UNIGAM87.E100D5
//*           DD DISP=SHR,DSN=F11OLS.UNIGAM87.E100D6
//*           DD DISP=SHR,DSN=F11OLS.UNIGAM87.E100D7
//*           DD DISP=SHR,DSN=F11OLS.UNIGAM87.E100D8
//*           DD DISP=SHR,DSN=F11OLS.UNIGAM87.E100D9
//*           DD DISP=SHR,DSN=F11OLS.UNIGAM87.E100DA
//*               OUTPUT
//*O.FT03F001 DD DUMMY
//*O.FT03F001 DD DISP=SHR,DSN=F11OLS.UNIGAM87.SUME300
//GO.FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//    DSN=F11OLS.UNIGAM87.SUMF100A,
//         MSVGP=VTMP,UNIT=3330V
//* .FT03F001 DD DISP=SHR,DSN=F11OLS.ETAP1286.NR6T9
//*O.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAPRI.SUM6
//*O.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*  SPACE=(TRK,(70,10),RLSE),DSN=F11OLS.TR12GAM.KREHCIEL
//*O.FT03F001 DD UNIT=TAPE,DISP=(NEW,KEEP),LABEL=(1,NL),
//*  DCB=(R01DCB.VBS,LRECL=6229,BLKSIZE=6233,DEN=4),
//*  DSN=YEN08150,VOL=SER=F11105
//*O.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*   DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*     DSN=F11OLS.ETAPMM86.SUM1TO4
//*O.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*   DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*     DSN=F11OLS.ETAPMM86.ENGLOSX.BSUM1T9
//*O.FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR12GAM.MNEU86.ETABAND,
//*        MSVGP=VTMP,UNIT=3330V
//*O.FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*   DSN=F11OLS.MSLUMI17.T181T200,
//*        MSVGP=VTMP,UNIT=3330V
C   28/03/97            MEMBER NAME  ##COPY   (JADE56.S)    FORTRAN
//F11JLL   JOB 00010622,F11OLS,CLASS=A,MSGLEVEL=(1,0),TIME=(0,35)
//*MAIN ORG=EXT,RELPRI=MED
// EXEC FLG
//LKED.SYSLIB DD
//            DD
//            DD DSN=F22ELS.CL11,DISP=SHR,UNIT=FAST
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR,UNIT=FAST
//LKED.SYSIN DD *
  INCLUDE SYSLIB(ECOPY)
//*                INPUT
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*           DSN=F11OLS.TR12GAM.NEU86.ETABAND
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*           DSN=F11OLS.ETAP2286.ENGLOSX.BSUM1T09
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*           DSN=F11OLS.RED1.NR1558
//*        DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.RED1.NR1559
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.MSTEV18.TEST1
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.TR12GAM.MNEU86.ETABAND
//*           DD DISP=SHR,DSN=F11OLS.TR3NGAM.NEU86EW1
//*           DD DISP=SHR,DSN=F11OLS.TR4NGAM.D435
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.UNIGAM.E100D8.SF6
//*           DD DISP=SHR,DSN=F11OLS.UNIGAM.E200D8.SF6
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.ETAPRI.SUM1
//*           DD DISP=SHR,DSN=F11OLS.ETAPRI.SUM2
//*           DD DISP=SHR,DSN=F11OLS.ETAPRI.SUM3
//*           DD DISP=SHR,DSN=F11OLS.ETAPRI.SUM4
//*           DD DISP=SHR,DSN=F11OLS.ETAPRI.SUM5
//*           DD DISP=SHR,DSN=F11OLS.ETAPRI.SUM6
//*           DD DISP=SHR,DSN=F11OLS.ETAPRI.SUM7
//*           DD DISP=SHR,DSN=F11OLS.ETAPRI.SUM8
//*           DD DISP=SHR,DSN=F11OLS.ETAPRI.SUM9
//*           DD DISP=SHR,DSN=F11OLS.ETAPRI.SUM10
//GO.FT02F001 DD DISP=SHR,DSN=F11OLS.MCTRACK.BSUM1
//            DD DISP=SHR,DSN=F11OLS.MCTRACK.BSUM2
//            DD DISP=SHR,DSN=F11OLS.MCTRACK.BSUM3
//            DD DISP=SHR,DSN=F11OLS.ETAP2286.TJELM10A
//            DD DISP=SHR,DSN=F11OLS.ETAP2286.TJELM10B
//*           DD DISP=SHR,DSN=F11OLS.ETAP2286.TJELN8C
//*               OUTPUT
//*O.FT03F001 DD DUMMY
//*O.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAP2286.NR6T1
//* .FT03F001 DD DISP=SHR,DSN=F11OLS.ETAP1286.NR6T9
//*O.FT03F001 DD DISP=SHR,DSN=F11OLS.ETA86.SUMNR5
//*O.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*  SPACE=(TRK,(70,10),RLSE),DSN=F11OLS.SCRATCH.NR0
//*O.FT03F001 DD UNIT=TAPE,DISP=(NEW,KEEP),LABEL=(1,NL),
//*  DCB=(R01DCB.VBS,LRECL=6229,BLKSIZE=6233,DEN=4),
//*  DSN=YEN08150,VOL=SER=F11105
//GO.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//    DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//      DSN=F11OLS.ETAP2286.ENGLOSX.TJELMX.SUM1TO4
//*O.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*   DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*     DSN=F11OLS.ETAPRI86.TJELMX.SUM1TO10
//*O.FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*   DSN=F11OLS.ETAPMM86.NR5T9,
//*        MSVGP=VTMP,UNIT=3330V
//*O.FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR12GAM.MNEU86.ETABANDX
//*        MSVGP=VTMP,UNIT=3330V
//*O.FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*   DSN=F11OLS.MSLUMI17.T181T200,
//*        MSVGP=VTMP,UNIT=3330V
C   28/03/97            MEMBER NAME  #CERSF56 (JADE56.S)    FORTRAN
//F11JLL   JOB 00010622,OLSSON,CLASS=K,TIME=(2,06),MSGLEVEL=(1,0)
//*MAIN RELPRI=LOW
//*
//*  GEP VERSION OF #CERSF54
//*
//*EXEC FCLG
// EXEC GEP,PARM.LKED='LIST',REGION.GO=700K,VS=HBOOK,
//      DN='F11OLS.CERSF56.NR3'
#include "@cersf55.for"
#include "sf5fun.for"
#include "curfit5.for"
//LKED.SYSLIB DD
//            DD
//            DD
//            DD
//            DD
//            DD DSN=F11OLS.JADELD,DISP=SHR
//            DD DSN=F22YAM.UTILTYL,DISP=SHR
//            DD DSN=F11OLS.TEMPL,DISP=SHR
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERN.KERNLIB4
//*DD DSN=F22YAM.WORKL,DISP=SHR
//*LKED.SYSIN DD *
//* INCLUDE SYSLIB(CURFIT4)
//GO.FT02F001 DD DUMMY
DATA FROM CERTST5.NR2  (-1.00 INCLUDED), CORRECTED 5.1.1987, 20.4.87
         1         1
 1.000
  86.15  88.91  89.66  93.58  94.66  98.19  99.97 102.98 108.53 113.76
 119.99 128.92 143.26 169.84
 0.900
  52.94  55.11  57.07  58.50  59.94  62.85  64.63  65.23  68.03  69.81
  76.49  81.69  88.57 105.47
 0.800
  49.88  50.84  51.12  53.53  54.44  55.18  57.52  59.04  60.99  62.71
  67.75  71.68  80.46  94.73
 0.700
  47.03  46.15  49.14  49.38  50.00  51.54  52.97  55.57  58.59  60.62
  62.15  66.04  73.95  90.60
 0.600
  44.16  44.20  45.95  46.57  46.85  49.48  51.90  51.48  53.22  56.49
  59.35  62.78  70.23  82.73
 0.500
  41.48  41.68  43.78  45.71  44.87  47.22  47.31  50.33  51.05  53.62
  56.44  61.25  66.52  76.53
 0.400
  50.05  50.19  50.45  51.78  52.14  53.26  54.95  55.32  55.99  58.30
  61.32  64.17  70.30  84.09
 0.300
  54.06  54.14  53.85  54.37  54.06  57.45  55.89  58.50  58.15  61.30
  62.70  65.34  71.26  82.01
 0.200
  55.28  55.30  52.99  56.10  57.38  57.21  58.31  57.68  58.72  61.45
  62.14  66.88  71.88  79.89
 0.100
  54.93  57.45  56.86  58.02  57.94  57.36  57.63  60.05  59.80  61.49
  63.58  66.69  70.82  80.52
 0.000
  56.84  56.70  55.95  56.05  54.94  58.05  58.94  59.59  60.37  61.18
  62.81  64.50  67.93  79.96
-0.100
  57.33  57.85  55.22  55.65  57.52  56.48  56.17  56.97  59.63  59.45
  61.42  62.71  66.59  75.82
-0.200
  53.50  54.04  55.57  54.72  55.49  55.30  55.26  54.65  55.91  56.70
  58.79  60.02  62.02  68.97
-0.300
  52.87  51.58  52.66  52.21  52.74  51.22  52.71  51.22  51.87  52.10
  54.52  55.56  57.19  61.79
-0.400
  47.95  48.26  48.16  45.52  46.43  46.33  45.81  46.86  46.30  46.52
  46.96  47.13  47.95  49.81
-0.500
  40.46  40.01  39.17  39.03  37.44  36.93  36.67  34.33  35.21  34.78
  32.92  32.71  33.27  33.26
-0.600
  41.65  41.82  40.99  40.55  37.90  39.03  39.15  38.00  35.97  37.31
  35.72  35.18  34.25  33.76
-0.700
  44.93  45.45  41.97  41.72  41.72  41.23  40.55  39.93  38.29  38.59
  38.46  36.12  36.19  34.72
-0.800
  48.92  47.84  46.89  46.16  45.42  43.93  42.58  42.77  41.86  40.56
  40.74  39.96  37.98  40.60
-0.900
  53.04  52.03  51.80  48.99  48.86  49.03  46.36  47.38  46.55  45.70
  43.05  42.83  42.88  41.63
-1.000
  83.53  82.17  81.18  78.43  75.94  74.46  74.05  72.40  69.98  67.75
  67.92  66.74  65.94  64.21
C   28/03/97            MEMBER NAME  #CERSF6H (JADE56.S)    FORTRAN
//F11JLL   JOB 00010622,OLSSON,CLASS=K,TIME=(0,45)
//*MAIN RELPRI=LOW
//*
//*  4-PARAMETER FIT
//*
//*EXEC FCLG
// EXEC GEP,PARM.LKED='LIST',REGION.GO=700K,VS=HBOOK
//*     DN='F11OLS.CERSF6H.NR1'
#include "@cerfith.for"
#include "cerfunh.for"
#include "curfit5.for"
//LKED.SYSLIB DD
//            DD
//            DD
//            DD
//            DD
//            DD DSN=F11OLS.JADELD,DISP=SHR
//            DD DSN=F22YAM.UTILTYL,DISP=SHR
//            DD DSN=F11OLS.TEMPL,DISP=SHR
//            DD UNIT=FAST,DISP=SHR,DSN=F11LHO.JADEGL
//*           DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERN.KERNLIB4
//*DD DSN=F22YAM.WORKL,DISP=SHR
//*LKED.SYSIN DD *
//* INCLUDE SYSLIB(CURFIT4)
//*   READ(5,501) AESS,BASI,AEXPA,A4,A5,A6,A7
//GO.FT02F001 DD DUMMY
DATA FROM CORRECTED #CERTST6 CERNKV67, VERSION OF 5.5.1987
      1.00     10.00      0.40    0.6      -0.7       0.6      -2.0000
 1.000
  32.67  33.44  34.34  34.41  34.98  35.48  36.20  37.51  38.12  39.00
  40.54  41.19  42.60  44.70  46.19  48.21  51.03  54.95  59.81  74.65
 0.900
  22.34  22.35  22.76  23.26  23.41  24.14  24.65  25.38  25.70  26.19
  26.46  27.52  28.38  29.48  30.50  31.82  33.43  35.82  39.96  48.05
 0.800
  21.81  22.13  22.59  22.34  23.00  23.47  23.47  24.28  24.95  25.24
  26.54  26.61  27.48  27.86  29.69  31.16  32.66  34.44  38.12  45.66
 0.700
  20.82  21.38  21.72  21.38  22.22  22.55  23.16  23.32  23.68  24.66
  25.17  26.17  26.79  27.74  28.33  29.91  30.74  33.34  36.95  44.73
 0.600
  20.24  20.51  20.73  20.85  21.41  21.31  22.42  22.62  23.00  23.61
  24.24  25.11  25.22  26.44  27.11  28.64  29.74  31.84  35.37  42.96
 0.500
  19.13  19.32  19.72  19.75  20.46  20.46  21.47  21.56  21.60  22.54
  22.95  24.27  24.19  24.92  26.13  27.48  28.63  30.31  33.81  40.27
 0.400
  18.17  18.84  18.64  18.71  19.53  19.71  20.22  20.49  21.11  21.66
  21.58  21.96  23.34  23.81  24.79  26.00  27.50  28.96  32.27  39.40
 0.300
  22.97  23.34  23.00  23.65  23.79  24.29  24.32  24.40  24.30  25.55
  25.78  26.32  27.14  27.31  28.47  28.96  29.93  31.91  34.75  41.18
 0.200
  25.31  25.39  25.15  25.73  25.45  25.94  25.49  26.23  26.92  26.03
  27.04  27.55  28.39  28.74  29.29  30.66  31.19  33.34  35.68  41.78
 0.100
  25.92  26.12  25.91  25.53  26.03  26.19  26.75  26.40  27.37  27.31
  27.38  28.13  28.05  28.62  29.64  30.01  31.95  32.59  35.08  39.94
 0.000
  25.59  25.66  25.90  26.24  25.98  26.49  26.17  26.32  26.73  27.27
  27.20  27.29  28.13  28.12  28.66  30.00  30.55  31.91  33.60  39.70
-0.100
  25.22  25.53  26.18  25.43  25.71  26.31  25.96  25.80  25.91  26.06
  26.70  26.97  27.30  27.55  28.52  29.17  29.57  30.46  32.42  36.10
-0.200
  24.91  24.77  24.51  24.31  24.46  24.70  24.62  24.74  24.68  24.85
  24.55  25.05  25.35  25.99  25.82  26.18  27.06  28.21  29.69  33.06
-0.300
  22.88  22.85  22.28  22.52  22.72  22.42  22.58  22.07  22.62  22.22
  22.40  22.40  22.70  22.81  23.31  23.54  24.21  24.34  25.48  27.59
-0.400
  17.86  17.85  17.69  17.28  17.13  16.68  16.85  16.06  15.89  16.04
  15.94  15.76  15.38  15.55  15.73  15.49  15.25  15.10  14.94  14.68
-0.500
  18.56  18.37  18.50  18.28  17.95  17.74  17.73  17.36  17.25  17.07
  16.69  16.75  16.23  16.28  15.76  16.19  15.93  15.73  15.77  15.14
-0.600
  19.61  19.32  19.29  18.79  19.00  18.34  18.10  18.18  17.85  17.79
  17.87  17.46  16.96  17.34  16.98  16.46  16.51  16.59  16.17  16.40
-0.700
  20.42  20.23  19.79  20.09  19.45  19.00  19.06  19.00  18.88  18.36
  18.31  17.80  17.98  17.62  17.57  17.37  17.47  17.09  16.87  17.11
-0.800
  21.11  20.78  20.77  20.70  20.28  19.98  19.61  19.29  18.99  19.21
  19.13  18.86  18.45  18.45  18.00  17.78  17.90  17.89  17.62  17.16
-0.900
  21.74  21.41  21.63  21.51  20.60  20.36  20.18  19.94  20.03  19.50
  19.51  18.72  18.84  18.43  18.55  18.70  17.98  18.30  17.82  17.57
-1.000
  31.82  31.60  31.46  30.82  30.59  30.02  29.63  29.19  28.92  28.74
  28.28  28.02  27.78  27.40  26.56  26.98  27.01  26.36  25.89  25.46
C   28/03/97            MEMBER NAME  #CERTST5 (JADE56.S)    FORTRAN
//F11JOL   JOB 00010622,OLSSON,CLASS=D,TIME=(12,00)
//*MAIN RELPRI=MED
//*EXEC FCLG
// EXEC GEP,PARM.LKED='LIST',REGION.GO=1300K,VS=HBOOK,
//       DN='F11OLS.CERTST5.NR2'
#include "@certst4.for"
#include "cernkv55.for"
#include "avabs5.for"
#include "bk7abs.for"
#include "convef.for"
//LKED.SYSLIB DD
//            DD
//            DD
//            DD
//            DD
//            DD DSN=F22YAM.LGLOAD,DISP=SHR
//*DD DSN=F22YAM.WORKL,DISP=SHR
//*     (DOES NOT EXIST ANY MORE!)
//            DD DSN=F11OLS.JADE56.L,DISP=SHR
//            DD DSN=F11OLS.JADELD,DISP=SHR
//            DD DISP=SHR,DSN=R01UTL.CERN.KERNLIB4
C   28/03/97            MEMBER NAME  #CERTST6 (JADE56.S)    FORTRAN
//F11JOL   JOB 00010622,OLSSON,CLASS=D,TIME=(27,00)
//*MAIN RELPRI=MED
//*
//*  CALCULATE PE/X0 DATA FOR NPECER, VERSION SF6 WITH N=1.8047
//*      C:A 25 MIN.
//*
//*
// EXEC GEP,PARM.LKED='LIST',REGION.GO=1500K,VS=HBOOK,
//       DN='F11OLS.CERTST6.NR2'
#include "@certst6.for"
#include "cernkv67.for"
#include "avabs6.for"
#include "convef.for"
//LKED.SYSLIB DD
//            DD
//            DD
//            DD
//            DD
// DD DSN=F22YAM.LGLOAD,DISP=SHR
//*DD DSN=F22YAM.WORKL,DISP=SHR
//*     (DOES NOT EXIST ANY MORE!)
// DD DSN=F11OLS.JADE56.L,DISP=SHR
// DD DSN=F11OLS.JADELD,DISP=SHR
//            DD DISP=SHR,DSN=R01UTL.CERN.KERNLIB4
C   28/03/97            MEMBER NAME  #COIL1   (JADE56.S)    FORTRAN
//F11OLS   JOB 00010622,OLSSON,CLASS=E,TIME=(0,15)
//*MAIN ORG=EXT,RELPRI=LOW
// EXEC GEP,PARM.LKED='LIST',REGION.GO=800K,VS=HBOOK,
//      DN='F11OLS.TJOCK.NR5'
C
C  CALCULATE THICKNESS OF ABSORBER IN FRONT OF LEADGLASS, AS FUNCTION
C  OF COS THETA
C
C     COMMON // BLCOMM(10000)
C
      COMMON /CJTRIG/ PI,TWOPI,PIHALF
C
      PI=ARCOS(-1.)
      TWOPI = 2.*PI
      PIHALF = .5*PI
C
      CALL HBOOK2(1,' RAD.LENGTH VS Z, AT RIGHT ANGLE $',
     $    100,0.,2000.,100,0.,1.5)
      CALL HBOOK2(2,' RAD.LENGTH VS Z, AT INCIDENT ANGLE$',
     $    100,0.,2000.,100,0.,2.0)
      CALL HBOOK2(3,' ELODIF VS Z, AT INCIDENT ANGLE$',
     $    100,0.,2000.,100,0.,60.)
C
C...........................
      DELZ = 1.
      Z = -DELZ
C                                    * * *  Z-STEP LOOP  * * *
      DO 1000  NEV = 1,2000
      IF(IUHR(2).NE.1) GO TO 999
C
      Z = Z + DELZ
      THE = ATAN2(Z,950.)
      IF(THE.LT.0.) THE = THE + TWOPI
      THE = PIHALF - THE
      COSTHE = COS(THE)
C
C  PLOT THICKNESS VERSUS Z
C
C
C     WRITE(6,321) NEV,Z,COSTHE,THE
321   FORMAT(' NEV Z COSTHE THE ',I5,3E14.6)
C
      CALL TJOCKI(COSTHE,XLEN90,XLEN,ELODIF)
C
C     WRITE(6,322) Z,XLEN90,XLEN,ELODIF
C22   FORMAT(' TJOCK GAVE Z XLEN90 XLEN ELODIF ',F6.1,3E14.6)
C
      CALL HFILL(1,Z,XLEN90,1.)
      CALL HFILL(2,Z,XLEN,1.)
      CALL HFILL(3,Z,ELODIF,1.)
C
C-------------------END OF THE LOOP------------------
1000  CONTINUE
      GO TO 900
C
999   WRITE(6,998)
998   FORMAT(' - - - - - - - ->>>>>>>   TIME LIMIT   TIME LIMIT  <<< ')
C
C
 900  CONTINUE
      WRITE(6,630)
 630    FORMAT('  END OF JOB',I10)
      CALL HISTDO
      STOP
      END
//LKED.SYSLIB DD
//            DD
//            DD
//            DD
//            DD
//            DD DISP=SHR,DSN=F11OLS.JADE56.L
//            DD DISP=SHR,DSN=F11OLS.JADELD
//*           DD DISP=SHR,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,DSN=R01UTL.CERN.KERNLIB4
//LKED.SYSIN DD *
 INCLUDE SYSLIB(TJOCKI)
//GO.FT02F001 DD DUMMY
C   28/03/97            MEMBER NAME  #COPY    (JADE56.S)    FORTRAN
//F11JOL   JOB 00010622,F11OLS,CLASS=E,MSGLEVEL=(1,0),TIME=(0,15)
//*MAIN ORG=EXT,RELPRI=LOW
// EXEC FLG
//LKED.SYSLIB DD
//            DD
//            DD DSN=F22ELS.CL11,DISP=SHR,UNIT=FAST
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR,UNIT=FAST
//LKED.SYSIN DD *
  INCLUDE SYSLIB(ECOPY)
//*                INPUT
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*          DSN=F22PAU.TR40GAM.ZRECAL.TP8082A
//*       DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.MSTAGSUM.N376380
//GO.FT02F001 DD DISP=SHR,DSN=F11OLS.TR12GAM.MNEU85.ETABAND
//*               OUTPUT
//*GO.FT03F001 DD DUMMY
//*GO.FT03F001 DD DISP=SHR,DSN=F11OLS.R283.RAWD19
//*O.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*  SPACE=(TRK,(70,10),RLSE),DSN=F11OLS.REDUC2.TEST62
//*GO.FT03F001 DD UNIT=TAPE,DISP=(NEW,KEEP),LABEL=(1,NL),
//*   DCB=(R01DCB.VBS,LRECL=6229,BLKSIZE=6233,DEN=4),
//*   DSN=YEN08150,VOL=SER=F11105
//GO.FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//     DSN=F11OLS.TR12GAM.MNEU85.ETABAND1,
//          MSVGP=VTMP,UNIT=3330V
//*GO.FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*   DCB=(R01DCB.VBS,LRECL=6236),
//*       SPACE=(CYL,(240,12)),DSN=&&SCRTCH
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*COPY EXEC PGM=IEBGENER
//*SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*          DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*          DSN=F11OLS.TR2NGAM.TAPE82A
//*SYSPRINT DD SYSOUT=*
//*SYSIN DD DUMMY
C   28/03/97            MEMBER NAME  #COPYJS  (JADE56.S)    FORTRAN
//F11OLS   JOB 00010622,F11OLS,CLASS=A,MSGLEVEL=(1,0),TIME=(0,45)
//*MAIN ORG=EXT,RELPRI=HIG
//*       C:A 10000 EVENTS IN 1 MINUTE
// EXEC FLG
//LKED.SYSLIB DD
//            DD
//            DD DSN=F22ELS.CL11,DISP=SHR,UNIT=FAST
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR,UNIT=FAST
//LKED.SYSIN DD *
  INCLUDE SYSLIB(ECOPY)
//*                INPUT
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR21GAM.TAPE86A
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86N2
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AQ2
//GO.FT02F001 DD DISP=SHR,DSN=F11OLS.TEMPO.NR1
//            DD DISP=SHR,DSN=F11OLS.TEMPO.NR2
//            DD DISP=SHR,DSN=F11OLS.TEMPO.NR3
//            DD DISP=SHR,DSN=F11OLS.TEMPO.NR4
//            DD DISP=SHR,DSN=F11OLS.TEMPO.NR5
//            DD DISP=SHR,DSN=F11OLS.TEMPO.NR6
//            DD DISP=SHR,DSN=F11OLS.TEMPO.NR7
//            DD DISP=SHR,DSN=F11OLS.TEMPO.NR8
//            DD DISP=SHR,DSN=F11OLS.TEMPO.NR9
//            DD DISP=SHR,DSN=F11OLS.TEMPO.NR10
//            DD DISP=SHR,DSN=F11OLS.TEMPO.NR11
//            DD DISP=SHR,DSN=F11OLS.TEMPO.NR12
//            DD DISP=SHR,DSN=F11OLS.TEMPO.NR13
//*           DD DISP=SHR,DSN=F11OLS.TEMPO.NR14
//*                OUTPUT
//*O.FT03F001 DD DUMMY,DCB=R01DCB.VBS
//*O.FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*      MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR21GAM.TEST
//*O.FT03F001 DD DISP=SHR,DSN=F11OLS.TR22GAM.MJS86DEF
//*O.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*  SPACE=(TRK,(70,10),RLSE),DSN=F11OLS.MCSTEP2.GAMMA.GEV10105
//GO.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//   DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//   DSN=F11OLS.TR21GAM.JSRFRZ.TAPE85B
C   28/03/97            MEMBER NAME  #COPYU   (JADE56.S)    FORTRAN
//F11JOL   JOB 00010622,F11OLS,CLASS=A,MSGLEVEL=(1,0),TIME=(0,13)
//*MAIN ORG=EXT,RELPRI=HIG
// EXEC FLG
//LKED.SYSLIB DD
//            DD
//            DD DSN=F22ELS.CL11,DISP=SHR,UNIT=FAST
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR,UNIT=FAST
//LKED.SYSIN DD *
  INCLUDE SYSLIB(ECOPY)
//*                INPUT
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*          DSN=F22PAU.TR40GAM.ZRECAL.TP8082A
//*       DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.MSTAGSUM.N376380
//GO.FT02F001 DD DISP=SHR,DSN=F11OLS.UNIGAM87.SUMEA00
//*           DD DISP=SHR,DSN=F11OLS.UNIGAM87.SUME200B
//            DD DISP=SHR,DSN=F11OLS.UNIGAM87.SUMFA00
//*           DD DISP=SHR,DSN=F11OLS.UNIGAM87.SUMF200B
//*               OUTPUT
//*GO.FT03F001 DD DUMMY
//*GO.FT03F001 DD DISP=SHR,DSN=F11OLS.R283.RAWD19
//*O.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*  SPACE=(TRK,(70,10),RLSE),DSN=F11OLS.REDUC2.TEST62
//GO.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//    DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//      DSN=F11OLS.UNIGAM87.SUMEFA00
//*O.FT03F001 DD UNIT=TAPE,DISP=(NEW,KEEP),LABEL=(1,NL),
//*  DCB=(R01DCB.VBS,LRECL=6229,BLKSIZE=6233,DEN=4),
//*  DSN=YEN08150,VOL=SER=F11105
//*O.FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11PAU.TR40GAM.MSS8082A,
//*         MSVGP=VTMP,UNIT=3330V
//*GO.FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*   DCB=(R01DCB.VBS,LRECL=6236),
//*       SPACE=(CYL,(240,12)),DSN=&&SCRTCH
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*COPY EXEC PGM=IEBGENER
//*SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*          DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*          DSN=F11OLS.TR2NGAM.TAPE82A
//*SYSPRINT DD SYSOUT=*
//*SYSIN DD DUMMY
C   28/03/97            MEMBER NAME  #FNPECER (JADE56.S)    FORTRAN
//F11JLL   JOB 00010622,OLSSON,CLASS=E,TIME=(0,15)
//*MAIN RELPRI=LOW
//*EXEC FCLG
// EXEC GEP,PARM.LKED='LIST',REGION.GO=700K,VS=HBOOK,
//      DN='F11OLS.FNPECER.NR5'
#include "@fnpecer.for"
#include "fnpecer8.for"
//LKED.SYSLIB DD
//            DD
//            DD
//            DD
//            DD
//            DD DSN=F11OLS.JADELD,DISP=SHR
//            DD DSN=F22YAM.UTILTYL,DISP=SHR
//*           DD DSN=F11OLS.TEMPL,DISP=SHR
//            DD UNIT=FAST,DISP=SHR,DSN=F11LHO.JADEGL
//*           DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERN.KERNLIB4
//*DD DSN=F22YAM.WORKL,DISP=SHR
//GO.FT02F001 DD DUMMY
C   28/03/97            MEMBER NAME  #JSFIT   (JADE56.S)    FORTRAN
//F11JOL94 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN ORG=EXT,RELPRI=LOW
//*
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*   PERFORM JSFIT: REFITTING WITH XYRFT1 AND ZSRFTV                  *
//*   UPDATE RESO BANK, PERFORM TOF AND DEDX ANALYSIS                  *
//*                                                                    *
//**********************************************************************
//*
//JSFIT EXEC PGM=LMDJSFIT,REGION=1700K
//*
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR21GAM.TAPE86F
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86M2
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86N2
//FT02F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR1
//*                        OUTPUT:
//*FT03F001 DD DUMMY,DCB=R01DCB.VBS
//*FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   SPACE=(TRK,(50,10),RLSE),DSN=F11OLS.PI02282Y
//FT03F001 DD DISP=SHR,DSN=F11OLS.TEMPO.NR1
//*FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR21GAM.TESTJS
//*FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
         0    400000         0     32000         0         0         1
    IRFIFT    IRZFIT    IDXTOF
         1         1         1
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR21GAM.JSRFRZ.TAPE86F
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
//F11JOL94 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN ORG=EXT,RELPRI=LOW
//*
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*   PERFORM JSFIT: REFITTING WITH XYRFT1 AND ZSRFTV                  *
//*   UPDATE RESO BANK, PERFORM TOF AND DEDX ANALYSIS                  *
//*                                                                    *
//**********************************************************************
//*
//JSFIT EXEC PGM=LMDJSFIT,REGION=1700K
//*
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR21GAM.TAPE86F
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86M2
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86N2
//FT02F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR2
//*                        OUTPUT:
//*FT03F001 DD DUMMY,DCB=R01DCB.VBS
//*FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   SPACE=(TRK,(50,10),RLSE),DSN=F11OLS.PI02282Y
//FT03F001 DD DISP=SHR,DSN=F11OLS.TEMPO.NR2
//*FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR21GAM.TESTJS
//*FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
         0    400000         0     32000         0         0         1
    IRFIFT    IRZFIT    IDXTOF
         1         1         1
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR21GAM.JSRFRZ.TAPE86F
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
//F11JOL94 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN ORG=EXT,RELPRI=LOW
//*
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*   PERFORM JSFIT: REFITTING WITH XYRFT1 AND ZSRFTV                  *
//*   UPDATE RESO BANK, PERFORM TOF AND DEDX ANALYSIS                  *
//*                                                                    *
//**********************************************************************
//*
//JSFIT EXEC PGM=LMDJSFIT,REGION=1700K
//*
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR21GAM.TAPE86F
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86M2
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86N2
//FT02F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR3
//*                        OUTPUT:
//*FT03F001 DD DUMMY,DCB=R01DCB.VBS
//*FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   SPACE=(TRK,(50,10),RLSE),DSN=F11OLS.PI02282Y
//FT03F001 DD DISP=SHR,DSN=F11OLS.TEMPO.NR3
//*FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR21GAM.TESTJS
//*FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
         0    400000         0     32000         0         0         1
    IRFIFT    IRZFIT    IDXTOF
         1         1         1
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR21GAM.JSRFRZ.TAPE86F
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
//F11JOL94 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN ORG=EXT,RELPRI=LOW
//*
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*   PERFORM JSFIT: REFITTING WITH XYRFT1 AND ZSRFTV                  *
//*   UPDATE RESO BANK, PERFORM TOF AND DEDX ANALYSIS                  *
//*                                                                    *
//**********************************************************************
//*
//JSFIT EXEC PGM=LMDJSFIT,REGION=1700K
//*
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR21GAM.TAPE86F
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86M2
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86N2
//FT02F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR4
//*                        OUTPUT:
//*FT03F001 DD DUMMY,DCB=R01DCB.VBS
//*FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   SPACE=(TRK,(50,10),RLSE),DSN=F11OLS.PI02282Y
//FT03F001 DD DISP=SHR,DSN=F11OLS.TEMPO.NR4
//*FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR21GAM.TESTJS
//*FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
         0    400000         0     32000         0         0         1
    IRFIFT    IRZFIT    IDXTOF
         1         1         1
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR21GAM.JSRFRZ.TAPE86F
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
//F11JOL94 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN ORG=EXT,RELPRI=LOW
//*
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*   PERFORM JSFIT: REFITTING WITH XYRFT1 AND ZSRFTV                  *
//*   UPDATE RESO BANK, PERFORM TOF AND DEDX ANALYSIS                  *
//*                                                                    *
//**********************************************************************
//*
//JSFIT EXEC PGM=LMDJSFIT,REGION=1700K
//*
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR21GAM.TAPE86F
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86M2
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86N2
//FT02F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR5
//*                        OUTPUT:
//*FT03F001 DD DUMMY,DCB=R01DCB.VBS
//*FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   SPACE=(TRK,(50,10),RLSE),DSN=F11OLS.PI02282Y
//FT03F001 DD DISP=SHR,DSN=F11OLS.TEMPO.NR5
//*FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR21GAM.TESTJS
//*FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
         0    400000         0     32000         0         0         1
    IRFIFT    IRZFIT    IDXTOF
         1         1         1
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR21GAM.JSRFRZ.TAPE86F
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
//F11JOL94 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN ORG=EXT,RELPRI=LOW
//*
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*   PERFORM JSFIT: REFITTING WITH XYRFT1 AND ZSRFTV                  *
//*   UPDATE RESO BANK, PERFORM TOF AND DEDX ANALYSIS                  *
//*                                                                    *
//**********************************************************************
//*
//JSFIT EXEC PGM=LMDJSFIT,REGION=1700K
//*
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR21GAM.TAPE86F
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86M2
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86N2
//FT02F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR6
//*                        OUTPUT:
//*FT03F001 DD DUMMY,DCB=R01DCB.VBS
//*FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   SPACE=(TRK,(50,10),RLSE),DSN=F11OLS.PI02282Y
//FT03F001 DD DISP=SHR,DSN=F11OLS.TEMPO.NR6
//*FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR21GAM.TESTJS
//*FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
         0    400000         0     32000         0         0         1
    IRFIFT    IRZFIT    IDXTOF
         1         1         1
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR21GAM.JSRFRZ.TAPE86F
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
//F11JOL94 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN ORG=EXT,RELPRI=LOW
//*
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*   PERFORM JSFIT: REFITTING WITH XYRFT1 AND ZSRFTV                  *
//*   UPDATE RESO BANK, PERFORM TOF AND DEDX ANALYSIS                  *
//*                                                                    *
//**********************************************************************
//*
//JSFIT EXEC PGM=LMDJSFIT,REGION=1700K
//*
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR21GAM.TAPE86F
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86M2
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86N2
//FT02F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR7
//*                        OUTPUT:
//*FT03F001 DD DUMMY,DCB=R01DCB.VBS
//*FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   SPACE=(TRK,(50,10),RLSE),DSN=F11OLS.PI02282Y
//FT03F001 DD DISP=SHR,DSN=F11OLS.TEMPO.NR7
//*FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR21GAM.TESTJS
//*FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
         0    400000         0     32000         0         0         1
    IRFIFT    IRZFIT    IDXTOF
         1         1         1
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR21GAM.JSRFRZ.TAPE86F
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
//F11JOL94 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN ORG=EXT,RELPRI=LOW
//*
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*   PERFORM JSFIT: REFITTING WITH XYRFT1 AND ZSRFTV                  *
//*   UPDATE RESO BANK, PERFORM TOF AND DEDX ANALYSIS                  *
//*                                                                    *
//**********************************************************************
//*
//JSFIT EXEC PGM=LMDJSFIT,REGION=1700K
//*
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR21GAM.TAPE86F
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86M2
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86N2
//FT02F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR8
//*                        OUTPUT:
//*FT03F001 DD DUMMY,DCB=R01DCB.VBS
//*FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   SPACE=(TRK,(50,10),RLSE),DSN=F11OLS.PI02282Y
//FT03F001 DD DISP=SHR,DSN=F11OLS.TEMPO.NR8
//*FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR21GAM.TESTJS
//*FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
         0    400000         0     32000         0         0         1
    IRFIFT    IRZFIT    IDXTOF
         1         1         1
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR21GAM.JSRFRZ.TAPE86F
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
//F11JOL94 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN ORG=EXT,RELPRI=LOW
//*
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*   PERFORM JSFIT: REFITTING WITH XYRFT1 AND ZSRFTV                  *
//*   UPDATE RESO BANK, PERFORM TOF AND DEDX ANALYSIS                  *
//*                                                                    *
//**********************************************************************
//*
//JSFIT EXEC PGM=LMDJSFIT,REGION=1700K
//*
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR21GAM.TAPE86F
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86M2
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86N2
//FT02F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR9
//*                        OUTPUT:
//*FT03F001 DD DUMMY,DCB=R01DCB.VBS
//*FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   SPACE=(TRK,(50,10),RLSE),DSN=F11OLS.PI02282Y
//FT03F001 DD DISP=SHR,DSN=F11OLS.TEMPO.NR9
//*FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR21GAM.TESTJS
//*FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
         0    400000         0     32000         0         0         1
    IRFIFT    IRZFIT    IDXTOF
         1         1         1
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR21GAM.JSRFRZ.TAPE86F
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
//F11JOL94 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN ORG=EXT,RELPRI=LOW
//*
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*   PERFORM JSFIT: REFITTING WITH XYRFT1 AND ZSRFTV                  *
//*   UPDATE RESO BANK, PERFORM TOF AND DEDX ANALYSIS                  *
//*                                                                    *
//**********************************************************************
//*
//JSFIT EXEC PGM=LMDJSFIT,REGION=1700K
//*
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR21GAM.TAPE86F
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86M2
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86N2
//FT02F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR10
//*                        OUTPUT:
//*FT03F001 DD DUMMY,DCB=R01DCB.VBS
//*FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   SPACE=(TRK,(50,10),RLSE),DSN=F11OLS.PI02282Y
//FT03F001 DD DISP=SHR,DSN=F11OLS.TEMPO.NR10
//*FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR21GAM.TESTJS
//*FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
         0    400000         0     32000         0         0         1
    IRFIFT    IRZFIT    IDXTOF
         1         1         1
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR21GAM.JSRFRZ.TAPE86F
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
//F11JOL94 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN ORG=EXT,RELPRI=LOW
//*
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*   PERFORM JSFIT: REFITTING WITH XYRFT1 AND ZSRFTV                  *
//*   UPDATE RESO BANK, PERFORM TOF AND DEDX ANALYSIS                  *
//*                                                                    *
//**********************************************************************
//*
//JSFIT EXEC PGM=LMDJSFIT,REGION=1700K
//*
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR21GAM.TAPE86F
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86M2
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86N2
//FT02F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR11
//*                        OUTPUT:
//*FT03F001 DD DUMMY,DCB=R01DCB.VBS
//*FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   SPACE=(TRK,(50,10),RLSE),DSN=F11OLS.PI02282Y
//FT03F001 DD DISP=SHR,DSN=F11OLS.TEMPO.NR11
//*FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR21GAM.TESTJS
//*FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
         0    400000         0     32000         0         0         1
    IRFIFT    IRZFIT    IDXTOF
         1         1         1
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR21GAM.JSRFRZ.TAPE86F
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
//F11JOL94 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN ORG=EXT,RELPRI=LOW
//*
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*   PERFORM JSFIT: REFITTING WITH XYRFT1 AND ZSRFTV                  *
//*   UPDATE RESO BANK, PERFORM TOF AND DEDX ANALYSIS                  *
//*                                                                    *
//**********************************************************************
//*
//JSFIT EXEC PGM=LMDJSFIT,REGION=1700K
//*
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR21GAM.TAPE86F
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86M2
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86N2
//FT02F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR12
//*                        OUTPUT:
//*FT03F001 DD DUMMY,DCB=R01DCB.VBS
//*FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   SPACE=(TRK,(50,10),RLSE),DSN=F11OLS.PI02282Y
//FT03F001 DD DISP=SHR,DSN=F11OLS.TEMPO.NR12
//*FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR21GAM.TESTJS
//*FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
         0    400000         0     32000         0         0         1
    IRFIFT    IRZFIT    IDXTOF
         1         1         1
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR21GAM.JSRFRZ.TAPE86F
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
//F11JOL94 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN ORG=EXT,RELPRI=LOW
//*
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*   PERFORM JSFIT: REFITTING WITH XYRFT1 AND ZSRFTV                  *
//*   UPDATE RESO BANK, PERFORM TOF AND DEDX ANALYSIS                  *
//*                                                                    *
//**********************************************************************
//*
//JSFIT EXEC PGM=LMDJSFIT,REGION=1700K
//*
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR21GAM.TAPE86F
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86M2
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86N2
//FT02F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR13
//*                        OUTPUT:
//*FT03F001 DD DUMMY,DCB=R01DCB.VBS
//*FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   SPACE=(TRK,(50,10),RLSE),DSN=F11OLS.PI02282Y
//FT03F001 DD DISP=SHR,DSN=F11OLS.TEMPO.NR13
//*FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR21GAM.TESTJS
//*FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
         0    400000         0     32000         0         0         1
    IRFIFT    IRZFIT    IDXTOF
         1         1         1
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR21GAM.JSRFRZ.TAPE86F
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
C   28/03/97            MEMBER NAME  #LINKMC  (JADE56.S)    FORTRAN
//F11OLSLK JOB '00010622',OLSSON,CLASS=E,MSGLEVEL=(1,1),TIME=(0,15)
//*MAIN RELPRI=LOW
//*
//*  LINK NON-GEANT VERSION FOR JADE TAGGER, WITH TOKYO SHOWER SIM.
//*
//*OBLIB DD DSN=R02BUT.FORTRANH,DISP=SHR
//*EWLIB EXEC NEWLIB,PS=NULLFILE,
//*  PL='F11OLS.JADEMCL',TO=DISK
//*  SCRATCH JADE56
//*
//*OMPR EXEC COMPRESS,LIB='F11OLS.JADEMCL'
//*
//*
//*    CREATE LOAD MODULE
//*
//LINK EXEC FCL,
//     PARM.FORT=XL,
//     PARM.LKED='SIZE=(600K,60K),LIST,MAP',REGION.LKED=800K
//FORT.SYSIN DD *
      COMMON /     / BOOK(10000)
      COMMON / BCS / IW(50000)
      COMMON /CEK4VC/ ISKP
C
      COMMON / CIEVS  / KIEV,IEVMIN,IEVMAX
C
C          IEVMIN : FIRST EVENT TO BE READ FROM INPUT FILE
C          IEVMAX : LAST  EVENT TO BE READ FROM INPUT FILE
C
C                   ==== > DEFAULT IEVMIN = 1
C                                  IEVMAX = 9999999
C
      INTEGER*2 HDATE
      COMMON / TODAY / HDATE(6)
C FOR GEANT DEBUG
      LOGICAL  LDEBUG
      COMMON / CDEBUG / LDEBUG
C
      COMMON/CPRIN/IPRO
      COMMON/COLSON/ IPROO
C  IPROO IS A PRINT VARIABLE FOR DEBUG PRINT IN SHOWER ROUTINES
C
      COMMON /CUTSHO/ CUTOF
C WITH CUTOF THE STANDARD CUTOFF OF 1.2 MEV CAN BE CHANGED, BUT IT
C  IS ONLY EFFECTIVE WITH THE INCLUDE OF SUBR.  LGMCGMN
C
      COMMON/CFLAG/LFLAG(10)
      LOGICAL * 1 LFLAG
C
C          LFLAG(1) = SMEAR GAMMA AND ELECTRON ENERGIES
C          LFLAG(2) = GAMMA CONVERSION IN OUTER TANK AND COIL (TRKGAM)
C          LFLAG(3) = ABSORPTION LOSSES
C          LFLAG(4) = 3 DIM SHOWER PROFILE FIT TO EGGS CODE SLOW!!!!!
C          LFLAG(5) = .TRUE.   -->  WITH VERTEX CHAMBER TRACKING
C                   = .FALSE.  -->  WITHOUT VERTEX CHAMBER TRACKING
C                                   BUT OLD BEAM PIPE GEOMETRY AND
C                                 BEAM PIPE COUNTERS (BEFORE MAI 84)
C          LFLAG(6) = 3 DIM TOKYO SHOWER PROGRAM, JADE NOTE 20A
C          LFLAG(7) = GEANT LG TRACKING FOR HADRONS, NOT RECOMMENDED
C          LFLAG(8) = GEANT SHOWER SIMULATION FOR TAGGING APPARATUS
C
C
C         ===> DEFAULT .TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.FALSE.,
C                      .FALSE.,.FALSE.
C
C   NOTE: WITH THE USE OF TOKYO SHOWER PROGRAM, LFLAG(1) AND LFLAG(3)
C         ARE NOT USED. HOWEVER, THEY SHOULD BE TRUE TO ENSURE THAT THE
C         ALGN BANK IS PROPERLY MARKED FOR LATER ENERGY CORRECTION..
C         LFLAG(2) IS TRULY REDUNDANT
C         LFLAG(4) SHOULD BE FALSE, ALTHOUGH TRLGL IS ONLY CALLED FOR
C                  HADRONS AND MUONS
      LOGICAL*1 TEXT
      DIMENSION TEXT(72)
C
CCC   LDEBUG = .TRUE.
      LDEBUG = .FALSE.
C
      LFLAG(1) = .TRUE.
      LFLAG(2) = .FALSE.
      LFLAG(3) = .TRUE.
C     LFLAG(3) = .FALSE.
      LFLAG(4) = .FALSE.
      LFLAG(5) = .TRUE.
      LFLAG(6) = .TRUE.
      LFLAG(7) = .FALSE.
C     LFLAG(8) = .TRUE.
      LFLAG(8) = .FALSE.
C
      WRITE(6,521) (LFLAG(I),I=1,8)
521   FORMAT(' LFLAG:  ',8I3)
C
C  INIT OF TODAY
C
      HDATE(1) = 1
      HDATE(2) = 1
      HDATE(3) = 1
      HDATE(4) = 15
      HDATE(5) = 6
      HDATE(6) = 1986
C
      WRITE(6,2201) HDATE
2201  FORMAT('  DATE: ',6I6)
C
      CALL BINT( 50000,15000,500, 0 )
C
      ISKP = 2
C     ISKP = 0
      IPRO = 0
      IPROO = 0
C
C MINIMUM CUTOFF ENERGY IN SHOWER
C     CUTOF = 1.2
C
C   READ IN:    EVENT READING LIMITS
C
7608  FORMAT(72A1)
7610  FORMAT(7I10)
7508  FORMAT(' ',72A1)
7510  FORMAT(' ',7I10)
      READ 7608, TEXT
      WRITE(6,7508) TEXT
      READ 7610, IEVMIN,IEVMAX
      WRITE(6,7510) IEVMIN,IEVMAX
C
      CALL MCJADE( 0,  5 )
      CALL BSTA
      CALL PALL
      CALL HISTDO
      STOP
      END
      SUBROUTINE JGETEV( * )
C-----------------------------------------------------------
C
C  VERSION OF 02/11/81   LAST MOD 02/11/81      E.ELSEN
C  GET NEXT EVENT.
C  RETURN 1 IF END OF INPUT SEQUENCE (EOF).
C-----------------------------------------------------------
C
C
      COMMON /CIEVS/ KIEV,IEVMIN,IEVMAX
      DATA IRUNIT / 3 /,ICALL/0/
C
      ICALL = ICALL + 1
C     WRITE(6,3910) ICALL
3910  FORMAT(' ICALL       ',2I10)
      IF(ICALL.NE.1) GO TO 95
      IEV = 0
      KIEV = 0
      NIEV = 20
95    IEV = IEV + 1
1001  IF(IEV.GE.IEVMIN) GO TO 1151
      IEV = IEV + 1
      READ(IRUNIT,ERR=1000,END=8100) NR
      GO TO 1001
CCC  READ EVENTS
1151  IF(IEV.GT.IEVMAX) GO TO 90
C
      KIEV = KIEV + 1
      CALL BRVECT( IRUNIT, &1000, &8100 )
      IF((IEV/NIEV)*NIEV.EQ.IEV) WRITE(6,6811) IEV
6811  FORMAT(' NR OF EVENTS DONE:',I10)
C
CHECK IF EVENT HAS ENOUGH PARTICLES IN INNER DETECTOR AND LEAD GLASS
      CALL CHK4VC(NWIC,NWIN,NWNE)
C     CALL TOTMAS(WWW)
C     CALL HFILL(1,WWW,0,1.)
C     CALL HFILL(2,WWW,0,1.)
C     ICHK = 0
      ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.2) ICHK = 1
C     IF(NWIC.GE.8.AND.NWIN.GE.0) ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.2) ICHK = 1
C     IF(NWIN.GE.2.AND.NWIC.LE.0) ICHK = 1
C     WRITE(6,1130) NWIC,NWIN,ICHK
C1130  FORMAT(' NWIC NWIN ICHK ',3I8)
      IF(ICHK.NE.0) GO TO 3637
      IEV = IEV + 1
      GO TO 1151
 3637 CONTINUE
C     CALL HFILL(3,WWW,0,1.)
C     CALL HFILL(4,WWW,0,1.)
      GO TO 8000
C
 90   WRITE(6,8012)
 8012 FORMAT(' MAX EVENTS READ  ')
      GO TO 7000
C
 1000 WRITE(6,8002)
 8002 FORMAT(' READ ERROR   OR BCS ERROR  ')
 8000 RETURN
C
 8100 WRITE(6,8101)
 8101 FORMAT(' E O F   E O F   E O F   E O F ')
 7000 RETURN 1
      END
      SUBROUTINE CHK4VC(NWIC,NWIN,NWNE)
C         CHECK THE 4-VECTORS AND SEE IF ENOUGH PARTICLES INSIDE THE
C         INNER DETECTOR AND LEAD GLASS.
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS NWIC = NR OF CHARGED PARTICLES INSIDE I.D.
C    RETURNS NWIN = NR OF NEUTRAL PARTICLES INSIDE LEAD GLASS
C    RETURNS NWNE = NR OF NEUTRAL PARTICLES INSIDE BARREL
C
C                                                  J.OLSSON    8.11.80
C                  LAST CHANGE  24.4.1982
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
C COSLMN FROM 320,1514 INNER EDGE E-CAPS.
C COSLMC FROM 227,1180 AT LEAST 16 WIRES IN JET CHAMBER
      DATA COSLMN /0.9784/, COSLMC /0.9820/,XMOLIM/.040/,XPTLIM/.030/
      DATA COSNEU /0.870/
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      ICHK = 0
      NWNE = 0
      NWIC = 0
      NWIN = 0
      IF(NF.LE.0) GO TO 999
      DO 1  I = 1,NF
C SKIP INITIAL ELECTRONS IF REQUIRED
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PTOT = 0.
      DO 2  J = 1,3
      PTOT = PTOT + PF(J,I)**2
2     IF(J.EQ.2) PTRA = PTOT
      PTOT = SQRT(PTOT)
      PTRA = SQRT(PTRA)
      IF(ICALL.LE.20) WRITE(6,2731) NEV,I,ICF(I),PTOT,PTRA
2731  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' PTOT ',E12.4,' PTRA ',
     $ E12.4)
      IF(PTOT.LT.XMOLIM.AND.ICF(I).NE.0) GO TO 1
      IF(PTRA.LT.XPTLIM.AND.ICF(I).NE.0) GO TO 1
      COSTHE = PF(3,I)/PTOT
      IF(ICF(I).NE.0.AND.ABS(COSTHE).LT.COSLMC) NWIC = NWIC + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSLMN) NWIN = NWIN + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSNEU) NWNE = NWNE + 1
      IF(ICALL.LE.20) WRITE(6,2431) NEV,I,ICF(I),COSTHE,NWIC,NWIN,PTOT,
     $ PTRA,NWNE
2431  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' COS NWIC-N ',E12.4,2I5,
     $ ' PTOT ',E12.4,' PTRA ',E12.4,' NWNE ',I2)
1     CONTINUE
999   RETURN
      END
      BLOCK DATA
      COMMON /CEK4VC/ ISKP
      DATA ISKP /0/
      END
      SUBROUTINE TOTMAS(WWW)
C     CALCULATE THE TOTAL MASS OF THE FINAL SYSTEM
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS WWW = MASS OF TOTAL SYSTEM
C
C                                                  J.OLSSON   14.03.81
C                  LAST CHANGE 14.03.81
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
      DIMENSION PSAM(4)
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      PTOTSM = 0.
      FACT = -1.
      DO 2030  J = 1,4
      IF(J.EQ.4) FACT = 1.
      PSAM(J) = 0.
      DO 1  I = 1,NF
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PSAM(J) = PSAM(J) + PF(J,I)
1     CONTINUE
      PTOTSM = PTOTSM + PSAM(J)*PSAM(J)*FACT
2030  CONTINUE
      PTOTSM = AMAX1(PTOTSM,1.E-08)
      WWW = SQRT(PTOTSM)
      IF(ICALL.LT.5) WRITE(6,2000) NF,WWW
2000  FORMAT(' NR OF FINAL PARTICLES ',I4,'  MASS ',E12.4)
      RETURN
      END
//LKED.SYSLIB DD
//            DD
//            DD DSN=F11OLS.JADE56.L,DISP=SHR
//            DD DSN=F22ELS.JMC.L,DISP=SHR
//            DD DSN=F22CPH.GEANT.L,DISP=SHR
//            DD DSN=F11LHO.JADEGL,DISP=SHR
//            DD DSN=F11LHO.TAGG.L,DISP=SHR
//            DD DSN=JADELG.LOAD,DISP=SHR
//            DD DSN=F22ALL.JADEMUL,DISP=SHR
//            DD DSN=R01UTL.HBOOK321.L,DISP=SHR
//            DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR
//            DD DSN=F22YAM.LGLOAD,DISP=SHR
//            DD DISP=SHR,DSN=SYS1.FT77LNKL
//            DD DISP=SHR,DSN=SYS1.FT77LIB
//*           DD DISP=SHR,DSN=R01UTL.CERN.DLIBF77
//*           DD DISP=SHR,DSN=R01UTL.CERN.PACKF77
//*KED.SYSLMOD DD DISP=OLD,UNIT=FAST,DSN=F11OLS.JADEMCL(JADE56)
//LKED.SYSLMOD DD DSN=F11OLS.JADEMCL,
//    DISP=(NEW,CATLG,DELETE),UNIT=FAST,
//    SPACE=(TRK,(40,11,5),RLSE),DCB=R01DCB.LOAD
//LKED.SYSIN DD *
 INCLUDE SYSLIB(GEANTDUM)
 INCLUDE SYSLIB(MCJADEGE,MCTAGMGE)
 INCLUDE SYSLIB(ENELMX,MCIN56MX)
 NAME JADE56(R)
C   28/03/97            MEMBER NAME  #LINKMCG (JADE56.S)    FORTRAN
//F11OLSLK JOB '00010622',OLSSON,CLASS=E,MSGLEVEL=(1,1),TIME=(0,15)
//*MAIN RELPRI=LOW
//*
//*  LINK CPH GEANT VERSION FOR JADE TAGGER, WITH TOKYO SHOWER SIM.
//*
//*OBLIB DD DSN=R02BUT.FORTRANH,DISP=SHR
//NEWLIB EXEC NEWLIB,PS=NULLFILE,
//   PL='F11OLS.GEANTMCL',TO=DISK
./   SCRATCH GEATAG
//*
//COMPR EXEC COMPRESS,LIB='F11OLS.GEANTMCL'
//*
//*
//*    CREATE LOAD MODULE
//*
//LINK EXEC FCL,
//     PARM.FORT=XL,
//     PARM.LKED='SIZE=(600K,60K),LIST,MAP',REGION.LKED=800K
//FORT.SYSIN DD *
      COMMON /     / BOOK(10000)
      COMMON / BCS / IW(50000)
      COMMON /CEK4VC/ ISKP
C
      COMMON / CIEVS  / KIEV,IEVMIN,IEVMAX
C
C          IEVMIN : FIRST EVENT TO BE READ FROM INPUT FILE
C          IEVMAX : LAST  EVENT TO BE READ FROM INPUT FILE
C
C                   ==== > DEFAULT IEVMIN = 1
C                                  IEVMAX = 9999999
C
      INTEGER*2 HDATE
      COMMON / TODAY / HDATE(6)
C FOR GEANT DEBUG
      LOGICAL  LDEBUG
      COMMON / CDEBUG / LDEBUG
C
      COMMON/CPRIN/IPRO
      COMMON/COLSON/ IPROO
C  IPROO IS A PRINT VARIABLE FOR DEBUG PRINT IN SHOWER ROUTINES
C
      COMMON /CUTSHO/ CUTOF
C WITH CUTOF THE STANDARD CUTOFF OF 1.2 MEV CAN BE CHANGED, BUT IT
C  IS ONLY EFFECTIVE WITH THE INCLUDE OF SUBR.  LGMCGMN
C
      COMMON/CFLAG/LFLAG(10)
      LOGICAL * 1 LFLAG
C
C          LFLAG(1) = SMEAR GAMMA AND ELECTRON ENERGIES
C          LFLAG(2) = GAMMA CONVERSION IN OUTER TANK AND COIL (TRKGAM)
C          LFLAG(3) = ABSORPTION LOSSES
C          LFLAG(4) = 3 DIM SHOWER PROFILE FIT TO EGGS CODE SLOW!!!!!
C          LFLAG(5) = .TRUE.   -->  WITH VERTEX CHAMBER TRACKING
C                   = .FALSE.  -->  WITHOUT VERTEX CHAMBER TRACKING
C                                   BUT OLD BEAM PIPE GEOMETRY AND
C                                 BEAM PIPE COUNTERS (BEFORE MAI 84)
C          LFLAG(6) = 3 DIM TOKYO SHOWER PROGRAM, JADE NOTE 20A
C          LFLAG(7) = GEANT LG TRACKING FOR HADRONS, NOT RECOMMENDED
C          LFLAG(8) = GEANT SHOWER SIMULATION FOR TAGGING APPARATUS
C
C
C         ===> DEFAULT .TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.FALSE.,
C                      .FALSE.,.FALSE.
C
C   NOTE: WITH THE USE OF TOKYO SHOWER PROGRAM, LFLAG(1) AND LFLAG(3)
C         ARE NOT USED. HOWEVER, THEY SHOULD BE TRUE TO ENSURE THAT THE
C         ALGN BANK IS PROPERLY MARKED FOR LATER ENERGY CORRECTION..
C         LFLAG(2) IS TRULY REDUNDANT
C         LFLAG(4) SHOULD BE FALSE, ALTHOUGH TRLGL IS ONLY CALLED FOR
C                  HADRONS AND MUONS
      LOGICAL*1 TEXT
      DIMENSION TEXT(72)
C
CCC   LDEBUG = .TRUE.
      LDEBUG = .FALSE.
C
      LFLAG(1) = .TRUE.
      LFLAG(2) = .FALSE.
      LFLAG(3) = .TRUE.
C     LFLAG(3) = .FALSE.
      LFLAG(4) = .FALSE.
      LFLAG(5) = .TRUE.
      LFLAG(6) = .TRUE.
      LFLAG(7) = .FALSE.
      LFLAG(8) = .TRUE.
C     LFLAG(8) = .FALSE.
C
      WRITE(6,521) (LFLAG(I),I=1,8)
521   FORMAT(' LFLAG:  ',8I3)
C
C  INIT OF TODAY
C
      HDATE(1) = 1
      HDATE(2) = 1
      HDATE(3) = 1
      HDATE(4) = 15
      HDATE(5) = 6
      HDATE(6) = 1986
C
      WRITE(6,2201) HDATE
2201  FORMAT('  DATE: ',6I6)
C
      CALL BINT( 50000,15000,500, 0 )
C
      ISKP = 2
C     ISKP = 0
      IPRO = 0
      IPROO = 0
C
C MINIMUM CUTOFF ENERGY IN SHOWER
C     CUTOF = 1.2
C
C   READ IN:    EVENT READING LIMITS
C
7608  FORMAT(72A1)
7610  FORMAT(7I10)
7508  FORMAT(' ',72A1)
7510  FORMAT(' ',7I10)
      READ 7608, TEXT
      WRITE(6,7508) TEXT
      READ 7610, IEVMIN,IEVMAX
      WRITE(6,7510) IEVMIN,IEVMAX
C
      CALL MCJADE( 0,  5 )
      CALL BSTA
      CALL PALL
      CALL HISTDO
      STOP
      END
      SUBROUTINE JGETEV( * )
C-----------------------------------------------------------
C
C  VERSION OF 02/11/81   LAST MOD 02/11/81      E.ELSEN
C  GET NEXT EVENT.
C  RETURN 1 IF END OF INPUT SEQUENCE (EOF).
C-----------------------------------------------------------
C
C
      COMMON /CIEVS/ KIEV,IEVMIN,IEVMAX
      DATA IRUNIT / 3 /,ICALL/0/
C
      ICALL = ICALL + 1
C     WRITE(6,3910) ICALL
3910  FORMAT(' ICALL       ',2I10)
      IF(ICALL.NE.1) GO TO 95
      IEV = 0
      KIEV = 0
      NIEV = 20
95    IEV = IEV + 1
1001  IF(IEV.GE.IEVMIN) GO TO 1151
      IEV = IEV + 1
      READ(IRUNIT,ERR=1000,END=8100) NR
      GO TO 1001
CCC  READ EVENTS
1151  IF(IEV.GT.IEVMAX) GO TO 90
C
      KIEV = KIEV + 1
      CALL BRVECT( IRUNIT, &1000, &8100 )
      IF((IEV/NIEV)*NIEV.EQ.IEV) WRITE(6,6811) IEV
6811  FORMAT(' NR OF EVENTS DONE:',I10)
C
CHECK IF EVENT HAS ENOUGH PARTICLES IN INNER DETECTOR AND LEAD GLASS
      CALL CHK4VC(NWIC,NWIN,NWNE)
C     CALL TOTMAS(WWW)
C     CALL HFILL(1,WWW,0,1.)
C     CALL HFILL(2,WWW,0,1.)
C     ICHK = 0
      ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.2) ICHK = 1
C     IF(NWIC.GE.8.AND.NWIN.GE.0) ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.2) ICHK = 1
C     IF(NWIN.GE.2.AND.NWIC.LE.0) ICHK = 1
C     WRITE(6,1130) NWIC,NWIN,ICHK
C1130  FORMAT(' NWIC NWIN ICHK ',3I8)
      IF(ICHK.NE.0) GO TO 3637
      IEV = IEV + 1
      GO TO 1151
 3637 CONTINUE
C     CALL HFILL(3,WWW,0,1.)
C     CALL HFILL(4,WWW,0,1.)
      GO TO 8000
C
 90   WRITE(6,8012)
 8012 FORMAT(' MAX EVENTS READ  ')
      GO TO 7000
C
 1000 WRITE(6,8002)
 8002 FORMAT(' READ ERROR   OR BCS ERROR  ')
 8000 RETURN
C
 8100 WRITE(6,8101)
 8101 FORMAT(' E O F   E O F   E O F   E O F ')
 7000 RETURN 1
      END
      SUBROUTINE CHK4VC(NWIC,NWIN,NWNE)
C         CHECK THE 4-VECTORS AND SEE IF ENOUGH PARTICLES INSIDE THE
C         INNER DETECTOR AND LEAD GLASS.
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS NWIC = NR OF CHARGED PARTICLES INSIDE I.D.
C    RETURNS NWIN = NR OF NEUTRAL PARTICLES INSIDE LEAD GLASS
C    RETURNS NWNE = NR OF NEUTRAL PARTICLES INSIDE BARREL
C
C                                                  J.OLSSON    8.11.80
C                  LAST CHANGE  24.4.1982
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
C COSLMN FROM 320,1514 INNER EDGE E-CAPS.
C COSLMC FROM 227,1180 AT LEAST 16 WIRES IN JET CHAMBER
      DATA COSLMN /0.9784/, COSLMC /0.9820/,XMOLIM/.040/,XPTLIM/.030/
      DATA COSNEU /0.870/
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      ICHK = 0
      NWNE = 0
      NWIC = 0
      NWIN = 0
      IF(NF.LE.0) GO TO 999
      DO 1  I = 1,NF
C SKIP INITIAL ELECTRONS IF REQUIRED
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PTOT = 0.
      DO 2  J = 1,3
      PTOT = PTOT + PF(J,I)**2
2     IF(J.EQ.2) PTRA = PTOT
      PTOT = SQRT(PTOT)
      PTRA = SQRT(PTRA)
      IF(ICALL.LE.20) WRITE(6,2731) NEV,I,ICF(I),PTOT,PTRA
2731  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' PTOT ',E12.4,' PTRA ',
     $ E12.4)
      IF(PTOT.LT.XMOLIM.AND.ICF(I).NE.0) GO TO 1
      IF(PTRA.LT.XPTLIM.AND.ICF(I).NE.0) GO TO 1
      COSTHE = PF(3,I)/PTOT
      IF(ICF(I).NE.0.AND.ABS(COSTHE).LT.COSLMC) NWIC = NWIC + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSLMN) NWIN = NWIN + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSNEU) NWNE = NWNE + 1
      IF(ICALL.LE.20) WRITE(6,2431) NEV,I,ICF(I),COSTHE,NWIC,NWIN,PTOT,
     $ PTRA,NWNE
2431  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' COS NWIC-N ',E12.4,2I5,
     $ ' PTOT ',E12.4,' PTRA ',E12.4,' NWNE ',I2)
1     CONTINUE
999   RETURN
      END
      BLOCK DATA
      COMMON /CEK4VC/ ISKP
      DATA ISKP /0/
      END
      SUBROUTINE TOTMAS(WWW)
C     CALCULATE THE TOTAL MASS OF THE FINAL SYSTEM
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS WWW = MASS OF TOTAL SYSTEM
C
C                                                  J.OLSSON   14.03.81
C                  LAST CHANGE 14.03.81
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
      DIMENSION PSAM(4)
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      PTOTSM = 0.
      FACT = -1.
      DO 2030  J = 1,4
      IF(J.EQ.4) FACT = 1.
      PSAM(J) = 0.
      DO 1  I = 1,NF
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PSAM(J) = PSAM(J) + PF(J,I)
1     CONTINUE
      PTOTSM = PTOTSM + PSAM(J)*PSAM(J)*FACT
2030  CONTINUE
      PTOTSM = AMAX1(PTOTSM,1.E-08)
      WWW = SQRT(PTOTSM)
      IF(ICALL.LT.5) WRITE(6,2000) NF,WWW
2000  FORMAT(' NR OF FINAL PARTICLES ',I4,'  MASS ',E12.4)
      RETURN
      END
//LKED.SYSLIB DD
//            DD
//            DD DSN=F11OLS.JADE56.L,DISP=SHR
//            DD DSN=F22ELS.JMC.L,DISP=SHR
//            DD DSN=F22CPH.GEANT.L,DISP=SHR
//            DD DSN=F11LHO.JADEGL,DISP=SHR
//            DD DSN=F11LHO.TAGG.L,DISP=SHR
//            DD DSN=JADELG.LOAD,DISP=SHR
//            DD DSN=F22ALL.JADEMUL,DISP=SHR
//*           DD DSN=R01UTL.HBOOK321.L,DISP=SHR
//*           DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR
//            DD DSN=F22YAM.LGLOAD,DISP=SHR
//            DD DISP=SHR,DSN=SYS1.FT77LNKL
//            DD DISP=SHR,DSN=SYS1.FT77LIB
//            DD DISP=SHR,DSN=R01UTL.CERN.DLIBF77
//            DD DISP=SHR,DSN=R01UTL.CERN.PACKF77
//LKED.SYSLMOD DD DISP=OLD,UNIT=FAST,DSN=F11OLS.GEANTMCL(GEATAG)
//* INCLUDE SYSLIB(GEANTDUM)
//*KED.SYSLMOD DD DSN=F11OLS.LKLDTEST,
//*   DISP=(NEW,CATLG,DELETE),UNIT=FAST,
//*   SPACE=(TRK,(40,11,5),RLSE),DCB=R01DCB.LOAD
//LKED.SYSIN DD *
 INCLUDE SYSLIB(MCJADEGE,MCTAGMGE)
 INCLUDE SYSLIB(ENELMX,MCIN56MX)
 NAME GEATAG(R)
C   28/03/97            MEMBER NAME  #LINKMCP (JADE56.S)    FORTRAN
//F11OLSLK JOB '00010622',OLSSON,CLASS=E,MSGLEVEL=(1,1),TIME=(0,15)
//*MAIN RELPRI=LOW
//*
//*  LINK TEST PLOT AND PRINT VERSION OF MCJADE, WITH TOKYO SHOWER SIM.
//*
//*OBLIB DD DSN=R02BUT.FORTRANH,DISP=SHR
//NEWLIB EXEC NEWLIB,PS=NULLFILE,
//   PL='F11OLS.LKLDTEST',TO=DISK
./   SCRATCH TESTTAG
//*
//COMPR EXEC COMPRESS,LIB='F11OLS.LKLDTEST'
//*
//*
//*    CREATE LOAD MODULE
//*
//LINK EXEC FCL,
//     PARM.FORT=XL,
//     PARM.LKED='SIZE=(600K,60K),LIST,MAP',REGION.LKED=800K
//FORT.SYSIN DD *
      COMMON /     / BOOK(10000)
      COMMON / BCS / IW(50000)
      COMMON /CEK4VC/ ISKP
C
      COMMON / CIEVS  / KIEV,IEVMIN,IEVMAX
C
C          IEVMIN : FIRST EVENT TO BE READ FROM INPUT FILE
C          IEVMAX : LAST  EVENT TO BE READ FROM INPUT FILE
C
C                   ==== > DEFAULT IEVMIN = 1
C                                  IEVMAX = 9999999
C
      INTEGER*2 HDATE
      COMMON / TODAY / HDATE(6)
C FOR GEANT DEBUG
      LOGICAL  LDEBUG
      COMMON / CDEBUG / LDEBUG
C
      COMMON/CPRIN/IPRO
      COMMON/COLSON/ IPROO
C  IPROO IS A PRINT VARIABLE FOR DEBUG PRINT IN SHOWER ROUTINES
C
      COMMON /CUTSHO/ CUTOF
C WITH CUTOF THE STANDARD CUTOFF OF 1.2 MEV CAN BE CHANGED, BUT IT
C  IS ONLY EFFECTIVE WITH THE INCLUDE OF SUBR.  LGMCGMN
C
      COMMON/CFLAG/LFLAG(10)
      LOGICAL * 1 LFLAG
C
C          LFLAG(1) = SMEAR GAMMA AND ELECTRON ENERGIES
C          LFLAG(2) = GAMMA CONVERSION IN OUTER TANK AND COIL (TRKGAM)
C          LFLAG(3) = ABSORPTION LOSSES
C          LFLAG(4) = 3 DIM SHOWER PROFILE FIT TO EGGS CODE SLOW!!!!!
C          LFLAG(5) = .TRUE.   -->  WITH VERTEX CHAMBER TRACKING
C                   = .FALSE.  -->  WITHOUT VERTEX CHAMBER TRACKING
C                                   BUT OLD BEAM PIPE GEOMETRY AND
C                                 BEAM PIPE COUNTERS (BEFORE MAI 84)
C          LFLAG(6) = 3 DIM TOKYO SHOWER PROGRAM, JADE NOTE 20A
C          LFLAG(7) = GEANT LG TRACKING FOR HADRONS, NOT RECOMMENDED
C          LFLAG(8) = GEANT SHOWER SIMULATION FOR TAGGING APPARATUS
C
C
C         ===> DEFAULT .TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.FALSE.,
C                      .FALSE.,.FALSE.
C
C   NOTE: WITH THE USE OF TOKYO SHOWER PROGRAM, LFLAG(1) AND LFLAG(3)
C         ARE NOT USED. HOWEVER, THEY SHOULD BE TRUE TO ENSURE THAT THE
C         ALGN BANK IS PROPERLY MARKED FOR LATER ENERGY CORRECTION..
C         LFLAG(2) IS TRULY REDUNDANT
C         LFLAG(4) SHOULD BE FALSE, ALTHOUGH TRLGL IS ONLY CALLED FOR
C                  HADRONS AND MUONS
      LOGICAL*1 TEXT
      DIMENSION TEXT(72)
C
CCC   LDEBUG = .TRUE.
      LDEBUG = .FALSE.
C
      LFLAG(1) = .TRUE.
      LFLAG(2) = .FALSE.
      LFLAG(3) = .TRUE.
C     LFLAG(3) = .FALSE.
      LFLAG(4) = .FALSE.
      LFLAG(5) = .TRUE.
      LFLAG(6) = .TRUE.
      LFLAG(7) = .FALSE.
C     LFLAG(8) = .TRUE.
      LFLAG(8) = .FALSE.
C
      WRITE(6,521) (LFLAG(I),I=1,8)
521   FORMAT(' LFLAG:  ',8I3)
C
C  INIT OF TODAY
C
      HDATE(1) = 1
      HDATE(2) = 1
      HDATE(3) = 1
      HDATE(4) = 15
      HDATE(5) = 6
      HDATE(6) = 1986
C
      WRITE(6,2201) HDATE
2201  FORMAT('  DATE: ',6I6)
C
      CALL BINT( 50000,15000,500, 0 )
C
      ISKP = 2
C     ISKP = 0
      IPRO = 0
      IPROO = 0
C
C MINIMUM CUTOFF ENERGY IN SHOWER
C     CUTOF = 1.2
C
C   READ IN:    EVENT READING LIMITS
C
7608  FORMAT(72A1)
7610  FORMAT(7I10)
7508  FORMAT(' ',72A1)
7510  FORMAT(' ',7I10)
      READ 7608, TEXT
      WRITE(6,7508) TEXT
      READ 7610, IEVMIN,IEVMAX
      WRITE(6,7510) IEVMIN,IEVMAX
C
      CALL MCJADE( 0,  5 )
      CALL BSTA
      CALL PALL
      CALL HISTDO
      STOP
      END
      SUBROUTINE JGETEV( * )
C-----------------------------------------------------------
C
C  VERSION OF 02/11/81   LAST MOD 02/11/81      E.ELSEN
C  GET NEXT EVENT.
C  RETURN 1 IF END OF INPUT SEQUENCE (EOF).
C-----------------------------------------------------------
C
C
      COMMON /CIEVS/ KIEV,IEVMIN,IEVMAX
      DATA IRUNIT / 3 /,ICALL/0/
C
      ICALL = ICALL + 1
C     WRITE(6,3910) ICALL
3910  FORMAT(' ICALL       ',2I10)
      IF(ICALL.NE.1) GO TO 95
      IEV = 0
      KIEV = 0
      NIEV = 20
95    IEV = IEV + 1
1001  IF(IEV.GE.IEVMIN) GO TO 1151
      IEV = IEV + 1
      READ(IRUNIT,ERR=1000,END=8100) NR
      GO TO 1001
CCC  READ EVENTS
1151  IF(IEV.GT.IEVMAX) GO TO 90
C
      KIEV = KIEV + 1
      CALL BRVECT( IRUNIT, &1000, &8100 )
      IF((IEV/NIEV)*NIEV.EQ.IEV) WRITE(6,6811) IEV
6811  FORMAT(' NR OF EVENTS DONE:',I10)
C
CHECK IF EVENT HAS ENOUGH PARTICLES IN INNER DETECTOR AND LEAD GLASS
      CALL CHK4VC(NWIC,NWIN,NWNE)
C     CALL TOTMAS(WWW)
C     CALL HFILL(1,WWW,0,1.)
C     CALL HFILL(2,WWW,0,1.)
C     ICHK = 0
      ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.2) ICHK = 1
C     IF(NWIC.GE.8.AND.NWIN.GE.0) ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.2) ICHK = 1
C     IF(NWIN.GE.2.AND.NWIC.LE.0) ICHK = 1
C     WRITE(6,1130) NWIC,NWIN,ICHK
C1130  FORMAT(' NWIC NWIN ICHK ',3I8)
      IF(ICHK.NE.0) GO TO 3637
      IEV = IEV + 1
      GO TO 1151
 3637 CONTINUE
C     CALL HFILL(3,WWW,0,1.)
C     CALL HFILL(4,WWW,0,1.)
      GO TO 8000
C
 90   WRITE(6,8012)
 8012 FORMAT(' MAX EVENTS READ  ')
      GO TO 7000
C
 1000 WRITE(6,8002)
 8002 FORMAT(' READ ERROR   OR BCS ERROR  ')
 8000 RETURN
C
 8100 WRITE(6,8101)
 8101 FORMAT(' E O F   E O F   E O F   E O F ')
 7000 RETURN 1
      END
      SUBROUTINE CHK4VC(NWIC,NWIN,NWNE)
C         CHECK THE 4-VECTORS AND SEE IF ENOUGH PARTICLES INSIDE THE
C         INNER DETECTOR AND LEAD GLASS.
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS NWIC = NR OF CHARGED PARTICLES INSIDE I.D.
C    RETURNS NWIN = NR OF NEUTRAL PARTICLES INSIDE LEAD GLASS
C    RETURNS NWNE = NR OF NEUTRAL PARTICLES INSIDE BARREL
C
C                                                  J.OLSSON    8.11.80
C                  LAST CHANGE  24.4.1982
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
C COSLMN FROM 320,1514 INNER EDGE E-CAPS.
C COSLMC FROM 227,1180 AT LEAST 16 WIRES IN JET CHAMBER
      DATA COSLMN /0.9784/, COSLMC /0.9820/,XMOLIM/.040/,XPTLIM/.030/
      DATA COSNEU /0.870/
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      ICHK = 0
      NWNE = 0
      NWIC = 0
      NWIN = 0
      IF(NF.LE.0) GO TO 999
      DO 1  I = 1,NF
C SKIP INITIAL ELECTRONS IF REQUIRED
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PTOT = 0.
      DO 2  J = 1,3
      PTOT = PTOT + PF(J,I)**2
2     IF(J.EQ.2) PTRA = PTOT
      PTOT = SQRT(PTOT)
      PTRA = SQRT(PTRA)
      IF(ICALL.LE.20) WRITE(6,2731) NEV,I,ICF(I),PTOT,PTRA
2731  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' PTOT ',E12.4,' PTRA ',
     $ E12.4)
      IF(PTOT.LT.XMOLIM.AND.ICF(I).NE.0) GO TO 1
      IF(PTRA.LT.XPTLIM.AND.ICF(I).NE.0) GO TO 1
      COSTHE = PF(3,I)/PTOT
      IF(ICF(I).NE.0.AND.ABS(COSTHE).LT.COSLMC) NWIC = NWIC + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSLMN) NWIN = NWIN + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSNEU) NWNE = NWNE + 1
      IF(ICALL.LE.20) WRITE(6,2431) NEV,I,ICF(I),COSTHE,NWIC,NWIN,PTOT,
     $ PTRA,NWNE
2431  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' COS NWIC-N ',E12.4,2I5,
     $ ' PTOT ',E12.4,' PTRA ',E12.4,' NWNE ',I2)
1     CONTINUE
999   RETURN
      END
      BLOCK DATA
      COMMON /CEK4VC/ ISKP
      DATA ISKP /0/
      END
      SUBROUTINE TOTMAS(WWW)
C     CALCULATE THE TOTAL MASS OF THE FINAL SYSTEM
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS WWW = MASS OF TOTAL SYSTEM
C
C                                                  J.OLSSON   14.03.81
C                  LAST CHANGE 14.03.81
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
      DIMENSION PSAM(4)
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      PTOTSM = 0.
      FACT = -1.
      DO 2030  J = 1,4
      IF(J.EQ.4) FACT = 1.
      PSAM(J) = 0.
      DO 1  I = 1,NF
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PSAM(J) = PSAM(J) + PF(J,I)
1     CONTINUE
      PTOTSM = PTOTSM + PSAM(J)*PSAM(J)*FACT
2030  CONTINUE
      PTOTSM = AMAX1(PTOTSM,1.E-08)
      WWW = SQRT(PTOTSM)
      IF(ICALL.LT.5) WRITE(6,2000) NF,WWW
2000  FORMAT(' NR OF FINAL PARTICLES ',I4,'  MASS ',E12.4)
      RETURN
      END
//LKED.SYSLIB DD
//            DD
//            DD DSN=F11OLS.JADE56.L,DISP=SHR
//            DD DSN=F22ELS.JMC.L,DISP=SHR
//            DD DSN=F22CPH.GEANT.L,DISP=SHR
//            DD DSN=F11LHO.JADEGL,DISP=SHR
//            DD DSN=F11LHO.TAGG.L,DISP=SHR
//            DD DSN=JADELG.LOAD,DISP=SHR
//            DD DSN=F22ALL.JADEMUL,DISP=SHR
//            DD DSN=R01UTL.HBOOK321.L,DISP=SHR
//            DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR
//            DD DSN=F22YAM.LGLOAD,DISP=SHR
//            DD DISP=SHR,DSN=SYS1.FT77LNKL
//            DD DISP=SHR,DSN=SYS1.FT77LIB
//*           DD DISP=SHR,DSN=R01UTL.CERN.DLIBF77
//*           DD DISP=SHR,DSN=R01UTL.CERN.PACKF77
//LKED.SYSLMOD DD DISP=OLD,UNIT=FAST,DSN=F11OLS.LKLDTEST(TESTTAG)
//*KED.SYSLMOD DD DSN=F11OLS.LKLDTEST,
//*   DISP=(NEW,CATLG,DELETE),UNIT=FAST,
//*   SPACE=(TRK,(40,11,5),RLSE),DCB=R01DCB.LOAD
//LKED.SYSIN DD *
 INCLUDE SYSLIB(GEANTDUM)
 INCLUDE SYSLIB(MCJADEPL,MCTAGMPL,STATAGPL,MCTAGEPL,MCTAGRPL)
 INCLUDE SYSLIB(ENELMX,MCIN56MX)
 NAME TESTTAG(R)
C   28/03/97            MEMBER NAME  #MCJADE  (JADE56.S)    FORTRAN
//F11JLL   JOB 00010622,CLASS=K,MSGLEVEL=(2,0),TIME=(3,00)
//*MAIN RELPRI=LOW
//*
//*
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//*         THIS JOB USES CERN STYLE JCL                               *
//*                                                                    *
//*            NEW VERSION OF TAGGING TRACKING INSTALLED               *
//*             DETAILS, SEE J.C.N. 86, BY A. FINCH                    *
//*                                                                    *
//* TAG CUTS, FOR THE SELECTION OF ZORN TRIGGERS EVENTUALLY.           *
//**********************************************************************
//*
//TRACK EXEC FORTCG,CPRM=XL,LPRM='LIST,NOMAP',GRGN=850K
//*
//C.SYSIN DD *
C-----------------------------------------------------------------------
      COMMON / BCS / IW(33000)
C
      LOGICAL*1  LFLAG
      COMMON/CFLAG/LFLAG(10)
C
C          LFLAG(1) = SMEAR GAMMA AND ELECTRON ENERGIES
C          LFLAG(2) = GAMMA CONVERSION IN OUTER TANK AND COIL (TRKGAM)
C          LFLAG(3) = ABSORPTION LOSSES
C          LFLAG(4) = 3 DIM SHOWER PROFILE FIT TO EGGS CODE SLOW!!!!!
C          LFLAG(5) = .TRUE.   -->  WITH VERTEX CHAMBER TRACKING
C                   = .FALSE.  -->  WITHOUT VERTEX CHAMBER TRACKING
C                                   BUT OLD BEAM PIPE GEOMETRY AND
C                                 BEAM PIPE COUNTERS (BEFORE MAI 84)
C
C                     ===> DEFAULT .TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.
C
      COMMON / CIEVS  / KIEV,IEVMIN,IEVMAX
C
C                       IEVMIN = FIRST EVENT TO BE READ FROM INPUT FILE
C                      IEVMAX = LAST  EVENT TO BE READ FROM INPUT FILE
C
C
      INTEGER*2 HDATE
      COMMON /TODAY/ HDATE(6)
C
      LFLAG(1) = .TRUE.
C     LFLAG(1) = .FALSE.
C     LFLAG(2) = .FALSE.
      LFLAG(2) = .TRUE.
      LFLAG(3) = .TRUE.
C     LFLAG(3) = .FALSE.
      LFLAG(4) = .TRUE.
      LFLAG(5) = .TRUE.
      WRITE(6,521) (LFLAG(I),I=1,5)
521   FORMAT(' LFLAG:  ',5I3)
C
      HDATE(1) = 1
      HDATE(2) = 1
      HDATE(3) = 1
      HDATE(4) = 1
      HDATE(5) = 6
      HDATE(6) = 1986
C            SET EVENT READING LIMITS
      IEVMIN = 9601
      IEVMAX = 9900
      WRITE(6,146) IEVMIN,IEVMAX
146   FORMAT('   IEVMIN AND IEVMAX :',2I5)
C
      CALL BINT( 33000,10000, 500, 0 )
      CALL MCJADE( 0, 10 )
      CALL BSTA
      CALL PALL
      STOP
      END
      SUBROUTINE JGETEV( * )
C-----------------------------------------------------------
C
C  VERSION OF 02/11/81   LAST MOD 02/11/81      E.ELSEN
C  GET NEXT EVENT.
C  RETURN 1 IF END OF INPUT SEQUENCE (EOF).
C-----------------------------------------------------------
C
C
      COMMON /CIEVS/ KIEV,IEVMIN,IEVMAX
      DATA IRUNIT / 3 /,ICALL/0/
C
      ICALL = ICALL + 1
C     WRITE(6,3910) ICALL
3910  FORMAT(' ICALL ',I10)
      IF(ICALL.NE.1) GO TO 95
      IEV = 0
      KIEV = 0
      NIEV = 100
95    IEV = IEV + 1
1001  IF(IEV.GE.IEVMIN) GO TO 1151
      IEV = IEV + 1
      READ(IRUNIT,ERR=1000,END=8100) NR
      GO TO 1001
CCC  READ EVENTS
1151  IF(IEV.GT.IEVMAX) GO TO 90
C
      KIEV = KIEV + 1
      CALL BRVECT( IRUNIT, &1000, &8100 )
      IF((IEV/NIEV)*NIEV.EQ.IEV) WRITE(6,6811) IEV
6811  FORMAT(' NR OF EVENTS DONE:',I10)
C
C CHECK IF EVENT HAS ENOUGH PARTICLES IN INNER DETECTOR AND LEAD GLASS
C NTAG GIVES NR OF TAGG ELECTRONS
C NWIN GIVES NR OF PHOTONS IN ANGULAR RANGE OF LEAD GLASS AND I.DETECTOR
C
      CALL CHKTAG(NTAG,NWIN)
C     ICHK = 0
      ICHK = 1
C     IF(NTAG.GT.0.AND.NWIN.GE.2) ICHK = 1
C     IF(NWIN.GE.2) ICHK = 1
      IF(ICHK.NE.0) GO TO 8000
C SKIP THIS EVENT, READ NEXT
      IEV = IEV + 1
      GO TO 1151
C
 90   WRITE(6,8012)
 8012 FORMAT(' MAX EVENTS READ  ')
      GO TO 7000
C
 1000 WRITE(6,8002)
 8002 FORMAT(' READ ERROR   OR BCS ERROR  ')
 8000 RETURN
C
 8100 WRITE(6,8101)
 8101 FORMAT(' E O F   E O F   E O F   E O F ')
 7000 RETURN 1
      END
      SUBROUTINE CHKTAG(NTAG,NWIN)
C         CHECK THE 4-VECTORS AND SEE IF ENOUGH PARTICLES INSIDE THE
C         INNER DETECTOR AND LEAD GLASS.
C    RETURNS NTAG = NR OF SCATTERED ELECTRONS IN TAGGING AREA
C    RETURNS NWIN = NR OF NEUTRAL PARTICLES INSIDE LEAD GLASS
C
C                                                  J.OLSSON   11.08.86
C
#include "cprod.for"
C ------------------ MACRO CPROD -----------------
C                                       4-VECTOR FORMAT FOR JADE
C
C     COMMON/CPROD/ NEV,BEAM,PT,PHI,THETA,IFLAVR,
C    *        NP,NC,NN,PP(4,500),XM(500),JCH(500),JTP(500),JP(500,2),
C    *        NF,NCF,NNF,PF(4,300),XMF(300),ICF(300),ITF(300),
C    *        PSTRT(3,300)
C
C ---------------END MACRO CPROD -----------------
C COSLMN FROM 320(VERT.),1514(HOR.) INNER EDGE E-CAPS.
C COSTG1 AND COSTG2 CORRESPONDS TO 30 AND 80 MRAD, RESPECTIVELY
C THE RANGE VARIES IN REALITY BETWEEN 32 (37)  AND 75 MRAD
C
      DATA COSLMN /0.9784/
      DATA COSTG1 /0.99955/, COSTG2 /0.99680/
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      ICHK = 0
      NTAG = 0
      NWIN = 0
      IF(NF.LE.0) GO TO 999
      DO 1  I = 1,NF
      PTOT = 0.
      DO 2  J = 1,3
      PTOT = PTOT + PF(J,I)**2
2     IF(J.EQ.2) PTRA = PTOT
      PTOT = SQRT(PTOT)
      PTRA = SQRT(PTRA)
      IF(ICALL.LE.20) WRITE(6,2731) NEV,I,ICF(I),PTOT,PTRA
2731  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' PTOT ',E12.4,' PTRA ',
     $ E12.4)
      COSTHE = PF(3,I)/PTOT
      ACOSTH = ABS(COSTHE)
      IF(ICF(I).EQ.0.AND.ACOSTH.LT.COSLMN) NWIN = NWIN + 1
      IF(I.LT.3.AND.ACOSTH.LT.COSTG1.AND.ACOSTH.GT.COSTG2)
     $ NTAG = NTAG + 1
      IF(ICALL.LE.20) WRITE(6,2431) NEV,I,ICF(I),COSTHE,NWIN,NTAG,PTOT,
     $ PTRA
2431  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' COS NWIN NTAG ',E12.4,
     $ 2I4,' PTOT ',E12.4,' PTRA ',E12.4)
1     CONTINUE
999   RETURN
      END
//G.SYSLIB DD DSN=SYS1.FORTLIB,DISP=SHR
//         DD DSN=DESYLIB,DISP=SHR
//*        DD DSN=F11OLS.GUSPI0.L,DISP=SHR
//*        DD DSN=F11MAG.CLUL,DISP=SHR
//*        DD DSN=F11OLS.MCTRIG.L,DISP=SHR
//         DD DSN=F22ELS.JMC.L,DISP=SHR
//         DD DSN=F11LHO.TAGG.L,DISP=SHR,UNIT=FAST,VOL=SER=STOR05
//         DD DSN=JADELG.LOAD,DISP=SHR,UNIT=FAST,VOL=SER=STOR05
//         DD DSN=F22ALL.JADEMUL,DISP=SHR,UNIT=FAST,VOL=SER=STOR05
//         DD DSN=F11LHO.JADEGL,DISP=SHR,UNIT=FAST,VOL=SER=STOR05
//         DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//         DD DSN=F1EBLO.BOSLIB.L,DISP=SHR
//*
//* UNIT3  INPUT:    4-VECTOR EVENTS IN THE CPROD-FORMAT
//*
//G.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAPRIV4.NR4
//*
//* UNIT2  OUTPUT:    JADE EVENTS IN BOS FORMAT
//*
//G.FT02F001 DD DISP=(NEW,CATLG,CATLG),UNIT=FAST,DCB=R01DCB.VBS,
//       DSN=F11OLS.ETAPMM86.NR33,SPACE=(TRK,(80,11),RLSE)
//*G.FT02F001 DD DUMMY
//F11JLL   JOB 00010622,CLASS=K,MSGLEVEL=(2,0),TIME=(3,00)
//*MAIN RELPRI=LOW
//*
//*
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//*         THIS JOB USES CERN STYLE JCL                               *
//*                                                                    *
//*            NEW VERSION OF TAGGING TRACKING INSTALLED               *
//*             DETAILS, SEE J.C.N. 86, BY A. FINCH                    *
//*                                                                    *
//* TAG CUTS, FOR THE SELECTION OF ZORN TRIGGERS EVENTUALLY.           *
//**********************************************************************
//*
//TRACK EXEC FORTCG,CPRM=XL,LPRM='LIST,NOMAP',GRGN=850K
//*
//C.SYSIN DD *
C-----------------------------------------------------------------------
      COMMON / BCS / IW(33000)
C
      LOGICAL*1  LFLAG
      COMMON/CFLAG/LFLAG(10)
C
C          LFLAG(1) = SMEAR GAMMA AND ELECTRON ENERGIES
C          LFLAG(2) = GAMMA CONVERSION IN OUTER TANK AND COIL (TRKGAM)
C          LFLAG(3) = ABSORPTION LOSSES
C          LFLAG(4) = 3 DIM SHOWER PROFILE FIT TO EGGS CODE SLOW!!!!!
C          LFLAG(5) = .TRUE.   -->  WITH VERTEX CHAMBER TRACKING
C                   = .FALSE.  -->  WITHOUT VERTEX CHAMBER TRACKING
C                                   BUT OLD BEAM PIPE GEOMETRY AND
C                                 BEAM PIPE COUNTERS (BEFORE MAI 84)
C
C                     ===> DEFAULT .TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.
C
      COMMON / CIEVS  / KIEV,IEVMIN,IEVMAX
C
C                     IEVMIN = FIRST EVENT TO BE READ FROM INPUT FILE
C                     IEVMAX = LAST  EVENT TO BE READ FROM INPUT FILE
C
C
      INTEGER*2 HDATE
      COMMON /TODAY/ HDATE(6)
C
      LFLAG(1) = .TRUE.
C     LFLAG(1) = .FALSE.
C     LFLAG(2) = .FALSE.
      LFLAG(2) = .TRUE.
      LFLAG(3) = .TRUE.
C     LFLAG(3) = .FALSE.
      LFLAG(4) = .TRUE.
      LFLAG(5) = .TRUE.
      WRITE(6,521) (LFLAG(I),I=1,5)
521   FORMAT(' LFLAG:  ',5I3)
C
      HDATE(1) = 1
      HDATE(2) = 1
      HDATE(3) = 1
      HDATE(4) = 1
      HDATE(5) = 6
      HDATE(6) = 1986
C            SET EVENT READING LIMITS
      IEVMIN = 9901
      IEVMAX = 10200
      WRITE(6,146) IEVMIN,IEVMAX
146   FORMAT('   IEVMIN AND IEVMAX :',2I5)
C
      CALL BINT( 33000,10000, 500, 0 )
      CALL MCJADE( 0, 10 )
      CALL BSTA
      CALL PALL
      STOP
      END
      SUBROUTINE JGETEV( * )
C-----------------------------------------------------------
C
C  VERSION OF 02/11/81   LAST MOD 02/11/81      E.ELSEN
C  GET NEXT EVENT.
C  RETURN 1 IF END OF INPUT SEQUENCE (EOF).
C-----------------------------------------------------------
C
C
      COMMON /CIEVS/ KIEV,IEVMIN,IEVMAX
      DATA IRUNIT / 3 /,ICALL/0/
C
      ICALL = ICALL + 1
C     WRITE(6,3910) ICALL
3910  FORMAT(' ICALL ',I10)
      IF(ICALL.NE.1) GO TO 95
      IEV = 0
      KIEV = 0
      NIEV = 100
95    IEV = IEV + 1
1001  IF(IEV.GE.IEVMIN) GO TO 1151
      IEV = IEV + 1
      READ(IRUNIT,ERR=1000,END=8100) NR
      GO TO 1001
CCC  READ EVENTS
1151  IF(IEV.GT.IEVMAX) GO TO 90
C
      KIEV = KIEV + 1
      CALL BRVECT( IRUNIT, &1000, &8100 )
      IF((IEV/NIEV)*NIEV.EQ.IEV) WRITE(6,6811) IEV
6811  FORMAT(' NR OF EVENTS DONE:',I10)
C
C CHECK IF EVENT HAS ENOUGH PARTICLES IN INNER DETECTOR AND LEAD GLASS
C NTAG GIVES NR OF TAGG ELECTRONS
C NWIN GIVES NR OF PHOTONS IN ANGULAR RANGE OF LEAD GLASS AND I.DETECTOR
C
      CALL CHKTAG(NTAG,NWIN)
C     ICHK = 0
      ICHK = 1
C     IF(NTAG.GT.0.AND.NWIN.GE.2) ICHK = 1
C     IF(NWIN.GE.2) ICHK = 1
      IF(ICHK.NE.0) GO TO 8000
C SKIP THIS EVENT, READ NEXT
      IEV = IEV + 1
      GO TO 1151
C
 90   WRITE(6,8012)
 8012 FORMAT(' MAX EVENTS READ  ')
      GO TO 7000
C
 1000 WRITE(6,8002)
 8002 FORMAT(' READ ERROR   OR BCS ERROR  ')
 8000 RETURN
C
 8100 WRITE(6,8101)
 8101 FORMAT(' E O F   E O F   E O F   E O F ')
 7000 RETURN 1
      END
      SUBROUTINE CHKTAG(NTAG,NWIN)
C         CHECK THE 4-VECTORS AND SEE IF ENOUGH PARTICLES INSIDE THE
C         INNER DETECTOR AND LEAD GLASS.
C    RETURNS NTAG = NR OF SCATTERED ELECTRONS IN TAGGING AREA
C    RETURNS NWIN = NR OF NEUTRAL PARTICLES INSIDE LEAD GLASS
C
C                                                  J.OLSSON   11.08.86
C
#include "cprod.for"
C ------------------ MACRO CPROD -----------------
C                                       4-VECTOR FORMAT FOR JADE
C
C     COMMON/CPROD/ NEV,BEAM,PT,PHI,THETA,IFLAVR,
C    *        NP,NC,NN,PP(4,500),XM(500),JCH(500),JTP(500),JP(500,2),
C    *        NF,NCF,NNF,PF(4,300),XMF(300),ICF(300),ITF(300),
C    *        PSTRT(3,300)
C
C ---------------END MACRO CPROD -----------------
C COSLMN FROM 320(VERT.),1514(HOR.) INNER EDGE E-CAPS.
C COSTG1 AND COSTG2 CORRESPONDS TO 30 AND 80 MRAD, RESPECTIVELY
C THE RANGE VARIES IN REALITY BETWEEN 32 (37)  AND 75 MRAD
C
      DATA COSLMN /0.9784/
      DATA COSTG1 /0.99955/, COSTG2 /0.99680/
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      ICHK = 0
      NTAG = 0
      NWIN = 0
      IF(NF.LE.0) GO TO 999
      DO 1  I = 1,NF
      PTOT = 0.
      DO 2  J = 1,3
      PTOT = PTOT + PF(J,I)**2
2     IF(J.EQ.2) PTRA = PTOT
      PTOT = SQRT(PTOT)
      PTRA = SQRT(PTRA)
      IF(ICALL.LE.20) WRITE(6,2731) NEV,I,ICF(I),PTOT,PTRA
2731  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' PTOT ',E12.4,' PTRA ',
     $ E12.4)
      COSTHE = PF(3,I)/PTOT
      ACOSTH = ABS(COSTHE)
      IF(ICF(I).EQ.0.AND.ACOSTH.LT.COSLMN) NWIN = NWIN + 1
      IF(I.LT.3.AND.ACOSTH.LT.COSTG1.AND.ACOSTH.GT.COSTG2)
     $ NTAG = NTAG + 1
      IF(ICALL.LE.20) WRITE(6,2431) NEV,I,ICF(I),COSTHE,NWIN,NTAG,PTOT,
     $ PTRA
2431  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' COS NWIN NTAG ',E12.4,
     $ 2I4,' PTOT ',E12.4,' PTRA ',E12.4)
1     CONTINUE
999   RETURN
      END
//G.SYSLIB DD DSN=SYS1.FORTLIB,DISP=SHR
//         DD DSN=DESYLIB,DISP=SHR
//*        DD DSN=F11OLS.GUSPI0.L,DISP=SHR
//*        DD DSN=F11MAG.CLUL,DISP=SHR
//*        DD DSN=F11OLS.MCTRIG.L,DISP=SHR
//         DD DSN=F22ELS.JMC.L,DISP=SHR
//         DD DSN=F11LHO.TAGG.L,DISP=SHR,UNIT=FAST,VOL=SER=STOR05
//         DD DSN=JADELG.LOAD,DISP=SHR,UNIT=FAST,VOL=SER=STOR05
//         DD DSN=F22ALL.JADEMUL,DISP=SHR,UNIT=FAST,VOL=SER=STOR05
//         DD DSN=F11LHO.JADEGL,DISP=SHR,UNIT=FAST,VOL=SER=STOR05
//         DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//         DD DSN=F1EBLO.BOSLIB.L,DISP=SHR
//*
//* UNIT3  INPUT:    4-VECTOR EVENTS IN THE CPROD-FORMAT
//*
//G.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAPRIV4.NR4
//*
//* UNIT2  OUTPUT:    JADE EVENTS IN BOS FORMAT
//*
//G.FT02F001 DD DISP=(NEW,CATLG,CATLG),UNIT=FAST,DCB=R01DCB.VBS,
//       DSN=F11OLS.ETAPMM86.NR34,SPACE=(TRK,(80,11),RLSE)
//*G.FT02F001 DD DUMMY
//F11JLL   JOB 00010622,CLASS=K,MSGLEVEL=(2,0),TIME=(3,00)
//*MAIN RELPRI=LOW
//*
//*
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//*         THIS JOB USES CERN STYLE JCL                               *
//*                                                                    *
//*            NEW VERSION OF TAGGING TRACKING INSTALLED               *
//*             DETAILS, SEE J.C.N. 86, BY A. FINCH                    *
//*                                                                    *
//* TAG CUTS, FOR THE SELECTION OF ZORN TRIGGERS EVENTUALLY.           *
//**********************************************************************
//*
//TRACK EXEC FORTCG,CPRM=XL,LPRM='LIST,NOMAP',GRGN=850K
//*
//C.SYSIN DD *
C-----------------------------------------------------------------------
      COMMON / BCS / IW(33000)
C
      LOGICAL*1  LFLAG
      COMMON/CFLAG/LFLAG(10)
C
C          LFLAG(1) = SMEAR GAMMA AND ELECTRON ENERGIES
C          LFLAG(2) = GAMMA CONVERSION IN OUTER TANK AND COIL (TRKGAM)
C          LFLAG(3) = ABSORPTION LOSSES
C          LFLAG(4) = 3 DIM SHOWER PROFILE FIT TO EGGS CODE SLOW!!!!!
C          LFLAG(5) = .TRUE.   -->  WITH VERTEX CHAMBER TRACKING
C                   = .FALSE.  -->  WITHOUT VERTEX CHAMBER TRACKING
C                                   BUT OLD BEAM PIPE GEOMETRY AND
C                                 BEAM PIPE COUNTERS (BEFORE MAI 84)
C
C                     ===> DEFAULT .TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.
C
      COMMON / CIEVS  / KIEV,IEVMIN,IEVMAX
C
C                      IEVMIN = FIRST EVENT TO BE READ FROM INPUT FILE
C                      IEVMAX = LAST  EVENT TO BE READ FROM INPUT FILE
C
C
      INTEGER*2 HDATE
      COMMON /TODAY/ HDATE(6)
C
      LFLAG(1) = .TRUE.
C     LFLAG(1) = .FALSE.
C     LFLAG(2) = .FALSE.
      LFLAG(2) = .TRUE.
      LFLAG(3) = .TRUE.
C     LFLAG(3) = .FALSE.
      LFLAG(4) = .TRUE.
      LFLAG(5) = .TRUE.
      WRITE(6,521) (LFLAG(I),I=1,5)
521   FORMAT(' LFLAG:  ',5I3)
C
      HDATE(1) = 1
      HDATE(2) = 1
      HDATE(3) = 1
      HDATE(4) = 1
      HDATE(5) = 6
      HDATE(6) = 1986
C            SET EVENT READING LIMITS
      IEVMIN = 10201
      IEVMAX = 10500
      WRITE(6,146) IEVMIN,IEVMAX
146   FORMAT('   IEVMIN AND IEVMAX :',2I5)
C
      CALL BINT( 33000,10000, 500, 0 )
      CALL MCJADE( 0, 10 )
      CALL BSTA
      CALL PALL
      STOP
      END
      SUBROUTINE JGETEV( * )
C-----------------------------------------------------------
C
C  VERSION OF 02/11/81   LAST MOD 02/11/81      E.ELSEN
C  GET NEXT EVENT.
C  RETURN 1 IF END OF INPUT SEQUENCE (EOF).
C-----------------------------------------------------------
C
C
      COMMON /CIEVS/ KIEV,IEVMIN,IEVMAX
      DATA IRUNIT / 3 /,ICALL/0/
C
      ICALL = ICALL + 1
C     WRITE(6,3910) ICALL
3910  FORMAT(' ICALL ',I10)
      IF(ICALL.NE.1) GO TO 95
      IEV = 0
      KIEV = 0
      NIEV = 100
95    IEV = IEV + 1
1001  IF(IEV.GE.IEVMIN) GO TO 1151
      IEV = IEV + 1
      READ(IRUNIT,ERR=1000,END=8100) NR
      GO TO 1001
CCC  READ EVENTS
1151  IF(IEV.GT.IEVMAX) GO TO 90
C
      KIEV = KIEV + 1
      CALL BRVECT( IRUNIT, &1000, &8100 )
      IF((IEV/NIEV)*NIEV.EQ.IEV) WRITE(6,6811) IEV
6811  FORMAT(' NR OF EVENTS DONE:',I10)
C
C CHECK IF EVENT HAS ENOUGH PARTICLES IN INNER DETECTOR AND LEAD GLASS
C NTAG GIVES NR OF TAGG ELECTRONS
C NWIN GIVES NR OF PHOTONS IN ANGULAR RANGE OF LEAD GLASS AND I.DETECTOR
C
      CALL CHKTAG(NTAG,NWIN)
C     ICHK = 0
      ICHK = 1
C     IF(NTAG.GT.0.AND.NWIN.GE.2) ICHK = 1
C     IF(NWIN.GE.2) ICHK = 1
      IF(ICHK.NE.0) GO TO 8000
C SKIP THIS EVENT, READ NEXT
      IEV = IEV + 1
      GO TO 1151
C
 90   WRITE(6,8012)
 8012 FORMAT(' MAX EVENTS READ  ')
      GO TO 7000
C
 1000 WRITE(6,8002)
 8002 FORMAT(' READ ERROR   OR BCS ERROR  ')
 8000 RETURN
C
 8100 WRITE(6,8101)
 8101 FORMAT(' E O F   E O F   E O F   E O F ')
 7000 RETURN 1
      END
      SUBROUTINE CHKTAG(NTAG,NWIN)
C         CHECK THE 4-VECTORS AND SEE IF ENOUGH PARTICLES INSIDE THE
C         INNER DETECTOR AND LEAD GLASS.
C    RETURNS NTAG = NR OF SCATTERED ELECTRONS IN TAGGING AREA
C    RETURNS NWIN = NR OF NEUTRAL PARTICLES INSIDE LEAD GLASS
C
C                                                  J.OLSSON   11.08.86
C
#include "cprod.for"
C ------------------ MACRO CPROD -----------------
C                                       4-VECTOR FORMAT FOR JADE
C
C     COMMON/CPROD/ NEV,BEAM,PT,PHI,THETA,IFLAVR,
C    *        NP,NC,NN,PP(4,500),XM(500),JCH(500),JTP(500),JP(500,2),
C    *        NF,NCF,NNF,PF(4,300),XMF(300),ICF(300),ITF(300),
C    *        PSTRT(3,300)
C
C ---------------END MACRO CPROD -----------------
C COSLMN FROM 320(VERT.),1514(HOR.) INNER EDGE E-CAPS.
C COSTG1 AND COSTG2 CORRESPONDS TO 30 AND 80 MRAD, RESPECTIVELY
C THE RANGE VARIES IN REALITY BETWEEN 32 (37)  AND 75 MRAD
C
      DATA COSLMN /0.9784/
      DATA COSTG1 /0.99955/, COSTG2 /0.99680/
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      ICHK = 0
      NTAG = 0
      NWIN = 0
      IF(NF.LE.0) GO TO 999
      DO 1  I = 1,NF
      PTOT = 0.
      DO 2  J = 1,3
      PTOT = PTOT + PF(J,I)**2
2     IF(J.EQ.2) PTRA = PTOT
      PTOT = SQRT(PTOT)
      PTRA = SQRT(PTRA)
      IF(ICALL.LE.20) WRITE(6,2731) NEV,I,ICF(I),PTOT,PTRA
2731  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' PTOT ',E12.4,' PTRA ',
     $ E12.4)
      COSTHE = PF(3,I)/PTOT
      ACOSTH = ABS(COSTHE)
      IF(ICF(I).EQ.0.AND.ACOSTH.LT.COSLMN) NWIN = NWIN + 1
      IF(I.LT.3.AND.ACOSTH.LT.COSTG1.AND.ACOSTH.GT.COSTG2)
     $ NTAG = NTAG + 1
      IF(ICALL.LE.20) WRITE(6,2431) NEV,I,ICF(I),COSTHE,NWIN,NTAG,PTOT,
     $ PTRA
2431  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' COS NWIN NTAG ',E12.4,
     $ 2I4,' PTOT ',E12.4,' PTRA ',E12.4)
1     CONTINUE
999   RETURN
      END
//G.SYSLIB DD DSN=SYS1.FORTLIB,DISP=SHR
//         DD DSN=DESYLIB,DISP=SHR
//*        DD DSN=F11OLS.GUSPI0.L,DISP=SHR
//*        DD DSN=F11MAG.CLUL,DISP=SHR
//*        DD DSN=F11OLS.MCTRIG.L,DISP=SHR
//         DD DSN=F22ELS.JMC.L,DISP=SHR
//         DD DSN=F11LHO.TAGG.L,DISP=SHR,UNIT=FAST,VOL=SER=STOR05
//         DD DSN=JADELG.LOAD,DISP=SHR,UNIT=FAST,VOL=SER=STOR05
//         DD DSN=F22ALL.JADEMUL,DISP=SHR,UNIT=FAST,VOL=SER=STOR05
//         DD DSN=F11LHO.JADEGL,DISP=SHR,UNIT=FAST,VOL=SER=STOR05
//         DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//         DD DSN=F1EBLO.BOSLIB.L,DISP=SHR
//*
//* UNIT3  INPUT:    4-VECTOR EVENTS IN THE CPROD-FORMAT
//*
//G.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAPRIV4.NR4
//*
//* UNIT2  OUTPUT:    JADE EVENTS IN BOS FORMAT
//*
//G.FT02F001 DD DISP=(NEW,CATLG,CATLG),UNIT=FAST,DCB=R01DCB.VBS,
//       DSN=F11OLS.ETAPMM86.NR35,SPACE=(TRK,(80,11),RLSE)
//*G.FT02F001 DD DUMMY
//F11JLL   JOB 00010622,CLASS=K,MSGLEVEL=(2,0),TIME=(3,00)
//*MAIN RELPRI=LOW
//*
//*
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//*         THIS JOB USES CERN STYLE JCL                               *
//*                                                                    *
//*            NEW VERSION OF TAGGING TRACKING INSTALLED               *
//*             DETAILS, SEE J.C.N. 86, BY A. FINCH                    *
//*                                                                    *
//* TAG CUTS, FOR THE SELECTION OF ZORN TRIGGERS EVENTUALLY.           *
//**********************************************************************
//*
//TRACK EXEC FORTCG,CPRM=XL,LPRM='LIST,NOMAP',GRGN=850K
//*
//C.SYSIN DD *
C-----------------------------------------------------------------------
      COMMON / BCS / IW(33000)
C
      LOGICAL*1  LFLAG
      COMMON/CFLAG/LFLAG(10)
C
C          LFLAG(1) = SMEAR GAMMA AND ELECTRON ENERGIES
C          LFLAG(2) = GAMMA CONVERSION IN OUTER TANK AND COIL (TRKGAM)
C          LFLAG(3) = ABSORPTION LOSSES
C          LFLAG(4) = 3 DIM SHOWER PROFILE FIT TO EGGS CODE SLOW!!!!!
C          LFLAG(5) = .TRUE.   -->  WITH VERTEX CHAMBER TRACKING
C                   = .FALSE.  -->  WITHOUT VERTEX CHAMBER TRACKING
C                                   BUT OLD BEAM PIPE GEOMETRY AND
C                                 BEAM PIPE COUNTERS (BEFORE MAI 84)
C
C                     ===> DEFAULT .TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.
C
      COMMON / CIEVS  / KIEV,IEVMIN,IEVMAX
C
C                        IEVMIN = FIRST EVENT TO BE READ FROM INPUT FILE
C                       IEVMAX = LAST  EVENT TO BE READ FROM INPUT FILE
C
C
      INTEGER*2 HDATE
      COMMON /TODAY/ HDATE(6)
C
      LFLAG(1) = .TRUE.
C     LFLAG(1) = .FALSE.
C     LFLAG(2) = .FALSE.
      LFLAG(2) = .TRUE.
      LFLAG(3) = .TRUE.
C     LFLAG(3) = .FALSE.
      LFLAG(4) = .TRUE.
      LFLAG(5) = .TRUE.
      WRITE(6,521) (LFLAG(I),I=1,5)
521   FORMAT(' LFLAG:  ',5I3)
C
      HDATE(1) = 1
      HDATE(2) = 1
      HDATE(3) = 1
      HDATE(4) = 1
      HDATE(5) = 6
      HDATE(6) = 1986
C            SET EVENT READING LIMITS
      IEVMIN = 10501
      IEVMAX = 11000
      WRITE(6,146) IEVMIN,IEVMAX
146   FORMAT('   IEVMIN AND IEVMAX :',2I5)
C
      CALL BINT( 33000,10000, 500, 0 )
      CALL MCJADE( 0, 10 )
      CALL BSTA
      CALL PALL
      STOP
      END
      SUBROUTINE JGETEV( * )
C-----------------------------------------------------------
C
C  VERSION OF 02/11/81   LAST MOD 02/11/81      E.ELSEN
C  GET NEXT EVENT.
C  RETURN 1 IF END OF INPUT SEQUENCE (EOF).
C-----------------------------------------------------------
C
C
      COMMON /CIEVS/ KIEV,IEVMIN,IEVMAX
      DATA IRUNIT / 3 /,ICALL/0/
C
      ICALL = ICALL + 1
C     WRITE(6,3910) ICALL
3910  FORMAT(' ICALL ',I10)
      IF(ICALL.NE.1) GO TO 95
      IEV = 0
      KIEV = 0
      NIEV = 100
95    IEV = IEV + 1
1001  IF(IEV.GE.IEVMIN) GO TO 1151
      IEV = IEV + 1
      READ(IRUNIT,ERR=1000,END=8100) NR
      GO TO 1001
CCC  READ EVENTS
1151  IF(IEV.GT.IEVMAX) GO TO 90
C
      KIEV = KIEV + 1
      CALL BRVECT( IRUNIT, &1000, &8100 )
      IF((IEV/NIEV)*NIEV.EQ.IEV) WRITE(6,6811) IEV
6811  FORMAT(' NR OF EVENTS DONE:',I10)
C
C CHECK IF EVENT HAS ENOUGH PARTICLES IN INNER DETECTOR AND LEAD GLASS
C NTAG GIVES NR OF TAGG ELECTRONS
C NWIN GIVES NR OF PHOTONS IN ANGULAR RANGE OF LEAD GLASS AND I.DETECTOR
C
      CALL CHKTAG(NTAG,NWIN)
C     ICHK = 0
      ICHK = 1
C     IF(NTAG.GT.0.AND.NWIN.GE.2) ICHK = 1
C     IF(NWIN.GE.2) ICHK = 1
      IF(ICHK.NE.0) GO TO 8000
C SKIP THIS EVENT, READ NEXT
      IEV = IEV + 1
      GO TO 1151
C
 90   WRITE(6,8012)
 8012 FORMAT(' MAX EVENTS READ  ')
      GO TO 7000
C
 1000 WRITE(6,8002)
 8002 FORMAT(' READ ERROR   OR BCS ERROR  ')
 8000 RETURN
C
 8100 WRITE(6,8101)
 8101 FORMAT(' E O F   E O F   E O F   E O F ')
 7000 RETURN 1
      END
      SUBROUTINE CHKTAG(NTAG,NWIN)
C         CHECK THE 4-VECTORS AND SEE IF ENOUGH PARTICLES INSIDE THE
C         INNER DETECTOR AND LEAD GLASS.
C    RETURNS NTAG = NR OF SCATTERED ELECTRONS IN TAGGING AREA
C    RETURNS NWIN = NR OF NEUTRAL PARTICLES INSIDE LEAD GLASS
C
C                                                  J.OLSSON   11.08.86
C
#include "cprod.for"
C ------------------ MACRO CPROD -----------------
C                                       4-VECTOR FORMAT FOR JADE
C
C     COMMON/CPROD/ NEV,BEAM,PT,PHI,THETA,IFLAVR,
C    *        NP,NC,NN,PP(4,500),XM(500),JCH(500),JTP(500),JP(500,2),
C    *        NF,NCF,NNF,PF(4,300),XMF(300),ICF(300),ITF(300),
C    *        PSTRT(3,300)
C
C ---------------END MACRO CPROD -----------------
C COSLMN FROM 320(VERT.),1514(HOR.) INNER EDGE E-CAPS.
C COSTG1 AND COSTG2 CORRESPONDS TO 30 AND 80 MRAD, RESPECTIVELY
C THE RANGE VARIES IN REALITY BETWEEN 32 (37)  AND 75 MRAD
C
      DATA COSLMN /0.9784/
      DATA COSTG1 /0.99955/, COSTG2 /0.99680/
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      ICHK = 0
      NTAG = 0
      NWIN = 0
      IF(NF.LE.0) GO TO 999
      DO 1  I = 1,NF
      PTOT = 0.
      DO 2  J = 1,3
      PTOT = PTOT + PF(J,I)**2
2     IF(J.EQ.2) PTRA = PTOT
      PTOT = SQRT(PTOT)
      PTRA = SQRT(PTRA)
      IF(ICALL.LE.20) WRITE(6,2731) NEV,I,ICF(I),PTOT,PTRA
2731  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' PTOT ',E12.4,' PTRA ',
     $ E12.4)
      COSTHE = PF(3,I)/PTOT
      ACOSTH = ABS(COSTHE)
      IF(ICF(I).EQ.0.AND.ACOSTH.LT.COSLMN) NWIN = NWIN + 1
      IF(I.LT.3.AND.ACOSTH.LT.COSTG1.AND.ACOSTH.GT.COSTG2)
     $ NTAG = NTAG + 1
      IF(ICALL.LE.20) WRITE(6,2431) NEV,I,ICF(I),COSTHE,NWIN,NTAG,PTOT,
     $ PTRA
2431  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' COS NWIN NTAG ',E12.4,
     $ 2I4,' PTOT ',E12.4,' PTRA ',E12.4)
1     CONTINUE
999   RETURN
      END
//G.SYSLIB DD DSN=SYS1.FORTLIB,DISP=SHR
//         DD DSN=DESYLIB,DISP=SHR
//*        DD DSN=F11OLS.GUSPI0.L,DISP=SHR
//*        DD DSN=F11MAG.CLUL,DISP=SHR
//*        DD DSN=F11OLS.MCTRIG.L,DISP=SHR
//         DD DSN=F22ELS.JMC.L,DISP=SHR
//         DD DSN=F11LHO.TAGG.L,DISP=SHR,UNIT=FAST,VOL=SER=STOR05
//         DD DSN=JADELG.LOAD,DISP=SHR,UNIT=FAST,VOL=SER=STOR05
//         DD DSN=F22ALL.JADEMUL,DISP=SHR,UNIT=FAST,VOL=SER=STOR05
//         DD DSN=F11LHO.JADEGL,DISP=SHR,UNIT=FAST,VOL=SER=STOR05
//         DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//         DD DSN=F1EBLO.BOSLIB.L,DISP=SHR
//*
//* UNIT3  INPUT:    4-VECTOR EVENTS IN THE CPROD-FORMAT
//*
//G.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAPRIV4.NR4
//*
//* UNIT2  OUTPUT:    JADE EVENTS IN BOS FORMAT
//*
//G.FT02F001 DD DISP=(NEW,CATLG,CATLG),UNIT=FAST,DCB=R01DCB.VBS,
//       DSN=F11OLS.ETAPMM86.NR36,SPACE=(TRK,(80,11),RLSE)
//*G.FT02F001 DD DUMMY
C   28/03/97            MEMBER NAME  #MULCOPY (JADE56.S)    FORTRAN
//F11OLS   JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(0,45),CLASS=A
//*MAIN ORG=EXT,RELPRI=HIG
//*
//JOBLIB DD DSN=F11OLS.JADENEWL,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*   COPY INPUT DATASET TO MULTIPLE OUTPUT FILES                      *
//*                                                                    *
//*   SPECIFY:    NROFIL:  NR OF OUTPUT FILES                          *
//*               IEVFIL:  NR OF EVENTS ON EACH OUTPUT FILE            *
//*                                                                    *
//*       C:A 23000 EVENTS IN 1 MINUTE
//**********************************************************************
//*
//MULCOPY EXEC PGM=MULTCOPY,REGION=1500K
//*
//*                INPUT
//FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR21GAM.TAPE82A
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR22GAM.NEU86N2
//*T02F001 DD DISP=SHR,DSN=F11OLS.TR12GAM.MNEU85.ETABAND1
//*        DD DISP=SHR,DSN=F11OLS.TR12GAM.MNEU85.ETABAND1
//*                OUTPUT
//*O.FT11F001 DD DUMMY,DCB=R01DCB.VBS
//FT11F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR1
//FT12F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR2
//FT13F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR3
//FT14F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR4
//FT15F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR5
//FT16F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR6
//FT17F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR7
//FT18F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR8
//FT19F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR9
//FT20F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR10
//FT21F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR11
//FT22F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR12
//FT23F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR13
//FT24F001 DD DISP=SHR,DSN=F11OLS.TEMPI.NR14
//*FT11F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*  SPACE=(TRK,(70,10),RLSE),DSN=F11OLS.MCSTEP2.GAMMA.GEV10105
//*
//*FT11F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*      MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TEMPI.NR5
//*FT12F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*      MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TEMPI.NR6
//*FT13F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*      MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TEMPI.NR7
//*FT14F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*      MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TEMPI.NR8
//*FT15F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*      MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TEMPI.NR9
//*FT16F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*      MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TEMPI.NR10
//*FT17F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*     MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TEMPI.NR11
//*FT18F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*      MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TEMPI.NR12
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    NROFIL    IEVFIL
        14       900
C   28/03/97            MEMBER NAME  #NPECER  (JADE56.S)    FORTRAN
//F11JLL   JOB 00010622,OLSSON,CLASS=E,TIME=(0,15)
//*MAIN RELPRI=LOW
//*EXEC FCLG
// EXEC GEP,PARM.LKED='LIST',REGION.GO=700K,VS=HBOOK,
//      DN='F11OLS.NPECER.NR2'
#include "@npecer.for"
//LKED.SYSLIB DD
//            DD
//            DD
//            DD
//            DD
//            DD DSN=F11OLS.JADE56.L,DISP=SHR
//*           DD DSN=F22YAM.LGLOAD,DISP=SHR
//            DD DSN=F11OLS.JADELD,DISP=SHR
//            DD DSN=F22YAM.UTILTYL,DISP=SHR
//*           DD DSN=F11OLS.TEMPL,DISP=SHR
//            DD UNIT=FAST,DISP=SHR,DSN=F11LHO.JADEGL
//*           DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERN.KERNLIB4
//*DD DSN=F22YAM.WORKL,DISP=SHR
 INCLUDE SYSLIB(NPECER8)
//GO.FT02F001 DD DUMMY
C   28/03/97            MEMBER NAME  #TG02MK  (JADE56.S)    FORTRAN
//F11JLL   JOB 00010622,CLASS=L,MSGLEVEL=(2,0),TIME=(9,00)
//*MAIN RELPRI=MED
//*
//* SPECIAL VERSION FOR B.ZORN SELECTION OF 2-GAMMA EVENTS
//*
// EXEC FLG,PARM.LKED='SIZE=(600K,60K)',REGION.LKED=950K,
//  REGION.GO=1600K
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,DSN=F11OLS.JADENEWL
//            DD DISP=SHR,DSN=F11OLS.JADELD
//            DD DISP=SHR,DSN=F22HEM.N50RED.L
//            DD DISP=SHR,DSN=F32BJD.LIBL
//            DD DISP=SHR,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,DSN=F11LHO.JADEGL
//            DD DISP=SHR,DSN=JADELG.LOAD
//            DD DISP=SHR,DSN=JADEPR.JADELD
//            DD DISP=SHR,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,DSN=F22NAR.TOFLIB.L
//            DD DISP=SHR,DSN=F11LHO.TAGG.L
//            DD DISP=SHR,DSN=R01UTL.CERN.PACKLIB4
//            DD DISP=SHR,DSN=F1EBLO.BOSLIB.L
//            DD DISP=SHR,DSN=F22YAM.TPLOAD
//            DD DISP=SHR,DSN=SYS1.FT77LNKL
//            DD DISP=SHR,DSN=SYS1.FT77LIB
//LKED.SYSIN DD *
 INCLUDE SYSLIB(JDMAIN0)
 INCLUDE SYSLIB(TG02MJPL,TLOOP24,WERTEX)
//GO.FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//GO.FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*                        INPUT ON TAPE
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR02GAM.NEU86AD
//*GO.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F32BJD.LOWTR.CETCUT
//*GO.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F32BJD.LOWTR.CUTCET
//*GO.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F32BJD.HIGHTR.CETCUTN
//*            DD UNIT=TAPE,DISP=OLD,DSN=F32BJD.LOWTR.CETCUT
//*    DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR016GAM.T203T213
//*                        INPUT ON DISK
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86BA4
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AM3
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AA4
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86CNU
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86CNV
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86CNW
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AD3
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AE3
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AF3
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AG3
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AH3
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AI3
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AJ3
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AK3
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AL3
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AM3
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AN3
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AO3
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AP3
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AQ3
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AR2
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AS2
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AT2
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AU2
//*           DD DISP=SHR,DSN=F11OLS.TR02GAM.BLL86AV2
//GO.FT02F001 DD DISP=SHR,DSN=F11OLS.ETA86.SUMNR2
//            DD DISP=SHR,DSN=F11OLS.ETA86.SUMNR3
//            DD DISP=SHR,DSN=F11OLS.ETA86.SUMNR4
//*                        OUTPUT:
//GO.FT03F001 DD DUMMY,DCB=R01DCB.VBS
//*            WRITE ON DISK
//*O.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*   SPACE=(TRK,(80,12),RLSE),DSN=F11OLS.TR02GAM.BLL86ENU
//*            WRITE ON TAPE
//*O.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F32BJD.HIGHTR.TAPE82A
//*            WRITE ON MASS STORAGE
//*O.FT03F001 DD DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*       MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR02GAM.BLL86AD3
//*O.FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*   DCB=(R01DCB.VBS,LRECL=6236),
//*       SPACE=(CYL,(150,10)),DSN=&&SCRTCH
    IT2ANA    INRED1    INRED2    IREPAT    ICALIB    ICALJC    MASTYP
         0         0         0         0         0         0         1
    ISLTRG    ITAGSL    ISELTG    IRCALZ    IVXCOR    IREFIT    IDV2TR
         0         0         0         0         6         0         0
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
         0    400000         0     32000         2         0         1
     IBDMX    NMBDMX    MINHIT    NTRMAX    IELCUT    IEKUTT     IPHMC
         1         3         8         9         1         0         6
     EKUTT    PTOTCT    RMINCT    ZMINCT    TOFCUT    EBLONE    EBLOEC
      0.00      0.10     20.00    200.00      4.00      0.05     45.00
     0.00     2.6000       0.0    3.1416       0.0     36.00    0.120
    3.1416     5.000   200.800      0.00    50.120  13597731
         0      2000       400       100         0         0         0
         0         0         0
    ETGCUT    FIMIN     THSMIN    THSMAX    THCUTL    THCUTH     EGMIN
    FIMAX     EGMAX     XMASMX    XMASMN     PTMAX    IRANDO
    IBJDSL    IT1ACC    IT1PSP    IT2CNC    IT1AAN    IT1PAN    IT2CAN
    ISEPSL    ITAGNW    IGAMSL
    BOTH RUN LIMITS ARE INCLUDED.
3.0718  (4 DEGREES)      2.7925  (20 DEGREE)
  ISEPSL = 1  SEPARATED BEAM DATA EXCLUDED  (RUNS 28697 - 28887)
  ISEPSL = 2  SEPARATED BEAM DATA SELECTED  (RUNS 28697 - 28887)
  IGAMSL = 0  ALL PHOTONS, -2 ONLY CONVERTED PHOTONS SELECTED
IBJDSL = 1:   SELECT SPECIAL TRIGGERS
  IT1ACC IS TRIGGER PATTERN FOR T1 ACCEPT, IN HEXADECIMAL FORM
  IT1PSP IS TRIGGER PATTERN FOR T1 POSTPONE, IN HEXADECIMAL FORM
  IT2CNC IS T2 TRACK COINCIDENCE BITS, IN HEXADECIMAL FORM
   USE IT1PSP=800 AND IT2CNC=200  FOR ZORN2 TRIGGER
   USE IT1PSP=200 AND IT2CNC= 10  FOR TBG * TAGG TRIGGER
  ZORNTRIGGER: IT1ACC=4000   OLSSON TRIGGER:  IT1ACC=2000  BOTH: 6000
  ZORNTRIGGER II: IT1PSP= 800    OLSSON TRIGGER II: IT1PSP=400
         ANTI TRIGGER BIT MASKS:
  IT1AAN IS MASK GIVING OTHER T1ACCEPT TRIGGERS TO BE EXCLUDED
  IT1PAN IS MASK GIVING OTHER T1POSTPONE TRIGGERS TO BE EXCLUDED
  IT2CAN IS CORRESPONDING T2 TRACK COINCIDENCE BITS
  SEE WORD12, TRIG1 DESCRIPTION IN JADE NOTE 32, SUPPLEMENT 5

CUTS BELOW USED FOR SELECONE
    00.00     2.6000       0.0    3.1416       0.0     47.00    0.140
    3.1416    50.000     4.800      0.00     2.120  13597731
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*COPY EXEC PGM=IEBGENER
//*SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*         DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*         DSN=F11OLS.TR02GAM.LGCALS6.TAP8216A
//*SYSPRINT DD SYSOUT=*
//*SYSIN DD DUMMY
C   28/03/97            MEMBER NAME  #TG12    (JADE56.S)    FORTRAN
//F11OLS   JOB 00010622,CLASS=K,MSGLEVEL=(1,0),TIME=(3,00)
//*MAIN RELPRI=LOW
//*
//*   SPECIAL VERSION FOR LOW ENERGY NEUTRAL TRIGGER EVENTS
//*
// EXEC FLG,PARM.LKED='SIZE=(600K,60K)',REGION.LKED=800K,
//  REGION.GO=1600K
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADENEWL
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADELD
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADE56.L
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.TAGG.L
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=F22NAR.TOFLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERN.KERNLIB4
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=F22YAM.TPLOAD
//LKED.SYSIN DD *
 INCLUDE SYSLIB(JDMAIN0,LGECORX,READPR9)
 INCLUDE SYSLIB(TG12,TLOOP24)
//GO.FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//GO.FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.RED2NEU.TAPE86DG
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.RED2NEU.TAPE86DH
//GO.FT02F001 DD DISP=SHR,DSN=F11OLS.ETAPIR.SUM1
//*                        OUTPUT:
//*GO.FT03F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//   SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.ETAP1286.NR1A
//*O.FT03F001 DD DISP=SHR,DSN=F11OLS.TEMPO.R21
//*GO.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*GO.FT03F001 DD DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.RZ22.MS80I
//*O.FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
    IT2ANA    INRED1    INRED2    IREPAT    ICALIB    ICALJC    MASTYP
         0         0         0         0        25         0         4
    ISLTRG    ITAGSL    ISELTG    IRCALZ    IVXCOR    IREFIT    IDV2TR
         0         0         0         0         6         0         0
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
         0      3000         0     32000         1         0         1
     IBDMX    NMBDMX    MINHIT    NTRMAX    IELCUT    IEKUTT     IPHMC
         1         5         8        15         1         0         6
     EKUTT    PTOTCT    RMINCT    ZMINCT    TOFCUT    EBLONE    EBLOEC
  99999.00      0.03     40.00    200.00      4.00      0.05     45.00
HDATE: SEC       MIN      HOUR       DAY     MONTH      YEAR
         1         1         1        17         5      1986
    BOTH RUN LIMITS ARE INCLUDED.
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR12GAM.NEU86DGL
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
//F11OLS   JOB 00010622,CLASS=K,MSGLEVEL=(1,0),TIME=(3,00)
//*MAIN RELPRI=LOW
//*
//*   SPECIAL VERSION FOR LOW ENERGY NEUTRAL TRIGGER EVENTS
//*
// EXEC FLG,PARM.LKED='SIZE=(600K,60K)',REGION.LKED=800K,
//  REGION.GO=1600K
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADENEWL
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADELD
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADE56.L
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.TAGG.L
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=F22NAR.TOFLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERN.KERNLIB4
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=F22YAM.TPLOAD
//LKED.SYSIN DD *
 INCLUDE SYSLIB(JDMAIN0,LGECORX,READPR9)
 INCLUDE SYSLIB(TG12,TLOOP24)
//GO.FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//GO.FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.RED2NEU.TAPE86DG
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.RED2NEU.TAPE86DH
//GO.FT02F001 DD DISP=SHR,DSN=F11OLS.ETAPRI.SUM1
//*           DD DISP=SHR,DSN=F11OLS.ETA86.SUMNR9C
//*                        OUTPUT:
//*GO.FT03F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//   SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.ETAP1286.NR1B
//*O.FT03F001 DD DISP=SHR,DSN=F11OLS.TEMPO.R21
//*GO.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*GO.FT03F001 DD DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.RZ22.MS80I
//*O.FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
    IT2ANA    INRED1    INRED2    IREPAT    ICALIB    ICALJC    MASTYP
         0         0         0         0        25         0         4
    ISLTRG    ITAGSL    ISELTG    IRCALZ    IVXCOR    IREFIT    IDV2TR
         0         0         0         0         6         0         0
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
      3001      6000         0     32000         1         0         1
     IBDMX    NMBDMX    MINHIT    NTRMAX    IELCUT    IEKUTT     IPHMC
         1         5         8        15         1         0         6
     EKUTT    PTOTCT    RMINCT    ZMINCT    TOFCUT    EBLONE    EBLOEC
  99999.00      0.03     40.00    200.00      4.00      0.05     45.00
HDATE: SEC       MIN      HOUR       DAY     MONTH      YEAR
         1         1         1        17         5      1986
    BOTH RUN LIMITS ARE INCLUDED.
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR12GAM.NEU86DGL
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
C   28/03/97            MEMBER NAME  #TG12FS  (JADE56.S)    FORTRAN
//F11JOL   JOB CLASS=E,MSGLEVEL=(1,0),TIME=(0,15)
//*MAIN RELPRI=LOW
// EXEC FCLG,PARM.LKED='SIZE=(600K,60K)',REGION.LKED=800K,
//  REGION.GO=800K
      CALL BLOCK
      CALL TG12FS
      STOP
      END
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADENEWL
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADELD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERN.KERNLIB4
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//LKED.SYSIN DD *
 INCLUDE SYSLIB(NEUTHSX)
//*                        INPUT:
//GO.FT04F001 DD DISP=SHR,DSN=F11OLS.TR12FS.ENGLOSMX.BSUM1T4A
//            DD DISP=SHR,DSN=F11OLS.TR12FS.ENGLOSMX.BSUM1T4B
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR12FS.ENGLOSX.MCNR1T5
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.ENGLOSX.MCNR6T9
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.ENGLOSX.MCANR1T5
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.ENGLOSX.MCANR6T9
//*                        OUTPUT:
//GO.FT03F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT14F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT01F001 DD DUMMY,DCB=R01DCB.VBS
//*O.FT01F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*  SPACE=(TRK,(1,1),RLSE),DSN=F11OLS.RV12.NEU85A
//*GO.FT01F001 DD UNIT=FAST,DISP=SHR,DSN=F11OLS.RV12.NEU85B
    MAXEV1    MAXEV2    HRUNMI    HRUNMX      IPRO     IHIST    IBADSC
         0    100000         0     32000         0         1         0
    ISLTRG    ITAGSL    I12GEV    ISELTG    LABTAG    IDTGRJ    IRUNEV
      2000         0         0      2000         5         0         1
    MINHIT    INCLST    NCLMIN    NCLMAX    NTRMAX     IBDMX    NMBDMX
         8         0         0        99        15         0         0
    IERGLS    IVXCOR    MASTYP    ICOPLA    IEEGAM    IGMTYP    IEGLOW
         1         7         4         0         0        10         0
    IELREJ    IELBLC     IDEDX    IDDXPR    IDDXKA    IDDXPI    IDDXEL
         0         0         0         0         0        10         0
    MODXCT    IDDXLB    IDDXRJ    IDDXFL    ITOFLB
         0         0         0         0         0
    ITOFCT    ITOFPR    ITOFKA    ITOFPI    ITOFEL
         0         0         0        10         0
    IZSMCT    IZDICT    IZ2CUT    IZDFCT    IRHIT1    IDV2TR
         0         0         0         0         0         0
      ZCUT    ZMINCT    ZMAXCT    ZDFCUT    XRHIT1    RMINCT    RMAXCT
     70.00    200.00     -1.00     90.00    500.00     40.00     -1.00
    IEKUTT    IPSMCT    IPSICT    IPTCUT    IECHRJ    IETOTL    IPSIPT
         0         0         0         0         0         0         0
     EKUTT    PTOCUT    PSICUT     PTCUT    ECHCUT    ETOTAL    PTSICT
   4000.00      7.00      5.00      0.25      1.00      3.00      0.45
    IHTRFI     IHTRZ    ICHRFI     ICHRZ    IBLSEL    IBLOC1    ICOSGM
         0         2         0         0         0        10         0
    PTOTCT    TOFCUT    CHIRFI     CHIRZ    CSTRCT    PEGCT1    PEGCT2
      0.03      4.00       .30     60.00      1.10      0.04     99.99
    LMDEAD    IGCLRJ    IMCGAM    IEFFGM    IMCTOF    INRTOF    IPIABS
         0         0      1985         0         0         0         1
    IPT2CT     IACO1     IACO2    ILOWHT    ILOWMO    ICOLLI    IPARAL
         0         0         0         0         0         0         0
    PT2CUT      ACO1      ACO2    EPSILO    CSGMLM    ETHRES
      0.05      0.35      0.05      0.26      0.96     25.00
    IMDIST    ICUTOP    ICRENM    IENCUT     ICOSO
         0         0         0         0         0
       BIN    CUTVR1    CUTVR2     ENCUT    CSOPCT
      2.00      1.20      1.48      0.10     -0.97
    ITRS80    ITRA82    ITRP82    IATS80    IATA82    IATP82
         0      2000       400         0         0         0
    IT2ACC    IAT2CC
         0         0
      0.90      1.02      0.60      1.00
      0.45      0.65      0.06      0.22
         0
       ET1       ET2      RHO1      RHO2
      ETA1      ETA2      PI01      PI02
    ISCB12
C   28/03/97            MEMBER NAME  #TG12GPN (JADE56.S)    FORTRAN
//F11OLS   JOB CLASS=A,MSGLEVEL=(1,0),TIME=(1,00)
//*MAIN RELPRI=LOW
// EXEC GEP,PARM.LKED='LIST',REGION.GO=950K,VS=HBOOK,
//      DN='F11OLS.GP12NC86.NEUNR1'
      CALL BLOCK
      CALL TG12GP
      STOP
      END
//LKED.SYSLIB DD
//            DD
//            DD
//            DD
//            DD
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADENEWL
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADELD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//*           DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERN.KERNLIB4
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//*                        INPUT:
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR12FS.ETPPGGS2
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR12FS.NEU85A
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.NEU85DF1
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.NEU85GI1
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.NEU85JL1
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR12FS.NEU86A1
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.NEU86A2
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.NEU86A3
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.NEU86A4
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.NEU86B1
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.NEU86B2
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.NEU86B3
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.NEU86B4
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.NEU86B5
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.NEU86C1
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.NEU86C2
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.NEU86C3
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.NEU86D1
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.NEU86D2
//*           DD DISP=SHR,DSN=F11OLS.TR12FS.NEU86D3
//*    M C
//GO.FT04F001 DD DISP=SHR,DSN=F11OLS.TR12FS.ENGLOSX.TJELBBWT.PCP7MRAB
//            DD DISP=SHR,DSN=F11OLS.TR12FS.ENGLOSX.TJELBBWT.PCP7MRCD
//            DD DISP=SHR,DSN=F11OLS.TR12FS.ENGLOSX.TJELBBWT.PCP7MREF
//            DD DISP=SHR,DSN=F11OLS.TR12FS.ENGLOSX.TJELBBWT.PCP7MRGI
//*
//*                        OUTPUT:
//GO.FT03F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT14F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT01F001 DD DUMMY,DCB=R01DCB.VBS
//*O.FT01F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*  SPACE=(TRK,(1,1),RLSE),DSN=F11OLS.RV12.NEU86.ETABAND1
//*GO.FT01F001 DD UNIT=FAST,DISP=SHR,DSN=F11OLS.RV12.NEU85B
    MAXEV1    MAXEV2    HRUNMI    HRUNMX      IPRO     IHIST    IBADSC
         0    100000         0     32584         0         1         0
    ISLTRG    ITAGSL    I12GEV    ISELTG    LABTAG    IDTGRJ    IRUNEV
      2000         0         0      2000         5         0         0
    MINHIT    INCLST    NCLMIN    NCLMAX    NTRMAX     IBDMX    NMBDMX
         8         0         0        99        15         0         0
    IERGLS    IVXCOR    MASTYP    ICOPLA    IEEGAM    IGMTYP    IEGLOW
         1         7         4         0         0        10         0
    IELREJ    IELBLC     IDEDX    IDDXPR    IDDXKA    IDDXPI    IDDXEL
         0         0         0         0         0        10         0
    MODXCT    IDDXLB    IDDXRJ    IDDXFL    ITOFLB
         0         0         0         0         0
    ITOFCT    ITOFPR    ITOFKA    ITOFPI    ITOFEL
         0         0         0        10         0
    IZSMCT    IZDICT    IZ2CUT    IZDFCT    IRHIT1    IDV2TR
         0         0         0         0         0         0
      ZCUT    ZMINCT    ZMAXCT    ZDFCUT    XRHIT1    RMINCT    RMAXCT
     70.00    200.00     -1.00     90.00    500.00     40.00     -1.00
    IEKUTT    IPSMCT    IPSICT    IPTCUT    IECHRJ    IETOTL    IPSIPT
         0         0         0         0         0         0         0
     EKUTT    PTOCUT    PSICUT     PTCUT    ECHCUT    ETOTAL    PTSICT
   4000.00      7.00      5.00      0.25      1.00      3.00      0.45
    IHTRFI     IHTRZ    ICHRFI     ICHRZ    IBLSEL    IBLOC1    ICOSGM
         0         2         0         0         0        10         0
    PTOTCT    TOFCUT    CHIRFI     CHIRZ    CSTRCT    PEGCT1    PEGCT2
      0.03      4.00       .30     60.00      1.10      0.04     99.99
    LMDEAD    IGCLRJ    IMCGAM    IEFFGM    IMCTOF    INRTOF    IPIABS
         0         0      1985         0         0         0         1
    IPT2CT     IACO1     IACO2    ILOWHT    ILOWMO    ICOLLI    IPARAL
         0         0         0         0         0         0         0
    PT2CUT      ACO1      ACO2    EPSILO    CSGMLM    ETHRES
      0.05      0.35      0.05      0.26      0.96     25.00
    IMDIST    ICUTOP    ICRENM    IENCUT     ICOSO
         0         0         0         0         0
       BIN    CUTVR1    CUTVR2     ENCUT    CSOPCT
      2.00      1.20      1.48      0.10     -0.97
    ITRS80    ITRA82    ITRP82    IATS80    IATA82    IATP82
         0      2000       400         0         0         0
    IT2ACC    IAT2CC
         0         0
      0.90      1.02      0.60      1.00
      0.35      0.80      0.06      0.22
         0
       ET1       ET2      RHO1      RHO2
      ETA1      ETA2      PI01      PI02
    ISCB12
C   28/03/97            MEMBER NAME  #TG22    (JADE56.S)    FORTRAN
//F11OLS   JOB 00010622,CLASS=K,MSGLEVEL=(1,0),TIME=(3,00)
//*MAIN RELPRI=LOW
//*
//*   SPECIAL VERSION FOR LOW ENERGY NEUTRAL TRIGGER EVENTS
//*
// EXEC FLG,PARM.LKED='SIZE=(600K,60K)',REGION.LKED=800K,
//  REGION.GO=1600K
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADENEWL
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADELD
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADE56.L
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=F22NAR.TOFLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERN.KERNLIB4
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=F22YAM.TPLOAD
//LKED.SYSIN DD *
 INCLUDE SYSLIB(JDMAIN0,LGECORWT,RDALGNDB,READPR9)
 INCLUDE SYSLIB(TG22,TLOOP24,SPINNRY)
//GO.FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//GO.FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.RED2NEU.TAPE86EY
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.RED2NEU.TAPE86ET
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.RED2NEU.TAPE86FX
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.RED2NEU.TAPE86DS
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR2NGAM.NEU86R1
//*  DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR2NGAM.NEU86S1
//*  DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR21GAM.NEU85C1
//GO.FT02F001 DD DISP=SHR,DSN=F11OLS.ETAPRI.SUM10
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.TR22GAM.MNEU86Q2
//*                        OUTPUT:
//*O.FT03F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//   SPACE=(TRK,(80,12),RLSE),DSN=F11OLS.ETAP2286.TJELM10A
//*O.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAPMM86.NR1T4
//*GO.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*O.FT03F001 DD DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR22GAM.NJS86EST
//*O.FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
    IT2ANA    INRED1    INRED2    IREPAT    ICALIB    ICALJC    MASTYP
         0         0         0         0        25         0         4
    ISLTRG    ITAGSL    ISELTG    IRCALZ    IVXCOR    IREFIT    IDV2TR
         0         0         0         0         6         0         0
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
         0      3000         0     32000         1         0         1
     IBDMX    NMBDMX    MINHIT    NTRMAX    IELCUT    IEKUTT     IPHMC
         1         5         8        15         1         0         6
     EKUTT    PTOTCT    RMINCT    ZMINCT    TOFCUT    EBLONE    EBLOEC
  99999.00      0.03     40.00    200.00      4.00      0.05     45.00
HDATE: SEC       MIN      HOUR       DAY     MONTH      YEAR
         1         1         1        17         5      1986
    BOTH RUN LIMITS ARE INCLUDED.
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR22GAM.NJS86DTU
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
//F11OLS   JOB 00010622,CLASS=K,MSGLEVEL=(1,0),TIME=(3,00)
//*MAIN RELPRI=LOW
//*
//*   SPECIAL VERSION FOR LOW ENERGY NEUTRAL TRIGGER EVENTS
//*
// EXEC FLG,PARM.LKED='SIZE=(600K,60K)',REGION.LKED=800K,
//  REGION.GO=1600K
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADENEWL
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADELD
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADE56.L
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=F22NAR.TOFLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERN.KERNLIB4
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=F22YAM.TPLOAD
//LKED.SYSIN DD *
 INCLUDE SYSLIB(JDMAIN0,LGECORWT,RDALGNDB,READPR9)
 INCLUDE SYSLIB(TG22,TLOOP24,SPINNRY)
//GO.FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//GO.FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.RED2NEU.TAPE86EY
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.RED2NEU.TAPE86ET
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.RED2NEU.TAPE86FX
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.RED2NEU.TAPE86DS
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR2NGAM.NEU86R1
//*  DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR2NGAM.NEU86S1
//*  DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR21GAM.NEU85C1
//GO.FT02F001 DD DISP=SHR,DSN=F11OLS.ETAPRI.SUM10
//*           DD DISP=SHR,DSN=F11OLS.ETA86.SUMNR9C
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.TR22GAM.MNEU86Q2
//*                        OUTPUT:
//*O.FT03F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//   SPACE=(TRK,(80,12),RLSE),DSN=F11OLS.ETAP2286.TJELM10B
//*O.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAPMM86.NR5T9
//*GO.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*O.FT03F001 DD DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR22GAM.NJS86EST
//*O.FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
    IT2ANA    INRED1    INRED2    IREPAT    ICALIB    ICALJC    MASTYP
         0         0         0         0        25         0         4
    ISLTRG    ITAGSL    ISELTG    IRCALZ    IVXCOR    IREFIT    IDV2TR
         0         0         0         0         6         0         0
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
      3001      6000         0     32000         1         0         1
     IBDMX    NMBDMX    MINHIT    NTRMAX    IELCUT    IEKUTT     IPHMC
         1         5         8        15         1         0         6
     EKUTT    PTOTCT    RMINCT    ZMINCT    TOFCUT    EBLONE    EBLOEC
  99999.00      0.03     40.00    200.00      4.00      0.05     45.00
HDATE: SEC       MIN      HOUR       DAY     MONTH      YEAR
         1         1         1        17         5      1986
    BOTH RUN LIMITS ARE INCLUDED.
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR22GAM.NJS86DTU
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
//F11OLS   JOB 00010622,CLASS=K,MSGLEVEL=(1,0),TIME=(3,00)
//*MAIN RELPRI=LOW
//*
//*   SPECIAL VERSION FOR LOW ENERGY NEUTRAL TRIGGER EVENTS
//*
// EXEC FLG,PARM.LKED='SIZE=(600K,60K)',REGION.LKED=800K,
//  REGION.GO=1600K
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADENEWL
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADELD
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADE56.L
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=F22NAR.TOFLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERN.KERNLIB4
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=F22YAM.TPLOAD
//LKED.SYSIN DD *
 INCLUDE SYSLIB(JDMAIN0,LGECORWT,RDALGNDB,READPR9)
 INCLUDE SYSLIB(TG22,TLOOP24,SPINNRY)
//GO.FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//GO.FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.RED2NEU.TAPE86EY
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.RED2NEU.TAPE86ET
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.RED2NEU.TAPE86FX
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.RED2NEU.TAPE86DS
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11OLS.TR2NGAM.NEU86R1
//*  DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR2NGAM.NEU86S1
//*  DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.TR21GAM.NEU85C1
//GO.FT02F001 DD DISP=SHR,DSN=F11OLS.ETAPRI.SUM8
//*           DD DISP=SHR,DSN=F11OLS.ETA86.SUMNR9C
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.TR22GAM.MNEU86Q2
//*                        OUTPUT:
//*O.FT03F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//   SPACE=(TRK,(80,12),RLSE),DSN=F11OLS.ETAP2286.TJELM8C
//*O.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAPMM86.NR5T9
//*GO.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*O.FT03F001 DD DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*        MSVGP=VTMP,UNIT=3330V,DSN=F11OLS.TR22GAM.NJS86EST
//*O.FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
    IT2ANA    INRED1    INRED2    IREPAT    ICALIB    ICALJC    MASTYP
         0         0         0         0        25         0         4
    ISLTRG    ITAGSL    ISELTG    IRCALZ    IVXCOR    IREFIT    IDV2TR
         0         0         0         0         6         0         0
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
      6001    300000         0     32000         1         0         1
     IBDMX    NMBDMX    MINHIT    NTRMAX    IELCUT    IEKUTT     IPHMC
         1         5         8        15         1         0         6
     EKUTT    PTOTCT    RMINCT    ZMINCT    TOFCUT    EBLONE    EBLOEC
  99999.00      0.03     40.00    200.00      4.00      0.05     45.00
HDATE: SEC       MIN      HOUR       DAY     MONTH      YEAR
         1         1         1        17         5      1986
    BOTH RUN LIMITS ARE INCLUDED.
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR22GAM.NJS86DTU
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
C   28/03/97            MEMBER NAME  #TG22FSN (JADE56.S)    FORTRAN
//F11OLS   JOB 00010622,CLASS=E,MSGLEVEL=(1,0),TIME=(0,15)
//*MAIN RELPRI=LOW
// EXEC FCLG,PARM.LKED='SIZE=(600K,60K)',REGION.LKED=800K,
//  REGION.GO=900K
      CALL BLOCK
      CALL TG22FS
      STOP
      END
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,DSN=F11OLS.JADENEWL
//            DD DISP=SHR,DSN=F11OLS.JADELD
//            DD DISP=SHR,DSN=F11LHO.JADEGL
//            DD DISP=SHR,DSN=F22YAM.U.L
//            DD DISP=SHR,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,DSN=R01UTL.CERN.KERNLIB4
//            DD DISP=SHR,DSN=F22PWA.CERNLIB2
//            DD DISP=SHR,DSN=F1EBLO.BOSLIB.L
 INCLUDE SYSLIB(READCR9,REJEC19,ANGL22Y,VIKT22Y)
//*                        INPUT:
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86A2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86B2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86C2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86D2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86E2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86F2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86G2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86H2
//**          DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86I2
//**          DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86J2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86K2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86L2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86M2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86N2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86O2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86P2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86Q2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86RS2
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSM.NEU86AF2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSM.NEU86GL2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSM.NEU86MS2
//*
//GO.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TNR1T3
//            DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TNR4T6
//            DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TNR7T8
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MM1T4120
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MM5T9120
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MM1T4126
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MM5T9126
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NC1T9115
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NR1T9115
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NC1T9120
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NR1T9120
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NC1T9126
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NR1T9126
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NC1T9
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NR1T9
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NR2T5126
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NR6T1126
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NR2T5130
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NR6T1130
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NR2T5120
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NR6T1120
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NR2T5110
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NR6T1110
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MMNR1T4
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MMNR5T9
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSMX.BSUM1T4A
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSMX.BSUM1T4B
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MCANR2T5
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MCANR6T1
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MCNR2T5
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MCNR6T1
//*                        OUTPUT:
//GO.FT03F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT14F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT01F001 DD DUMMY,DCB=R01DCB.VBS
//*O.FT01F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*  SPACE=(TRK,(1,1),RLSE),DSN=F11OLS.RV22.NEU86N2
//*GO.FT01F001 DD DISP=SHR,DSN=F11OLS.RV22
    MAXEV1    MAXEV2    HRUNMI    HRUNMX      IPRO     IHIST    IBADSC
         0    400000         0     32000         0         4         0
    ISLTRG    ITAGSL    I12GEV    ISELTG    LABTAG    IDTGRJ    IRUNEV
      2000         0         0      2000         5         0         1
    MINHIT    INCLST    NCLMIN    NCLMAX    NTRMAX     IBDMX    NMBDMX
         8         0         0        99        15         0         0
    IERGLS    IVXCOR    MASTYP    ICOPLA    IEEGAM    IGMTYP    IEGLOW
         1         7         4         0         0        10         0
    IELREJ    IELBLC     IDEDX    IDDXPR    IDDXKA    IDDXPI    IDDXEL
         0         0         0         0         0        10         0
    MODXCT    IDDXLB    IDDXRJ    IDDXFL    ITOFLB
         0         0         0         0         0
    ITOFCT    ITOFPR    ITOFKA    ITOFPI    ITOFEL
         0         0         0        10         0
    IZSMCT    IZDICT    IZ2CUT    IZDFCT    IRHIT1    IDV2TR
         0         0         0         0         0         0
      ZCUT    ZMINCT    ZMAXCT    ZDFCUT    XRHIT1    RMINCT    RMAXCT
     70.00    200.00     -1.00     90.00    500.00     40.00     -1.00
    IEKUTT    IPSMCT    IPSICT    IPTCUT    IECHRJ    IETOTL    IPSIPT
         0         0         0         0         0         0         0
     EKUTT    PTOCUT    PSICUT     PTCUT    ECHCUT    ETOTAL    PTSICT
   4000.00      7.00      3.00      0.25      1.00      3.00      0.45
    IHTRFI     IHTRZ    ICHRFI     ICHRZ    IBLSEL    IBLOC1    ICOSGM
         0         2         0         0         0        10         0
    PTOTCT    TOFCUT    CHIRFI     CHIRZ    CSTRCT    PEGCT1    PEGCT2
      0.03      4.00       .30     60.00      1.15      0.04     99.30
    LMDEAD    IGCLRJ    IMCGAM    IEFFGM    IMCTOF    INRTOF    IPIABS
         1         0      1982         0         0         8         1
    IPT2CT     IACO1     IACO2    ILOWHT    ILOWMO    ICOLLI    IPARAL
         0         0         0         0         0         0         0
    PT2CUT      ACO1      ACO2    EPSILO    CSGMLM    ETHRES
      0.05      0.35      0.05      0.26      0.96     25.00
    IMDIST    ICUTOP    ICRENM    IENCUT     ICOSO
         0         0         0         0         0
       BIN    CUTVR1    CUTVR2     ENCUT    CSOPCT
      0.06      1.20      1.48      0.10     -0.97
    ITRS80    ITRA82    ITRP82    IATS80    IATA82    IATP82
         0      2000       400         0         0         0
    IT2ACC    IAT2CC
       100         0
HDATE: SEC       MIN      HOUR       DAY     MONTH      YEAR
         1         1         1        17         5      1986
----------------------**  RD22EX  **------------------------------------
       ET1       ET2       RH1       RH2    I21CUT    ICSOPG    ICSLOG
      0.87      1.11      0.60      1.00         0         0         0
      ETA1      ETA2      PI01      PI02    CUTOPG    CUTLOG
      0.35      0.80      0.03      0.25      0.99      0.00
    A2MAS1    A2MAS2     IPLPH    IT2000    IANGUL    IVIKTY    SCALEM
      1.15      1.55         0         1         0         0      4.00
    ICNVCT    CNVCUT    ICOSTG    CTGCUT     ETAC1     ETAC2    IRANDO
         0      0.99         2      0.98      2.60      3.30         0
    IKINFI      DFIA      DFIB     DTHEA     DTHEB    FACKIN    MCLUMI
         0      .021      .030      .030      .030     0.600         0
     LUMI1     LUMI2     LUMI3     LUMI4    DELBG1    DELBG2    ISCB22
     20912     20956     42477     52218      0.10      0.25         0
     PERC1     PERC2     PERC3     PERC4    IDXRJN    IFLRJN    IFLUGM
      3.47      9.77     48.35     38.43         0         4         0
    ICORA2     GGET1     GGET2    IDELFI     DELFI    IHEQRJ
         0      0.80      1.10         0      4.00         0
    IMCGAM: EQUAL TO YEAR FOR WHICH STATUS IS VALID.
 R10599 FIRST RUN WITH TBGNS TRIGGER
C   28/03/97            MEMBER NAME  #TG22GPN (JADE56.S)    FORTRAN
//F11JLL   JOB 00010622,CLASS=K,MSGLEVEL=(2,0),TIME=(1,25)
//*MAIN RELPRI=LOW
// EXEC GEP,PARM.LKED='LIST',REGION.GO=950K,VS=HBOOK,
//      DN='F11OLS.GP22NC86.NEUNR43'
      CALL BLOCK
      CALL TG22GP
      STOP
      END
//LKED.SYSLIB DD
//            DD
//            DD
//            DD
//            DD
//            DD DISP=SHR,DSN=F11OLS.JADENEWL
//            DD DISP=SHR,DSN=F11OLS.JADELD
//            DD DISP=SHR,DSN=F11LHO.JADEGL
//            DD DISP=SHR,DSN=F22YAM.U.L
//            DD DISP=SHR,DSN=R01UTL.CERN.KERNLIB4
//            DD DISP=SHR,DSN=F22PWA.CERNLIB2
//            DD DISP=SHR,DSN=F1EBLO.BOSLIB.L
 INCLUDE SYSLIB(ANGL22Y,VIKT22Y,READCR9,REJEC19)
//*                        INPUT:
//*GO.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.NEUTRAL.SUM82E
//*            DD DISP=SHR,DSN=F11OLS.TR22FS.R28482B
//*            DD DISP=SHR,DSN=F11OLS.TR22FS.NEUTRAL.SUM82G
//*            DD DISP=SHR,DSN=F11OLS.TR22FS.NEUTRAL.COLL8384
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.BBLEAK.ALL8386
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.BBLEAK.LGECORWT.ALL8386
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSM.NEU86AF2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSM.NEU86GL2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSM.NEU86MS2
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.NEU82A1
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU82B1
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.NEU8384A
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU85A
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU85B
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU85C
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU85D
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86AQ2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.NEU86RS2
//*    M C
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NPTJ1T3
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NPTJ4T6
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NPTJ7T11
//*
//GO.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELBBWT.PCP7MR13
//            DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELBBWT.PCP7MR46
//            DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELBBWT.PCP7MR79
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELBBWT.PAPAMR13
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELBBWT.PAPAMR46
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELBBWT.PAPAMR79
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELBBWT.MR13
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELBBWT.MR46
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELBBWT.MR79
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELBBWT.M3M0NR13
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELBBWT.M3M0NR46
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELBBWT.M3M0NR79
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELPPWT.M3M0NR13
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELPPWT.M3M0NR46
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELPPWT.M3M0NR79
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELPPWT.M5M5NR13
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELPPWT.M5M5NR46
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELPPWT.M5M5NR79
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELPPWT.NR13
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELPPWT.NR46
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJELPPWT.NR79
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPWT.NRNO
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPWT.NRPQ
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPWT.NRRS
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPWT.NRTU
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPWT.NR13
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPWT.NR46
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPWT.NR79
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPWT.NRAC
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPWT.NRDE
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPWT.NRFH
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPWT.NRIK
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPWT.NRLM
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPZT.NR13
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPZT.NR46
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPZT.NR79
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPZT.NRAC
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPZT.NRDE
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPZT.NRFH
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPZT.NRIK
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PPZT.NRLM
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PP1.NR13
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PP1.NR46
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PP1.NR79
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40YT.P7P479
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40YT.P7P4AC
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40YT.P7P4DE
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40EG.P7P479
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40EG.P7P4AC
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40EG.P7P4DE
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40.P7P479
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40.P7P4AC
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40.P7P4DE
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40.P7P413
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40.P7P446
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40.P7M413
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40.P7M446
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ201T3
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ204T6
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ207
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NPTJ01T3
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NPTJ04T6
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PA13
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40PA46
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40P513
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TJ40P546
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NPEO1T3
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NPEO4T6
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NTJ401T3
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NTJ404T6
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.P10M1T3
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.P10M4T6
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.P10M7T11
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.P5M51T3
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.P5M54T6
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.P5M57T11
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NPEC1T3
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NPEC4T6
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NPEC7T8
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NP571T3
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NP574T6
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NP577T8
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NP611T3
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NP614T6
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NP617T8
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NP593T5
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NP596T8
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NP603T5
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NP606T8
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NP583T5
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NP586T8
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TNOTR1T2
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TNOTR3T4
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TNOTR5T6
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TNOTR7T8
//*  OLD SF5
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TNR1T3
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TNR4T6
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.TNR7T8
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MM1T4115
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MM5T9115
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MM1T4126
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MM5T9126
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MM1T4120
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MM5T9120
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MMNR1T4
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.MMNR5T9
//*
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NR1T9
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NC1T9
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NR1T9115
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NC1T9115
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NR1T9120
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NC1T9120
//*O.FT04F001 DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NR1T9126
//*           DD DISP=SHR,DSN=F11OLS.TR22FS.ENGLOSX.NC1T9126
//*
//*                        OUTPUT:
//GO.FT03F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT14F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT01F001 DD DUMMY,DCB=R01DCB.VBS
//*GO.FT14F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   SPACE=(TRK,(1,1),RLSE),DSN=F11OLS.DISTA2.NR2
//*GO.FT01F001 DD DISP=SHR,DSN=F11OLS.RV22
    MAXEV1    MAXEV2    HRUNMI    HRUNMX      IPRO     IHIST    IBADSC
         0    100000         0     32500         0         4         0
    ISLTRG    ITAGSL    I12GEV    ISELTG    LABTAG    IDTGRJ    IRUNEV
      2000         0         0      2000         5         0         1
    MINHIT    INCLST    NCLMIN    NCLMAX    NTRMAX     IBDMX    NMBDMX
         8         0         0        99        15         0         0
    IERGLS    IVXCOR    MASTYP    ICOPLA    IEEGAM    IGMTYP    IEGLOW
         1         7         4         0         0         0         0
    IELREJ    IELBLC     IDEDX    IDDXPR    IDDXKA    IDDXPI    IDDXEL
         0         0         0         0         0        10         0
    MODXCT    IDDXLB    IDDXRJ    IDDXFL    ITOFLB
         0         0         0         0         0
    ITOFCT    ITOFPR    ITOFKA    ITOFPI    ITOFEL
         0         0         0        10         0
    IZSMCT    IZDICT    IZ2CUT    IZDFCT    IRHIT1    IDV2TR
         0         0         0         0         0         0
      ZCUT    ZMINCT    ZMAXCT    ZDFCUT    XRHIT1    RMINCT    RMAXCT
     70.00    200.00     -1.00     90.00    500.00     40.00     -1.00
    IEKUTT    IPSMCT    IPSICT    IPTCUT    IECHRJ    IETOTL    IPSIPT
         0         0         0         0         0         0         0
     EKUTT    PTOCUT    PSICUT     PTCUT    ECHCUT    ETOTAL    PTSICT
   4000.00      7.00      3.00      0.25      1.00      3.00      0.45
    IHTRFI     IHTRZ    ICHRFI     ICHRZ    IBLSEL    IBLOC1    ICOSGM
         0         2         0         0         0        10         0
    PTOTCT    TOFCUT    CHIRFI     CHIRZ    CSTRCT    PEGCT1    PEGCT2
      0.03      4.00       .30     60.00      1.15      0.04     99.30
    LMDEAD    IGCLRJ    IMCGAM    IEFFGM    IMCTOF    INRTOF    IPIABS
         1         0      1982         0         0         8         1
    IPT2CT     IACO1     IACO2    ILOWHT    ILOWMO    ICOLLI    IPARAL
         0         0         0         0         0         0         0
    PT2CUT      ACO1      ACO2    EPSILO    CSGMLM    ETHRES
      0.05      0.35      0.05      0.26      0.96     25.00
    IMDIST    ICUTOP    ICRENM    IENCUT     ICOSO
         0         0         0         0         0
       BIN    CUTVR1    CUTVR2     ENCUT    CSOPCT
      0.06      1.20      1.48      0.10     -0.97
    ITRS80    ITRA82    ITRP82    IATS80    IATA82    IATP82
         0      2000       400         0         0         0
    IT2ACC    IAT2CC
       100         0
HDATE: SEC       MIN      HOUR       DAY     MONTH      YEAR
         1         1         1        17         5      1986
----------------------**  RD22EX  **------------------------------------
       ET1       ET2       RH1       RH2    I21CUT    ICSOPG    ICSLOG
      0.93      1.00      0.60      1.00         0         0         0
      ETA1      ETA2      PI01      PI02    CUTOPG    CUTLOG
      0.30      0.80      0.03      0.25      0.99      0.00
    A2MAS1    A2MAS2     IPLPH    IT2000    IANGUL    IVIKTY    SCALEM
      1.15      1.55         0         1         0         0      4.00
    ICNVCT    CNVCUT    ICOSTG    CTGCUT     ETAC1     ETAC2    IRANDO
         0      0.99         2      0.98      2.60      3.30         0
    IKINFI      DFIA      DFIB     DTHEA     DTHEB    FACKIN    MCLUMI
         0      .021      .030      .030      .030     0.600         0
     LUMI1     LUMI2     LUMI3     LUMI4    DELBG1    DELBG2    ISCB22
     20912     20956     42477     52218      0.10      0.25         1
     PERC1     PERC2     PERC3     PERC4    IDXRJN    IFLRJN    IFLUGM
      3.47      9.77     48.35     38.43         0         4         0
    ICORA2     GGET1     GGET2    IDELFI     DELFI    IHEQRJ
         0      0.80      1.10         0      4.00         0
    IMCGAM: EQUAL TO YEAR FOR WHICH STATUS IS VALID.
 R10599 FIRST RUN WITH TBGNS TRIGGER
C   28/03/97            MEMBER NAME  #UNIGAM  (JADE56.S)    FORTRAN
//F11OLS   JOB 00010622,OLSSON,CLASS=E,TIME=(0,15)
//*MAIN ORG=EXT,RELPRI=LOW
// EXEC FCLG,PARM.LKED='SIZE=(600K,60K)',REGION.LKED=800K,
//  REGION.GO=800K
C
C  GENERATE MONOCHROMATIC PHOTONS, 1/EVENT, AT VARIOUS DIRECTIONS
C     LAST CHANGE 25.4.1987
C
C     COMMON // BLCOMM(2000)
C
      COMMON/CPROD/IDUM(6),NPROD,NCHRG,NNEUT,PPROD(4,30),
     1 XMASS(30),ICHRG(30),ITYPE(30),IPOINT(30,2),
     2 NFIN,NCHRFI,NNEUFI,PFIN(4,100),
     3 XMSFIN(100),ICHRFI(100),ITPFIN(100),PSTRT(3,100)
C
      DIMENSION ZMID(10),DZ(10)
      DATA ZMID / 50.,150.,250.,350.,500.,700.,900.,1100.,1300.,1500./
      DATA DZ   / 50., 50., 50., 50.,100.,100.,100., 100., 100., 100./
C
      PI=ARCOS(-1.)
      TWOPI = 2.*PI
      PIHALF = .5*PI
C
C     CALL HBOOK1(1,' PHI OF PHOTON $',100,0.0,6.5)
C
      EBEAM=17.5D0
      EECCMM = 2.*EBEAM
      CALL MTSTRT(EECCMM)
      IRAN=34466873
      WRITE(6,368) IRAN
368   FORMAT(' IRAN = ',I10)
C        IRAN=ANY ODD NUMBER FOR RANDOM # INITIALIZATION.
C---------------------------INPUT VALUES ----
      NEVMAX = 2000
C
      EGAM = 300.*.001
C...........................
C
C                                    * * *  FILE LOOP  * * *
      IFILE = 10
      NEVTOT = 0
C
      DO 2000  IF = 1,10
      IFILE = IFILE + 1
      ZINIT = ZMID(IF)
      DELZ = DZ(IF)
C
C                                    * * *  EVENT LOOP  * * *
      DO 1000  NEV = 1,NEVMAX
      IF(IUHR(2).NE.1) GO TO 999
C
      NEVTOT = NEVTOT + 1
C
      Z = ZINIT - RN(DUM)*DELZ
      THE = ATAN2(Z,1100.)
      IF(THE.LT.0.) THE = THE + TWOPI
      THE = PIHALF - THE
      COST = COS(THE)
      SINT = SIN(THE)
      PHI = RN(DUM) * TWOPI
C          FILL /CPROD/
C     COMMON/CPROD/IDUM(6),NPROD,NCHRG,NNEUT,PPROD(4,30),
C    1 XMASS(30),ICHRG(30),ITYPE(30),IPOINT(30,2),
C    2 NFIN,NCHRFI,NNEUFI,PFIN(4,100),
C    3 XMSFIN(100),ICHRFI(100),ITPFIN(100),PSTRT(3,100)
C
      NPROD = 1
      NFIN = 1
      NNEUT = 1
      NNEUFI = 1
      NCHRG = 0
      NCHRFI = 0
C
      ITYPE(NPROD) = 1
      ITPFIN(NFIN) = 1
      XMASS(NPROD) = 0.
      XMSFIN(NFIN) = 0.
      ICHRG(NPROD) = 0
      ICHRFI(NFIN) = 0
C
      PPROD(1,NPROD) = EGAM*SINT*COS(PHI)
      PPROD(2,NPROD) = EGAM*SINT*SIN(PHI)
      PPROD(3,NPROD) = EGAM*COST
      PPROD(4,NPROD) = EGAM
C
      DO 221  I = 1,4
      PFIN(I,NFIN) = PPROD(I,NPROD)
221   CONTINUE
C
      IF(NEV.LT.20) WRITE(6,9602) Z,THE,PHI,EGAM
9602  FORMAT(' Z THE PHI EGAM ',4E13.5)
C
      IF(NEV.LT.20) WRITE(6,9102) (((PPROD(LI,N),LI=1,4),XMASS(N),
     $ ICHRG(N),ITYPE(N)),N=1,NPROD)
 9102  FORMAT(' PPROD ',4E12.4,' MS CH TP ',E12.4,2I5)
C
      IF(NEV.LT.20) WRITE(6,9101) (((PFIN(LI,N),LI=1,4),XMSFIN(N),
     $ ICHRFI(N),ITPFIN(N)),N=1,NFIN)
 9101  FORMAT(' PFIN ',4E12.4,' MS CH TP ',E12.4,2I5)
C
      IDUM(1) = NEV
C
      CALL WRIT4V(IFILE)
C
C-------------------END OF THE LOOP------------------
1000  CONTINUE
      WRITE(6,630) NEV,ZINIT,DELZ,IFILE
 630    FORMAT('  NR OF GENERATED EVENTS:',I10,'     ZLIM ',F10.2,' +-',
     $ F8.2,' FILE NR ',I4)
2000  CONTINUE
      GO TO 900
C
999   WRITE(6,998) IFILE,NEV
998   FORMAT(' - - ->>>>>>>   TIME LIMIT   TIME LIMIT  <<<   FILE ',I3,
     $ ' EVENTS ON THIS FILE ',I4)
C
C
 900  CONTINUE
      WRITE(6,632) NEVTOT
 632    FORMAT('  TOTAL NR OF GENERATED EVENTS:',I10)
C     CALL HISTDO
      STOP
      END
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,DSN=F11OLS.JADELD
//            DD DISP=SHR,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,DSN=R01UTL.CERN.KERNLIB4
//*O.FT11F001 DD DUMMY
//GO.FT11F001 DD DSN=F11OLS.UNIGAM4X.E300D1,DISP=(NEW,CATLG,CATLG),
//    DCB=R01DCB.VBS,SPACE=(TRK,(80,11),RLSE),UNIT=FAST
//GO.FT12F001 DD DSN=F11OLS.UNIGAM4X.E300D2,DISP=(NEW,CATLG,CATLG),
//    DCB=R01DCB.VBS,SPACE=(TRK,(80,11),RLSE),UNIT=FAST
//GO.FT13F001 DD DSN=F11OLS.UNIGAM4X.E300D3,DISP=(NEW,CATLG,CATLG),
//    DCB=R01DCB.VBS,SPACE=(TRK,(80,11),RLSE),UNIT=FAST
//GO.FT14F001 DD DSN=F11OLS.UNIGAM4X.E300D4,DISP=(NEW,CATLG,CATLG),
//    DCB=R01DCB.VBS,SPACE=(TRK,(80,11),RLSE),UNIT=FAST
//GO.FT15F001 DD DSN=F11OLS.UNIGAM4X.E300D5,DISP=(NEW,CATLG,CATLG),
//    DCB=R01DCB.VBS,SPACE=(TRK,(80,11),RLSE),UNIT=FAST
//GO.FT16F001 DD DSN=F11OLS.UNIGAM4X.E300D6,DISP=(NEW,CATLG,CATLG),
//    DCB=R01DCB.VBS,SPACE=(TRK,(80,11),RLSE),UNIT=FAST
//GO.FT17F001 DD DSN=F11OLS.UNIGAM4X.E300D7,DISP=(NEW,CATLG,CATLG),
//    DCB=R01DCB.VBS,SPACE=(TRK,(80,11),RLSE),UNIT=FAST
//GO.FT18F001 DD DSN=F11OLS.UNIGAM4X.E300D8,DISP=(NEW,CATLG,CATLG),
//    DCB=R01DCB.VBS,SPACE=(TRK,(80,11),RLSE),UNIT=FAST
//GO.FT19F001 DD DSN=F11OLS.UNIGAM4X.E300D9,DISP=(NEW,CATLG,CATLG),
//    DCB=R01DCB.VBS,SPACE=(TRK,(80,11),RLSE),UNIT=FAST
//GO.FT20F001 DD DSN=F11OLS.UNIGAM4X.E300DA,DISP=(NEW,CATLG,CATLG),
//    DCB=R01DCB.VBS,SPACE=(TRK,(80,11),RLSE),UNIT=FAST
C   28/03/97            MEMBER NAME  JBALGNSC (JADE56.S)    FORTRAN
//F11JLL   JOB 00010622,CLASS=K,MSGLEVEL=(1,0),TIME=(2,45)
//*MAIN RELPRI=LOW
// EXEC FLG,PARM.LKED='SIZE=(600K,60K)',REGION.LKED=800K,
//  REGION.GO=1600K
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADENEWL
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADELD
//            DD DISP=SHR,UNIT=FAST,DSN=F11OLS.JADE56.L
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=F22NAR.TOFLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERN.KERNLIB4
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=F22YAM.TPLOAD
//LKED.SYSIN DD *
 INCLUDE SYSLIB(JDMAIN0)
 INCLUDE SYSLIB(LGECORWT)
 INCLUDE SYSLIB(LGCLXAR,UVXCOR)
//GO.FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//GO.FT22F001 DD DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*      DSN=F11OLS.TR22GAM.ALL8386
//*O.FT02F001 DD DISP=SHR,DSN=F11OLS.MCTRACK.BSUM5
//GO.FT02F001 DD DISP=SHR,DSN=F11OLS.TR22GAM.NEU82A1
//            DD DISP=SHR,DSN=F11OLS.TR22GAM.NEU82B1
//*                        OUTPUT:
//*GO.FT03F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//   SPACE=(TRK,(50,10),RLSE),DSN=F11OLS.TR22GAM.BBLEAKWT.NEU82
//*O.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAPRI.SUM1
//*O.FT03F001 DD DISP=SHR,DSN=F11OLS.MCTRACK.BSUM10
//*GO.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.TR20GAM.RESO5OEW
//*O.FT03F001 DD DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*       MSVGP=VJAD,UNIT=3330V,DSN=F11OLS.MCTRACK.BSUM7
//*O.FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*  DCB=(R01DCB.VBS,LRECL=6236),
//*      SPACE=(CYL,(200,15)),DSN=&&SCRTCH
    MAXEV1    MAXEV2    HRUNMI    HRUNMX     IHIST      IPRO     IBANK
         0    400000         0     32000         0         0         1
    SCLGC5    SCLGC6
     1.000     1.000
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*OPY EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*        DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*        DSN=F11OLS.TR22GAM.BBLEAK.LGECORWT.ALL8386
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
C   28/03/97            MEMBER NAME  JBENELS  (JADE56.S)    FORTRAN
//F11JLL   JOB 00010622,OLSSON,CLASS=E,TIME=(0,15)
//*MAIN RELPRI=LOW
// EXEC GEP,PARM.LKED='LIST',REGION.GO=900K,VS=HBOOK,
//       DN='F11OLS.ENELS.NR5'
C
C   PLOT OUTPUT OF FUNCTION ENELS, FOR VARIOUS MATERIALS
C
      COMMON /M0PAR/ CUTM
      DIMENSION ALNAS(45),WATNAS(45),XLUNAS(45),SCINAS(45)
      DIMENSION EBIN(45)
      DIMENSION DIF1(45),DIF2(45),DIF3(45)
C
      DATA EBIN/ 0.6,0.65,
     $ 0.70,0.75,0.80,0.85,0.90, 0.95,1.00,1.10,1.20,1.30,
     $ 1.40,1.50,1.60,1.70,1.80, 1.90,2.00,2.20,2.40,2.60,
     $ 2.80,3.00,3.50,4.00,4.50, 5.00,5.50,6.00,6.50,7.00,
     $ 7.50,8.00,8.50,9.00,9.50, 10.,20.,30.,40.,50.,
     $ 60.,80.,100./
C
      DATA ALNAS/ 1.551,1.532,
     $ 1.517,1.505,1.496,1.488,1.482, 1.477,1.473,1.468,1.465,1.463,
     $ 1.463,1.464,1.466,1.468,1.470, 1.473,1.476,1.482,1.489,1.495,
     $ 1.502,1.508,1.523,1.537,1.549, 1.561,1.571,1.581,1.590,1.598,
     $ 1.606,1.613,1.620,1.626,1.632, 1.637,1.709,1.747,1.773,1.792,
     $ 1.808,1.831,1.849/
C
      DATA WATNAS/ 1.989,1.963,
     $ 1.942,1.925,1.911,1.900,1.890, 1.882,1.876,1.866,1.860,1.856,
     $ 1.853,1.852,1.852,1.853,1.854, 1.856,1.858,1.862,1.867,1.873,
     $ 1.878,1.884,1.897,1.909,1.920, 1.931,1.940,1.949,1.957,1.964,
     $ 1.971,1.978,1.984,1.989,1.995, 2.000,2.064,2.100,2.125,2.144,
     $ 2.160,2.185,2.204/
C
      DATA XLUNAS/ 1.914,1.888,
     $ 1.867,1.849,1.835,1.823,1.814, 1.806,1.799,1.789,1.782,1.778,
     $ 1.775,1.774,1.774,1.775,1.776, 1.777,1.779,1.784,1.789,1.794,
     $ 1.800,1.805,1.819,1.832,1.843, 1.854,1.864,1.873,1.882,1.889,
     $ 1.897,1.903,1.910,1.916,1.921, 1.926,1.994,2.030,2.055,2.074,
     $ 2.089,2.113,2.132/
C
      DATA SCINAS/ 1.925,1.899,
     $ 1.878,1.860,1.846,1.834,1.824, 1.816,1.809,1.798,1.792,1.787,
     $ 1.784,1.783,1.783,1.783,1.784, 1.786,1.787,1.792,1.797,1.802,
     $ 1.807,1.813,1.826,1.838,1.850, 1.861,1.870,1.879,1.888,1.895,
     $ 1.902,1.909,1.915,1.921,1.926, 1.932,1.998,2.034,2.059,2.077,
     $ 2.093,2.117,2.135/
C
      DATA RME/0.511003/
      DATA XAL/24.01/, XH2O/36.08/, XLUC/40.55/, XSCIN/43.8/
C***********************************
C     CALL ACORE(20000)
C
      CALL HBOOK2( 1,'ENELS VS E , AL $',100,0.5,100.5,100,20.,100.)
      CALL HBOOK2( 6,'ENELMX VS E , AL $',100,0.5,100.5,100,20.,100.)
      CALL HBOOK2( 7,'ENELEL VS E , AL $',100,0.5,100.5,100,20.,100.)
      CALL HBOOK2( 8,'ENELPO VS E , AL $',100,0.5,100.5,100,20.,100.)
      CALL HBOOK2( 2,'NASA DATA VS E, AL $',
     $    100,0.5,100.5,100,20.,100.)
      CALL HBOOK2( 3,'NASA DATA VS E, H2O $',
     $    100,0.5,100.5,100,20.,100.)
      CALL HBOOK2( 4,'NASA DATA VS E, LUCITE $',
     $    100,0.5,100.5,100,20.,100.)
      CALL HBOOK2( 5,'NASA DATA VS E, POLYSTYR.(SCIN) $',
     $    100,0.5,100.5,100,20.,100.)
C
      CALL MCIN56
C
      CALL INITAL(1)
C
C//////////////////////////////////////////////
      ENE = 1.05
C
      DO 1  I = 1,200
C
      EWEI = ENELS(ENE) * RME
      EPLO = ENE * RME
C
      EWEIMX = ENELMX(ENE) * RME
      EWEIEL = ENELEL(ENE) * RME
      EWEIPO = ENELPO(ENE) * RME
C
      CALL HFILL(1,EPLO,EWEI,1.)
      CALL HFILL(6,EPLO,EWEIMX,1.)
      CALL HFILL(7,EPLO,EWEIEL,1.)
      CALL HFILL(8,EPLO,EWEIPO,1.)
      ENE = ENE + 1.
1     CONTINUE
C
      DIFM1 = 0.
      DIFM2 = 0.
      DIFM3 = 0.
C
      DO 22  J = 1,45
      EPLO = EBIN(J)
C
      EWEI0 = ALNAS(J)*XAL
      CALL HFILL(2,EPLO,EWEI0,1.)
      EWEI1 = WATNAS(J)*XH2O
      CALL HFILL(3,EPLO,EWEI1,1.)
      EWEI2 = XLUNAS(J)*XLUC
      CALL HFILL(4,EPLO,EWEI2,1.)
      EWEI3 = SCINAS(J)*XSCIN
      CALL HFILL(5,EPLO,EWEI3,1.)
C
      DIF1(J) = EWEI1-EWEI0
      DIF2(J) = EWEI2-EWEI0
      DIF3(J) = EWEI3-EWEI0
C
      DIFM1 = DIFM1 + DIF1(J)
      DIFM2 = DIFM2 + DIF2(J)
      DIFM3 = DIFM3 + DIF3(J)
C
22    CONTINUE
C
C////////////////////////
C
      DIFM1 = DIFM1/45.
      DIFM2 = DIFM2/45.
      DIFM3 = DIFM3/45.
C
      WRITE(6,101) DIFM1,DIFM2,DIFM3
101   FORMAT(' MEANS OF DIF1-3 ',3E13.5)
C
      WRITE(6,201) DIF1
201   FORMAT(' DIF1 ',5F10.5,/)
C
      WRITE(6,202) DIF2
202   FORMAT(' DIF2 ',5F10.5,/)
C
      WRITE(6,203) DIF3
203   FORMAT(' DIF3 ',5F10.5,/)
C
C--
      CALL HISTDO
C
      STOP
      END
//LKED.SYSLIB DD
//            DD
//            DD
//            DD
//            DD
//            DD DSN=F11OLS.JADE56.L,DISP=SHR
//            DD DSN=F11OLS.JADELD,DISP=SHR
//            DD DISP=SHR,DSN=F11LHO.JADEGL
//*           DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERN.KERNLIB4
//            DD DSN=F22YAM.LGLOAD,DISP=SHR
//*DD DSN=F22YAM.WORKL,DISP=SHR
//LKED.SYSIN DD *
 INCLUDE SYSLIB(LSCCTL)
//GO.FT02F001 DD DUMMY
C   28/03/97            MEMBER NAME  JBMCETAP (JADE56.S)    FORTRAN
//F11JLL   JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN RELPRI=LOW
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//*            NEW VERSION OF TAGGING TRACKING INSTALLED               *
//*             DETAILS, SEE J.C.N. 86, BY A. FINCH                    *
//*                                                                    *
//**********************************************************************
//*
//*         SHOWER CALCULATION OF BOTH PHOTONS AND ELECTRONS
//*           USING TOKYO SHOWER PROGRAM (A.SATO, S.YAMADA)
//*       ADAPTED FOR JADE SETUP WITH SF5 AND SF6   (J.OLSSON)
//*
//**********************************************************************
//*
// EXEC FCLG,PARM.FORT=XL,REGION.LKED=800K,
//  REGION.GO=840K
      COMMON /     / BOOK(3000)
      COMMON / BCS / IW(40000)
      COMMON /CEK4VC/ ISKP
C
      COMMON / CIEVS  / KIEV,IEVMIN,IEVMAX
C
C          IEVMIN : FIRST EVENT TO BE READ FROM INPUT FILE
C          IEVMAX : LAST  EVENT TO BE READ FROM INPUT FILE
C
C                   ==== > DEFAULT IEVMIN = 1
C                                  IEVMAX = 9999999
C
      INTEGER*2 HDATE
      COMMON / TODAY / HDATE(6)
C
      COMMON/CPRIN/IPRO
      COMMON/COLSON/ IPROO
C  IPROO IS A PRINT VARIABLE FOR DEBUG PRINT IN SHOWER ROUTINES
C
      COMMON /CUTSHO/ CUTOF
C WITH CUTOF THE STANDARD CUTOFF OF 1.2 MEV CAN BE CHANGED, BUT IT
C  IS ONLY EFFECTIVE WITH THE INCLUDE OF SUBR.  LGMCGMN
C
      COMMON/CFLAG/LFLAG(10)
      LOGICAL * 1 LFLAG
C
C          LFLAG(1) = SMEAR GAMMA AND ELECTRON ENERGIES
C          LFLAG(2) = GAMMA CONVERSION IN OUTER TANK AND COIL (TRKGAM)
C          LFLAG(3) = ABSORPTION LOSSES
C          LFLAG(4) = 3 DIM SHOWER PROFILE FIT TO EGGS CODE SLOW!!!!!
C          LFLAG(5) = .TRUE.   -->  WITH VERTEX CHAMBER TRACKING
C                   = .FALSE.  -->  WITHOUT VERTEX CHAMBER TRACKING
C                                   BUT OLD BEAM PIPE GEOMETRY AND
C                                 BEAM PIPE COUNTERS (BEFORE MAI 84)
C          LFLAG(6) = 3 DIM TOKYO SHOWER PROGRAM, JADE NOTE 20A
C
C         ===> DEFAULT .TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.FALSE.
C
C   NOTE: WITH THE USE OF TOKYO SHOWER PROGRAM, LFLAG(1) AND LFLAG(3)
C         ARE NOT USED. HOWEVER, THEY SHOULD BE TRUE TO ENSURE THAT THE
C         ALGN BANK IS PROPERLY MARKED FOR LATER ENERGY CORRECTION..
C         LFLAG(2) IS TRULY REDUNDANT
C         LFLAG(4) SHOULD BE FALSE, ALTHOUGH TRLGL IS ONLY CALLED FOR
C                  HADRONS AND MUONS
C
      LFLAG(1) = .TRUE.
      LFLAG(2) = .FALSE.
      LFLAG(3) = .TRUE.
      LFLAG(4) = .FALSE.
      LFLAG(5) = .TRUE.
      LFLAG(6) = .TRUE.
C
      WRITE(6,521) (LFLAG(I),I=1,6)
521   FORMAT(' LFLAG:  ',6I3)
C
C  INIT OF TODAY
C
      HDATE(1) = 1
      HDATE(2) = 1
      HDATE(3) = 1
      HDATE(4) = 15
      HDATE(5) = 6
      HDATE(6) = 1986
C
      WRITE(6,2201) HDATE
2201  FORMAT('  DATE: ',6I6)
C
      CALL BINT( 40000,15000,500, 0 )
C
      ISKP = 2
C     ISKP = 0
      IPRO = 0
      IPROO = 0
C
C MINIMUM CUTOFF ENERGY IN SHOWER
C     CUTOF = 1.2
C
C            SET EVENT READING LIMITS
C
      IEVMIN = 0
      IEVMAX = 400
      WRITE(6,146) IEVMIN,IEVMAX
146   FORMAT('   IEVMIN AND IEVMAX :',2I7)
C
      CALL MCJADE( 0,  5 )
      CALL BSTA
      CALL PALL
      CALL HISTDO
      STOP
      END
      SUBROUTINE JGETEV( * )
C-----------------------------------------------------------
C
C  VERSION OF 02/11/81   LAST MOD 02/11/81      E.ELSEN
C  GET NEXT EVENT.
C  RETURN 1 IF END OF INPUT SEQUENCE (EOF).
C-----------------------------------------------------------
C
C
      COMMON /CIEVS/ KIEV,IEVMIN,IEVMAX
      DATA IRUNIT / 3 /,ICALL/0/
C
      ICALL = ICALL + 1
C     WRITE(6,3910) ICALL
3910  FORMAT(' ICALL       ',2I10)
      IF(ICALL.NE.1) GO TO 95
      IEV = 0
      KIEV = 0
      NIEV = 20
95    IEV = IEV + 1
1001  IF(IEV.GE.IEVMIN) GO TO 1151
      IEV = IEV + 1
      READ(IRUNIT,ERR=1000,END=8100) NR
      GO TO 1001
CCC  READ EVENTS
1151  IF(IEV.GT.IEVMAX) GO TO 90
C
      KIEV = KIEV + 1
      CALL BRVECT( IRUNIT, &1000, &8100 )
      IF((IEV/NIEV)*NIEV.EQ.IEV) WRITE(6,6811) IEV
6811  FORMAT(' NR OF EVENTS DONE:',I10)
C
CHECK IF EVENT HAS ENOUGH PARTICLES IN INNER DETECTOR AND LEAD GLASS
      CALL CHK4VC(NWIC,NWIN,NWNE)
C     CALL TOTMAS(WWW)
C     CALL HFILL(1,WWW,0,1.)
C     CALL HFILL(2,WWW,0,1.)
C     ICHK = 0
      ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.2) ICHK = 1
C     IF(NWIC.GE.8.AND.NWIN.GE.0) ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.2) ICHK = 1
C     IF(NWIN.GE.2.AND.NWIC.LE.0) ICHK = 1
C     WRITE(6,1130) NWIC,NWIN,ICHK
C1130  FORMAT(' NWIC NWIN ICHK ',3I8)
      IF(ICHK.NE.0) GO TO 3637
      IEV = IEV + 1
      GO TO 1151
 3637 CONTINUE
C     CALL HFILL(3,WWW,0,1.)
C     CALL HFILL(4,WWW,0,1.)
      GO TO 8000
C
 90   WRITE(6,8012)
 8012 FORMAT(' MAX EVENTS READ  ')
      GO TO 7000
C
 1000 WRITE(6,8002)
 8002 FORMAT(' READ ERROR   OR BCS ERROR  ')
 8000 RETURN
C
 8100 WRITE(6,8101)
 8101 FORMAT(' E O F   E O F   E O F   E O F ')
 7000 RETURN 1
      END
      SUBROUTINE CHK4VC(NWIC,NWIN,NWNE)
C         CHECK THE 4-VECTORS AND SEE IF ENOUGH PARTICLES INSIDE THE
C         INNER DETECTOR AND LEAD GLASS.
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS NWIC = NR OF CHARGED PARTICLES INSIDE I.D.
C    RETURNS NWIN = NR OF NEUTRAL PARTICLES INSIDE LEAD GLASS
C    RETURNS NWNE = NR OF NEUTRAL PARTICLES INSIDE BARREL
C
C                                                  J.OLSSON    8.11.80
C                  LAST CHANGE  24.4.1982
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
C COSLMN FROM 320,1514 INNER EDGE E-CAPS.
C COSLMC FROM 227,1180 AT LEAST 16 WIRES IN JET CHAMBER
      DATA COSLMN /0.9784/, COSLMC /0.9820/,XMOLIM/.040/,XPTLIM/.030/
      DATA COSNEU /0.870/
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      ICHK = 0
      NWNE = 0
      NWIC = 0
      NWIN = 0
      IF(NF.LE.0) GO TO 999
      DO 1  I = 1,NF
C SKIP INITIAL ELECTRONS IF REQUIRED
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PTOT = 0.
      DO 2  J = 1,3
      PTOT = PTOT + PF(J,I)**2
2     IF(J.EQ.2) PTRA = PTOT
      PTOT = SQRT(PTOT)
      PTRA = SQRT(PTRA)
      IF(ICALL.LE.20) WRITE(6,2731) NEV,I,ICF(I),PTOT,PTRA
2731  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' PTOT ',E12.4,' PTRA ',
     $ E12.4)
      IF(PTOT.LT.XMOLIM.AND.ICF(I).NE.0) GO TO 1
      IF(PTRA.LT.XPTLIM.AND.ICF(I).NE.0) GO TO 1
      COSTHE = PF(3,I)/PTOT
      IF(ICF(I).NE.0.AND.ABS(COSTHE).LT.COSLMC) NWIC = NWIC + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSLMN) NWIN = NWIN + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSNEU) NWNE = NWNE + 1
      IF(ICALL.LE.20) WRITE(6,2431) NEV,I,ICF(I),COSTHE,NWIC,NWIN,PTOT,
     $ PTRA,NWNE
2431  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' COS NWIC-N ',E12.4,2I5,
     $ ' PTOT ',E12.4,' PTRA ',E12.4,' NWNE ',I2)
1     CONTINUE
999   RETURN
      END
      BLOCK DATA
      COMMON /CEK4VC/ ISKP
      DATA ISKP /0/
      END
      SUBROUTINE TOTMAS(WWW)
C     CALCULATE THE TOTAL MASS OF THE FINAL SYSTEM
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS WWW = MASS OF TOTAL SYSTEM
C
C                                                  J.OLSSON   14.03.81
C                  LAST CHANGE 14.03.81
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
      DIMENSION PSAM(4)
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      PTOTSM = 0.
      FACT = -1.
      DO 2030  J = 1,4
      IF(J.EQ.4) FACT = 1.
      PSAM(J) = 0.
      DO 1  I = 1,NF
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PSAM(J) = PSAM(J) + PF(J,I)
1     CONTINUE
      PTOTSM = PTOTSM + PSAM(J)*PSAM(J)*FACT
2030  CONTINUE
      PTOTSM = AMAX1(PTOTSM,1.E-08)
      WWW = SQRT(PTOTSM)
      IF(ICALL.LT.5) WRITE(6,2000) NF,WWW
2000  FORMAT(' NR OF FINAL PARTICLES ',I4,'  MASS ',E12.4)
      RETURN
      END
//LKED.SYSLIB DD
//            DD
//            DD DSN=F11OLS.JADE56.L,DISP=SHR
//            DD DSN=F11OLS.JADELD,DISP=SHR
//            DD DSN=F22ELS.JMC.L,DISP=SHR
//            DD DSN=F11LHO.JADEGL,DISP=SHR
//            DD DSN=F11LHO.TAGG.L,DISP=SHR
//            DD DSN=JADELG.LOAD,DISP=SHR
//            DD DSN=F22ALL.JADEMUL,DISP=SHR
//            DD DSN=R01UTL.HBOOK321.L,DISP=SHR
//            DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR
//            DD DSN=F22YAM.LGLOAD,DISP=SHR
//*           DD DSN=F22YAM.LG.L,DISP=SHR
//LKED.SYSIN DD *
//* INCLUDE SYSLIB(BRVECTT,NPECER8)
 INCLUDE SYSLIB(BRVECTT)
//*                 INPUT
//GO.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAPRIV4.NR2
//*                 OUTPUT
//*GO.FT02F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//    SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.ETAPRI86.NR31
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.ETAPRI.B15
//F11JLL   JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN RELPRI=LOW
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//*            NEW VERSION OF TAGGING TRACKING INSTALLED               *
//*             DETAILS, SEE J.C.N. 86, BY A. FINCH                    *
//*                                                                    *
//**********************************************************************
//*
//*         SHOWER CALCULATION OF BOTH PHOTONS AND ELECTRONS
//*           USING TOKYO SHOWER PROGRAM (A.SATO, S.YAMADA)
//*       ADAPTED FOR JADE SETUP WITH SF5 AND SF6   (J.OLSSON)
//*
//**********************************************************************
//*
// EXEC FCLG,PARM.FORT=XL,REGION.LKED=800K,
//  REGION.GO=840K
      COMMON /     / BOOK(3000)
      COMMON / BCS / IW(40000)
      COMMON /CEK4VC/ ISKP
C
      COMMON / CIEVS  / KIEV,IEVMIN,IEVMAX
C
C          IEVMIN : FIRST EVENT TO BE READ FROM INPUT FILE
C          IEVMAX : LAST  EVENT TO BE READ FROM INPUT FILE
C
C                   ==== > DEFAULT IEVMIN = 1
C                                  IEVMAX = 9999999
C
      INTEGER*2 HDATE
      COMMON / TODAY / HDATE(6)
C
      COMMON/CPRIN/IPRO
      COMMON/COLSON/ IPROO
C  IPROO IS A PRINT VARIABLE FOR DEBUG PRINT IN SHOWER ROUTINES
C
      COMMON /CUTSHO/ CUTOF
C WITH CUTOF THE STANDARD CUTOFF OF 1.2 MEV CAN BE CHANGED, BUT IT
C  IS ONLY EFFECTIVE WITH THE INCLUDE OF SUBR.  LGMCGMN
C
      COMMON/CFLAG/LFLAG(10)
      LOGICAL * 1 LFLAG
C
C          LFLAG(1) = SMEAR GAMMA AND ELECTRON ENERGIES
C          LFLAG(2) = GAMMA CONVERSION IN OUTER TANK AND COIL (TRKGAM)
C          LFLAG(3) = ABSORPTION LOSSES
C          LFLAG(4) = 3 DIM SHOWER PROFILE FIT TO EGGS CODE SLOW!!!!!
C          LFLAG(5) = .TRUE.   -->  WITH VERTEX CHAMBER TRACKING
C                   = .FALSE.  -->  WITHOUT VERTEX CHAMBER TRACKING
C                                   BUT OLD BEAM PIPE GEOMETRY AND
C                                 BEAM PIPE COUNTERS (BEFORE MAI 84)
C          LFLAG(6) = 3 DIM TOKYO SHOWER PROGRAM, JADE NOTE 20A
C
C         ===> DEFAULT .TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.FALSE.
C
C   NOTE: WITH THE USE OF TOKYO SHOWER PROGRAM, LFLAG(1) AND LFLAG(3)
C         ARE NOT USED. HOWEVER, THEY SHOULD BE TRUE TO ENSURE THAT THE
C         ALGN BANK IS PROPERLY MARKED FOR LATER ENERGY CORRECTION..
C         LFLAG(2) IS TRULY REDUNDANT
C         LFLAG(4) SHOULD BE FALSE, ALTHOUGH TRLGL IS ONLY CALLED FOR
C                  HADRONS AND MUONS
C
      LFLAG(1) = .TRUE.
      LFLAG(2) = .FALSE.
      LFLAG(3) = .TRUE.
      LFLAG(4) = .FALSE.
      LFLAG(5) = .TRUE.
      LFLAG(6) = .TRUE.
C
      WRITE(6,521) (LFLAG(I),I=1,6)
521   FORMAT(' LFLAG:  ',6I3)
C
C  INIT OF TODAY
C
      HDATE(1) = 1
      HDATE(2) = 1
      HDATE(3) = 1
      HDATE(4) = 15
      HDATE(5) = 6
      HDATE(6) = 1986
C
      WRITE(6,2201) HDATE
2201  FORMAT('  DATE: ',6I6)
C
      CALL BINT( 40000,15000,500, 0 )
C
      ISKP = 2
C     ISKP = 0
      IPRO = 0
      IPROO = 0
C
C MINIMUM CUTOFF ENERGY IN SHOWER
C     CUTOF = 1.2
C
C            SET EVENT READING LIMITS
C
      IEVMIN = 401
      IEVMAX = 800
      WRITE(6,146) IEVMIN,IEVMAX
146   FORMAT('   IEVMIN AND IEVMAX :',2I7)
C
      CALL MCJADE( 0,  5 )
      CALL BSTA
      CALL PALL
      CALL HISTDO
      STOP
      END
      SUBROUTINE JGETEV( * )
C-----------------------------------------------------------
C
C  VERSION OF 02/11/81   LAST MOD 02/11/81      E.ELSEN
C  GET NEXT EVENT.
C  RETURN 1 IF END OF INPUT SEQUENCE (EOF).
C-----------------------------------------------------------
C
C
      COMMON /CIEVS/ KIEV,IEVMIN,IEVMAX
      DATA IRUNIT / 3 /,ICALL/0/
C
      ICALL = ICALL + 1
C     WRITE(6,3910) ICALL
3910  FORMAT(' ICALL       ',2I10)
      IF(ICALL.NE.1) GO TO 95
      IEV = 0
      KIEV = 0
      NIEV = 20
95    IEV = IEV + 1
1001  IF(IEV.GE.IEVMIN) GO TO 1151
      IEV = IEV + 1
      READ(IRUNIT,ERR=1000,END=8100) NR
      GO TO 1001
CCC  READ EVENTS
1151  IF(IEV.GT.IEVMAX) GO TO 90
C
      KIEV = KIEV + 1
      CALL BRVECT( IRUNIT, &1000, &8100 )
      IF((IEV/NIEV)*NIEV.EQ.IEV) WRITE(6,6811) IEV
6811  FORMAT(' NR OF EVENTS DONE:',I10)
C
CHECK IF EVENT HAS ENOUGH PARTICLES IN INNER DETECTOR AND LEAD GLASS
      CALL CHK4VC(NWIC,NWIN,NWNE)
C     CALL TOTMAS(WWW)
C     CALL HFILL(1,WWW,0,1.)
C     CALL HFILL(2,WWW,0,1.)
C     ICHK = 0
      ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.2) ICHK = 1
C     IF(NWIC.GE.8.AND.NWIN.GE.0) ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.2) ICHK = 1
C     IF(NWIN.GE.2.AND.NWIC.LE.0) ICHK = 1
C     WRITE(6,1130) NWIC,NWIN,ICHK
C1130  FORMAT(' NWIC NWIN ICHK ',3I8)
      IF(ICHK.NE.0) GO TO 3637
      IEV = IEV + 1
      GO TO 1151
 3637 CONTINUE
C     CALL HFILL(3,WWW,0,1.)
C     CALL HFILL(4,WWW,0,1.)
      GO TO 8000
C
 90   WRITE(6,8012)
 8012 FORMAT(' MAX EVENTS READ  ')
      GO TO 7000
C
 1000 WRITE(6,8002)
 8002 FORMAT(' READ ERROR   OR BCS ERROR  ')
 8000 RETURN
C
 8100 WRITE(6,8101)
 8101 FORMAT(' E O F   E O F   E O F   E O F ')
 7000 RETURN 1
      END
      SUBROUTINE CHK4VC(NWIC,NWIN,NWNE)
C         CHECK THE 4-VECTORS AND SEE IF ENOUGH PARTICLES INSIDE THE
C         INNER DETECTOR AND LEAD GLASS.
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS NWIC = NR OF CHARGED PARTICLES INSIDE I.D.
C    RETURNS NWIN = NR OF NEUTRAL PARTICLES INSIDE LEAD GLASS
C    RETURNS NWNE = NR OF NEUTRAL PARTICLES INSIDE BARREL
C
C                                                  J.OLSSON    8.11.80
C                  LAST CHANGE  24.4.1982
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
C COSLMN FROM 320,1514 INNER EDGE E-CAPS.
C COSLMC FROM 227,1180 AT LEAST 16 WIRES IN JET CHAMBER
      DATA COSLMN /0.9784/, COSLMC /0.9820/,XMOLIM/.040/,XPTLIM/.030/
      DATA COSNEU /0.870/
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      ICHK = 0
      NWNE = 0
      NWIC = 0
      NWIN = 0
      IF(NF.LE.0) GO TO 999
      DO 1  I = 1,NF
C SKIP INITIAL ELECTRONS IF REQUIRED
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PTOT = 0.
      DO 2  J = 1,3
      PTOT = PTOT + PF(J,I)**2
2     IF(J.EQ.2) PTRA = PTOT
      PTOT = SQRT(PTOT)
      PTRA = SQRT(PTRA)
      IF(ICALL.LE.20) WRITE(6,2731) NEV,I,ICF(I),PTOT,PTRA
2731  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' PTOT ',E12.4,' PTRA ',
     $ E12.4)
      IF(PTOT.LT.XMOLIM.AND.ICF(I).NE.0) GO TO 1
      IF(PTRA.LT.XPTLIM.AND.ICF(I).NE.0) GO TO 1
      COSTHE = PF(3,I)/PTOT
      IF(ICF(I).NE.0.AND.ABS(COSTHE).LT.COSLMC) NWIC = NWIC + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSLMN) NWIN = NWIN + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSNEU) NWNE = NWNE + 1
      IF(ICALL.LE.20) WRITE(6,2431) NEV,I,ICF(I),COSTHE,NWIC,NWIN,PTOT,
     $ PTRA,NWNE
2431  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' COS NWIC-N ',E12.4,2I5,
     $ ' PTOT ',E12.4,' PTRA ',E12.4,' NWNE ',I2)
1     CONTINUE
999   RETURN
      END
      BLOCK DATA
      COMMON /CEK4VC/ ISKP
      DATA ISKP /0/
      END
      SUBROUTINE TOTMAS(WWW)
C     CALCULATE THE TOTAL MASS OF THE FINAL SYSTEM
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS WWW = MASS OF TOTAL SYSTEM
C
C                                                  J.OLSSON   14.03.81
C                  LAST CHANGE 14.03.81
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
      DIMENSION PSAM(4)
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      PTOTSM = 0.
      FACT = -1.
      DO 2030  J = 1,4
      IF(J.EQ.4) FACT = 1.
      PSAM(J) = 0.
      DO 1  I = 1,NF
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PSAM(J) = PSAM(J) + PF(J,I)
1     CONTINUE
      PTOTSM = PTOTSM + PSAM(J)*PSAM(J)*FACT
2030  CONTINUE
      PTOTSM = AMAX1(PTOTSM,1.E-08)
      WWW = SQRT(PTOTSM)
      IF(ICALL.LT.5) WRITE(6,2000) NF,WWW
2000  FORMAT(' NR OF FINAL PARTICLES ',I4,'  MASS ',E12.4)
      RETURN
      END
//LKED.SYSLIB DD
//            DD
//            DD DSN=F11OLS.JADE56.L,DISP=SHR
//            DD DSN=F11OLS.JADELD,DISP=SHR
//            DD DSN=F22ELS.JMC.L,DISP=SHR
//            DD DSN=F11LHO.JADEGL,DISP=SHR
//            DD DSN=F11LHO.TAGG.L,DISP=SHR
//            DD DSN=JADELG.LOAD,DISP=SHR
//            DD DSN=F22ALL.JADEMUL,DISP=SHR
//            DD DSN=R01UTL.HBOOK321.L,DISP=SHR
//            DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR
//            DD DSN=F22YAM.LGLOAD,DISP=SHR
//*           DD DSN=F22YAM.LG.L,DISP=SHR
//LKED.SYSIN DD *
//* INCLUDE SYSLIB(BRVECTT,NPECER8)
 INCLUDE SYSLIB(BRVECTT)
//*                 INPUT
//GO.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAPRIV4.NR2
//*                 OUTPUT
//*GO.FT02F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//    SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.ETAPRI86.NR32
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.ETAPRI.B15
//F11JLL   JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN RELPRI=LOW
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//*            NEW VERSION OF TAGGING TRACKING INSTALLED               *
//*             DETAILS, SEE J.C.N. 86, BY A. FINCH                    *
//*                                                                    *
//**********************************************************************
//*
//*         SHOWER CALCULATION OF BOTH PHOTONS AND ELECTRONS
//*           USING TOKYO SHOWER PROGRAM (A.SATO, S.YAMADA)
//*       ADAPTED FOR JADE SETUP WITH SF5 AND SF6   (J.OLSSON)
//*
//**********************************************************************
//*
// EXEC FCLG,PARM.FORT=XL,REGION.LKED=800K,
//  REGION.GO=840K
      COMMON /     / BOOK(3000)
      COMMON / BCS / IW(40000)
      COMMON /CEK4VC/ ISKP
C
      COMMON / CIEVS  / KIEV,IEVMIN,IEVMAX
C
C          IEVMIN : FIRST EVENT TO BE READ FROM INPUT FILE
C          IEVMAX : LAST  EVENT TO BE READ FROM INPUT FILE
C
C                   ==== > DEFAULT IEVMIN = 1
C                                  IEVMAX = 9999999
C
      INTEGER*2 HDATE
      COMMON / TODAY / HDATE(6)
C
      COMMON/CPRIN/IPRO
      COMMON/COLSON/ IPROO
C  IPROO IS A PRINT VARIABLE FOR DEBUG PRINT IN SHOWER ROUTINES
C
      COMMON /CUTSHO/ CUTOF
C WITH CUTOF THE STANDARD CUTOFF OF 1.2 MEV CAN BE CHANGED, BUT IT
C  IS ONLY EFFECTIVE WITH THE INCLUDE OF SUBR.  LGMCGMN
C
      COMMON/CFLAG/LFLAG(10)
      LOGICAL * 1 LFLAG
C
C          LFLAG(1) = SMEAR GAMMA AND ELECTRON ENERGIES
C          LFLAG(2) = GAMMA CONVERSION IN OUTER TANK AND COIL (TRKGAM)
C          LFLAG(3) = ABSORPTION LOSSES
C          LFLAG(4) = 3 DIM SHOWER PROFILE FIT TO EGGS CODE SLOW!!!!!
C          LFLAG(5) = .TRUE.   -->  WITH VERTEX CHAMBER TRACKING
C                   = .FALSE.  -->  WITHOUT VERTEX CHAMBER TRACKING
C                                   BUT OLD BEAM PIPE GEOMETRY AND
C                                 BEAM PIPE COUNTERS (BEFORE MAI 84)
C          LFLAG(6) = 3 DIM TOKYO SHOWER PROGRAM, JADE NOTE 20A
C
C         ===> DEFAULT .TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.FALSE.
C
C   NOTE: WITH THE USE OF TOKYO SHOWER PROGRAM, LFLAG(1) AND LFLAG(3)
C         ARE NOT USED. HOWEVER, THEY SHOULD BE TRUE TO ENSURE THAT THE
C         ALGN BANK IS PROPERLY MARKED FOR LATER ENERGY CORRECTION..
C         LFLAG(2) IS TRULY REDUNDANT
C         LFLAG(4) SHOULD BE FALSE, ALTHOUGH TRLGL IS ONLY CALLED FOR
C                  HADRONS AND MUONS
C
      LFLAG(1) = .TRUE.
      LFLAG(2) = .FALSE.
      LFLAG(3) = .TRUE.
      LFLAG(4) = .FALSE.
      LFLAG(5) = .TRUE.
      LFLAG(6) = .TRUE.
C
      WRITE(6,521) (LFLAG(I),I=1,6)
521   FORMAT(' LFLAG:  ',6I3)
C
C  INIT OF TODAY
C
      HDATE(1) = 1
      HDATE(2) = 1
      HDATE(3) = 1
      HDATE(4) = 15
      HDATE(5) = 6
      HDATE(6) = 1986
C
      WRITE(6,2201) HDATE
2201  FORMAT('  DATE: ',6I6)
C
      CALL BINT( 40000,15000,500, 0 )
C
      ISKP = 2
C     ISKP = 0
      IPRO = 0
      IPROO = 0
C
C MINIMUM CUTOFF ENERGY IN SHOWER
C     CUTOF = 1.2
C
C            SET EVENT READING LIMITS
C
      IEVMIN = 801
      IEVMAX = 1200
      WRITE(6,146) IEVMIN,IEVMAX
146   FORMAT('   IEVMIN AND IEVMAX :',2I7)
C
      CALL MCJADE( 0,  5 )
      CALL BSTA
      CALL PALL
      CALL HISTDO
      STOP
      END
      SUBROUTINE JGETEV( * )
C-----------------------------------------------------------
C
C  VERSION OF 02/11/81   LAST MOD 02/11/81      E.ELSEN
C  GET NEXT EVENT.
C  RETURN 1 IF END OF INPUT SEQUENCE (EOF).
C-----------------------------------------------------------
C
C
      COMMON /CIEVS/ KIEV,IEVMIN,IEVMAX
      DATA IRUNIT / 3 /,ICALL/0/
C
      ICALL = ICALL + 1
C     WRITE(6,3910) ICALL
3910  FORMAT(' ICALL       ',2I10)
      IF(ICALL.NE.1) GO TO 95
      IEV = 0
      KIEV = 0
      NIEV = 20
95    IEV = IEV + 1
1001  IF(IEV.GE.IEVMIN) GO TO 1151
      IEV = IEV + 1
      READ(IRUNIT,ERR=1000,END=8100) NR
      GO TO 1001
CCC  READ EVENTS
1151  IF(IEV.GT.IEVMAX) GO TO 90
C
      KIEV = KIEV + 1
      CALL BRVECT( IRUNIT, &1000, &8100 )
      IF((IEV/NIEV)*NIEV.EQ.IEV) WRITE(6,6811) IEV
6811  FORMAT(' NR OF EVENTS DONE:',I10)
C
CHECK IF EVENT HAS ENOUGH PARTICLES IN INNER DETECTOR AND LEAD GLASS
      CALL CHK4VC(NWIC,NWIN,NWNE)
C     CALL TOTMAS(WWW)
C     CALL HFILL(1,WWW,0,1.)
C     CALL HFILL(2,WWW,0,1.)
C     ICHK = 0
      ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.2) ICHK = 1
C     IF(NWIC.GE.8.AND.NWIN.GE.0) ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.2) ICHK = 1
C     IF(NWIN.GE.2.AND.NWIC.LE.0) ICHK = 1
C     WRITE(6,1130) NWIC,NWIN,ICHK
C1130  FORMAT(' NWIC NWIN ICHK ',3I8)
      IF(ICHK.NE.0) GO TO 3637
      IEV = IEV + 1
      GO TO 1151
 3637 CONTINUE
C     CALL HFILL(3,WWW,0,1.)
C     CALL HFILL(4,WWW,0,1.)
      GO TO 8000
C
 90   WRITE(6,8012)
 8012 FORMAT(' MAX EVENTS READ  ')
      GO TO 7000
C
 1000 WRITE(6,8002)
 8002 FORMAT(' READ ERROR   OR BCS ERROR  ')
 8000 RETURN
C
 8100 WRITE(6,8101)
 8101 FORMAT(' E O F   E O F   E O F   E O F ')
 7000 RETURN 1
      END
      SUBROUTINE CHK4VC(NWIC,NWIN,NWNE)
C         CHECK THE 4-VECTORS AND SEE IF ENOUGH PARTICLES INSIDE THE
C         INNER DETECTOR AND LEAD GLASS.
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS NWIC = NR OF CHARGED PARTICLES INSIDE I.D.
C    RETURNS NWIN = NR OF NEUTRAL PARTICLES INSIDE LEAD GLASS
C    RETURNS NWNE = NR OF NEUTRAL PARTICLES INSIDE BARREL
C
C                                                  J.OLSSON    8.11.80
C                  LAST CHANGE  24.4.1982
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
C COSLMN FROM 320,1514 INNER EDGE E-CAPS.
C COSLMC FROM 227,1180 AT LEAST 16 WIRES IN JET CHAMBER
      DATA COSLMN /0.9784/, COSLMC /0.9820/,XMOLIM/.040/,XPTLIM/.030/
      DATA COSNEU /0.870/
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      ICHK = 0
      NWNE = 0
      NWIC = 0
      NWIN = 0
      IF(NF.LE.0) GO TO 999
      DO 1  I = 1,NF
C SKIP INITIAL ELECTRONS IF REQUIRED
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PTOT = 0.
      DO 2  J = 1,3
      PTOT = PTOT + PF(J,I)**2
2     IF(J.EQ.2) PTRA = PTOT
      PTOT = SQRT(PTOT)
      PTRA = SQRT(PTRA)
      IF(ICALL.LE.20) WRITE(6,2731) NEV,I,ICF(I),PTOT,PTRA
2731  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' PTOT ',E12.4,' PTRA ',
     $ E12.4)
      IF(PTOT.LT.XMOLIM.AND.ICF(I).NE.0) GO TO 1
      IF(PTRA.LT.XPTLIM.AND.ICF(I).NE.0) GO TO 1
      COSTHE = PF(3,I)/PTOT
      IF(ICF(I).NE.0.AND.ABS(COSTHE).LT.COSLMC) NWIC = NWIC + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSLMN) NWIN = NWIN + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSNEU) NWNE = NWNE + 1
      IF(ICALL.LE.20) WRITE(6,2431) NEV,I,ICF(I),COSTHE,NWIC,NWIN,PTOT,
     $ PTRA,NWNE
2431  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' COS NWIC-N ',E12.4,2I5,
     $ ' PTOT ',E12.4,' PTRA ',E12.4,' NWNE ',I2)
1     CONTINUE
999   RETURN
      END
      BLOCK DATA
      COMMON /CEK4VC/ ISKP
      DATA ISKP /0/
      END
      SUBROUTINE TOTMAS(WWW)
C     CALCULATE THE TOTAL MASS OF THE FINAL SYSTEM
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS WWW = MASS OF TOTAL SYSTEM
C
C                                                  J.OLSSON   14.03.81
C                  LAST CHANGE 14.03.81
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
      DIMENSION PSAM(4)
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      PTOTSM = 0.
      FACT = -1.
      DO 2030  J = 1,4
      IF(J.EQ.4) FACT = 1.
      PSAM(J) = 0.
      DO 1  I = 1,NF
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PSAM(J) = PSAM(J) + PF(J,I)
1     CONTINUE
      PTOTSM = PTOTSM + PSAM(J)*PSAM(J)*FACT
2030  CONTINUE
      PTOTSM = AMAX1(PTOTSM,1.E-08)
      WWW = SQRT(PTOTSM)
      IF(ICALL.LT.5) WRITE(6,2000) NF,WWW
2000  FORMAT(' NR OF FINAL PARTICLES ',I4,'  MASS ',E12.4)
      RETURN
      END
//LKED.SYSLIB DD
//            DD
//            DD DSN=F11OLS.JADE56.L,DISP=SHR
//            DD DSN=F11OLS.JADELD,DISP=SHR
//            DD DSN=F22ELS.JMC.L,DISP=SHR
//            DD DSN=F11LHO.JADEGL,DISP=SHR
//            DD DSN=F11LHO.TAGG.L,DISP=SHR
//            DD DSN=JADELG.LOAD,DISP=SHR
//            DD DSN=F22ALL.JADEMUL,DISP=SHR
//            DD DSN=R01UTL.HBOOK321.L,DISP=SHR
//            DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR
//            DD DSN=F22YAM.LGLOAD,DISP=SHR
//*           DD DSN=F22YAM.LG.L,DISP=SHR
//LKED.SYSIN DD *
//* INCLUDE SYSLIB(BRVECTT,NPECER8)
 INCLUDE SYSLIB(BRVECTT)
//*                 INPUT
//GO.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAPRIV4.NR2
//*                 OUTPUT
//*GO.FT02F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//    SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.ETAPRI86.NR33
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.ETAPRI.B15
//F11JLL   JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN RELPRI=LOW
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//*            NEW VERSION OF TAGGING TRACKING INSTALLED               *
//*             DETAILS, SEE J.C.N. 86, BY A. FINCH                    *
//*                                                                    *
//**********************************************************************
//*
//*         SHOWER CALCULATION OF BOTH PHOTONS AND ELECTRONS
//*           USING TOKYO SHOWER PROGRAM (A.SATO, S.YAMADA)
//*       ADAPTED FOR JADE SETUP WITH SF5 AND SF6   (J.OLSSON)
//*
//**********************************************************************
//*
// EXEC FCLG,PARM.FORT=XL,REGION.LKED=800K,
//  REGION.GO=840K
      COMMON /     / BOOK(3000)
      COMMON / BCS / IW(40000)
      COMMON /CEK4VC/ ISKP
C
      COMMON / CIEVS  / KIEV,IEVMIN,IEVMAX
C
C          IEVMIN : FIRST EVENT TO BE READ FROM INPUT FILE
C          IEVMAX : LAST  EVENT TO BE READ FROM INPUT FILE
C
C                   ==== > DEFAULT IEVMIN = 1
C                                  IEVMAX = 9999999
C
      INTEGER*2 HDATE
      COMMON / TODAY / HDATE(6)
C
      COMMON/CPRIN/IPRO
      COMMON/COLSON/ IPROO
C  IPROO IS A PRINT VARIABLE FOR DEBUG PRINT IN SHOWER ROUTINES
C
      COMMON /CUTSHO/ CUTOF
C WITH CUTOF THE STANDARD CUTOFF OF 1.2 MEV CAN BE CHANGED, BUT IT
C  IS ONLY EFFECTIVE WITH THE INCLUDE OF SUBR.  LGMCGMN
C
      COMMON/CFLAG/LFLAG(10)
      LOGICAL * 1 LFLAG
C
C          LFLAG(1) = SMEAR GAMMA AND ELECTRON ENERGIES
C          LFLAG(2) = GAMMA CONVERSION IN OUTER TANK AND COIL (TRKGAM)
C          LFLAG(3) = ABSORPTION LOSSES
C          LFLAG(4) = 3 DIM SHOWER PROFILE FIT TO EGGS CODE SLOW!!!!!
C          LFLAG(5) = .TRUE.   -->  WITH VERTEX CHAMBER TRACKING
C                   = .FALSE.  -->  WITHOUT VERTEX CHAMBER TRACKING
C                                   BUT OLD BEAM PIPE GEOMETRY AND
C                                 BEAM PIPE COUNTERS (BEFORE MAI 84)
C          LFLAG(6) = 3 DIM TOKYO SHOWER PROGRAM, JADE NOTE 20A
C
C         ===> DEFAULT .TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.FALSE.
C
C   NOTE: WITH THE USE OF TOKYO SHOWER PROGRAM, LFLAG(1) AND LFLAG(3)
C         ARE NOT USED. HOWEVER, THEY SHOULD BE TRUE TO ENSURE THAT THE
C         ALGN BANK IS PROPERLY MARKED FOR LATER ENERGY CORRECTION..
C         LFLAG(2) IS TRULY REDUNDANT
C         LFLAG(4) SHOULD BE FALSE, ALTHOUGH TRLGL IS ONLY CALLED FOR
C                  HADRONS AND MUONS
C
      LFLAG(1) = .TRUE.
      LFLAG(2) = .FALSE.
      LFLAG(3) = .TRUE.
      LFLAG(4) = .FALSE.
      LFLAG(5) = .TRUE.
      LFLAG(6) = .TRUE.
C
      WRITE(6,521) (LFLAG(I),I=1,6)
521   FORMAT(' LFLAG:  ',6I3)
C
C  INIT OF TODAY
C
      HDATE(1) = 1
      HDATE(2) = 1
      HDATE(3) = 1
      HDATE(4) = 15
      HDATE(5) = 6
      HDATE(6) = 1986
C
      WRITE(6,2201) HDATE
2201  FORMAT('  DATE: ',6I6)
C
      CALL BINT( 40000,15000,500, 0 )
C
      ISKP = 2
C     ISKP = 0
      IPRO = 0
      IPROO = 0
C
C MINIMUM CUTOFF ENERGY IN SHOWER
C     CUTOF = 1.2
C
C            SET EVENT READING LIMITS
C
      IEVMIN = 1201
      IEVMAX = 1600
      WRITE(6,146) IEVMIN,IEVMAX
146   FORMAT('   IEVMIN AND IEVMAX :',2I7)
C
      CALL MCJADE( 0,  5 )
      CALL BSTA
      CALL PALL
      CALL HISTDO
      STOP
      END
      SUBROUTINE JGETEV( * )
C-----------------------------------------------------------
C
C  VERSION OF 02/11/81   LAST MOD 02/11/81      E.ELSEN
C  GET NEXT EVENT.
C  RETURN 1 IF END OF INPUT SEQUENCE (EOF).
C-----------------------------------------------------------
C
C
      COMMON /CIEVS/ KIEV,IEVMIN,IEVMAX
      DATA IRUNIT / 3 /,ICALL/0/
C
      ICALL = ICALL + 1
C     WRITE(6,3910) ICALL
3910  FORMAT(' ICALL       ',2I10)
      IF(ICALL.NE.1) GO TO 95
      IEV = 0
      KIEV = 0
      NIEV = 20
95    IEV = IEV + 1
1001  IF(IEV.GE.IEVMIN) GO TO 1151
      IEV = IEV + 1
      READ(IRUNIT,ERR=1000,END=8100) NR
      GO TO 1001
CCC  READ EVENTS
1151  IF(IEV.GT.IEVMAX) GO TO 90
C
      KIEV = KIEV + 1
      CALL BRVECT( IRUNIT, &1000, &8100 )
      IF((IEV/NIEV)*NIEV.EQ.IEV) WRITE(6,6811) IEV
6811  FORMAT(' NR OF EVENTS DONE:',I10)
C
CHECK IF EVENT HAS ENOUGH PARTICLES IN INNER DETECTOR AND LEAD GLASS
      CALL CHK4VC(NWIC,NWIN,NWNE)
C     CALL TOTMAS(WWW)
C     CALL HFILL(1,WWW,0,1.)
C     CALL HFILL(2,WWW,0,1.)
C     ICHK = 0
      ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.2) ICHK = 1
C     IF(NWIC.GE.8.AND.NWIN.GE.0) ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.2) ICHK = 1
C     IF(NWIN.GE.2.AND.NWIC.LE.0) ICHK = 1
C     WRITE(6,1130) NWIC,NWIN,ICHK
C1130  FORMAT(' NWIC NWIN ICHK ',3I8)
      IF(ICHK.NE.0) GO TO 3637
      IEV = IEV + 1
      GO TO 1151
 3637 CONTINUE
C     CALL HFILL(3,WWW,0,1.)
C     CALL HFILL(4,WWW,0,1.)
      GO TO 8000
C
 90   WRITE(6,8012)
 8012 FORMAT(' MAX EVENTS READ  ')
      GO TO 7000
C
 1000 WRITE(6,8002)
 8002 FORMAT(' READ ERROR   OR BCS ERROR  ')
 8000 RETURN
C
 8100 WRITE(6,8101)
 8101 FORMAT(' E O F   E O F   E O F   E O F ')
 7000 RETURN 1
      END
      SUBROUTINE CHK4VC(NWIC,NWIN,NWNE)
C         CHECK THE 4-VECTORS AND SEE IF ENOUGH PARTICLES INSIDE THE
C         INNER DETECTOR AND LEAD GLASS.
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS NWIC = NR OF CHARGED PARTICLES INSIDE I.D.
C    RETURNS NWIN = NR OF NEUTRAL PARTICLES INSIDE LEAD GLASS
C    RETURNS NWNE = NR OF NEUTRAL PARTICLES INSIDE BARREL
C
C                                                  J.OLSSON    8.11.80
C                  LAST CHANGE  24.4.1982
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
C COSLMN FROM 320,1514 INNER EDGE E-CAPS.
C COSLMC FROM 227,1180 AT LEAST 16 WIRES IN JET CHAMBER
      DATA COSLMN /0.9784/, COSLMC /0.9820/,XMOLIM/.040/,XPTLIM/.030/
      DATA COSNEU /0.870/
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      ICHK = 0
      NWNE = 0
      NWIC = 0
      NWIN = 0
      IF(NF.LE.0) GO TO 999
      DO 1  I = 1,NF
C SKIP INITIAL ELECTRONS IF REQUIRED
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PTOT = 0.
      DO 2  J = 1,3
      PTOT = PTOT + PF(J,I)**2
2     IF(J.EQ.2) PTRA = PTOT
      PTOT = SQRT(PTOT)
      PTRA = SQRT(PTRA)
      IF(ICALL.LE.20) WRITE(6,2731) NEV,I,ICF(I),PTOT,PTRA
2731  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' PTOT ',E12.4,' PTRA ',
     $ E12.4)
      IF(PTOT.LT.XMOLIM.AND.ICF(I).NE.0) GO TO 1
      IF(PTRA.LT.XPTLIM.AND.ICF(I).NE.0) GO TO 1
      COSTHE = PF(3,I)/PTOT
      IF(ICF(I).NE.0.AND.ABS(COSTHE).LT.COSLMC) NWIC = NWIC + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSLMN) NWIN = NWIN + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSNEU) NWNE = NWNE + 1
      IF(ICALL.LE.20) WRITE(6,2431) NEV,I,ICF(I),COSTHE,NWIC,NWIN,PTOT,
     $ PTRA,NWNE
2431  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' COS NWIC-N ',E12.4,2I5,
     $ ' PTOT ',E12.4,' PTRA ',E12.4,' NWNE ',I2)
1     CONTINUE
999   RETURN
      END
      BLOCK DATA
      COMMON /CEK4VC/ ISKP
      DATA ISKP /0/
      END
      SUBROUTINE TOTMAS(WWW)
C     CALCULATE THE TOTAL MASS OF THE FINAL SYSTEM
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS WWW = MASS OF TOTAL SYSTEM
C
C                                                  J.OLSSON   14.03.81
C                  LAST CHANGE 14.03.81
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
      DIMENSION PSAM(4)
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      PTOTSM = 0.
      FACT = -1.
      DO 2030  J = 1,4
      IF(J.EQ.4) FACT = 1.
      PSAM(J) = 0.
      DO 1  I = 1,NF
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PSAM(J) = PSAM(J) + PF(J,I)
1     CONTINUE
      PTOTSM = PTOTSM + PSAM(J)*PSAM(J)*FACT
2030  CONTINUE
      PTOTSM = AMAX1(PTOTSM,1.E-08)
      WWW = SQRT(PTOTSM)
      IF(ICALL.LT.5) WRITE(6,2000) NF,WWW
2000  FORMAT(' NR OF FINAL PARTICLES ',I4,'  MASS ',E12.4)
      RETURN
      END
//LKED.SYSLIB DD
//            DD
//            DD DSN=F11OLS.JADE56.L,DISP=SHR
//            DD DSN=F11OLS.JADELD,DISP=SHR
//            DD DSN=F22ELS.JMC.L,DISP=SHR
//            DD DSN=F11LHO.JADEGL,DISP=SHR
//            DD DSN=F11LHO.TAGG.L,DISP=SHR
//            DD DSN=JADELG.LOAD,DISP=SHR
//            DD DSN=F22ALL.JADEMUL,DISP=SHR
//            DD DSN=R01UTL.HBOOK321.L,DISP=SHR
//            DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR
//            DD DSN=F22YAM.LGLOAD,DISP=SHR
//*           DD DSN=F22YAM.LG.L,DISP=SHR
//LKED.SYSIN DD *
//* INCLUDE SYSLIB(BRVECTT,NPECER8)
 INCLUDE SYSLIB(BRVECTT)
//*                 INPUT
//GO.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAPRIV4.NR2
//*                 OUTPUT
//*GO.FT02F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//    SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.ETAPRI86.NR34
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.ETAPRI.B15
C   28/03/97            MEMBER NAME  JBMCJADE (JADE56.S)    FORTRAN
//F11JOL   JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN RELPRI=LOW
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//*            NEW VERSION OF TAGGING TRACKING INSTALLED               *
//*             DETAILS, SEE J.C.N. 86, BY A. FINCH                    *
//*                                                                    *
//**********************************************************************
//*
//*         SHOWER CALCULATION OF BOTH PHOTONS AND ELECTRONS
//*           USING TOKYO SHOWER PROGRAM (A.SATO, S.YAMADA)
//*       ADAPTED FOR JADE SETUP WITH SF5 AND SF6   (J.OLSSON)
//*
//**********************************************************************
//*
// EXEC FCLG,PARM.FORT=XL,REGION.LKED=800K,
//  REGION.GO=840K
      COMMON /     / BOOK(3000)
      COMMON / BCS / IW(40000)
      COMMON /CEK4VC/ ISKP
C
      COMMON / CIEVS  / KIEV,IEVMIN,IEVMAX
C
C          IEVMIN : FIRST EVENT TO BE READ FROM INPUT FILE
C          IEVMAX : LAST  EVENT TO BE READ FROM INPUT FILE
C
C                   ==== > DEFAULT IEVMIN = 1
C                                  IEVMAX = 9999999
C
      INTEGER*2 HDATE
      COMMON / TODAY / HDATE(6)
C
      COMMON/CPRIN/IPRO
      COMMON/COLSON/ IPROO
C  IPROO IS A PRINT VARIABLE FOR DEBUG PRINT IN SHOWER ROUTINES
C
      COMMON /CUTSHO/ CUTOF
C WITH CUTOF THE STANDARD CUTOFF OF 1.2 MEV CAN BE CHANGED, BUT IT
C  IS ONLY EFFECTIVE WITH THE INCLUDE OF SUBR.  LGMCGMN
C
      COMMON/CFLAG/LFLAG(10)
      LOGICAL * 1 LFLAG
C
C          LFLAG(1) = SMEAR GAMMA AND ELECTRON ENERGIES
C          LFLAG(2) = GAMMA CONVERSION IN OUTER TANK AND COIL (TRKGAM)
C          LFLAG(3) = ABSORPTION LOSSES
C          LFLAG(4) = 3 DIM SHOWER PROFILE FIT TO EGGS CODE SLOW!!!!!
C          LFLAG(5) = .TRUE.   -->  WITH VERTEX CHAMBER TRACKING
C                   = .FALSE.  -->  WITHOUT VERTEX CHAMBER TRACKING
C                                   BUT OLD BEAM PIPE GEOMETRY AND
C                                 BEAM PIPE COUNTERS (BEFORE MAI 84)
C          LFLAG(6) = 3 DIM TOKYO SHOWER PROGRAM, JADE NOTE 20A
C
C         ===> DEFAULT .TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.FALSE.
C
C   NOTE: WITH THE USE OF TOKYO SHOWER PROGRAM, LFLAG(1) AND LFLAG(3)
C         ARE NOT USED. HOWEVER, THEY SHOULD BE TRUE TO ENSURE THAT THE
C         ALGN BANK IS PROPERLY MARKED FOR LATER ENERGY CORRECTION..
C         LFLAG(2) IS TRULY REDUNDANT
C         LFLAG(4) SHOULD BE FALSE, ALTHOUGH TRLGL IS ONLY CALLED FOR
C                  HADRONS AND MUONS
C
      LFLAG(1) = .TRUE.
      LFLAG(2) = .FALSE.
      LFLAG(3) = .TRUE.
      LFLAG(4) = .FALSE.
      LFLAG(5) = .TRUE.
      LFLAG(6) = .TRUE.
C
      WRITE(6,521) (LFLAG(I),I=1,6)
521   FORMAT(' LFLAG:  ',6I3)
C
C  INIT OF TODAY
C
      HDATE(1) = 1
      HDATE(2) = 1
      HDATE(3) = 1
      HDATE(4) = 15
      HDATE(5) = 6
      HDATE(6) = 1986
C
      WRITE(6,2201) HDATE
2201  FORMAT('  DATE: ',6I6)
C
      CALL BINT( 40000,15000,500, 0 )
C
C     ISKP = 2
      ISKP = 0
      IPRO = 0
      IPROO = 0
C
C MINIMUM CUTOFF ENERGY IN SHOWER
C     CUTOF = 1.2
C
C            SET EVENT READING LIMITS
C
      IEVMIN = 0
      IEVMAX = 2000
      WRITE(6,146) IEVMIN,IEVMAX
146   FORMAT('   IEVMIN AND IEVMAX :',2I7)
C
      CALL MCJADE( 0,  5 )
      CALL BSTA
      CALL PALL
      CALL HISTDO
      STOP
      END
      SUBROUTINE JGETEV( * )
C-----------------------------------------------------------
C
C  VERSION OF 02/11/81   LAST MOD 02/11/81      E.ELSEN
C  GET NEXT EVENT.
C  RETURN 1 IF END OF INPUT SEQUENCE (EOF).
C-----------------------------------------------------------
C
C
      COMMON /CIEVS/ KIEV,IEVMIN,IEVMAX
      DATA IRUNIT / 3 /,ICALL/0/
C
      ICALL = ICALL + 1
C     WRITE(6,3910) ICALL
3910  FORMAT(' ICALL       ',2I10)
      IF(ICALL.NE.1) GO TO 95
      IEV = 0
      KIEV = 0
      NIEV = 20
95    IEV = IEV + 1
1001  IF(IEV.GE.IEVMIN) GO TO 1151
      IEV = IEV + 1
      READ(IRUNIT,ERR=1000,END=8100) NR
      GO TO 1001
CCC  READ EVENTS
1151  IF(IEV.GT.IEVMAX) GO TO 90
C
      KIEV = KIEV + 1
      CALL BRVECT( IRUNIT, &1000, &8100 )
      IF((IEV/NIEV)*NIEV.EQ.IEV) WRITE(6,6811) IEV
6811  FORMAT(' NR OF EVENTS DONE:',I10)
C
CHECK IF EVENT HAS ENOUGH PARTICLES IN INNER DETECTOR AND LEAD GLASS
      CALL CHK4VC(NWIC,NWIN,NWNE)
C     CALL TOTMAS(WWW)
C     CALL HFILL(1,WWW,0,1.)
C     CALL HFILL(2,WWW,0,1.)
      ICHK = 0
C     IF(NWIC.GE.4.AND.NWIN.GE.1) ICHK = 1
      IF(NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.2) ICHK = 1
C     IF(NWIC.GE.8.AND.NWIN.GE.0) ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.2) ICHK = 1
C     IF(NWIN.GE.2.AND.NWIC.LE.0) ICHK = 1
C     WRITE(6,1130) NWIC,NWIN,ICHK
C1130  FORMAT(' NWIC NWIN ICHK ',3I8)
      IF(ICHK.NE.0) GO TO 3637
      IEV = IEV + 1
      GO TO 1151
 3637 CONTINUE
C     CALL HFILL(3,WWW,0,1.)
C     CALL HFILL(4,WWW,0,1.)
      GO TO 8000
C
 90   WRITE(6,8012)
 8012 FORMAT(' MAX EVENTS READ  ')
      GO TO 7000
C
 1000 WRITE(6,8002)
 8002 FORMAT(' READ ERROR   OR BCS ERROR  ')
 8000 RETURN
C
 8100 WRITE(6,8101)
 8101 FORMAT(' E O F   E O F   E O F   E O F ')
 7000 RETURN 1
      END
      SUBROUTINE CHK4VC(NWIC,NWIN,NWNE)
C         CHECK THE 4-VECTORS AND SEE IF ENOUGH PARTICLES INSIDE THE
C         INNER DETECTOR AND LEAD GLASS.
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS NWIC = NR OF CHARGED PARTICLES INSIDE I.D.
C    RETURNS NWIN = NR OF NEUTRAL PARTICLES INSIDE LEAD GLASS
C    RETURNS NWNE = NR OF NEUTRAL PARTICLES INSIDE BARREL
C
C                                                  J.OLSSON    8.11.80
C                  LAST CHANGE  24.4.1982
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
C COSLMN FROM 320,1514 INNER EDGE E-CAPS.
C COSLMC FROM 227,1180 AT LEAST 16 WIRES IN JET CHAMBER
      DATA COSLMN /0.9784/, COSLMC /0.9820/,XMOLIM/.040/,XPTLIM/.030/
      DATA COSNEU /0.870/
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      ICHK = 0
      NWNE = 0
      NWIC = 0
      NWIN = 0
      IF(NF.LE.0) GO TO 999
      DO 1  I = 1,NF
C SKIP INITIAL ELECTRONS IF REQUIRED
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PTOT = 0.
      DO 2  J = 1,3
      PTOT = PTOT + PF(J,I)**2
2     IF(J.EQ.2) PTRA = PTOT
      PTOT = SQRT(PTOT)
      PTRA = SQRT(PTRA)
      IF(ICALL.LE.20) WRITE(6,2731) NEV,I,ICF(I),PTOT,PTRA
2731  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' PTOT ',E12.4,' PTRA ',
     $ E12.4)
      IF(PTOT.LT.XMOLIM.AND.ICF(I).NE.0) GO TO 1
      IF(PTRA.LT.XPTLIM.AND.ICF(I).NE.0) GO TO 1
      COSTHE = PF(3,I)/PTOT
      IF(ICF(I).NE.0.AND.ABS(COSTHE).LT.COSLMC) NWIC = NWIC + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSLMN) NWIN = NWIN + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSNEU) NWNE = NWNE + 1
      IF(ICALL.LE.20) WRITE(6,2431) NEV,I,ICF(I),COSTHE,NWIC,NWIN,PTOT,
     $ PTRA,NWNE
2431  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' COS NWIC-N ',E12.4,2I5,
     $ ' PTOT ',E12.4,' PTRA ',E12.4,' NWNE ',I2)
1     CONTINUE
999   RETURN
      END
      BLOCK DATA
      COMMON /CEK4VC/ ISKP
      DATA ISKP /0/
      END
      SUBROUTINE TOTMAS(WWW)
C     CALCULATE THE TOTAL MASS OF THE FINAL SYSTEM
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS WWW = MASS OF TOTAL SYSTEM
C
C                                                  J.OLSSON   14.03.81
C                  LAST CHANGE 14.03.81
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
      DIMENSION PSAM(4)
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      PTOTSM = 0.
      FACT = -1.
      DO 2030  J = 1,4
      IF(J.EQ.4) FACT = 1.
      PSAM(J) = 0.
      DO 1  I = 1,NF
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PSAM(J) = PSAM(J) + PF(J,I)
1     CONTINUE
      PTOTSM = PTOTSM + PSAM(J)*PSAM(J)*FACT
2030  CONTINUE
      PTOTSM = AMAX1(PTOTSM,1.E-08)
      WWW = SQRT(PTOTSM)
      IF(ICALL.LT.5) WRITE(6,2000) NF,WWW
2000  FORMAT(' NR OF FINAL PARTICLES ',I4,'  MASS ',E12.4)
      RETURN
      END
//LKED.SYSLIB DD
//            DD
//            DD DSN=F11OLS.JADE56.L,DISP=SHR
//            DD DSN=F11OLS.JADELD,DISP=SHR
//            DD DSN=F22ELS.JMC.L,DISP=SHR
//            DD DSN=F11LHO.JADEGL,DISP=SHR
//            DD DSN=F11LHO.TAGG.L,DISP=SHR
//            DD DSN=JADELG.LOAD,DISP=SHR
//            DD DSN=F22ALL.JADEMUL,DISP=SHR
//            DD DSN=R01UTL.HBOOK321.L,DISP=SHR
//            DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR
//            DD DSN=F22YAM.LGLOAD,DISP=SHR
//*           DD DSN=F22YAM.LG.L,DISP=SHR
//LKED.SYSIN DD *
 INCLUDE SYSLIB(BRVECTT,NPECER8)
//*                 INPUT
//GO.FT03F001 DD DISP=SHR,DSN=F11OLS.UNIGAM4V.E100D9
//*                 OUTPUT
//*O.FT02F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//    SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.UNIGAM.E100D9.SF6
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.ETAPRI.B15
//F11JOL   JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN RELPRI=LOW
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//*            NEW VERSION OF TAGGING TRACKING INSTALLED               *
//*             DETAILS, SEE J.C.N. 86, BY A. FINCH                    *
//*                                                                    *
//**********************************************************************
//*
//*         SHOWER CALCULATION OF BOTH PHOTONS AND ELECTRONS
//*           USING TOKYO SHOWER PROGRAM (A.SATO, S.YAMADA)
//*       ADAPTED FOR JADE SETUP WITH SF5 AND SF6   (J.OLSSON)
//*
//**********************************************************************
//*
// EXEC FCLG,PARM.FORT=XL,REGION.LKED=800K,
//  REGION.GO=840K
      COMMON /     / BOOK(3000)
      COMMON / BCS / IW(40000)
      COMMON /CEK4VC/ ISKP
C
      COMMON / CIEVS  / KIEV,IEVMIN,IEVMAX
C
C          IEVMIN : FIRST EVENT TO BE READ FROM INPUT FILE
C          IEVMAX : LAST  EVENT TO BE READ FROM INPUT FILE
C
C                   ==== > DEFAULT IEVMIN = 1
C                                  IEVMAX = 9999999
C
      INTEGER*2 HDATE
      COMMON / TODAY / HDATE(6)
C
      COMMON/CPRIN/IPRO
      COMMON/COLSON/ IPROO
C  IPROO IS A PRINT VARIABLE FOR DEBUG PRINT IN SHOWER ROUTINES
C
      COMMON /CUTSHO/ CUTOF
C WITH CUTOF THE STANDARD CUTOFF OF 1.2 MEV CAN BE CHANGED, BUT IT
C  IS ONLY EFFECTIVE WITH THE INCLUDE OF SUBR.  LGMCGMN
C
      COMMON/CFLAG/LFLAG(10)
      LOGICAL * 1 LFLAG
C
C          LFLAG(1) = SMEAR GAMMA AND ELECTRON ENERGIES
C          LFLAG(2) = GAMMA CONVERSION IN OUTER TANK AND COIL (TRKGAM)
C          LFLAG(3) = ABSORPTION LOSSES
C          LFLAG(4) = 3 DIM SHOWER PROFILE FIT TO EGGS CODE SLOW!!!!!
C          LFLAG(5) = .TRUE.   -->  WITH VERTEX CHAMBER TRACKING
C                   = .FALSE.  -->  WITHOUT VERTEX CHAMBER TRACKING
C                                   BUT OLD BEAM PIPE GEOMETRY AND
C                                 BEAM PIPE COUNTERS (BEFORE MAI 84)
C          LFLAG(6) = 3 DIM TOKYO SHOWER PROGRAM, JADE NOTE 20A
C
C         ===> DEFAULT .TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.FALSE.
C
C   NOTE: WITH THE USE OF TOKYO SHOWER PROGRAM, LFLAG(1) AND LFLAG(3)
C         ARE NOT USED. HOWEVER, THEY SHOULD BE TRUE TO ENSURE THAT THE
C         ALGN BANK IS PROPERLY MARKED FOR LATER ENERGY CORRECTION..
C         LFLAG(2) IS TRULY REDUNDANT
C         LFLAG(4) SHOULD BE FALSE, ALTHOUGH TRLGL IS ONLY CALLED FOR
C                  HADRONS AND MUONS
C
      LFLAG(1) = .TRUE.
      LFLAG(2) = .FALSE.
      LFLAG(3) = .TRUE.
      LFLAG(4) = .FALSE.
      LFLAG(5) = .TRUE.
      LFLAG(6) = .TRUE.
C
      WRITE(6,521) (LFLAG(I),I=1,6)
521   FORMAT(' LFLAG:  ',6I3)
C
C  INIT OF TODAY
C
      HDATE(1) = 1
      HDATE(2) = 1
      HDATE(3) = 1
      HDATE(4) = 15
      HDATE(5) = 6
      HDATE(6) = 1986
C
      WRITE(6,2201) HDATE
2201  FORMAT('  DATE: ',6I6)
C
      CALL BINT( 40000,15000,500, 0 )
C
C     ISKP = 2
      ISKP = 0
      IPRO = 0
      IPROO = 0
C
C MINIMUM CUTOFF ENERGY IN SHOWER
C     CUTOF = 1.2
C
C            SET EVENT READING LIMITS
C
      IEVMIN = 0
      IEVMAX = 2000
      WRITE(6,146) IEVMIN,IEVMAX
146   FORMAT('   IEVMIN AND IEVMAX :',2I7)
C
      CALL MCJADE( 0,  5 )
      CALL BSTA
      CALL PALL
      CALL HISTDO
      STOP
      END
      SUBROUTINE JGETEV( * )
C-----------------------------------------------------------
C
C  VERSION OF 02/11/81   LAST MOD 02/11/81      E.ELSEN
C  GET NEXT EVENT.
C  RETURN 1 IF END OF INPUT SEQUENCE (EOF).
C-----------------------------------------------------------
C
C
      COMMON /CIEVS/ KIEV,IEVMIN,IEVMAX
      DATA IRUNIT / 3 /,ICALL/0/
C
      ICALL = ICALL + 1
C     WRITE(6,3910) ICALL
3910  FORMAT(' ICALL       ',2I10)
      IF(ICALL.NE.1) GO TO 95
      IEV = 0
      KIEV = 0
      NIEV = 20
95    IEV = IEV + 1
1001  IF(IEV.GE.IEVMIN) GO TO 1151
      IEV = IEV + 1
      READ(IRUNIT,ERR=1000,END=8100) NR
      GO TO 1001
CCC  READ EVENTS
1151  IF(IEV.GT.IEVMAX) GO TO 90
C
      KIEV = KIEV + 1
      CALL BRVECT( IRUNIT, &1000, &8100 )
      IF((IEV/NIEV)*NIEV.EQ.IEV) WRITE(6,6811) IEV
6811  FORMAT(' NR OF EVENTS DONE:',I10)
C
CHECK IF EVENT HAS ENOUGH PARTICLES IN INNER DETECTOR AND LEAD GLASS
      CALL CHK4VC(NWIC,NWIN,NWNE)
C     CALL TOTMAS(WWW)
C     CALL HFILL(1,WWW,0,1.)
C     CALL HFILL(2,WWW,0,1.)
      ICHK = 0
C     IF(NWIC.GE.4.AND.NWIN.GE.1) ICHK = 1
      IF(NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.2) ICHK = 1
C     IF(NWIC.GE.8.AND.NWIN.GE.0) ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.2) ICHK = 1
C     IF(NWIN.GE.2.AND.NWIC.LE.0) ICHK = 1
C     WRITE(6,1130) NWIC,NWIN,ICHK
C1130  FORMAT(' NWIC NWIN ICHK ',3I8)
      IF(ICHK.NE.0) GO TO 3637
      IEV = IEV + 1
      GO TO 1151
 3637 CONTINUE
C     CALL HFILL(3,WWW,0,1.)
C     CALL HFILL(4,WWW,0,1.)
      GO TO 8000
C
 90   WRITE(6,8012)
 8012 FORMAT(' MAX EVENTS READ  ')
      GO TO 7000
C
 1000 WRITE(6,8002)
 8002 FORMAT(' READ ERROR   OR BCS ERROR  ')
 8000 RETURN
C
 8100 WRITE(6,8101)
 8101 FORMAT(' E O F   E O F   E O F   E O F ')
 7000 RETURN 1
      END
      SUBROUTINE CHK4VC(NWIC,NWIN,NWNE)
C         CHECK THE 4-VECTORS AND SEE IF ENOUGH PARTICLES INSIDE THE
C         INNER DETECTOR AND LEAD GLASS.
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS NWIC = NR OF CHARGED PARTICLES INSIDE I.D.
C    RETURNS NWIN = NR OF NEUTRAL PARTICLES INSIDE LEAD GLASS
C    RETURNS NWNE = NR OF NEUTRAL PARTICLES INSIDE BARREL
C
C                                                  J.OLSSON    8.11.80
C                  LAST CHANGE  24.4.1982
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
C COSLMN FROM 320,1514 INNER EDGE E-CAPS.
C COSLMC FROM 227,1180 AT LEAST 16 WIRES IN JET CHAMBER
      DATA COSLMN /0.9784/, COSLMC /0.9820/,XMOLIM/.040/,XPTLIM/.030/
      DATA COSNEU /0.870/
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      ICHK = 0
      NWNE = 0
      NWIC = 0
      NWIN = 0
      IF(NF.LE.0) GO TO 999
      DO 1  I = 1,NF
C SKIP INITIAL ELECTRONS IF REQUIRED
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PTOT = 0.
      DO 2  J = 1,3
      PTOT = PTOT + PF(J,I)**2
2     IF(J.EQ.2) PTRA = PTOT
      PTOT = SQRT(PTOT)
      PTRA = SQRT(PTRA)
      IF(ICALL.LE.20) WRITE(6,2731) NEV,I,ICF(I),PTOT,PTRA
2731  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' PTOT ',E12.4,' PTRA ',
     $ E12.4)
      IF(PTOT.LT.XMOLIM.AND.ICF(I).NE.0) GO TO 1
      IF(PTRA.LT.XPTLIM.AND.ICF(I).NE.0) GO TO 1
      COSTHE = PF(3,I)/PTOT
      IF(ICF(I).NE.0.AND.ABS(COSTHE).LT.COSLMC) NWIC = NWIC + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSLMN) NWIN = NWIN + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSNEU) NWNE = NWNE + 1
      IF(ICALL.LE.20) WRITE(6,2431) NEV,I,ICF(I),COSTHE,NWIC,NWIN,PTOT,
     $ PTRA,NWNE
2431  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' COS NWIC-N ',E12.4,2I5,
     $ ' PTOT ',E12.4,' PTRA ',E12.4,' NWNE ',I2)
1     CONTINUE
999   RETURN
      END
      BLOCK DATA
      COMMON /CEK4VC/ ISKP
      DATA ISKP /0/
      END
      SUBROUTINE TOTMAS(WWW)
C     CALCULATE THE TOTAL MASS OF THE FINAL SYSTEM
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS WWW = MASS OF TOTAL SYSTEM
C
C                                                  J.OLSSON   14.03.81
C                  LAST CHANGE 14.03.81
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
      DIMENSION PSAM(4)
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      PTOTSM = 0.
      FACT = -1.
      DO 2030  J = 1,4
      IF(J.EQ.4) FACT = 1.
      PSAM(J) = 0.
      DO 1  I = 1,NF
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PSAM(J) = PSAM(J) + PF(J,I)
1     CONTINUE
      PTOTSM = PTOTSM + PSAM(J)*PSAM(J)*FACT
2030  CONTINUE
      PTOTSM = AMAX1(PTOTSM,1.E-08)
      WWW = SQRT(PTOTSM)
      IF(ICALL.LT.5) WRITE(6,2000) NF,WWW
2000  FORMAT(' NR OF FINAL PARTICLES ',I4,'  MASS ',E12.4)
      RETURN
      END
//LKED.SYSLIB DD
//            DD
//            DD DSN=F11OLS.JADE56.L,DISP=SHR
//            DD DSN=F11OLS.JADELD,DISP=SHR
//            DD DSN=F22ELS.JMC.L,DISP=SHR
//            DD DSN=F11LHO.JADEGL,DISP=SHR
//            DD DSN=F11LHO.TAGG.L,DISP=SHR
//            DD DSN=JADELG.LOAD,DISP=SHR
//            DD DSN=F22ALL.JADEMUL,DISP=SHR
//            DD DSN=R01UTL.HBOOK321.L,DISP=SHR
//            DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR
//            DD DSN=F22YAM.LGLOAD,DISP=SHR
//*           DD DSN=F22YAM.LG.L,DISP=SHR
//LKED.SYSIN DD *
 INCLUDE SYSLIB(BRVECTT,NPECER8)
//*                 INPUT
//GO.FT03F001 DD DISP=SHR,DSN=F11OLS.UNIGAM4V.E200D9
//*                 OUTPUT
//*O.FT02F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//    SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.UNIGAM.E200D9.SF6
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.ETAPRI.B15
//F11JOL   JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN RELPRI=LOW
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//*            NEW VERSION OF TAGGING TRACKING INSTALLED               *
//*             DETAILS, SEE J.C.N. 86, BY A. FINCH                    *
//*                                                                    *
//**********************************************************************
//*
//*         SHOWER CALCULATION OF BOTH PHOTONS AND ELECTRONS
//*           USING TOKYO SHOWER PROGRAM (A.SATO, S.YAMADA)
//*       ADAPTED FOR JADE SETUP WITH SF5 AND SF6   (J.OLSSON)
//*
//**********************************************************************
//*
// EXEC FCLG,PARM.FORT=XL,REGION.LKED=800K,
//  REGION.GO=840K
      COMMON /     / BOOK(3000)
      COMMON / BCS / IW(40000)
      COMMON /CEK4VC/ ISKP
C
      COMMON / CIEVS  / KIEV,IEVMIN,IEVMAX
C
C          IEVMIN : FIRST EVENT TO BE READ FROM INPUT FILE
C          IEVMAX : LAST  EVENT TO BE READ FROM INPUT FILE
C
C                   ==== > DEFAULT IEVMIN = 1
C                                  IEVMAX = 9999999
C
      INTEGER*2 HDATE
      COMMON / TODAY / HDATE(6)
C
      COMMON/CPRIN/IPRO
      COMMON/COLSON/ IPROO
C  IPROO IS A PRINT VARIABLE FOR DEBUG PRINT IN SHOWER ROUTINES
C
      COMMON /CUTSHO/ CUTOF
C WITH CUTOF THE STANDARD CUTOFF OF 1.2 MEV CAN BE CHANGED, BUT IT
C  IS ONLY EFFECTIVE WITH THE INCLUDE OF SUBR.  LGMCGMN
C
      COMMON/CFLAG/LFLAG(10)
      LOGICAL * 1 LFLAG
C
C          LFLAG(1) = SMEAR GAMMA AND ELECTRON ENERGIES
C          LFLAG(2) = GAMMA CONVERSION IN OUTER TANK AND COIL (TRKGAM)
C          LFLAG(3) = ABSORPTION LOSSES
C          LFLAG(4) = 3 DIM SHOWER PROFILE FIT TO EGGS CODE SLOW!!!!!
C          LFLAG(5) = .TRUE.   -->  WITH VERTEX CHAMBER TRACKING
C                   = .FALSE.  -->  WITHOUT VERTEX CHAMBER TRACKING
C                                   BUT OLD BEAM PIPE GEOMETRY AND
C                                 BEAM PIPE COUNTERS (BEFORE MAI 84)
C          LFLAG(6) = 3 DIM TOKYO SHOWER PROGRAM, JADE NOTE 20A
C
C         ===> DEFAULT .TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.FALSE.
C
C   NOTE: WITH THE USE OF TOKYO SHOWER PROGRAM, LFLAG(1) AND LFLAG(3)
C         ARE NOT USED. HOWEVER, THEY SHOULD BE TRUE TO ENSURE THAT THE
C         ALGN BANK IS PROPERLY MARKED FOR LATER ENERGY CORRECTION..
C         LFLAG(2) IS TRULY REDUNDANT
C         LFLAG(4) SHOULD BE FALSE, ALTHOUGH TRLGL IS ONLY CALLED FOR
C                  HADRONS AND MUONS
C
      LFLAG(1) = .TRUE.
      LFLAG(2) = .FALSE.
      LFLAG(3) = .TRUE.
      LFLAG(4) = .FALSE.
      LFLAG(5) = .TRUE.
      LFLAG(6) = .TRUE.
C
      WRITE(6,521) (LFLAG(I),I=1,6)
521   FORMAT(' LFLAG:  ',6I3)
C
C  INIT OF TODAY
C
      HDATE(1) = 1
      HDATE(2) = 1
      HDATE(3) = 1
      HDATE(4) = 15
      HDATE(5) = 6
      HDATE(6) = 1986
C
      WRITE(6,2201) HDATE
2201  FORMAT('  DATE: ',6I6)
C
      CALL BINT( 40000,15000,500, 0 )
C
C     ISKP = 2
      ISKP = 0
      IPRO = 0
      IPROO = 0
C
C MINIMUM CUTOFF ENERGY IN SHOWER
C     CUTOF = 1.2
C
C            SET EVENT READING LIMITS
C
      IEVMIN = 0
      IEVMAX = 1000
      WRITE(6,146) IEVMIN,IEVMAX
146   FORMAT('   IEVMIN AND IEVMAX :',2I7)
C
      CALL MCJADE( 0,  5 )
      CALL BSTA
      CALL PALL
      CALL HISTDO
      STOP
      END
      SUBROUTINE JGETEV( * )
C-----------------------------------------------------------
C
C  VERSION OF 02/11/81   LAST MOD 02/11/81      E.ELSEN
C  GET NEXT EVENT.
C  RETURN 1 IF END OF INPUT SEQUENCE (EOF).
C-----------------------------------------------------------
C
C
      COMMON /CIEVS/ KIEV,IEVMIN,IEVMAX
      DATA IRUNIT / 3 /,ICALL/0/
C
      ICALL = ICALL + 1
C     WRITE(6,3910) ICALL
3910  FORMAT(' ICALL       ',2I10)
      IF(ICALL.NE.1) GO TO 95
      IEV = 0
      KIEV = 0
      NIEV = 20
95    IEV = IEV + 1
1001  IF(IEV.GE.IEVMIN) GO TO 1151
      IEV = IEV + 1
      READ(IRUNIT,ERR=1000,END=8100) NR
      GO TO 1001
CCC  READ EVENTS
1151  IF(IEV.GT.IEVMAX) GO TO 90
C
      KIEV = KIEV + 1
      CALL BRVECT( IRUNIT, &1000, &8100 )
      IF((IEV/NIEV)*NIEV.EQ.IEV) WRITE(6,6811) IEV
6811  FORMAT(' NR OF EVENTS DONE:',I10)
C
CHECK IF EVENT HAS ENOUGH PARTICLES IN INNER DETECTOR AND LEAD GLASS
      CALL CHK4VC(NWIC,NWIN,NWNE)
C     CALL TOTMAS(WWW)
C     CALL HFILL(1,WWW,0,1.)
C     CALL HFILL(2,WWW,0,1.)
      ICHK = 0
C     IF(NWIC.GE.4.AND.NWIN.GE.1) ICHK = 1
      IF(NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.2) ICHK = 1
C     IF(NWIC.GE.8.AND.NWIN.GE.0) ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.2) ICHK = 1
C     IF(NWIN.GE.2.AND.NWIC.LE.0) ICHK = 1
C     WRITE(6,1130) NWIC,NWIN,ICHK
C1130  FORMAT(' NWIC NWIN ICHK ',3I8)
      IF(ICHK.NE.0) GO TO 3637
      IEV = IEV + 1
      GO TO 1151
 3637 CONTINUE
C     CALL HFILL(3,WWW,0,1.)
C     CALL HFILL(4,WWW,0,1.)
      GO TO 8000
C
 90   WRITE(6,8012)
 8012 FORMAT(' MAX EVENTS READ  ')
      GO TO 7000
C
 1000 WRITE(6,8002)
 8002 FORMAT(' READ ERROR   OR BCS ERROR  ')
 8000 RETURN
C
 8100 WRITE(6,8101)
 8101 FORMAT(' E O F   E O F   E O F   E O F ')
 7000 RETURN 1
      END
      SUBROUTINE CHK4VC(NWIC,NWIN,NWNE)
C         CHECK THE 4-VECTORS AND SEE IF ENOUGH PARTICLES INSIDE THE
C         INNER DETECTOR AND LEAD GLASS.
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS NWIC = NR OF CHARGED PARTICLES INSIDE I.D.
C    RETURNS NWIN = NR OF NEUTRAL PARTICLES INSIDE LEAD GLASS
C    RETURNS NWNE = NR OF NEUTRAL PARTICLES INSIDE BARREL
C
C                                                  J.OLSSON    8.11.80
C                  LAST CHANGE  24.4.1982
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
C COSLMN FROM 320,1514 INNER EDGE E-CAPS.
C COSLMC FROM 227,1180 AT LEAST 16 WIRES IN JET CHAMBER
      DATA COSLMN /0.9784/, COSLMC /0.9820/,XMOLIM/.040/,XPTLIM/.030/
      DATA COSNEU /0.870/
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      ICHK = 0
      NWNE = 0
      NWIC = 0
      NWIN = 0
      IF(NF.LE.0) GO TO 999
      DO 1  I = 1,NF
C SKIP INITIAL ELECTRONS IF REQUIRED
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PTOT = 0.
      DO 2  J = 1,3
      PTOT = PTOT + PF(J,I)**2
2     IF(J.EQ.2) PTRA = PTOT
      PTOT = SQRT(PTOT)
      PTRA = SQRT(PTRA)
      IF(ICALL.LE.20) WRITE(6,2731) NEV,I,ICF(I),PTOT,PTRA
2731  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' PTOT ',E12.4,' PTRA ',
     $ E12.4)
      IF(PTOT.LT.XMOLIM.AND.ICF(I).NE.0) GO TO 1
      IF(PTRA.LT.XPTLIM.AND.ICF(I).NE.0) GO TO 1
      COSTHE = PF(3,I)/PTOT
      IF(ICF(I).NE.0.AND.ABS(COSTHE).LT.COSLMC) NWIC = NWIC + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSLMN) NWIN = NWIN + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSNEU) NWNE = NWNE + 1
      IF(ICALL.LE.20) WRITE(6,2431) NEV,I,ICF(I),COSTHE,NWIC,NWIN,PTOT,
     $ PTRA,NWNE
2431  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' COS NWIC-N ',E12.4,2I5,
     $ ' PTOT ',E12.4,' PTRA ',E12.4,' NWNE ',I2)
1     CONTINUE
999   RETURN
      END
      BLOCK DATA
      COMMON /CEK4VC/ ISKP
      DATA ISKP /0/
      END
      SUBROUTINE TOTMAS(WWW)
C     CALCULATE THE TOTAL MASS OF THE FINAL SYSTEM
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS WWW = MASS OF TOTAL SYSTEM
C
C                                                  J.OLSSON   14.03.81
C                  LAST CHANGE 14.03.81
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
      DIMENSION PSAM(4)
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      PTOTSM = 0.
      FACT = -1.
      DO 2030  J = 1,4
      IF(J.EQ.4) FACT = 1.
      PSAM(J) = 0.
      DO 1  I = 1,NF
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PSAM(J) = PSAM(J) + PF(J,I)
1     CONTINUE
      PTOTSM = PTOTSM + PSAM(J)*PSAM(J)*FACT
2030  CONTINUE
      PTOTSM = AMAX1(PTOTSM,1.E-08)
      WWW = SQRT(PTOTSM)
      IF(ICALL.LT.5) WRITE(6,2000) NF,WWW
2000  FORMAT(' NR OF FINAL PARTICLES ',I4,'  MASS ',E12.4)
      RETURN
      END
//LKED.SYSLIB DD
//            DD
//            DD DSN=F11OLS.JADE56.L,DISP=SHR
//            DD DSN=F11OLS.JADELD,DISP=SHR
//            DD DSN=F22ELS.JMC.L,DISP=SHR
//            DD DSN=F11LHO.JADEGL,DISP=SHR
//            DD DSN=F11LHO.TAGG.L,DISP=SHR
//            DD DSN=JADELG.LOAD,DISP=SHR
//            DD DSN=F22ALL.JADEMUL,DISP=SHR
//            DD DSN=R01UTL.HBOOK321.L,DISP=SHR
//            DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR
//            DD DSN=F22YAM.LGLOAD,DISP=SHR
//*           DD DSN=F22YAM.LG.L,DISP=SHR
//LKED.SYSIN DD *
 INCLUDE SYSLIB(BRVECTT,NPECER8)
//*                 INPUT
//GO.FT03F001 DD DISP=SHR,DSN=F11OLS.UNIGAM4V.E400D9
//*                 OUTPUT
//*O.FT02F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//    SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.UNIGAM.E400D9.SF6A
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.ETAPRI.B15
//F11JOL   JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN RELPRI=LOW
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//*            NEW VERSION OF TAGGING TRACKING INSTALLED               *
//*             DETAILS, SEE J.C.N. 86, BY A. FINCH                    *
//*                                                                    *
//**********************************************************************
//*
//*         SHOWER CALCULATION OF BOTH PHOTONS AND ELECTRONS
//*           USING TOKYO SHOWER PROGRAM (A.SATO, S.YAMADA)
//*       ADAPTED FOR JADE SETUP WITH SF5 AND SF6   (J.OLSSON)
//*
//**********************************************************************
//*
// EXEC FCLG,PARM.FORT=XL,REGION.LKED=800K,
//  REGION.GO=840K
      COMMON /     / BOOK(3000)
      COMMON / BCS / IW(40000)
      COMMON /CEK4VC/ ISKP
C
      COMMON / CIEVS  / KIEV,IEVMIN,IEVMAX
C
C          IEVMIN : FIRST EVENT TO BE READ FROM INPUT FILE
C          IEVMAX : LAST  EVENT TO BE READ FROM INPUT FILE
C
C                   ==== > DEFAULT IEVMIN = 1
C                                  IEVMAX = 9999999
C
      INTEGER*2 HDATE
      COMMON / TODAY / HDATE(6)
C
      COMMON/CPRIN/IPRO
      COMMON/COLSON/ IPROO
C  IPROO IS A PRINT VARIABLE FOR DEBUG PRINT IN SHOWER ROUTINES
C
      COMMON /CUTSHO/ CUTOF
C WITH CUTOF THE STANDARD CUTOFF OF 1.2 MEV CAN BE CHANGED, BUT IT
C  IS ONLY EFFECTIVE WITH THE INCLUDE OF SUBR.  LGMCGMN
C
      COMMON/CFLAG/LFLAG(10)
      LOGICAL * 1 LFLAG
C
C          LFLAG(1) = SMEAR GAMMA AND ELECTRON ENERGIES
C          LFLAG(2) = GAMMA CONVERSION IN OUTER TANK AND COIL (TRKGAM)
C          LFLAG(3) = ABSORPTION LOSSES
C          LFLAG(4) = 3 DIM SHOWER PROFILE FIT TO EGGS CODE SLOW!!!!!
C          LFLAG(5) = .TRUE.   -->  WITH VERTEX CHAMBER TRACKING
C                   = .FALSE.  -->  WITHOUT VERTEX CHAMBER TRACKING
C                                   BUT OLD BEAM PIPE GEOMETRY AND
C                                 BEAM PIPE COUNTERS (BEFORE MAI 84)
C          LFLAG(6) = 3 DIM TOKYO SHOWER PROGRAM, JADE NOTE 20A
C
C         ===> DEFAULT .TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.FALSE.
C
C   NOTE: WITH THE USE OF TOKYO SHOWER PROGRAM, LFLAG(1) AND LFLAG(3)
C         ARE NOT USED. HOWEVER, THEY SHOULD BE TRUE TO ENSURE THAT THE
C         ALGN BANK IS PROPERLY MARKED FOR LATER ENERGY CORRECTION..
C         LFLAG(2) IS TRULY REDUNDANT
C         LFLAG(4) SHOULD BE FALSE, ALTHOUGH TRLGL IS ONLY CALLED FOR
C                  HADRONS AND MUONS
C
      LFLAG(1) = .TRUE.
      LFLAG(2) = .FALSE.
      LFLAG(3) = .TRUE.
      LFLAG(4) = .FALSE.
      LFLAG(5) = .TRUE.
      LFLAG(6) = .TRUE.
C
      WRITE(6,521) (LFLAG(I),I=1,6)
521   FORMAT(' LFLAG:  ',6I3)
C
C  INIT OF TODAY
C
      HDATE(1) = 1
      HDATE(2) = 1
      HDATE(3) = 1
      HDATE(4) = 15
      HDATE(5) = 6
      HDATE(6) = 1986
C
      WRITE(6,2201) HDATE
2201  FORMAT('  DATE: ',6I6)
C
      CALL BINT( 40000,15000,500, 0 )
C
C     ISKP = 2
      ISKP = 0
      IPRO = 0
      IPROO = 0
C
C MINIMUM CUTOFF ENERGY IN SHOWER
C     CUTOF = 1.2
C
C            SET EVENT READING LIMITS
C
      IEVMIN = 1001
      IEVMAX = 2000
      WRITE(6,146) IEVMIN,IEVMAX
146   FORMAT('   IEVMIN AND IEVMAX :',2I7)
C
      CALL MCJADE( 0,  5 )
      CALL BSTA
      CALL PALL
      CALL HISTDO
      STOP
      END
      SUBROUTINE JGETEV( * )
C-----------------------------------------------------------
C
C  VERSION OF 02/11/81   LAST MOD 02/11/81      E.ELSEN
C  GET NEXT EVENT.
C  RETURN 1 IF END OF INPUT SEQUENCE (EOF).
C-----------------------------------------------------------
C
C
      COMMON /CIEVS/ KIEV,IEVMIN,IEVMAX
      DATA IRUNIT / 3 /,ICALL/0/
C
      ICALL = ICALL + 1
C     WRITE(6,3910) ICALL
3910  FORMAT(' ICALL       ',2I10)
      IF(ICALL.NE.1) GO TO 95
      IEV = 0
      KIEV = 0
      NIEV = 20
95    IEV = IEV + 1
1001  IF(IEV.GE.IEVMIN) GO TO 1151
      IEV = IEV + 1
      READ(IRUNIT,ERR=1000,END=8100) NR
      GO TO 1001
CCC  READ EVENTS
1151  IF(IEV.GT.IEVMAX) GO TO 90
C
      KIEV = KIEV + 1
      CALL BRVECT( IRUNIT, &1000, &8100 )
      IF((IEV/NIEV)*NIEV.EQ.IEV) WRITE(6,6811) IEV
6811  FORMAT(' NR OF EVENTS DONE:',I10)
C
CHECK IF EVENT HAS ENOUGH PARTICLES IN INNER DETECTOR AND LEAD GLASS
      CALL CHK4VC(NWIC,NWIN,NWNE)
C     CALL TOTMAS(WWW)
C     CALL HFILL(1,WWW,0,1.)
C     CALL HFILL(2,WWW,0,1.)
      ICHK = 0
C     IF(NWIC.GE.4.AND.NWIN.GE.1) ICHK = 1
      IF(NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.2) ICHK = 1
C     IF(NWIC.GE.8.AND.NWIN.GE.0) ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.2) ICHK = 1
C     IF(NWIN.GE.2.AND.NWIC.LE.0) ICHK = 1
C     WRITE(6,1130) NWIC,NWIN,ICHK
C1130  FORMAT(' NWIC NWIN ICHK ',3I8)
      IF(ICHK.NE.0) GO TO 3637
      IEV = IEV + 1
      GO TO 1151
 3637 CONTINUE
C     CALL HFILL(3,WWW,0,1.)
C     CALL HFILL(4,WWW,0,1.)
      GO TO 8000
C
 90   WRITE(6,8012)
 8012 FORMAT(' MAX EVENTS READ  ')
      GO TO 7000
C
 1000 WRITE(6,8002)
 8002 FORMAT(' READ ERROR   OR BCS ERROR  ')
 8000 RETURN
C
 8100 WRITE(6,8101)
 8101 FORMAT(' E O F   E O F   E O F   E O F ')
 7000 RETURN 1
      END
      SUBROUTINE CHK4VC(NWIC,NWIN,NWNE)
C         CHECK THE 4-VECTORS AND SEE IF ENOUGH PARTICLES INSIDE THE
C         INNER DETECTOR AND LEAD GLASS.
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS NWIC = NR OF CHARGED PARTICLES INSIDE I.D.
C    RETURNS NWIN = NR OF NEUTRAL PARTICLES INSIDE LEAD GLASS
C    RETURNS NWNE = NR OF NEUTRAL PARTICLES INSIDE BARREL
C
C                                                  J.OLSSON    8.11.80
C                  LAST CHANGE  24.4.1982
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
C COSLMN FROM 320,1514 INNER EDGE E-CAPS.
C COSLMC FROM 227,1180 AT LEAST 16 WIRES IN JET CHAMBER
      DATA COSLMN /0.9784/, COSLMC /0.9820/,XMOLIM/.040/,XPTLIM/.030/
      DATA COSNEU /0.870/
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      ICHK = 0
      NWNE = 0
      NWIC = 0
      NWIN = 0
      IF(NF.LE.0) GO TO 999
      DO 1  I = 1,NF
C SKIP INITIAL ELECTRONS IF REQUIRED
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PTOT = 0.
      DO 2  J = 1,3
      PTOT = PTOT + PF(J,I)**2
2     IF(J.EQ.2) PTRA = PTOT
      PTOT = SQRT(PTOT)
      PTRA = SQRT(PTRA)
      IF(ICALL.LE.20) WRITE(6,2731) NEV,I,ICF(I),PTOT,PTRA
2731  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' PTOT ',E12.4,' PTRA ',
     $ E12.4)
      IF(PTOT.LT.XMOLIM.AND.ICF(I).NE.0) GO TO 1
      IF(PTRA.LT.XPTLIM.AND.ICF(I).NE.0) GO TO 1
      COSTHE = PF(3,I)/PTOT
      IF(ICF(I).NE.0.AND.ABS(COSTHE).LT.COSLMC) NWIC = NWIC + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSLMN) NWIN = NWIN + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSNEU) NWNE = NWNE + 1
      IF(ICALL.LE.20) WRITE(6,2431) NEV,I,ICF(I),COSTHE,NWIC,NWIN,PTOT,
     $ PTRA,NWNE
2431  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' COS NWIC-N ',E12.4,2I5,
     $ ' PTOT ',E12.4,' PTRA ',E12.4,' NWNE ',I2)
1     CONTINUE
999   RETURN
      END
      BLOCK DATA
      COMMON /CEK4VC/ ISKP
      DATA ISKP /0/
      END
      SUBROUTINE TOTMAS(WWW)
C     CALCULATE THE TOTAL MASS OF THE FINAL SYSTEM
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS WWW = MASS OF TOTAL SYSTEM
C
C                                                  J.OLSSON   14.03.81
C                  LAST CHANGE 14.03.81
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
      DIMENSION PSAM(4)
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      PTOTSM = 0.
      FACT = -1.
      DO 2030  J = 1,4
      IF(J.EQ.4) FACT = 1.
      PSAM(J) = 0.
      DO 1  I = 1,NF
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PSAM(J) = PSAM(J) + PF(J,I)
1     CONTINUE
      PTOTSM = PTOTSM + PSAM(J)*PSAM(J)*FACT
2030  CONTINUE
      PTOTSM = AMAX1(PTOTSM,1.E-08)
      WWW = SQRT(PTOTSM)
      IF(ICALL.LT.5) WRITE(6,2000) NF,WWW
2000  FORMAT(' NR OF FINAL PARTICLES ',I4,'  MASS ',E12.4)
      RETURN
      END
//LKED.SYSLIB DD
//            DD
//            DD DSN=F11OLS.JADE56.L,DISP=SHR
//            DD DSN=F11OLS.JADELD,DISP=SHR
//            DD DSN=F22ELS.JMC.L,DISP=SHR
//            DD DSN=F11LHO.JADEGL,DISP=SHR
//            DD DSN=F11LHO.TAGG.L,DISP=SHR
//            DD DSN=JADELG.LOAD,DISP=SHR
//            DD DSN=F22ALL.JADEMUL,DISP=SHR
//            DD DSN=R01UTL.HBOOK321.L,DISP=SHR
//            DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR
//            DD DSN=F22YAM.LGLOAD,DISP=SHR
//*           DD DSN=F22YAM.LG.L,DISP=SHR
//LKED.SYSIN DD *
 INCLUDE SYSLIB(BRVECTT,NPECER8)
//*                 INPUT
//GO.FT03F001 DD DISP=SHR,DSN=F11OLS.UNIGAM4V.E400D9
//*                 OUTPUT
//*O.FT02F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//    SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.UNIGAM.E400D9.SF6B
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.ETAPRI.B15
C   28/03/97            MEMBER NAME  JBMCJADT (JADE56.S)    FORTRAN
//F11OLS   JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(0,15),CLASS=E
//*MAIN RELPRI=LOW
//*  SHOWER CALCULATION OF BOTH PHOTONS AND ELECTRONS
//*  TAGGING TRACKING ACC. TO A.FINCH     5.11.1985
//*
//*   TEST JOB FOR NEW TRIGGER SIMULATION ROUTINES
//*
// EXEC FCLG,PARM.FORT=XL,REGION.LKED=800K,
//  REGION.GO=940K
      COMMON /     / BOOK(3000)
      COMMON / BCS / IW(40000)
      COMMON /CEK4VC/ ISKP
      COMMON / CIEVS  / KIEV,IEVMIN,IEVMAX
      INTEGER*2 HDATE
      COMMON / TODAY / HDATE(6)
      COMMON/CPRIN/IPRO
      COMMON/COLSON/ IPROO
C  IPROO IS A PRINT VARIABLE FOR DEBUG PRINT IN SHOWER ROUTINES
      COMMON /CUTSHO/ CUTOF
C WITH CUTOF THE STANDARD CUTOFF OF 1.2 MEV CAN BE CHANGED, BUT IT
C  IS ONLY EFFECTIVE WITH THE INCLUDE OF SUBR.  LGMCGMN
      COMMON/CFLAG/LFLAG(10)
      LOGICAL * 1 LFLAG
C        LFLAG(1) = SMEAR GAMMA AND ELECTRON ENERGIES
C        LFLAG(2) = GAMMA CONVERSION IN OUTER TANK AND COIL (TRKGAM)
C        LFLAG(3) = ABSORPTION LOSSES
C        LFLAG(4) = 3 DIM SHOWER PROFILE FIT TO EGGS CODE
C        LFLAG(5) = .TRUE.   -->  WITH VERTEX CHAMBER TRACKING
C                 = .FALSE.  -->  WITHOUT VERTEX CHAMBER TRACKING
C                                 BUT OLD BEAM PIPE GEOMETRY AND
C                                 BEAM PIPE COUNTERS (BEFORE MAI 84)
C                   ===> DEFAULT .TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.
C
      LFLAG(1) = .TRUE.
      LFLAG(2) = .FALSE.
      LFLAG(3) = .TRUE.
      LFLAG(4) = .FALSE.
      LFLAG(5) = .FALSE.
C  INIT OF TODAY, FOR FORWARD TRACKING
      HDATE(1) = 1
      HDATE(2) = 1
      HDATE(3) = 1
      HDATE(4) = 15
      HDATE(5) = 6
      HDATE(6) = 1982
C
      CALL BINT( 40000,15000,500, 0 )
      ISKP = 2
      IPRO = 0
      IPROO = -1
C MINIMUM CUTOFF ENERGY IN SHOWER
C     CUTOF = 1.2
C
C            SET EVENT READING LIMITS
      IEVMIN = 0
      IEVMAX = 13000
      WRITE(6,146) IEVMIN,IEVMAX
146   FORMAT('   IEVMIN AND IEVMAX :',2I5)
C
      CALL MCJADE( 0,  5 )
      CALL BSTA
      CALL PALL
      CALL HISTDO
      STOP
      END
      SUBROUTINE JGETEV( * )
C-----------------------------------------------------------
C
C  VERSION OF 02/11/81   LAST MOD 02/11/81      E.ELSEN
C  GET NEXT EVENT.
C  RETURN 1 IF END OF INPUT SEQUENCE (EOF).
C-----------------------------------------------------------
C
C
      COMMON /CIEVS/ KIEV,IEVMIN,IEVMAX
      DATA IRUNIT / 3 /,ICALL/0/
C
      ICALL = ICALL + 1
C     WRITE(6,3910) ICALL
3910  FORMAT(' ICALL ',I10)
      IF(ICALL.NE.1) GO TO 95
      IEV = 0
      KIEV = 0
      NIEV = 20
95    IEV = IEV + 1
1001  IF(IEV.GE.IEVMIN) GO TO 1151
      IEV = IEV + 1
      READ(IRUNIT,ERR=1000,END=8100) NR
      GO TO 1001
CCC  READ EVENTS
1151  IF(IEV.GT.IEVMAX) GO TO 90
C
      KIEV = KIEV + 1
      CALL BRVECT( IRUNIT, &1000, &8100 )
      IF((IEV/NIEV)*NIEV.EQ.IEV) WRITE(6,6811) IEV
6811  FORMAT(' NR OF EVENTS DONE:',I10)
C
CHECK IF EVENT HAS ENOUGH PARTICLES IN INNER DETECTOR AND LEAD GLASS
      CALL CHK4VC(NWIC,NWIN,NWNE)
      CALL TOTMAS(WWW)
      CALL HFILL(1,WWW,0,1.)
      CALL HFILL(2,WWW,0,1.)
      ICHK = 0
C     IF(NWIC.GE.4.AND.NWIN.GE.1) ICHK = 1
      IF(NWIN.GE.2) ICHK = 1
C     IF(NWIC.GE.8.AND.NWIN.GE.0) ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.2) ICHK = 1
C     IF(NWIN.GE.2.AND.NWIC.LE.0) ICHK = 1
C     WRITE(6,1130) NWIC,NWIN,ICHK
C1130  FORMAT(' NWIC NWIN ICHK ',3I8)
      IF(ICHK.NE.0) GO TO 3637
      IEV = IEV + 1
      GO TO 1151
 3637 CALL HFILL(3,WWW,0,1.)
      CALL HFILL(4,WWW,0,1.)
      GO TO 8000
C
 90   WRITE(6,8012)
 8012 FORMAT(' MAX EVENTS READ  ')
      GO TO 7000
C
 1000 WRITE(6,8002)
 8002 FORMAT(' READ ERROR   OR BCS ERROR  ')
 8000 RETURN
C
 8100 WRITE(6,8101)
 8101 FORMAT(' E O F   E O F   E O F   E O F ')
 7000 RETURN 1
      END
      SUBROUTINE CHK4VC(NWIC,NWIN,NWNE)
C         CHECK THE 4-VECTORS AND SEE IF ENOUGH PARTICLES INSIDE THE
C         INNER DETECTOR AND LEAD GLASS.
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS NWIC = NR OF CHARGED PARTICLES INSIDE I.D.
C    RETURNS NWIN = NR OF NEUTRAL PARTICLES INSIDE LEAD GLASS
C    RETURNS NWNE = NR OF NEUTRAL PARTICLES INSIDE BARREL
C
C                                                  J.OLSSON    8.11.80
C                  LAST CHANGE  24.4.1982
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
C COSLMN FROM 320,1514 INNER EDGE E-CAPS.
C COSLMC FROM 227,1180 AT LEAST 16 WIRES IN JET CHAMBER
      DATA COSLMN /0.9784/, COSLMC /0.9820/,XMOLIM/.040/,XPTLIM/.030/
      DATA COSNEU /0.870/
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      ICHK = 0
      NWNE = 0
      NWIC = 0
      NWIN = 0
      IF(NF.LE.0) GO TO 999
      DO 1  I = 1,NF
C SKIP INITIAL ELECTRONS IF REQUIRED
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PTOT = 0.
      DO 2  J = 1,3
      PTOT = PTOT + PF(J,I)**2
2     IF(J.EQ.2) PTRA = PTOT
      PTOT = SQRT(PTOT)
      PTRA = SQRT(PTRA)
      IF(ICALL.LE.20) WRITE(6,2731) NEV,I,ICF(I),PTOT,PTRA
2731  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' PTOT ',E12.4,' PTRA ',
     $ E12.4)
      IF(PTOT.LT.XMOLIM.AND.ICF(I).NE.0) GO TO 1
      IF(PTRA.LT.XPTLIM.AND.ICF(I).NE.0) GO TO 1
      COSTHE = PF(3,I)/PTOT
      IF(ICF(I).NE.0.AND.ABS(COSTHE).LT.COSLMC) NWIC = NWIC + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSLMN) NWIN = NWIN + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSNEU) NWNE = NWNE + 1
      IF(ICALL.LE.20) WRITE(6,2431) NEV,I,ICF(I),COSTHE,NWIC,NWIN,PTOT,
     $ PTRA,NWNE
2431  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' COS NWIC-N ',E12.4,2I5,
     $ ' PTOT ',E12.4,' PTRA ',E12.4,' NWNE ',I2)
1     CONTINUE
999   RETURN
      END
      BLOCK DATA
      COMMON /CEK4VC/ ISKP
      DATA ISKP /0/
      END
      SUBROUTINE TOTMAS(WWW)
C     CALCULATE THE TOTAL MASS OF THE FINAL SYSTEM
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS WWW = MASS OF TOTAL SYSTEM
C
C                                                  J.OLSSON   14.03.81
C                  LAST CHANGE 14.03.81
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
      DIMENSION PSAM(4)
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      PTOTSM = 0.
      FACT = -1.
      DO 2030  J = 1,4
      IF(J.EQ.4) FACT = 1.
      PSAM(J) = 0.
      DO 1  I = 1,NF
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PSAM(J) = PSAM(J) + PF(J,I)
1     CONTINUE
      PTOTSM = PTOTSM + PSAM(J)*PSAM(J)*FACT
2030  CONTINUE
      PTOTSM = AMAX1(PTOTSM,1.E-08)
      WWW = SQRT(PTOTSM)
      IF(ICALL.LT.5) WRITE(6,2000) NF,WWW
2000  FORMAT(' NR OF FINAL PARTICLES ',I4,'  MASS ',E12.4)
      RETURN
      END
//LKED.SYSLIB DD
//            DD
//            DD DSN=F11OLS.MCTRIG.L,DISP=SHR
//            DD DSN=F11OLS.JADELD,DISP=SHR
//            DD DSN=F22ELS.JMC.L,DISP=SHR
//            DD DSN=F11LHO.JADEGL,DISP=SHR
//            DD DSN=F11LHO.TAGG.L,DISP=SHR
//            DD DSN=JADELG.LOAD,DISP=SHR
//            DD DSN=F22ALL.JADEMUL,DISP=SHR
//            DD DSN=R01UTL.HBOOK321.L,DISP=SHR
//            DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR
//            DD DSN=F22YAM.LGLOAD,DISP=SHR
//LKED.SYSIN DD *
 INCLUDE SYSLIB(LGSTRMN,LSCCTLN)
 INCLUDE SYSLIB(MCJBDSHW,TRKGMSHW,TRKGVSHW)
//*                 INPUT
//GO.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAVEC4.NR2
//*                 OUTPUT
//GO.FT02F001 DD DUMMY,DCB=R01DCB.VBS
//*O.FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*  SPACE=(TRK,(70,10),RLSE),DSN=F11OLS.TESTMC.TOKYOO
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.ETAPRI.B15
C   28/03/97            MEMBER NAME  JBMCJAD0 (JADE56.S)    FORTRAN
//F11OLS   JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN RELPRI=LOW
//*  SHOWER CALCULATION OF BOTH PHOTONS AND ELECTRONS
//*  TAGGING TRACKING ACC. TO A.FINCH     5.11.1985
// EXEC FCLG,PARM.FORT=XL,REGION.LKED=800K,
//  REGION.GO=940K
      COMMON /     / BOOK(3000)
      COMMON / BCS / IW(40000)
      COMMON /CEK4VC/ ISKP
      COMMON / CIEVS  / KIEV,IEVMIN,IEVMAX
      INTEGER*2 HDATE
      COMMON / TODAY / HDATE(6)
      COMMON/CPRIN/IPRO
      COMMON/COLSON/ IPROO
C  IPROO IS A PRINT VARIABLE FOR DEBUG PRINT IN SHOWER ROUTINES
      COMMON /CUTSHO/ CUTOF
C WITH CUTOF THE STANDARD CUTOFF OF 1.2 MEV CAN BE CHANGED, BUT IT
C  IS ONLY EFFECTIVE WITH THE INCLUDE OF SUBR.  LGMCGMN
      COMMON/CFLAG/LFLAG(10)
      LOGICAL * 1 LFLAG
C        LFLAG(1) = SMEAR GAMMA AND ELECTRON ENERGIES
C        LFLAG(2) = GAMMA CONVERSION IN OUTER TANK AND COIL (TRKGAM)
C        LFLAG(3) = ABSORPTION LOSSES
C        LFLAG(4) = 3 DIM SHOWER PROFILE FIT TO EGGS CODE
C        LFLAG(5) = .TRUE.   -->  WITH VERTEX CHAMBER TRACKING
C                 = .FALSE.  -->  WITHOUT VERTEX CHAMBER TRACKING
C                                 BUT OLD BEAM PIPE GEOMETRY AND
C                                 BEAM PIPE COUNTERS (BEFORE MAI 84)
C                   ===> DEFAULT .TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.
C
      LFLAG(1) = .TRUE.
      LFLAG(2) = .FALSE.
      LFLAG(3) = .TRUE.
      LFLAG(4) = .FALSE.
      LFLAG(5) = .TRUE.
C  INIT OF TODAY, FOR FORWARD TRACKING
      HDATE(1) = 1
      HDATE(2) = 1
      HDATE(3) = 1
      HDATE(4) = 15
      HDATE(5) = 6
      HDATE(6) = 1986
C
      CALL BINT( 40000,15000,500, 0 )
      ISKP = 2
      IPRO = 0
      IPROO = 0
C MINIMUM CUTOFF ENERGY IN SHOWER
C     CUTOF = 1.2
C
C            SET EVENT READING LIMITS
      IEVMIN = 0
      IEVMAX = 13000
      WRITE(6,146) IEVMIN,IEVMAX
146   FORMAT('   IEVMIN AND IEVMAX :',2I5)
C
      CALL MCJADE( 0,  5 )
      CALL BSTA
      CALL PALL
      CALL HISTDO
      STOP
      END
      SUBROUTINE JGETEV( * )
C-----------------------------------------------------------
C
C  VERSION OF 02/11/81   LAST MOD 02/11/81      E.ELSEN
C  GET NEXT EVENT.
C  RETURN 1 IF END OF INPUT SEQUENCE (EOF).
C-----------------------------------------------------------
C
C
      COMMON /CIEVS/ KIEV,IEVMIN,IEVMAX
      DATA IRUNIT / 3 /,ICALL/0/
C
      ICALL = ICALL + 1
C     WRITE(6,3910) ICALL
3910  FORMAT(' ICALL ',I10)
      IF(ICALL.NE.1) GO TO 95
      IEV = 0
      KIEV = 0
      NIEV = 20
95    IEV = IEV + 1
1001  IF(IEV.GE.IEVMIN) GO TO 1151
      IEV = IEV + 1
      READ(IRUNIT,ERR=1000,END=8100) NR
      GO TO 1001
CCC  READ EVENTS
1151  IF(IEV.GT.IEVMAX) GO TO 90
C
      KIEV = KIEV + 1
      CALL BRVECT( IRUNIT, &1000, &8100 )
      IF((IEV/NIEV)*NIEV.EQ.IEV) WRITE(6,6811) IEV
6811  FORMAT(' NR OF EVENTS DONE:',I10)
C
CHECK IF EVENT HAS ENOUGH PARTICLES IN INNER DETECTOR AND LEAD GLASS
      CALL CHK4VC(NWIC,NWIN,NWNE)
      CALL TOTMAS(WWW)
      CALL HFILL(1,WWW,0,1.)
      CALL HFILL(2,WWW,0,1.)
      ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.1) ICHK = 1
C     IF(NWIN.GE.2) ICHK = 1
C     IF(NWIC.GE.8.AND.NWIN.GE.0) ICHK = 1
C     IF(NWIC.GE.4.AND.NWIN.GE.2) ICHK = 1
C     IF(NWIN.GE.2.AND.NWIC.LE.0) ICHK = 1
C     WRITE(6,1130) NWIC,NWIN,ICHK
C1130  FORMAT(' NWIC NWIN ICHK ',3I8)
      IF(ICHK.NE.0) GO TO 3637
      IEV = IEV + 1
      GO TO 1151
 3637 CALL HFILL(3,WWW,0,1.)
      CALL HFILL(4,WWW,0,1.)
      GO TO 8000
C
 90   WRITE(6,8012)
 8012 FORMAT(' MAX EVENTS READ  ')
      GO TO 7000
C
 1000 WRITE(6,8002)
 8002 FORMAT(' READ ERROR   OR BCS ERROR  ')
 8000 RETURN
C
 8100 WRITE(6,8101)
 8101 FORMAT(' E O F   E O F   E O F   E O F ')
 7000 RETURN 1
      END
      SUBROUTINE CHK4VC(NWIC,NWIN,NWNE)
C         CHECK THE 4-VECTORS AND SEE IF ENOUGH PARTICLES INSIDE THE
C         INNER DETECTOR AND LEAD GLASS.
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS NWIC = NR OF CHARGED PARTICLES INSIDE I.D.
C    RETURNS NWIN = NR OF NEUTRAL PARTICLES INSIDE LEAD GLASS
C    RETURNS NWNE = NR OF NEUTRAL PARTICLES INSIDE BARREL
C
C                                                  J.OLSSON    8.11.80
C                  LAST CHANGE  24.4.1982
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
C COSLMN FROM 320,1514 INNER EDGE E-CAPS.
C COSLMC FROM 227,1180 AT LEAST 16 WIRES IN JET CHAMBER
      DATA COSLMN /0.9784/, COSLMC /0.9820/,XMOLIM/.040/,XPTLIM/.030/
      DATA COSNEU /0.870/
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      ICHK = 0
      NWNE = 0
      NWIC = 0
      NWIN = 0
      IF(NF.LE.0) GO TO 999
      DO 1  I = 1,NF
C SKIP INITIAL ELECTRONS IF REQUIRED
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PTOT = 0.
      DO 2  J = 1,3
      PTOT = PTOT + PF(J,I)**2
2     IF(J.EQ.2) PTRA = PTOT
      PTOT = SQRT(PTOT)
      PTRA = SQRT(PTRA)
      IF(ICALL.LE.20) WRITE(6,2731) NEV,I,ICF(I),PTOT,PTRA
2731  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' PTOT ',E12.4,' PTRA ',
     $ E12.4)
      IF(PTOT.LT.XMOLIM.AND.ICF(I).NE.0) GO TO 1
      IF(PTRA.LT.XPTLIM.AND.ICF(I).NE.0) GO TO 1
      COSTHE = PF(3,I)/PTOT
      IF(ICF(I).NE.0.AND.ABS(COSTHE).LT.COSLMC) NWIC = NWIC + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSLMN) NWIN = NWIN + 1
      IF(ICF(I).EQ.0.AND.ABS(COSTHE).LT.COSNEU) NWNE = NWNE + 1
      IF(ICALL.LE.20) WRITE(6,2431) NEV,I,ICF(I),COSTHE,NWIC,NWIN,PTOT,
     $ PTRA,NWNE
2431  FORMAT(' EVENT ',I6,' PART,CHARGE ',2I4,' COS NWIC-N ',E12.4,2I5,
     $ ' PTOT ',E12.4,' PTRA ',E12.4,' NWNE ',I2)
1     CONTINUE
999   RETURN
      END
      BLOCK DATA
      COMMON /CEK4VC/ ISKP
      DATA ISKP /0/
      END
      SUBROUTINE TOTMAS(WWW)
C     CALCULATE THE TOTAL MASS OF THE FINAL SYSTEM
C    THE FIRST 2 ELECTRONS IN 2-GAMMA EVENTS CAN BE SKIPPED IF ISKP NE 0
C    RETURNS WWW = MASS OF TOTAL SYSTEM
C
C                                                  J.OLSSON   14.03.81
C                  LAST CHANGE 14.03.81
C
#include "cprod.for"
      COMMON /CEK4VC/ ISKP
      DIMENSION PSAM(4)
      DATA ICALL /0/
C
      ICALL = ICALL + 1
      PTOTSM = 0.
      FACT = -1.
      DO 2030  J = 1,4
      IF(J.EQ.4) FACT = 1.
      PSAM(J) = 0.
      DO 1  I = 1,NF
      IF(ISKP.NE.0.AND.I.LT.3) GO TO 1
      PSAM(J) = PSAM(J) + PF(J,I)
1     CONTINUE
      PTOTSM = PTOTSM + PSAM(J)*PSAM(J)*FACT
2030  CONTINUE
      PTOTSM = AMAX1(PTOTSM,1.E-08)
      WWW = SQRT(PTOTSM)
      IF(ICALL.LT.5) WRITE(6,2000) NF,WWW
2000  FORMAT(' NR OF FINAL PARTICLES ',I4,'  MASS ',E12.4)
      RETURN
      END
//LKED.SYSLIB DD
//            DD
//            DD DSN=F11OLS.JADELD,DISP=SHR
//            DD DSN=F22ELS.JMC.L,DISP=SHR
//            DD DSN=F11LHO.JADEGL,DISP=SHR
//            DD DSN=F11LHO.TAGG.L,DISP=SHR
//            DD DSN=JADELG.LOAD,DISP=SHR
//            DD DSN=F22ALL.JADEMUL,DISP=SHR
//            DD DSN=R01UTL.HBOOK321.L,DISP=SHR
//            DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR
//            DD DSN=F22YAM.LGLOAD,DISP=SHR
//LKED.SYSIN DD *
 INCLUDE SYSLIB(LGSTRMN,LSCCTLN)
 INCLUDE SYSLIB(MCJBDSHW,TRKGMSHW,TRKGVSHW,BRVECTT)
//*                 INPUT
//GO.FT03F001 DD DISP=SHR,DSN=F11OLS.ETAPRIV4.NR1
//*                 OUTPUT
//GO.FT02F001 DD DUMMY,DCB=R01DCB.VBS
//*O.FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*SPACE=(TRK,(70,10),RLSE),DSN=F11OLS.ETAC.NR13
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.ETAPRI.B15
C   28/03/97            MEMBER NAME  JBR594   (JADE56.S)    FORTRAN
//F11JLL   JOB 00010622,OLSSON,CLASS=E,TIME=(0,15)
//*MAIN RELPRI=LOW
// EXEC GEP,PARM.LKED='LIST',REGION.GO=900K,VS=HBOOK,
//       DN='F11OLS.PMR594.NR5'
C
C   CALCULATE AND PLOT VARIOUS FORMULAS IN JADE NOTE 20 AND SUPPLEMENT
C
C     CALL ACORE(20000)
C
      CALL HBOOK1( 1,'PHOTO-EL. CONVERSION EFFIC.  OLD$',100,.2,.7)
      CALL HBOOK1( 2,'PHOTO-EL. CONVERSION EFFIC.  NEW$',100,.2,.7)
C
      XLAMLW = .2
      XLAMHG = .7
      DXLAM = (XLAMHG-XLAMLW)/100.
C
      XLAM = XLAMLW - DXLAM*.5
C//////////////////////////////////////////////
      DO 1  I = 1,100
C
      EFF1 = 0.
      EFF2 = 0.
      XLAM = XLAM + DXLAM
      IF(XLAM.LE..28) GO TO 2
C
      XLAM2 = XLAM*XLAM
      XLAM3 = XLAM2*XLAM
      XLAM4 = XLAM3*XLAM
C
C  SF5, OLD VERSION IN JADEN NOTE 20
C
      EFF1 = -28.06*XLAM4 + 72.21*XLAM3 - 65.9*XLAM2 + 24.61*XLAM
     $       - 2.965
      IF(EFF1.LT.0.) EFF1 = 0.
C
C  SF5, NEW VERSION FROM 1978   ALSO USED FOR SF6
C
      EFF2 = 14.25*XLAM3 - 22.66*XLAM2 + 10.77*XLAM
     $       - 1.32 - .001/(XLAM - .28)
      IF(EFF2.LT.0.) EFF2 = 0.
C
2     CONTINUE
      CALL HFILL( 1,XLAM,0,EFF1)
      CALL HFILL( 2,XLAM,0,EFF2)
C
1     CONTINUE
C////////////////////////
C
C  ABSORPTION LENGTH IN SF5 (OLD AND NEW) AND IN SF6
C
      CALL HBOOK1(11,'ABSORP.LENGTH SF5 OLD$',100,.2,.6)
      CALL HBOOK1(12,'ABSORP.LENGTH SF5 NEW$',100,.2,.6)
      CALL HBOOK1(13,'ABSORP.LENGTH SF6    $',100,.2,.6)
      CALL HBOOK1(14,'ABSORP.LENGTH BK7 OLD$',100,.2,.6)
      CALL HBOOK1(15,'ABSORP.LENGTH BK7 NEW$',100,.2,.6)
C
      XLAMHG = .6
      DXLAM = (XLAMHG-XLAMLW)/100.
      XLAM = XLAMLW - DXLAM*.5
C//////////////////////////////////////////////
      DO 10  I = 1,100
C
      XL1 = 0.
      XL2 = 0.
      XL3 = 0.
      XL4 = 0.
      XL5 = 0.
      XLAM = XLAM + DXLAM
      IF(XLAM.LE..28) GO TO 20
C
C  SF5, OLD VERSION IN JADEN NOTE 20
C
      IF(XLAM.LT..39) XL1 = 10**(30.303*XLAM-10.5155)
      IF(XLAM.GE..39.AND.XLAM.LT..45) XL1 = 10**(13.70*XLAM-4.027)
      IF(XLAM.GE..45) XL1 = 10**(2.840*XLAM+0.847)
C
C  SF5, NEW VERSION SINCE 1978
C
      IF(XLAM.LT..39) XL2 = 10**(30.303*XLAM-10.2154)
      IF(XLAM.GE..39.AND.XLAM.LT..45) XL2 = 10**(13.699*XLAM-3.726)
      IF(XLAM.GE..45) XL2 = 10**(2.840*XLAM+1.148)
C
C  SF6
C
      IF(XLAM.LT..39) XL3 = 10**(34.48*XLAM-12.654)
      IF(XLAM.GE..39.AND.XLAM.LT..428) XL3 = 10**(23.26*XLAM-8.2807)
      IF(XLAM.GE..428) XL3 = 10**(14.29*XLAM-4.4305)
C
C  BK7  OLD
C
      IF(XLAM.LE..37) XL4 = 10**(20.2*XLAM-5.445)
      IF(XLAM.GT..37) XL4 = 10**(1.346*XLAM+1.531)
C
C  BK7  NEW
C
      IF(XLAM.LE..37) XL5 = 10**(22.75*XLAM-6.0026)
      IF(XLAM.GT..37) XL5 = 10**(7.96*XLAM-0.531)
C
20    CONTINUE
      CALL HFILL(11,XLAM,0,XL1)
      CALL HFILL(12,XLAM,0,XL2)
      CALL HFILL(13,XLAM,0,XL3)
      CALL HFILL(14,XLAM,0,XL4)
      CALL HFILL(15,XLAM,0,XL5)
C
10    CONTINUE
C////////////////////////
C
C  TRANSMISSION EFFICIENCY AT SF5-BK7 BOUNDARY
C
      CALL HBOOK1(21,'TRANSM. EFFICIENCY SF5-BK7 VS. COSP$',100,.4,.8)
      CALL HBOOK1(22,'TRANSM. EFFICIENCY SF6-PM VS. COSP$',100,.4,.8)
C
      COSPUP = .8
      COSPLW = .4
      DCOSP = (COSPUP - COSPLW)/100.
C
      COSP =COSPLW - .5*DCOSP
C
      DO 30  I = 1,100
      COSP = COSP + DCOSP
      EFFSF5 = 0.
      EFFSF6 = 0.
      IF(COSP.LT..4172) GOTO 35
C
C   SF5 - BK7
C
      EFFSF5 = 1. - .0065/(COSP - .410)
C
      IF(COSP.LT..5393) GOTO 35
C
C   SF6 - PM
C
      EFFSF6 = 1. - 0.0065/(COSP - .5327)
C
35    CONTINUE
      CALL HFILL(21,COSP,0,EFFSF5)
      CALL HFILL(22,COSP,0,EFFSF6)
C
30    CONTINUE
C
C////////////////////////
C
C  EXPONENT PART IN FUNCTIONAL FIT OF NPECER
C
      CALL HBOOK1(31,'CC=10**CC1 ORIGINAL$',20,-1.,1.)
      CALL HBOOK1(32,'CC=10**CC1 CERSF6$',20,-1.,1.)
      CALL HBOOK1(33,'PART3      ORIGINAL D=1 $',20,-1.,1.)
      CALL HBOOK1(34,'PART3  .34 CERSF6 D=1 $',20,-1.,1.)
      CALL HBOOK1(35,'PART3  .30 CERSF6 D=1 $',20,-1.,1.)
      CALL HBOOK1(36,'PART3  .31 CERSF6 D=1 $',20,-1.,1.)
      CALL HBOOK1(37,'PART3  .32 CERSF6 D=1 $',20,-1.,1.)
      CALL HBOOK1(38,'PART3  .33 CERSF6 D=1 $',20,-1.,1.)
      CALL HBOOK1(39,'PART3  .35 CERSF6 D=1 $',20,-1.,1.)
      CALL HBOOK1(40,'PART3  .36 CERSF6 D=1 $',20,-1.,1.)
      CALL HBOOK1(41,'CC CERSF6 VAR A4= .5  $',20,-1.,1.)
      CALL HBOOK1(42,'CC CERSF6 VAR A4= .7  $',20,-1.,1.)
      CALL HBOOK1(43,'CC CERSF6 VAR A4= .8  $',20,-1.,1.)
      CALL HBOOK1(44,'CC CERSF6 VAR A5= .5  $',20,-1.,1.)
      CALL HBOOK1(45,'CC CERSF6 VAR A5= .6  $',20,-1.,1.)
      CALL HBOOK1(46,'CC CERSF6 VAR A5= .8  $',20,-1.,1.)
      CALL HBOOK1(47,'CC CERSF6 VAR A6= .3  $',20,-1.,1.)
      CALL HBOOK1(48,'CC CERSF6 VAR A6= .4  $',20,-1.,1.)
      CALL HBOOK1(49,'CC CERSF6 VAR A6= .5  $',20,-1.,1.)
      CALL HBOOK1(50,'CC CERSF6 VAR A7= 1.8 $',20,-1.,1.)
      CALL HBOOK1(51,'CC CERSF6 VAR A7= 1.9 $',20,-1.,1.)
      CALL HBOOK1(52,'CC CERSF6 VAR A7= 2.1 $',20,-1.,1.)
C
      COSTUP = -1.
      COSTLW = 1.
      DCOST = (COSTUP - COSTLW)/20.
      DEPTH = 1.
C
      COST =COSTLW - .5*DCOST
C
      DO 40  I = 1,20
      COST = COST + DCOST
C
C   CC ORIGINAL
C
      W1 = 10**(((0.8751*COST-.8362)*COST+0.3924)*COST - 2.)
C
C   CC CERSF6E
C
      W2 = 10**(((0.6*COST-.7)*COST+0.6)*COST - 2.)
C
C   PART3 ORIGINAL
C
      W3 = W1*EXP(0.55*DEPTH)
C
C   PART3 CERSF6E
C
      W4 = W2*EXP(0.34*DEPTH)
C
C   PART3 CERSF6E, WITH AEXPA = .30 -.36
C
      W5 = W2*EXP(0.30*DEPTH)
      W6 = W2*EXP(0.31*DEPTH)
      W7 = W2*EXP(0.32*DEPTH)
      W8 = W2*EXP(0.33*DEPTH)
      W9 = W2*EXP(0.35*DEPTH)
      W10 = W2*EXP(0.36*DEPTH)
C
C VARIATIONS OF PARAMETERS IN CC
C
      W11 = 10**(((0.5*COST-.7)*COST+0.6)*COST - 2.)
      W12 = 10**(((0.7*COST-.7)*COST+0.6)*COST - 2.)
      W13 = 10**(((0.8*COST-.7)*COST+0.6)*COST - 2.)
C
      W14 = 10**(((0.6*COST-.5)*COST+0.6)*COST - 2.)
      W15 = 10**(((0.6*COST-.6)*COST+0.6)*COST - 2.)
      W16 = 10**(((0.6*COST-.8)*COST+0.6)*COST - 2.)
C
      W17 = 10**(((0.6*COST-.7)*COST+0.3)*COST - 2.)
      W18 = 10**(((0.6*COST-.7)*COST+0.4)*COST - 2.)
      W19 = 10**(((0.6*COST-.7)*COST+0.5)*COST - 2.)
C
      W20 = 10**(((0.6*COST-.7)*COST+0.6)*COST - 1.8)
      W21 = 10**(((0.6*COST-.7)*COST+0.6)*COST - 1.9)
      W22 = 10**(((0.6*COST-.7)*COST+0.6)*COST - 2.1)
C
C
      CALL HFILL(31,COST,0,W1)
      CALL HFILL(32,COST,0,W2)
      CALL HFILL(33,COST,0,W3)
      CALL HFILL(34,COST,0,W4)
      CALL HFILL(35,COST,0,W5)
      CALL HFILL(36,COST,0,W6)
      CALL HFILL(37,COST,0,W7)
      CALL HFILL(38,COST,0,W8)
      CALL HFILL(39,COST,0,W9)
      CALL HFILL(40,COST,0,W10)
C
      CALL HFILL(41,COST,0,W11)
      CALL HFILL(42,COST,0,W12)
      CALL HFILL(43,COST,0,W13)
      CALL HFILL(44,COST,0,W14)
      CALL HFILL(45,COST,0,W15)
      CALL HFILL(46,COST,0,W16)
      CALL HFILL(47,COST,0,W17)
      CALL HFILL(48,COST,0,W18)
      CALL HFILL(49,COST,0,W19)
      CALL HFILL(50,COST,0,W20)
      CALL HFILL(51,COST,0,W21)
      CALL HFILL(52,COST,0,W22)
40    CONTINUE
C
C////////////////////////
      CALL HISTDO
C
      STOP
      END
//LKED.SYSLIB DD
//            DD
//            DD
//            DD
//            DD
//            DD DSN=F11OLS.JADELD,DISP=SHR
//C           DD DSN=F22YAM.UTILTYL,DISP=SHR
//C           DD DSN=F11OLS.TEMPL,DISP=SHR
//            DD DISP=SHR,DSN=F11LHO.JADEGL
//*           DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERN.KERNLIB4
//*DD DSN=F22YAM.WORKL,DISP=SHR
//GO.FT02F001 DD DUMMY
C   28/03/97            MEMBER NAME  JBTJEL   (JADE56.S)    FORTRAN
//F11JLL97 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN RELPRI=LOW
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//**********************************************************************
//*
//TRACKING EXEC PGM=LMDTJ40,REGION=840K
//*
//*                 INPUT
//FT03F001 DD DISP=SHR,DSN=F11OLS.UNIGAM4V.E300D5
//*
//*                 OUTPUT
//*FT02F001 DD DUMMY,DCB=R01DCB.VBS
//FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//   SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.UNIGAM86.E300D5
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.FTAPRJ.B15
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    IEVMIN    IEVMAX
         0      2000    99999
//F11JLL97 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN RELPRI=LOW
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//**********************************************************************
//*
//TRACKING EXEC PGM=LMDTJ40,REGION=840K
//*
//*                 INPUT
//FT03F001 DD DISP=SHR,DSN=F11OLS.UNIGAM4V.E300D6
//*
//*                 OUTPUT
//*FT02F001 DD DUMMY,DCB=R01DCB.VBS
//FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//   SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.UNIGAM86.E300D6
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.FTAPRJ.B15
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    IEVMIN    IEVMAX
         0      2000    99999
//F11JLL97 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN RELPRI=LOW
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//**********************************************************************
//*
//TRACKING EXEC PGM=LMDTJ40,REGION=840K
//*
//*                 INPUT
//FT03F001 DD DISP=SHR,DSN=F11OLS.UNIGAM4V.E300D7
//*
//*                 OUTPUT
//*FT02F001 DD DUMMY,DCB=R01DCB.VBS
//FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//   SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.UNIGAM86.E300D7
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.FTAPRJ.B15
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    IEVMIN    IEVMAX
         0      2000    99999
//F11JLL97 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN RELPRI=LOW
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//**********************************************************************
//*
//TRACKING EXEC PGM=LMDTJ40,REGION=840K
//*
//*                 INPUT
//FT03F001 DD DISP=SHR,DSN=F11OLS.UNIGAM4V.E300D8
//*
//*                 OUTPUT
//*FT02F001 DD DUMMY,DCB=R01DCB.VBS
//FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//   SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.UNIGAM86.E300D8
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.FTAPRJ.B15
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    IEVMIN    IEVMAX
         0      2000    99999
//F11JLL97 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN RELPRI=LOW
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//**********************************************************************
//*
//TRACKING EXEC PGM=LMDTJ40,REGION=840K
//*
//*                 INPUT
//FT03F001 DD DISP=SHR,DSN=F11OLS.UNIGAM4V.E300D9
//*
//*                 OUTPUT
//*FT02F001 DD DUMMY,DCB=R01DCB.VBS
//FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//   SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.UNIGAM86.E300D9
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.FTAPRJ.B15
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    IEVMIN    IEVMAX
         0      2000    99999
//F11JLL97 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN RELPRI=LOW
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//**********************************************************************
//*
//TRACKING EXEC PGM=LMDTJ40,REGION=840K
//*
//*                 INPUT
//FT03F001 DD DISP=SHR,DSN=F11OLS.UNIGAM4V.E300DA
//*
//*                 OUTPUT
//*FT02F001 DD DUMMY,DCB=R01DCB.VBS
//FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//   SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.UNIGAM86.E300DA
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.FTAPRJ.B15
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    IEVMIN    IEVMAX
         0      2000    99999
//F11JLL97 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN RELPRI=LOW
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//**********************************************************************
//*
//TRACKING EXEC PGM=LMDTJ40,REGION=840K
//*
//*                 INPUT
//FT03F001 DD DISP=SHR,DSN=F11OLS.UNIGAM4V.E300DB
//*
//*                 OUTPUT
//*FT02F001 DD DUMMY,DCB=R01DCB.VBS
//FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//   SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.UNIGAM86.E300DB
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.FTAPRJ.B15
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    IEVMIN    IEVMAX
         0      2000    99999
//F11JLL97 JOB 00010622,OLSSON,MSGLEVEL=(1,0),TIME=(3,00),CLASS=K
//*MAIN RELPRI=LOW
//JOBLIB DD DSN=F11OLS.LKLDMC,DISP=SHR
//*
//**********************************************************************
//*                                                                    *
//*         M C J A D E   TRACKING JOB  (WITHOUT MUON TRACKING)        *
//*                                                                    *
//**********************************************************************
//*
//TRACKING EXEC PGM=LMDTJ40,REGION=840K
//*
//*                 INPUT
//FT03F001 DD DISP=SHR,DSN=F11OLS.UNIGAM4V.E300DC
//*
//*                 OUTPUT
//*FT02F001 DD DUMMY,DCB=R01DCB.VBS
//FT02F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//   SPACE=(TRK,(80,11),RLSE),DSN=F11OLS.UNIGAM86.E300DC
//*GO.FT02F001 DD DISP=SHR,
//*    DSN=F11OLS.ETPRF.S1
//*GO.FT02F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//*    DSN=F11OLS.ETPRF.S1,
//*       MSVGP=VTMP,UNIT=3330V
//*GO.FT02F001 DD UNIT=TAPE,DISP=(,CATLG,DELETE),
//*        DCB=R01DCB.VBS,
//*        DSN=F11OLS.TRACK1.FTAPRJ.B15
//FT06F001 DD SYSOUT=*
//FT05F001 DD *
    IEVMIN    IEVMAX
         0      2000    99999
