COSMOS v7.655  COSMOSv7655
(AirShowerMC)
getcoef.f
Go to the documentation of this file.
1 !
2 ! This program gets numerical values for the coefficients
3 ! in formulas expessing the air density as a function of the height.
4 !
5 ! 10/hn exp( (hb-z)/hn ) at z > hc
6 ! rho(z) =
7 ! 10/hl/hm ( (ha -z)/hl ) **( 1/hm -1) at z < hc
8 !
9 ! where hn = 7000 (m) ; shoud be in 6700 to 7300.
10 ! hc = 11.1d3 (m);
11 !
12 ! Other coefficients are determined so that
13 !
14 ! 1) at z=0, rho(0) = rho0 = 1.225 or little bit less. (kg/m3)
15 ! 2) at z=hc, rho(hc) =rho1 = 0.35932d0 (kg/m3)
16 ! 3) at z=hc, rho is continus and rho'(=d rho/dz) is also continus.
17 !
18  real*8 z, rhop1,temp, hmi, rho, hlhmi, z0
19  real*8 rho0, rho1, ha, hb, hm, hn, hc, f1, f2
20  integer ios
21  real*8 solv, x
22 ! to fix ha.
23  solv(x) =( (x-hc)/(x-z0) )**(-rhop1/rho1 * (x-hc))/(rho1/rho0) -1.d0
24 
25  z0 = 0.d3
26  hn =6.4d3
27  hc = 11.1d3
28  rho1 = 0.35932d0
29 ! rho0 = .73643
30 ! rho0 = 1.225
31  rho0 = 1.2 ! make rho0 bit smaller to have better fit < 11.1km
32 
33 
34  hb = log(rho1*hn/10.d0) *hn + hc
35  rhop1 = -10.d0/hn/hn * exp( (hb-hc)/hn)
36 ! binary chop for getting ha
37  ha1 = 13000.d0
38  ha2 = 45000.d0
39  f1 = solv(ha1)
40  f2= solv(ha2)
41  if(f1 *f 2 .gt. 0.) stop 9876
42  do while(.true.)
43  ha = (ha1 + ha2)/2
44  temp = solv(ha)
45  if(ha .eq. ha1 .or. ha .eq. ha2) goto 10
46  if(temp * f1 .le. 0.) then
47  f2 = temp
48  ha2 = ha
49  else
50  f1= temp
51  ha1 = ha
52  endif
53 ! write(0, *) temp, ha
54  enddo
55  10 continue
56 
57  hmi = - rhop1/rho1 * (ha - hc) + 1.d0
58  hm = 1.d0/hmi
59  hl = (10.d0/hm/rho0)**hm * (ha-z0)**(1.d0 - hm)
60  hlhmi = 1.d0/hl/hm
61 ! write(0, *) ha, hb, hl, hm, hn, hmi, hlhmi
62  write(*, *) ' data ha/', ha,'/, hb/',hb,'/,',
63  * ' * hl/',hl,'/, hm/',hm,'/,',
64  * ' * hn/',hn,'/, hmi/',hmi,'/,',
65  * ' * hlhmi/',hlhmi,'/, hc/',hc,'/'
66 !
67 ! read z vs rho data for comparison
68  open(12,file='stdatmos3.d', status='old', form='formatted',
69  * access='sequential')
70  do while(.true.)
71  read(12, *, iostat = ios) z, rho
72  if(ios .lt. 0) stop 9999
73 
74  if(z .le. hc) then
75  rhox = 10.d0/hl/hm * (( ha-z )/hl)**(hmi -1.d0)
76  else
77  rhox = 10.d0/hn*exp( (hb-z)/hn)
78  endif
79  write(*, *) sngl(z), sngl(rho), sngl(rhox)
80  enddo
81  end
82 
nodes z
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there hm
Definition: Zstdatmos.h:7
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there hb
Definition: Zstdatmos.h:7
block data cblkIncident data *Za1ry *HeightOfInj d3
Definition: cblkIncident.h:7
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there hc
Definition: Zstdatmos.h:7
block data cblkElemag data *AnihiE ! Eposi< 1 TeV, anihilation considered *X0/365.667/, ! radiation length of air in kg/m2 *Ecrit/81.e-3/, ! critical energy of air in GeV *MaxComptonE/1./, ! compton is considered below 1 GeV *MaxPhotoE/1.e-3/, ! above this, PhotoElectric effect neg. *MinPhotoProdE/153.e-3/, ! below 153 MeV, no gp --> hadrons ! scattering const not MeV *Knockon true
Definition: cblkElemag.h:7
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there hl
Definition: Zstdatmos.h:7
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there hmi
Definition: Zstdatmos.h:7
! to be included just before the execution code ! density as a function of height real fd0 real z0
Definition: Zstdatmosf.h:3
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there hlhmi common comstdatm ha
Definition: Zstdatmos.h:7
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there hn
Definition: Zstdatmos.h:7
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21
dE dx *! Nuc Int sampling table f
Definition: cblkMuInt.h:130