COSMOS v7.655  COSMOSv7655
(AirShowerMC)
asinfo.f
Go to the documentation of this file.
1 ! real depth, s, E0, sizex
2 ! integer code, id
3 ! do while (.true.)
4 ! write(0,*) ' enter code, E0'
5 ! E0=1.e8
6 ! code=2
7 ! read(*,*) code, E0
8 ! do id = 200, 1200, 100
9 ! depth = id
10 ! s= dep2s(E0, 1, depth)
11 ! write(*,*) depth, sizex(E0, 1, code, s)
12 ! enddo
13 ! enddo
14 ! end
15 
16  real function sizex(E0in, NN, code, s)
17  implicit none
18  real E0in ! input primary total energy in GeV
19  integer NN ! input. incident nucleon number 0--> photon, 1-->proton, 4-->He ...56-->Fe
20  integer code ! input code
21  real s ! input age
22 
23  real s2Ng, s2Ne, s2Nmu, s2Nh, E0, fac
24  if(nn .ge. 1) then
25  e0=e0in/nn
26  fac=nn
27  else
28  e0=e0in
29  fac =1
30  endif
31  if(e0 .gt. 1.e11 .or. e0 .lt. 1.e7) then
32  write(0,*)
33  * "*******warning: E0/n=",e0, " is out of range ******"
34  endif
35 
36  if(code .eq. 1) then
37  sizex=s2ng(e0, s)
38  if(nn .eq. 0) fac = 1.2
39  elseif(code .eq. 2) then
40  sizex=s2ne(e0, s)
41  if(nn .eq. 0) fac = 1.2
42  elseif(code .eq. 3) then
43  sizex=s2nmu(e0, s)
44  if(nn .eq. 0) fac = 0.01
45  elseif(code .le. 6) then
46  sizex=s2nh(e0, s)
47  if(nn .eq. 0) fac = 0.01
48  else
49  write(0,*) ' code error=',code, ' to sizex'
50  stop 6776
51  endif
52  sizex=sizex*fac
53  end
54 ! ************************
55  real function dep2cogdep(E0in, NN, dep)
56 ! ************************
57  implicit none
58  real E0in ! input primary nucleus total energy in GeV.
59  integer NN ! input incident nucleon number.
60  real dep ! input slant depth in g/cm^2
61 
62  real E0, eps
63  eps = 3.e-3
64  if(nn .eq. 0) then
65  e0=e0in
66  else
67  e0=e0in/nn
68  endif
69 ! function value is dep/cog.
70  if(abs(1.0- e0/1.e8) .lt. eps) then
71  dep2cogdep=0.001442*dep
72  elseif( abs(1.0-e0/1.e9) .lt. eps) then
73  dep2cogdep=0.001247*dep
74  elseif( abs(1.0-e0/1.e10) .lt. eps ) then
75  dep2cogdep=0.001094*dep
76  else
77  dep2cogdep=(-7.556e-05*log(e0) + 0.002826999)* dep
78  endif
79  end
80 ! ************************
81  real function cogdep2nmu(E0, cogdep)
82 ! ************************
83  implicit none
84  real E0 ! input GeV
85  real cogdep ! input dep/cog
86  real a, b, c, d
87  a=3.2e8
88  if(e0 .eq. 1e8) then
89  b=4.8316
90  c=5.9692
91  d=0.709
92  elseif(e0 .eq. 1e9) then
93  b=4.6796
94  c=3.7835
95  d=1.091
96  elseif(e0 .eq. 1e10) then
97  b=4.1251
98  c=1.8791
99  d=1.818
100  else
101  b = -0.1534*log(e0) + 7.7246
102  c = -0.8881*log(e0) + 22.282
103  d = 0.24081*log(e0) -3.7845
104  endif
105  cogdep2nmu=a*cogdep**b * exp(-c*cogdep**d)
106  end
107 ! ***********************
108  real function cogdep2nh(E0, cogdep)
109 ! ***********************
110  implicit none
111  real E0 ! input GeV
112  real cogdep ! input dep/cog
113 !
114  real cogdep2Nmu
115 ! use mu at present
116  cogdep2nh= cogdep2nmu(e0,cogdep)
117  end
118 ! ***********************
119  real function s2nh(E0, s)
120 ! ***********************
121  implicit none
122  real E0 ! input GeV
123  real s ! input age
124 ! use mu at present
125  real s2Nmu
126  s2nh = s2nmu(e0, s)
127  end
128 ! ************************
129  real function cogdep2ne(E0, cogdep)
130 ! ************************
131  implicit none
132  real E0 ! input GeV
133  real cogdep ! input dep/cog
134  real a, b, c, d
135  real eps
136  eps = 3.e-3
137 
138  a=1.e11
139  if(abs(1.- 1e8/e0) .lt. eps ) then
140  b=8.1044
141  c=7.4068
142  d=1.12022
143  elseif( abs(1.- 1e9/e0) .lt.eps) then
144  b= 7.278
145  c= 5.063
146  d= 1.555
147  elseif( abs(1.-1.e10/e0) .lt. eps) then
148  b=6.3661
149  c=2.7725
150  d=2.2605
151  else
152  b = -0.3774*log(e0) + 15.07
153  c = -1.0063*log(e0) + 25.93
154  d = 0.24760*log(e0) -3.48601
155  endif
156  cogdep2ne=a*cogdep**b * exp(-c*cogdep**d)
157  end
158 ! ************************
159  real function cogdep2ng(E0, cogdep)
160 ! ************************
161  implicit none
162  real E0 ! input GeV
163  real cogdep ! input dep/cog
164  real a, b, c, d
165 
166  a=1.e12
167  if(e0 .eq. 1e8) then
168  b=8.00
169  c=8.034
170  d=0.941
171  elseif(e0 .eq. 1e9) then
172  b=7.71
173  c=5.652
174  d=1.383
175  elseif(e0 .eq. 1e10) then
176  b= 6.91
177  c= 3.271
178  d= 2.022
179  else
180  b=-0.23669*log(e0)+12.445
181  c=-1.03427*log(e0)+ 27.085
182  d=0.2347*log(e0) -3.41583
183  endif
184  cogdep2ng=a*cogdep**b * exp(-c*cogdep**d)
185  end
186 ! ***************
187  real function cogdep2s(E0,NN, cogdep)
188 ! ***************
189 ! for all energy
190  implicit none
191  real E0 ! input not used now
192  integer NN ! input incident nucleon number. not used now
193  real cogdep ! input dep/cog
194  cogdep2s = 10.28*cogdep**0.0407-9.228
195  end
196 ! ***************
197  real function dep2s(E0, NN, dep)
198 ! ***************
199  implicit none
200  real E0 !input GeV
201  integer NN ! input incident nucleon number. not used now
202  real dep ! input dep g/cm^2
203 
204  real dep2cogdep, cogdep2s
205  dep2s=cogdep2s(e0,nn, dep2cogdep(e0,nn, dep))
206  end
207 ! ***************
208  real function s2ng(E0, s)
209 ! ***************
210  implicit none
211  real E0 !input total incident energy/n GeV
212  real s ! input age
213 
214  real cogdep2Ng, s2cogdep
215  s2ng=cogdep2ng(e0,s2cogdep(e0,s))
216  end
217 ! ***************
218  real function s2ne(E0, s)
219 ! ***************
220  implicit none
221  real E0 !input GeV
222  real s ! input age
223 
224  real s2cogdep, cogdep2Ne
225 
226  s2ne=cogdep2ne(e0, s2cogdep(e0, s))
227  end
228 ! ***************
229  real function s2nmu(E0, s)
230 ! ***************
231  implicit none
232  real E0 !input GeV
233  real s ! input age
234 
235  real s2cogdep, cogdep2Nmu
236 
237  s2nmu=cogdep2nmu(e0,s2cogdep(e0, s))
238  end
239 ! *************
240  real function s2cogdep(E0, s)
241 ! *************
242  real E0 ! not used now
243  real s ! input. age
244  s2cogdep= ( (s+9.228)/10.28 )**(1./0.0407)
245  end
real function cogdep2s(E0, NN, cogdep)
Definition: asinfo.f:188
real function cogdep2ng(E0, cogdep)
Definition: asinfo.f:160
dE dx *! Nuc Int sampling table e
Definition: cblkMuInt.h:130
real function s2ng(E0, s)
Definition: asinfo.f:209
real function cogdep2nmu(E0, cogdep)
Definition: asinfo.f:82
real function dep2s(E0, NN, dep)
Definition: asinfo.f:198
real function cogdep2ne(E0, cogdep)
Definition: asinfo.f:130
real function dep2cogdep(E0in, NN, dep)
Definition: asinfo.f:56
real function s2ne(E0, s)
Definition: asinfo.f:219
real function cogdep2nh(E0, cogdep)
Definition: asinfo.f:109
real function s2nmu(E0, s)
Definition: asinfo.f:230
*************************block data cblkTracking *************************implicit none data *ExactThick *Freec *RatioToE0 *MagChgDist *TimeStructure *Truncn *Truncx data *IncMuonPolari *KEminObs *ThinSampling *EthinRatio *Generate *LpmEffect *MagPairEmin e10
Definition: cblkTracking.h:9
real function s2nh(E0, s)
Definition: asinfo.f:120
real function s2cogdep(E0, s)
Definition: asinfo.f:241
real function sizex(E0in, NN, code, s)
Definition: asinfo.f:17