29 integer leng, i, fn0, fout
30 integer icon0, iconhyb
31 character*120 hist0, histout
32 character*6 histid0, oldhist
40 leng = kgetenv2(
"HISTFILE0", hist0)
43 write(0,*)
"File specified by HISTFILE0 " 44 if( icon0 .eq. 0)
then 45 write(0,*)
'not exists' 47 write(0,*)
' cannot be opened ' 49 write(0,*)
' icon=',icon0
52 write(0,*) hist0(1:leng),
' opened' 54 leng = kgetenv2(
"HISTFILE1", histout)
57 *
"Output file name is not given by the HISTFILE1" 58 write(0,*)
"Set Env. Var. HISTFILE1" 61 call copenfw2(fout, histout(1:leng), 2, icon0)
63 write(0,*)
"For binary output "//histout(1:leng)
64 write(0,*)
"is specified but old one seems to exist" 65 write(0,*)
"delete or mv that file beforehand" 69 * histout(1:leng)//
' will be created for binary hist"' 73 leng = kgetenv2(
"OLDHIST", oldhist)
74 if( leng .gt. 0 .and. oldhist .eq.
"yes")
then 75 write(0,*)
'Old hist format assumed' 76 call kwhistfmt(.
true.)
78 call kwhistfmt(.
false.)
82 read( fn0, end=1000 ) histid0
84 if( histid0 .eq.
'#hist1' )
then 87 if(iconhyb .eq. 1)
then 93 elseif(histid0 .eq.
'#hist2' )
then 94 call kwhistr2(h20, fn0, icon0)
95 if(iconhyb .eq. 1)
then 98 call kwhists2(h20, normf)
99 call kwhistp2(h20, fout)
101 elseif(histid0 .eq.
'#hist3' )
then 102 call kwhistr3(h30, fn0, icon0)
103 if(iconhyb .eq. 1)
then 106 call kwhists3(h30, normf)
107 call kwhistp3(h30, fout)
110 write(0,*)
'histid=', histid0,
' invalid' 115 write(0,*)
'all events processed ' 127 real*8 ASdep(ndepth), munit(ndepth)
128 real*8 Esize0(ndepth),
129 * age0(ndepth), cogdep0(ndepth),
131 * ng0(ndepth), ne0(ndepth), nmu0(ndepth),
136 * asdep, esize0, age0,
137 * cogdep0, seloss0, munit,
138 * ng0, ne0, nmu0, cog0,
147 do while (input0(1:10) .ne.
" ")
149 read( fn1 ,
'(a)') input0
153 if(input0(1:10) .ne.
" ")
then 154 read(input0(1:klena(input0)), *)
155 * evno0, i, asdep(i), esize0(i), age0(i),
156 * cogdep0(i), seloss0(i),
157 * munit(i), ng0(i), ne0(i), nmu0(i), cog0
179 real*8 ASdep(ndepth), munit(ndepth)
180 real*8 Esize0(ndepth),
181 * age0(ndepth), cogdep0(ndepth),
183 * ng0(ndepth), ne0(ndepth), nmu0(ndepth),
188 * asdep, esize0, age0,
189 * cogdep0, seloss0, munit,
190 * ng0, ne0, nmu0, cog0,
196 do while (h1%c%eventno .ne. evno0)
197 call get1hyb( h1%c%eventno .lt. evno0)
212 read(h1%c%id,
'(i3)') j
217 *
'(i3, i5, f5.2, f5.2, 219 * j, int( asdep(j) ),
220 * age0(j), asdep(j)/cog0,
221 * int(munit(j)), int(cog0)
231 do while (h2%c%eventno .ne. evno0)
232 call get1hyb( h2%c%eventno .lt. evno0)
234 read(h2%c%id,
'(i3)') j
236 *
'(i3, i5, f5.2, f5.2, 238 * j, int( asdep(j) ),
239 * age0(j), asdep(j)/cog0,
240 * int(munit(j)), int(cog0)
246 do while (h3%c%eventno .ne. evno0)
247 call get1hyb( h3%c%eventno .lt. evno0)
250 read(h3%c%id,
'(i3)') j
252 *
'(i3, i5, f5.2, f5.2, 254 * j, int( asdep(j) ),
255 * age0(j), asdep(j)/cog0,
256 * int(munit(j)), int(cog0)
268 real*8 ASdep(ndepth), munit(ndepth)
269 real*8 Esize0(ndepth),
270 * age0(ndepth), cogdep0(ndepth),
272 * ng0(ndepth), ne0(ndepth), nmu0(ndepth),
277 * asdep, esize0, age0,
278 * cogdep0, seloss0, munit,
279 * ng0, ne0, nmu0, cog0,
286 leng = kgetenv2(
"HYBFILE0", hyb0)
290 *
"You haven't given env. var. HYBFILE0" 292 *
"or File specified by HYBFILE0" 293 if( icon .eq. 0)
then 294 write(0,*)
'not exists' 296 write(0,*)
' cannot be opened ' 300 write(0,*) hyb0(1:leng),
' opened' integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
void kwhistp(struct histogram1 *h, FILE *fno)
void kwhistd(struct histogram1 *h)
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
subroutine copenfw2(io, fnin, form, icon)
void kwhistr(struct histogram1 *h, FILE *bfnor, int icon)
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 ! knockon is considered Obsolete *PhotoProd false
void kwhists(struct histogram1 *h, float inorm)