(file) Return to simulate_init.inc CVS log (file) (dir) Up to [HallC] / simc_semi

  1 gaskelld 1.1 ! SIMULATE_INIT.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_init.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 gaskelld 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              	real*8 slop_param_d_SHMS, slop_param_t_SHMS, slop_param_p_SHMS
 35              	parameter	(slop_param_d_SHMS=0.5)
 36              	parameter	(slop_param_t_SHMS=0.005)
 37              	parameter	(slop_param_p_SHMS=0.005)
 38              
 39              ! ... the common blocks
 40              
 41              !RMM changed ordering in /gnrl/ to fix memory alignment problems
 42              
 43 gaskelld 1.1 	real*8	Mh, Mh2, Mh2_final	!mh,mh2 are INITIAL hadron mass(**2)
 44              	real*8	Ebeam, dEbeam, Ebeam_vertex_ave, genvol, genvol_inclusive
 45              	real*8	luminosity, targetfac, normfac
 46              	real*8	wtcontribute, dE_edge_test, Egamma_gen_max
 47              	real*8  pt_b_param,sigc_kin_min,sigc_kin_max,sigc_kin_ind
 48              	integer*4 sigc_flag,sigc_nbin
 49              
 50              	record /gen_limits/	gen
 51              	record /both_spec/	spec
 52              	record /cuts_true/	cuts
 53              	record /edge_true/	edge
 54              	record /edge_true/	VERTEXedge
 55              	record /double_arm_cuts/ SPedge
 56              	record /slop/		slop
 57              	record /EXP_field/	EXPER
 58              	logical mc_smear
 59              	logical debug(5)
 60              	integer*4 nevent, ntried, ngen, deForest_flag, Nntu
 61              	integer*4 ncontribute, npasscuts, ncontribute_no_rad_proton, spect_mode, phsp_mode
 62              	character base*40
 63              	character extra_dbase_file*60
 64 gaskelld 1.1 	logical using_E_arm_montecarlo, using_P_arm_montecarlo
 65              	logical doing_phsp, using_rad, hard_cuts
 66              	logical doing_hyd_elast, doing_deuterium, doing_heavy
 67              	logical doing_eep, doing_pion, doing_delta, doing_kaon, doing_rho
 68              	logical doing_semi, doing_semipi, doing_semika, doing_hplus
 69              	integer*4 which_kaon, which_pion
 70              	logical using_cit_generation, using_Coulomb, using_Eloss
 71              	logical correct_Eloss, correct_raster, do_fermi
 72              	integer*4 electron_arm, hadron_arm, use_first_cer
 73              
 74              	common /gnrl/   Mh, Mh2, Mh2_final, Ebeam, dEbeam, Ebeam_vertex_ave,
 75              	1 genvol, genvol_inclusive, luminosity, targetfac,
 76              	3 normfac, wtcontribute, dE_edge_test, Egamma_gen_max,pt_b_param,
 77              	4 sigc_kin_min,sigc_kin_max,sigc_kin_ind,sigc_flag,sigc_nbin,
 78              	5 gen, spec, cuts, edge, SPedge, VERTEXedge,
 79              	6 slop, EXPER, mc_smear, debug, nevent, ntried, ngen,
 80              	7 deForest_flag, Nntu, ncontribute, npasscuts, ncontribute_no_rad_proton, base,
 81              	8 extra_dbase_file, using_E_arm_montecarlo, using_P_arm_montecarlo,
 82              	9 doing_phsp, using_rad, doing_hyd_elast, doing_deuterium, doing_heavy,
 83              	1 doing_eep, doing_pion, doing_delta, doing_kaon, doing_rho, doing_semi,
 84              	2 doing_semipi, doing_semika, doing_hplus, which_kaon,
 85 gaskelld 1.1 	3 which_pion, using_cit_generation, using_Coulomb, using_Eloss,
 86              	4 correct_Eloss, correct_raster, do_fermi,
 87              	5 electron_arm, hadron_arm, use_first_cer, spect_mode, phsp_mode, hard_cuts
 88              
 89              
 90              ! ........ note: make these first two parameters at least ONE BIGGER than the actual dimensions you want to read in
 91              	integer*4 ntheorymax,nrhoPmmax
 92              	parameter	(ntheorymax=500)
 93              	parameter	(nrhoPmmax=21)
 94              	real*8		theory, Em_theory, bs_norm_theory, nprot_theory
 95              	real*8		Emsig_theory, Em_int_theory, E_Fermi
 96              	integer		nrhoPm
 97              	character	theory_file*80, theory_base*40, theory_target*40
 98              
 99              	record /axis/	Pm_theory
100              
101              	common /theory/		theory(nrhoPmmax,ntheorymax),
102              	1	Em_theory(nrhoPmmax), bs_norm_theory(nrhoPmmax),
103              	2	nprot_theory(nrhoPmmax), Emsig_theory(nrhoPmmax),
104              	4	Em_int_theory(nrhoPmmax), E_Fermi,
105              	5	Pm_theory(nrhoPmmax),
106 gaskelld 1.1 	6	theory_file, theory_base, theory_target,
107              	7	nrhoPm
108              
109              C decdist(30) is just an array of miscellaneous shared variables, SOME of
110              C which are related to decay.  Here are the ones that are currently in use:
111              Cxx	decdist(30)    = position where event decays (cm)
112              C	decdist(3)  = sum of sigcc (to calculate "central sigcc")
113              Cxx	decdist(4)  = radphot   (for ntuple output)
114              Cxx	decdist(5)  = flag for type of radiation (which particle).
115              Cxx	decdist(6)  = resfac in ntup. (sum of resolution modifiers for HMS/SOS)
116              Cxx	decdist(21) = sigma_eep (which is eepi cross section - Sigcc in ntup.)
117              C
118              C	real*8 decdist(30)
119              
120              	real*8 ctau
121              	logical doing_decay
122              	logical doing_hydpi, doing_deutpi, doing_hepi
123              	logical doing_hydkaon, doing_deutkaon, doing_hekaon
124              	logical doing_hyddelta, doing_deutdelta, doing_hedelta
125              	logical doing_hydrho, doing_Deutrho, doing_herho
126              	logical doing_hydsemi, doing_deutsemi
127 gaskelld 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_hyddelta,doing_deutdelta,doing_hedelta,
132              	4 doing_hydrho, doing_deutrho, doing_herho,
133              	5 doing_hydsemi, doing_deutsemi
134              
135              C Trying to get rid of the decdist array of random variables.
136              C Structure for variables that we want to available to the ntuple.
137              	structure /ntupvars/
138              		real*8 radphot, radarm
139              		real*8 resfac
140              		real*8 sigcm
141              		real*8 krel,mm,mmA,t
142              		real*8 sigcm1, sigcm2, sigcm3, sigcm4
143              		real*8 xfermi, yfermi
144              		real*8 rhomass, rhotheta
145              	end structure
146              
147              	record /ntupvars/ ntup
148 gaskelld 1.1 
149              C decdist is zpos of decay if doing_decay, survivalprobability if
150              C .not.doing_decay.  NOT included in ntup.* structure because it is used
151              C in the single arm MC, which we want to keep structure-free.
152              
153              	real*8 decdist
154              
155              	common /ntuple_variables/ ntup,decdist
156              
157              
158              
159              C Kaon cross section lookup tables (real*4 for CERNLIB fint compatability).
160              	real*4 zrff1(10,11,19),zrff2(10,11,19),zrff3(10,11,19)
161              	real*4 zrff4(10,11,19),zrff5(10,11,19),zrff6(10,11,19)
162              	real*4 ziff1(10,11,19),ziff2(10,11,19),ziff3(10,11,19)
163              	real*4 ziff4(10,11,19),ziff5(10,11,19),ziff6(10,11,19)
164              	real*4 zsrff1(20,10,19),zsrff2(20,10,19),zsrff3(20,10,19)
165              	real*4 zsrff4(20,10,19),zsrff5(20,10,19),zsrff6(20,10,19)
166              	real*4 zsiff1(20,10,19),zsiff2(20,10,19),zsiff3(20,10,19)
167              	real*4 zsiff4(20,10,19),zsiff5(20,10,19),zsiff6(20,10,19)
168              	real*4 thrown(50,50,50)
169 gaskelld 1.1 	real*4 genera(50,50,50)
170              	real*4 recons(50,50,50)
171              	real*4 weightc(20,50)
172              	real*4 weightd(8,40,30)
173              
174              	common /sigkaon/ thrown,genera,recons,weightc,weightd,
175              	1 zrff1,zrff2,zrff3,zrff4,zrff5,zrff6,
176              	2 ziff1,ziff2,ziff3,ziff4,ziff5,ziff6,
177              	3 zsrff1,zsrff2,zsrff3,zsrff4,zsrff5,zsrff6,
178              	4 zsiff1,zsiff2,zsiff3,zsiff4,zsiff5,zsiff6
179              
180              
181              
182              C momentum distribution (nump=#/points, pval=p, mprob=integral (p^2 f(p) dp)
183              	real*8 pval(2000),mprob(2000)
184              	real*8 efer,pfer,pferx,pfery,pferz
185              	integer*4 nump
186              	integer*4 nume
187              	real*8 eval(2000)
188              
189              	common /pfermi/ eval,pval,mprob,efer,pfer,pferx,pfery,pferz,nump,nume
190 gaskelld 1.1 
191              ! ... and some variable blocks of general interest defined in external files
192              	include 'target.inc'

Analyzer/Replay: Mark Jones, Documents: Stephen Wood
Powered by
ViewCVS 0.9.2-cvsgraph-1.4.0