15 #include "../FleshHist/asinfo.f" 16 #include "../FleshHist/asdensity.f" 17 #include "../FleshHist/crecprob.f" 19 #include "../FleshHist/Zprivate0.h" 20 #include "../FleshHist/Zprivate1.h" 21 #include "../FleshHist/Zprivate3.h" 25 integer ldep, code, subcode,
26 *
charge, ridx, faiidx, codex
27 real rinmu, fai, Ek, time,
37 real recprob(
nrbin, 4, ndepth)
42 real rat, all, rec, prob
45 integer nrbina, nfaia, ansites0
46 integer leng, i, j, k, l
47 integer i0, j0, k0, l0
49 integer icon0, iconx, icont
51 character*100 nrfaifile, nrfaifile2, datfile
53 integer fnonrfai, fnonrfai2
54 real cosz, age, sum, Nx, depth
55 real nptcls(
nrbin, 4, ndepth)
56 integer indivdep(ndepth), packeddepidx(ndepth), depidx
58 integer icon, kgetenv2, nrec
65 write(0,*)
"Env. NRFAIFILE not given" 68 call copenfw2(fnonrfai, nrfaifile, 1, icon)
70 write(0,*)
' error cannot open', nrfaifile
76 write(0,*)
"Env. DATFILE not given" 79 call copenfw2(fnodat, datfile, 2, icon)
81 write(0,*)
' error cannot open', datfile
84 nrfaifile2 = datfile(1:
leng-3)//
"rnrfai" 85 call copenfw2(fnonrfai2, nrfaifile2, 1, icon)
86 write(0,*)
' reduced .nrfai is', trim(nrfaifile2)
87 write(0,*)
' open icon=', icon
93 rnrfairec(
i, l,
j, k)=0
101 read(fnonrfai,
'(a)', end=1000 ) input0
102 if(input0 .ne.
" ")
then 103 read(input0(1:
klena(input0)), *)
104 * evno0, e0,nn, cosz, limit, nrbina, nfaia, ansites0
108 if(nrbina .ne.
nrbin .or. nfaia .ne.
nfai)
then 109 write(0,*)
' nrbina=',nrbina,
'or nfaia=',nfaia,
110 *
' differ from the def. in this prog' 113 if(ansites0 .gt. ndepth)
then 114 write(0,*)
' too many depths' 121 read(fnonrfai,
'(a, f7.1, 4i4)' )
122 * id, intdep(
i), l0, i0, j0, k0
133 if(i0 .ne.
i .or.
j .ne. j0 .or. k .ne. k0)
then 134 write(0,*)
' intdep, i0,j0,k0=',
135 * intdep(
i), i0, j0, k0,
' strange' 138 if( id .ne.
"rec")
then 139 write(0,*)
'id=',id,
' strange' 144 * ( nrfairec0(l,k,
j,
i), l=1,
nrbin )
152 read(fnonrfai,
'(a,f7.1, 4i4)' )
153 * id, intdep(
i), l0, i0, j0, k0
155 if(i0 .ne.
i .or.
j .ne. j0 .or. k .ne. k0)
then 156 write(0,*)
' intdep, i0,j0,k0=',
157 * intdep(
i), i0, j0, k0,
' strange' 160 if( id .ne.
"all")
then 161 write(0,*)
'id=',id,
' strange' 165 * ( nrfaiall0(l,k,
j,
i), l=1,
nrbin )
171 write(0,*)
' all nrfai data has been read' 172 write(0,
'(i2, 1pE11.3,i3, 0pf7.1, 1pE11.3, 3i4)')
173 * evno0, e0,nn, cosz, limit, nrbina, nfaia, ansites0
180 write(0,*)
' limit=',limit,
' is being used' 186 if(nrfairec0(l, k,
j,
i) .gt. limit)
then 188 pnrfairec(l, k,
j,
i)=
189 * limit/nrfairec0(l, k,
j,
i)
191 pnrfairec(l, k,
j,
i)=1.0
209 call binread1(abuf, icon)
212 depidx = packeddepidx(abuf.ldep)
214 if(depidx .le. 0)
then 215 write(0,*)
' should not happen. depidx=',depidx
216 write(0,*)
'nrec=',nrec,
'icon=',icon,
' ldep=',
217 * abuf.ldep,
' code=',abuf.
code 222 codex=min(abuf.
code, 4)
224 * pnrfairec(abuf.ridx, abuf.faiidx, codex, depidx) )
then 225 rnrfairec(abuf.ridx, abuf.faiidx, codex, depidx)=
226 * rnrfairec(abuf.ridx, abuf.faiidx, codex, depidx) + 1
228 if(abuf.wz .lt. 0.999)
then 230 *
'(6i3, 1pE11.3, 0p,f6.1,1p2E11.3,0p, 2f8.4,f10.6)')
232 * abuf.
charge, abuf.ridx, abuf.faiidx,
233 * abuf.rinmu, abuf.fai,
235 * abuf.wx, abuf.wy, abuf.wz
237 write(*,
'(6i3,1pE11.3, 0p, f6.1, 1p2E11.3, a)')
239 * abuf.
charge, abuf.ridx, abuf.faiidx,
240 * abuf.rinmu, abuf.fai,
248 *
'(i2,1pE11.3, 0p,i3, f8.4, 1pE11.3,3i4)' )
249 * evno0, e0, nn, cosz, limit,
nrbin,
nfai, ansites0
255 write(fnonrfai2,
'("rec",f7.1, 4i4)' )
256 * intdep(
i), l,
i,
j, k
257 write(fnonrfai2,
'(1p10E11.3)')
258 * ( rnrfairec(l,k,
j,
i), l=1,
nrbin )
266 write(fnonrfai2,
'("all",f7.1, 4i4)' )
267 * intdep(
i), l,
i,
j, k
268 write(fnonrfai2,
'(1p10E11.3)')
269 * ( nrfaiall0(l,k,
j,
i), l=1,
nrbin )
273 write(0,*)
'end of run' 278 #include "../FleshHist/Zprivate1.h" 279 #include "../FleshHist/Zprivate3.h" 280 real*8 Et, wx, wy, wz
289 * eventno, code, et, wx, wy, wz
290 write(*,
'("i ", i3, i4, g13.4,3f11.7)')
291 * eventno, code, et, wx, wy, wz
297 entry binread1(abuf, icon)
300 read(fnodat,end=100, err=500) bufc, (buf(i), i=1, bufc)
305 if(bufc .eq. 100000) bufc=bufc-1
312 write(0, *)
' strange bufc' 320 write(0,*)
' input data read err' integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
integer function kgetenv2(envname, envresult)
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
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
subroutine copenfw2(io, fnin, form, icon)
*Zfirst p fm *Zfirst p Zfirst p code
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p charge
integer function klena(cha)
*Zfirst p fm *Zfirst p Zfirst p Zfirst p subcode