1 jones 1.1 ! SIMULATE.INC
2
3 ! Note: All angles are in radians
4 ! All distances are in cm
5 ! All energies (momenta,masses) are in MeV
6 ! All deltas are in percent
7 ! All densities (thicknesses) are in g/cm3 (g/cm2)
8
9 ! Define some record structures, and constants
10
11 include 'structures.inc'
12 include 'constants.inc'
13
14 ! Now for the actual variables
15
16 ! ??? these montecarlo-specific values should go in a DAT file.
17 ! ... the slop that will be allowed on the cuts when they are to be applied "loosely"
18 real*8 slop_param_d_HMS, slop_param_t_HMS, slop_param_p_HMS
19 parameter (slop_param_d_HMS=0.5)
20 parameter (slop_param_t_HMS=0.005)
21 parameter (slop_param_p_HMS=0.005)
22 jones 1.1 real*8 slop_param_d_SOS, slop_param_t_SOS, slop_param_p_SOS
23 parameter (slop_param_d_SOS=1.0)
24 parameter (slop_param_t_SOS=0.008)
25 parameter (slop_param_p_SOS=0.008)
26 real*8 slop_param_d_HRSR, slop_param_t_HRSR, slop_param_p_HRSR
27 parameter (slop_param_d_HRSR=0.5)
28 parameter (slop_param_t_HRSR=0.005)
29 parameter (slop_param_p_HRSR=0.005)
30 real*8 slop_param_d_HRSL, slop_param_t_HRSL, slop_param_p_HRSL
31 parameter (slop_param_d_HRSL=0.5)
32 parameter (slop_param_t_HRSL=0.005)
33 parameter (slop_param_p_HRSL=0.005)
34
35 ! ... the common blocks
36
37 !RMM changed ordering in /gnrl/ to fix memory alignment problems
38
39 real*8 Mh, Mh2, Mh2_final !mh,mh2 are INITIAL hadron mass(**2)
40 real*8 Ebeam, dEbeam, Ebeam_vertex_ave, genvol, genvol_inclusive
41 real*8 luminosity, targetfac, normfac
42 real*8 wtcontribute, dE_edge_test, Egamma_gen_max
43 jones 1.1 real*8 targ_Bangle,targ_Bphi
44 real*8 drift_to_cal,targ_pol,sign_hms_part
45
46 record /gen_limits/ gen
47 record /both_spec/ spec
48 record /cuts_true/ cuts
49 record /edge_true/ edge
50 record /edge_true/ VERTEXedge
51 record /double_arm_cuts/ SPedge
52 record /slop/ slop
53 record /EXP_field/ EXPER
54 logical mc_smear
55 logical debug(5)
56 integer*4 nevent, ntried, ngen, deForest_flag, Nntu
57 integer*4 ncontribute, ncontribute_no_rad_proton, spect_mode, phsp_mode
58 integer*4 which_kaon, which_pion, which_dvcs
59 integer*4 electron_arm, hadron_arm
60 character base*40
61 character extra_dbase_file*60
62 character tgt_field_file*60
63 logical using_E_arm_montecarlo, using_P_arm_montecarlo
64 jones 1.1 logical doing_phsp, using_rad, hard_cuts
65 logical doing_hyd_elast, doing_deuterium, doing_heavy
66 logical doing_eep, doing_pion, doing_piplus, doing_kaon
67 logical doing_dvcs
68 logical using_cit_generation, using_Coulomb, using_Eloss
69 logical correct_Eloss, correct_raster,using_tgt_field
70
71
72
73
74 common /gnrl/ Mh, Mh2, Mh2_final, Ebeam, dEbeam, Ebeam_vertex_ave,
75 1 genvol, genvol_inclusive, luminosity, targetfac,
76 2 normfac, wtcontribute, dE_edge_test, Egamma_gen_max,
77 3 targ_Bangle,targ_Bphi,
78 3 drift_to_cal,targ_pol,sign_hms_part,
79 4 gen, spec, cuts, edge, SPedge, VERTEXedge,
80 5 slop, EXPER, mc_smear, debug, nevent, ntried, ngen,
81 6 deForest_flag, Nntu, ncontribute, ncontribute_no_rad_proton,
82 7 spect_mode, phsp_mode, which_kaon,which_pion, which_dvcs,
83 8 electron_arm, hadron_arm,
84 9 base, extra_dbase_file, tgt_field_file,
85 jones 1.1 1 using_E_arm_montecarlo, using_P_arm_montecarlo, doing_phsp,
86 2 using_rad, hard_cuts, doing_hyd_elast, doing_deuterium, doing_heavy,
87 3 doing_eep,doing_pion,doing_piplus,doing_kaon,doing_dvcs,
88 4 using_cit_generation, using_Coulomb,
89 5 using_Eloss, correct_Eloss, correct_raster,using_tgt_field
90
91
92 ! ........ note: make these first two parameters at least ONE BIGGER than the actual dimensions you want to read in
93 integer*4 ntheorymax,nrhoPmmax
94 parameter (ntheorymax=500)
95 parameter (nrhoPmmax=21)
96 real*8 theory, Em_theory, bs_norm_theory, nprot_theory
97 real*8 Emsig_theory, Em_int_theory, E_Fermi
98 integer nrhoPm
99 character theory_file*80, theory_base*40, theory_target*40
100
101 record /axis/ Pm_theory
102
103 common /theory/ theory(nrhoPmmax,ntheorymax),
104 1 Em_theory(nrhoPmmax), bs_norm_theory(nrhoPmmax),
105 2 nprot_theory(nrhoPmmax), Emsig_theory(nrhoPmmax),
106 jones 1.1 4 Em_int_theory(nrhoPmmax), E_Fermi,
107 5 Pm_theory(nrhoPmmax),
108 6 theory_file, theory_base, theory_target,
109 7 nrhoPm
110
111 C decdist(30) is just an array of miscellaneous shared variables, SOME of
112 C which are related to decay. Here are the ones that are currently in use:
113 Cxx decdist(30) = position where event decays (cm)
114 C decdist(3) = sum of sigcc (to calculate "central sigcc")
115 Cxx decdist(4) = radphot (for ntuple output)
116 Cxx decdist(5) = flag for type of radiation (which particle).
117 Cxx decdist(6) = resfac in ntup. (sum of resolution modifiers for HMS/SOS)
118 Cxx decdist(21) = sigma_eep (which is eepi cross section - Sigcc in ntup.)
119 C
120 C real*8 decdist(30)
121
122 real*8 ctau
123 logical doing_hydpi, doing_deutpi, doing_hepi
124 logical doing_hydkaon, doing_deutkaon, doing_hekaon
125 logical doing_hyddvcs, doing_deutdvcs, doing_hedvcs
126 logical doing_decay
127 jones 1.1
128 common /decd/ ctau,doing_decay,
129 1 doing_hydpi,doing_deutpi,doing_hepi,
130 2 doing_hydkaon,doing_deutkaon,doing_hekaon,
131 3 doing_hyddvcs, doing_deutdvcs, doing_hedvcs
132
133 C Trying to get rid of the decdist array of random variables.
134 C Structure for variables that we want to available to the ntuple.
135 structure /ntupvars/
136 real*8 radphot, radarm
137 real*8 resfac
138 real*8 sigcm,sigl,sigt
139 real*8 krel,mm,mmA,t
140 end structure
141
142 record /ntupvars/ ntup
143
144 C decdist is zpos of decay if doing_decay, survivalprobability if
145 C .not.doing_decay. NOT included in ntup.* structure because it is used
146 C in the single arm MC, which we want to keep structure-free.
147
148 jones 1.1 real*8 decdist
149
150 common /ntuple_variables/ ntup,decdist
151
152
153
154 C Kaon cross section lookup tables (real*4 for CERNLIB fint compatability).
155 real*4 zrff1(10,11,19),zrff2(10,11,19),zrff3(10,11,19)
156 real*4 zrff4(10,11,19),zrff5(10,11,19),zrff6(10,11,19)
157 real*4 ziff1(10,11,19),ziff2(10,11,19),ziff3(10,11,19)
158 real*4 ziff4(10,11,19),ziff5(10,11,19),ziff6(10,11,19)
159 real*4 zsrff1(20,10,19),zsrff2(20,10,19),zsrff3(20,10,19)
160 real*4 zsrff4(20,10,19),zsrff5(20,10,19),zsrff6(20,10,19)
161 real*4 zsiff1(20,10,19),zsiff2(20,10,19),zsiff3(20,10,19)
162 real*4 zsiff4(20,10,19),zsiff5(20,10,19),zsiff6(20,10,19)
163 real*4 thrown(50,50,50)
164 real*4 genera(50,50,50)
165 real*4 recons(50,50,50)
166 real*4 weightc(20,50)
167 real*4 weightd(8,40,30)
168
169 jones 1.1 common /sigkaon/ thrown,genera,recons,weightc,weightd,
170 1 zrff1,zrff2,zrff3,zrff4,zrff5,zrff6,
171 2 ziff1,ziff2,ziff3,ziff4,ziff5,ziff6,
172 3 zsrff1,zsrff2,zsrff3,zsrff4,zsrff5,zsrff6,
173 4 zsiff1,zsiff2,zsiff3,zsiff4,zsiff5,zsiff6
174
175
176
177 C momentum distribution (nump=#/points, pval=p, mprob=integral (p^2 f(p) dp)
178 real*8 pval(2000),mprob(2000)
179 real*8 pfer,pferx,pfery,pferz
180 integer*4 nump
181 real*8 he_em
182 integer*4 nume
183 real*8 eval(2000)
184
185 common /pfermi/ eval,pval,mprob,pfer,pferx,pfery,pferz,he_em,nump,nume
186
187 ! ... and some variable blocks of general interest defined in external files
188 include 'target.inc'
|