33 include
"../../SkelFlesh/Zprivate.h" 40 integer i, nlow, cumnum, num, ir(2)
42 character*120 skelefile, outdir
43 character*100 basename
44 character*100 filename
46 character*100 hostlist
48 integer n, j, k, nr, ll, kgetenv2
53 read( msg(1:ll), *) ncpu
61 if(ll .gt. 0) hostlist = msg(1:ll)
63 call copenfw2(11, skelefile, 2, icon)
65 write(msg,*) skelefile(1:
klena(skelefile)),
66 *
' could not be opened properly' 69 write(msg,*)
"# of cpu's=",ncpu
71 if(ncpu .lt. 1 .or. ncpu .gt. maxcpu)
then 72 call cerrormsg(
"# of cpu's > MaxCPU <1 ",0)
77 if( outdir(k:k) .ne.
'/')
then 81 write(msg,
'(a,a)')
'output directory is ',
85 *
' files will be created there as '//
86 * basename(1:
klena(basename))//
'0001 etc' 90 if(hostlist .ne.
' ')
then 91 call copenf(12, hostlist, icon)
102 call ksplit(input, 30, 3, field, nr)
103 read(field(1),
'(i5)' ) numba(
i)
107 read(field(3), * )
cpupw(
i)
112 write(0,*)
' hostlist not given' 117 write(filename,
'(a,i4.4)')
118 * basename(1:
klena(basename)), numba(
i)
119 skelefile=outdir(1:
klena(outdir))//filename
120 call copenfw2(basefn+
i, skelefile, 2, icon)
123 call cerrormsg(
'could not be opened properly',1)
124 call cerrormsg(
'maybe they already exist', 0)
133 read(11, end=100) cumnum, num, ir, zfirst
135 write(basefn+
i) cumnum, num, ir, zfirst
140 write(msg, *) np,
' ptcls are observed ones in skeleton' 142 if(np .gt. maxob)
then 144 *
'It is too large; enlarge Maxob', 0)
152 do while (nlow .ge. 0)
157 if(ctc .lt.
maxp)
then 162 *
'too many particles in skeleton',1)
164 *
'Enlarge Maxp in Zprivate2.h', 0)
170 *
'# of total ptcls at flesh=',ctc
179 if(ctc .lt. ncpu)
then 181 write(msg, *)
'# of ptcls < Ncpu; only ', ctc,
182 *
' cpu will be used for fleshing' 197 call cerrormsg(
'all events have been smashed',1)
207 include
"../../SkelFlesh/Zprivate.h" 208 include
"Zprivate2.h" 222 idxlist(1, i) =
idx(i)
277 noncpu( k ) = noncpu( k ) + 1
278 if( noncpu( k ) .gt. maxptclpercpu )
then 280 *
'# of ptcls on a cpu', k,
' exceeded limit=',
283 call cerrormsg(
'Enlarge MaxPtclPerCpu in Zprivate2.h',0)
285 idxlist( noncpu(k), k ) =
idx(j)
295 include
"../../SkelFlesh/Zprivate.h" 296 include
"Zprivate2.h" 307 write(basefn+1) oo(j)
312 write(basefn+i) noncpu(i)
314 write(basefn+i) ct( idxlist(j, i) )
321 include
"../../SkelFlesh/Zprivate.h" 322 include
"Zprivate2.h" 327 msg =
' cpu# cpuPW Sum E # of ptcls' 331 write(msg,
'(i4, f7.1, g16.7, i9)')
343 include
"../../SkelFlesh/Zprivate.h" 344 include
"Zprivate2.h" 350 erg(i) = ct(i).
p.fm.
p(4)
351 averg = averg +
erg(i)
358 averg = averg/ctc * ncpu
360 call cerrormsg(
'no need to flesh; no child',0)
362 if(
erg(
idx(ctc) ) .gt. averg*1.1 )
then 365 write(msg,*)
'WARGNING: max E=',
erg(
idx(i)),
366 *
' is > average total energy for 1 cpu=',
378 include
"../../SkelFlesh/Zprivate.h" 379 include
"Zprivate2.h" 387 t.
p.fm.
p(1) = f.fm(1)
388 t.
p.fm.
p(2) = f.fm(2)
389 t.
p.fm.
p(3) = f.fm(3)
390 t.
p.fm.
p(4) = f.fm(4)
392 t.pos.
xyz.
r(1) = pp.posx
393 t.pos.
xyz.
r(2) = pp.posy
394 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