38 include
"../../SkelFlesh/Zprivate.h" 45 integer i, nlow, cumnum, num, ir(2)
47 character*120 skelefile, outdir
48 character*100 basename
49 character*100 filename
51 character*100 hostlist
53 integer n, j, k, nr, ll, kgetenv2
58 read( msg(1:ll), *) ncpu
66 if(ll .gt. 0) hostlist = msg(1:ll)
68 call copenfw2(11, skelefile, 2, icon)
70 write(msg,*) skelefile(1:
klena(skelefile)),
71 *
' could not be opened properly' 74 write(msg,*)
"# of cpu's=",ncpu
76 if(ncpu .lt. 1 .or. ncpu .gt. maxcpu)
then 77 call cerrormsg(
"# of cpu's > MaxCPU <1 ",0)
82 if( outdir(k:k) .ne.
'/')
then 86 write(msg,
'(a,a)')
'output directory is ',
90 *
' files will be created there as '//
91 * basename(1:
klena(basename))//
'0001 etc' 95 if(hostlist .ne.
' ')
then 96 call copenf(12, hostlist, icon)
102 read(12,
'(a)') input
107 call ksplit(input, 30, 3, field, nr)
108 read(field(1),
'(i5)' ) numba(
i)
112 read(field(3), * )
cpupw(
i)
117 write(0,*)
' hostlist not given' 122 write(filename,
'(a,i5.5)')
123 * basename(1:
klena(basename)), numba(
i)
124 skelefile=outdir(1:
klena(outdir))//filename
125 call copenfw2(basefn+
i, skelefile, 2, icon)
128 call cerrormsg(
'could not be opened properly',1)
129 call cerrormsg(
'maybe they already exist', 0)
138 read(11, end=100) cumnum, num, ir, zfirst
140 write(basefn+
i) cumnum, num, ir, zfirst
145 write(msg, *) np,
' ptcls are observed ones in skeleton' 147 if(np .gt. maxob)
then 149 *
'It is too large; enlarge Maxob', 0)
157 do while (nlow .ge. 0)
162 if(ctc .lt.
maxp)
then 167 *
'too many particles in skeleton',1)
169 *
'Enlarge Maxp in Zprivate2.h', 0)
175 *
'# of total ptcls at flesh=',ctc
184 if(ctc .lt. ncpu)
then 186 write(msg, *)
'# of ptcls < Ncpu' 199 call cerrormsg(
'all events have been smashed',1)
209 include
"../../SkelFlesh/Zprivate.h" 210 include
"Zprivate2.h" 224 idxlist(1, i) =
idx(i)
279 noncpu( k ) = noncpu( k ) + 1
280 if( noncpu( k ) .gt. maxptclpercpu )
then 282 *
'# of ptcls on a cpu', k,
' exceeded limit=',
285 call cerrormsg(
'Enlarge MaxPtclPerCpu in Zprivate2.h',0)
287 idxlist( noncpu(k), k ) =
idx(j)
297 include
"../../SkelFlesh/Zprivate.h" 298 include
"Zprivate2.h" 301 integer navob, navobc
311 navob = max(np/ncpu, 1)
312 if( np .eq. 0 ) navob = 0
315 if(navobc+navob .gt. np .or. i .eq. n )
then 318 write(basefn+i) navob
319 do j = navobc +1, navobc+navob
321 write(basefn+i) oo(j)
323 navobc = navobc + navob
335 write(basefn+i) noncpu(i)
337 write(basefn+i) ct( idxlist(j, i) )
344 include
"../../SkelFlesh/Zprivate.h" 345 include
"Zprivate2.h" 350 msg =
' cpu# cpuPW Sum E # of ptcls' 354 write(msg,
'(i4, f7.1, g16.7, i9)')
366 include
"../../SkelFlesh/Zprivate.h" 367 include
"Zprivate2.h" 373 erg(i) = ct(i).
p.fm.
p(4)
374 averg = averg +
erg(i)
381 averg = averg/ctc * ncpu
386 if(
erg(
idx(ctc) ) .gt. averg*1.1 )
then 389 write(msg,*)
'WARGNING: max E=',
erg(
idx(i)),
390 *
' is > average total energy for 1 cpu=',
402 include
"../../SkelFlesh/Zprivate.h" 403 include
"Zprivate2.h" 411 t.
p.fm.
p(1) = f.fm(1)
412 t.
p.fm.
p(2) = f.fm(2)
413 t.
p.fm.
p(3) = f.fm(3)
414 t.
p.fm.
p(4) = f.fm(4)
416 t.pos.
xyz.
r(1) = pp.posx
417 t.pos.
xyz.
r(2) = pp.posy
418 t.pos.
xyz.
r(3) = pp.posz
subroutine ksplit(a, m, n, b, nr)
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz Zfirst pos xyz *Zfirst pos *Zfirst pos depth
subroutine cerrormsg(msg, needrtn)
integer function kgetenv2(envname, envresult)
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz Zfirst pos xyz *Zfirst pos *Zfirst pos Zfirst pos *Zfirst pos colheight
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz r
subroutine movetrack(f, t)
latitude latitude this system is used *****************************************************************! type coord sequence union map real z z in m endmap xyz map real ! latitude in deg is to the north ! longitude in deg is to the east *h ! height in m endmap llh map real ! polar angle ! azimuthal angle *radius ! radial distance endmap sph endunion character *sys ! which system xyz
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
averg real * sumergi(MaxCPU)
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz Zfirst pos xyz sys
averg real MaxCPU integer idx(Maxp)
subroutine cresetdirec(aTrack)
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
subroutine copenfw2(io, fnin, form, icon)
subroutine kqsortd(A, ORD, N)
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz Zfirst pos xyz *Zfirst pos *Zfirst pos Zfirst pos *Zfirst pos *Zfirst Zfirst vec w *Zfirst vec w Zfirst vec *Zfirst Zfirst Zfirst asflag
*Zfirst p fm *Zfirst p Zfirst p code
subroutine ksortinv(idx, n)
averg real sumergw(MaxCPU)
subroutine copenf(io, fnin, icon)
averg real MaxCPU integer idxlocal(MaxCPU) integer numba(MaxCPU) integer ctc
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz Zfirst pos xyz *Zfirst pos *Zfirst pos Zfirst pos height
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p charge
integer function klena(cha)
*Zfirst p fm *Zfirst p mass
averg real cpupw(MaxCPU) integer nOnCpu(MaxCPU) integer idxlist(MaxPtclPerCpu
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz Zfirst pos xyz *Zfirst pos *Zfirst pos Zfirst pos *Zfirst pos *Zfirst Zfirst vec w *Zfirst vec w Zfirst vec *Zfirst wgt
*Zfirst p fm *Zfirst p Zfirst p Zfirst p subcode
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz Zfirst pos xyz *Zfirst pos radiallen