19 real*8 ASdep(ndepth), muunit(ndepth), sumEsize, sumEsize2
20 real*8 Esize0(ndepth),
21 * age0(ndepth), cogdep0(ndepth),
23 * ng0(ndepth), ne0(ndepth), nmu0(ndepth), nhad0(ndepth),
25 real*8 Esizex(ndepth),
26 * agex(ndepth), cogdepx(ndepth),
28 * ngx(ndepth), nex(ndepth), nmux(ndepth), nhadx(ndepth),
31 real*8 Esizet(ndepth),
32 * aget(ndepth), cogdept(ndepth),
34 * ngt(ndepth), net(ndepth), nmut(ndepth), nhadt(ndepth),
41 integer code, subcode, charge
42 integer leng, i, j, lengflesh
43 integer icon0, iconx, icont
44 real dd, firstz, w1, w2, w3, E0
45 character*128 hyb0, hybx, hybt, flesher
46 character*128 input0, inputx, inputt
53 write(0,*) hyb0(1:
leng)
54 if( icon0 .eq. 0)
then 55 write(0,*)
'not exists' 57 write(0,*)
' cannot be opened ' 59 write(0,*)
' icon=',icon0
62 write(0,*) hyb0(1:
leng),
' opened' 67 write(0,*) hybx(1:
leng)
68 if( iconx .eq. 0)
then 69 write(0,*)
'not exists' 71 write(0,*)
' cannot be opened ' 73 write(0,*)
' icon=',iconx
76 write(0,*) hybx(1:
leng),
' opened' 83 write(0,*) hybt(1:
leng)
84 write(0,*)
' cannot be opened ' 85 write(0,*)
' icon=',icont
88 write(0,*) hybt(1:
leng),
' opened' 90 lengflesh =
kgetenv2(
"FLESHDIR", flesher)
95 read( fn0,
'(a)', end=1000 ) input0
97 read( fnx,
'(a)' ) inputx
98 if(input0 .ne.
" ")
then 99 if(flesher(1:lengflesh) .eq.
"FleshHist")
then 100 if(input0(1:1) .eq.
"h" )
then 101 read(input0(3:
klena(input0)),* ) evno0,
code,
105 read(inputx(3:
klena(inputx)),*) evnox,
code,
110 read(input0(3:
klena(input0)), *)
111 *
i, asdep(
i), muunit(
i), age0(
i), cogdep0(
i),
112 * ng0(
i), ne0(
i), nmu0(
i), nhad0(
i),
113 * esize0(
i), seloss0(
i)
115 read(inputx(3:
klena(inputx)), *)
116 *
i, asdep(
i), muunit(
i), agex(
i), cogdepx(
i),
117 * ngx(
i), nex(
i), nmux(
i), nhadx(
i),
118 * esizex(
i), selossx(
i)
121 read(input0(3:
klena(input0)), *)
122 *
i, asdep(
i), muunit(
i), age0(
i), cogdep0(
i),
123 * ng0(
i), ne0(
i), nmu0(
i), nhad0(
i),
127 read(inputx(3:
klena(inputx)), *)
128 *
i, asdep(
i), muunit(
i), agex(
i), cogdepx(
i),
129 * ngx(
i), nex(
i), nmux(
i), nhadx(
i),
135 if(inputx .ne.
" ")
then 136 write(0,*)
' event differ', inputx
140 esizet(
j) = esize0(
j) + esizex(
j)
141 if(esizet(
j) .gt. 0.)
then 142 aget(
j) = ( esize0(
j)*age0(
j) + esizex(
j)*agex(
j))/
147 selosst(
j) = seloss0(
j) + selossx(
j)
148 ngt(
j) = ng0(
j) + ngx(
j)
149 net(
j) = ne0(
j) + nex(
j)
150 nmut(
j) = nmu0(
j) + nmux(
j)
151 nhadt(
j) = nhad0(
j) + nhadx(
j)
158 if(
j .gt. 1 .and.
j .lt.
i )
then 159 dd =( asdep(
j+1) - asdep(
j-1))/2.0
160 elseif(
j .eq. 1)
then 161 dd =(asdep(2) - asdep(1))
163 dd =(asdep(
i) - asdep(
i-1))
165 cogt = cogt + esizet(
j)*asdep(
j)*dd
166 sumesize = sumesize + esizet(
j)*dd
168 if( aget(
j) .gt. 2.0-aget(
i) )
then 169 if(
j .gt. 1 .and.
j .lt.
i )
then 170 dd =( asdep(
j+1) - asdep(
j-1))/2.0
171 elseif(
j .eq. 1)
then 172 dd =(asdep(2) - asdep(1))
174 dd =(asdep(
i) - asdep(
i-1))
176 cog2t = cog2t + esizet(
j)*asdep(
j)*dd
177 sumesize2= sumesize2 + esizet(
j)*dd
180 cogt = cogt / sumesize
181 if(sumesize2 .gt. 0.)
then 182 cog2t = cog2t / sumesize2
187 cogdept(
j) = asdep(
j)/cog2t
190 *
'("h ", i4, 3i3, 1pE11.3, 0p 3f11.7, f7.2, 2f7.0)')
195 if(flesher(1:lengflesh) .eq.
"FleshHist")
then 196 write(fnt,
'("t ", i3, 2f7.1, 2f6.3, 199 * asdep(
j), muunit(
j),
200 * aget(
j), cogdept(
j),
201 * ngt(
j), net(
j), nmut(
j), nhadt(
j),
202 * esizet(
j), selosst(
j)
204 write(fnt,
'("t ", i3, 2f7.1, 2f6.3, 207 * asdep(
j), muunit(
j),
208 * aget(
j), cogdept(
j),
209 * ngt(
j), net(
j), nmut(
j), nhadt(
j),
217 write(0,*)
'all events processed ' 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