32 subroutine gsvolu(name, shape, nmed, par, npar, ivol)
34 subroutine ksvolu(name, shape, nmed, par, npar, ivol)
39 character name*4, shape*4, fmt*150
40 integer nmed, npar, ivol, k
48 if (dogeom) call gsvolu(
name, shape, nmed, par, npar, ivol)
52 if (lunlist.ne.0)
then
57 write(fmt,
'(A,I2,A)')
'(a4,1x,a6,1x,a4,1x,a4,2i5,',max(npar,1),
59 write(lunlist,fmt)
context, rname,
name, shape, nmed, npar,
62 if (luncode.ne.0)
then
63 write(luncode,
'(''{'')')
65 write(luncode,1000)
name, shape, nmed, npar
66 1000
format(
'G4gsvolu(name="',
a,
'",shape="',
a,
'",nmed=',i5,
67 +
',par,npar=',i4,
');')
68 write(luncode,
'(''}'')')
74 subroutine gspos(name, num, moth, x, y, z, irot, only)
76 subroutine kspos(name, num, moth, x, y, z, irot, only)
81 character name*4, moth*4, only*4
90 if (dogeom) call gspos(
name, num, moth,
x,
y,
z, irot, only)
92 if (lunlist.ne.0)
then
94 +
'(a4,1x,a6,1x,a4,i5,1x,a4,3(1x,e16.8),i5,1x,a4)')
97 if (luncode.ne.0)
then
98 write(luncode,
'(''{'')')
102 write(luncode,1000)
name,num,moth,irot,only
103 1000
format(
'G4gspos(name="',
a,
'",num=',i5,
',moth="',
a,
104 +
'",x,y,z,irot=',i5,
',only="',
a,
'");')
105 write(luncode,
'(''}'')')
111 subroutine gsposp(name, num, moth, x, y, z, irot, only, par, npar)
113 subroutine ksposp(name, num, moth, x, y, z, irot, only, par, npar)
118 character name*4, moth*4, only*4
119 integer num, irot, npar, k
120 real x,
y,
z, par(npar)
121 character rname*6, fmt*150
122 #include "G3toG4.inc"
123 data rname /
'GSPOSP'/
127 if (dogeom) call gsposp(
name, num, moth,
x,
y,
z, irot, only,
130 if (lunlist.ne.0)
then
132 if (abs(par(k)).gt.1.e10)
then
133 print *,
'Warning: huge junk value in PAR for GSPOS'
144 write(fmt,
'(A,A,I2,A)')
145 >
'(a4,1x,a6,1x,a4,i5,1x,a4,3(1x,e16.8),',
146 +
'i5,1x,a4,i5,',max(npar,1),
'(1x,e16.8))'
148 +
context, rname,
name, num, moth,
x,
y,
z, irot, only,
152 if (luncode.ne.0)
then
153 write(luncode,
'(''{'')')
158 write(luncode,1000)
name,num,moth,irot,only,npar
159 1000
format(
'G4gsposp(name="',
a,
'",num=',i5,
',moth="',
a,
160 +
'",x,y,z,irot=',i5,
',only="',
a,
'",par,npar=',i4,
');')
161 write(luncode,
'(''}'')')
167 subroutine gsatt(name, attr, ival)
174 character name*4, attr*4
177 #include "G3toG4.inc"
178 data rname /
'GSATT '/
182 if (dogeom) call gsatt(
name, attr, ival)
184 if (lunlist.ne.0)
then
186 +
'(a4,1x,a6,1x,a4,1x,a4,i12)')
189 if (luncode.ne.0)
then
190 write(luncode,
'(''{'')')
191 write(luncode,1000)
name,attr,ival
192 1000
format(
'G4gsatt(name="',
a,
'",attr="',
a,
'",ival=',i10,
');')
193 write(luncode,
'(''}'')')
199 subroutine gsrotm(irot, theta1, phi1, theta2, phi2,
202 subroutine ksrotm(irot, theta1, phi1, theta2, phi2,
209 real theta1, phi1, theta2, phi2, theta3, phi3
211 #include "G3toG4.inc"
212 data rname /
'GSROTM'/
216 if (dogeom) call gsrotm(irot, theta1, phi1, theta2, phi2,
219 if (lunlist.ne.0)
then
221 +
'(a4,1x,a6,i5,6f11.5)')
222 +
context, rname, irot, theta1, phi1, theta2, phi2,
225 if (luncode.ne.0)
then
226 write(luncode,
'(''{'')')
227 call
rtocp(
'theta1',theta1)
228 call
rtocp(
'phi1',phi1)
229 call
rtocp(
'theta2',theta2)
230 call
rtocp(
'phi2',phi2)
231 call
rtocp(
'theta3',theta3)
232 call
rtocp(
'phi3',phi3)
233 write(luncode,1000) irot
234 1000
format(
'G4gsrotm(irot=',i5,
235 +
',theta1,phi1,theta2,phi2,theta3,phi3);')
236 write(luncode,
'(''}'')')
242 subroutine gsdvn(name, moth, ndiv, iaxis)
244 subroutine ksdvn(name, moth, ndiv, iaxis)
249 character name*4, moth*4
252 #include "G3toG4.inc"
253 data rname /
'GSDVN '/
257 if (dogeom) call gsdvn(
name, moth, ndiv, iaxis)
259 if (lunlist.ne.0)
then
261 +
'(a4,1x,a6,1x,a4,1x,a4,i5,i3)')
264 if (luncode.ne.0)
then
265 write(luncode,
'(''{'')')
266 write(luncode,1000)
name, moth, ndiv, iaxis
267 1000
format(
'G4gsdvn(name="',
a,
'",moth="',
a,
'",ndiv=',i3,
269 write(luncode,
'(''}'')')
275 subroutine gsdvt(name, moth, step, iaxis, numed, ndvmx)
277 subroutine ksdvt(name, moth, step, iaxis, numed, ndvmx)
282 character name*4, moth*4
284 integer iaxis, numed, ndvmx
286 #include "G3toG4.inc"
287 data rname /
'GSDVT '/
291 if (dogeom) call gsdvt(
name, moth, step, iaxis, numed, ndvmx)
293 if (lunlist.ne.0)
then
295 +
'(a4,1x,a6,1x,a4,1x,a4,(1x,e16.8),3i5)')
296 +
context, rname,
name, moth, step, iaxis, numed, ndvmx
298 if (luncode.ne.0)
then
299 write(luncode,
'(''{'')')
300 call
rtocp(
'step',step)
301 write(luncode,1000)
name,moth,iaxis,numed,ndvmx
302 1000
format(
'G4gsdvt(name="',
a,
'",moth="',
a,
'",step,iaxis=',
303 + i1,
',numed=',i4,
',ndvmx=',i4,
');')
304 write(luncode,
'(''}'')')
310 subroutine gsdvx(name, moth, ndiv, iaxis, step, c0, numed, ndvmx)
312 subroutine ksdvx(name, moth, ndiv, iaxis, step, c0, numed, ndvmx)
317 character name*4, moth*4
318 integer ndiv, iaxis, numed, ndvmx
321 #include "G3toG4.inc"
322 data rname /
'GSDVX '/
326 if (dogeom) call gsdvx(
name, moth, ndiv, iaxis, step, c0, numed,
329 if (lunlist.ne.0)
then
331 +
'(a4,1x,a6,1x,a4,1x,a4,i5,i3,2(1x,e16.8),2i5)')
332 +
context, rname,
name, moth, ndiv, iaxis,step, c0,
335 if (luncode.ne.0)
then
336 write(luncode,
'(''{'')')
337 call
rtocp(
'step',step)
339 write(luncode,1000)
name,moth,ndiv,iaxis,numed,ndvmx
340 1000
format(
'G4gsdvx(name="',
a,
'",moth="',
a,
'",ndiv=',i3,
',iaxis=',
341 + i1,
',step,c0,numed=',i4,
',ndvmx=',i4,
');')
342 write(luncode,
'(''}'')')
348 subroutine gsdvn2(name, moth, ndiv, iaxis, c0, numed)
350 subroutine ksdvn2(name, moth, ndiv, iaxis, c0, numed)
355 character name*4, moth*4
356 integer ndiv, iaxis, numed
359 #include "G3toG4.inc"
360 data rname /
'GSDVN2'/
364 if (dogeom) call gsdvn2(
name, moth, ndiv, iaxis, c0, numed)
366 if (lunlist.ne.0)
then
368 +
'(a4,1x,a6,1x,a4,1x,a4,i5,i3,(1x,e16.8),i5)')
369 +
context, rname,
name, moth, ndiv, iaxis, c0, numed
371 if (luncode.ne.0)
then
372 write(luncode,
'(''{'')')
374 write(luncode, 1000)
name,moth,ndiv,iaxis,numed
375 1000
format(
'G4gsdvn2(name="',
a,
'",moth="',
a,
'",ndiv=',i3,
',iaxis=',
376 + i1,
',c0,numed=',i4,
');')
377 write(luncode,
'(''}'')')
383 subroutine gsdvt2(name, moth, step, iaxis, c0, numed, ndvmx)
385 subroutine ksdvt2(name, moth, step, iaxis, c0, numed, ndvmx)
390 character name*4, moth*4
391 integer iaxis, numed, ndvmx
394 #include "G3toG4.inc"
395 data rname /
'GSDVT2'/
399 if (dogeom) call gsdvt2(
name, moth, step, iaxis, c0, numed, ndvmx)
401 if (lunlist.ne.0)
then
403 +
'(a4,1x,a6,1x,a4,1x,a4,(1x,e16.8),i3,(1x,e16.8),2i5)')
404 +
context, rname,
name, moth, step, iaxis, c0, numed, ndvmx
406 if (luncode.ne.0)
then
407 write(luncode,
'(''{'')')
408 call
rtocp(
'step',step)
410 write(luncode,1000)
name,moth,iaxis,numed,ndvmx
411 1000
format(
'G4gsdvt2(name="',
a,
'",moth="',
a,
'",step,iaxis=',
412 + i1,
',c0,numed=',i4,
',ndvmx=',i4,
');')
413 write(luncode,
'(''}'')')
419 subroutine gsmate(imate, name, a, z, dens, radl, absl, ubf, nwbf)
421 subroutine ksmate(imate, name, a, z, dens, radl, absl, ubf, nwbf)
427 integer imate, nwbf, k
428 real a,
z, dens, radl, absl, ubf(nwbf)
429 character rname*6, fmt*150
430 #include "G3toG4.inc"
431 data rname /
'GSMATE'/
435 if (dogeom) call gsmate
436 + (imate,
name,
a,
z, dens, radl, absl, ubf, nwbf)
438 if (lunlist.ne.0)
then
439 write(fmt,
'(A,I3,A)')
440 >
'(a4,1x,a6,i5,1x,''"'',a,''"'',4(1x,e16.8),i3,',
441 > max(nwbf,1),
'(1x,e16.8))'
444 + nwbf, (ubf(k), k=1,nwbf)
446 if (luncode.ne.0)
then
447 write(luncode,
'(''{'')')
450 call
rtocp(
'dens',dens)
451 call
rtocp(
'radl',radl)
453 write(luncode,1000) imate,
name, nwbf
454 1000
format(
'G4gsmate(imate=',i4,
',name="',
a,
455 +
'",a,z,dens,radl,npar=',i4,
',par);')
456 write(luncode,
'(''}'')')
462 subroutine gsmixt(imate, name, a, z, dens, nlmat, wmat)
464 subroutine ksmixt(imate, name, a, z, dens, nlmat, wmat)
470 integer imate, nlmat, k, nlmata
471 real a(*),
z(*), dens, wmat(*)
472 character rname*6, fmt*150
473 #include "G3toG4.inc"
474 data rname /
'GSMIXT'/
478 if (dogeom) call gsmixt
479 + (imate,
name,
a,
z, dens, nlmat, wmat)
481 if (lunlist.ne.0)
then
483 write(fmt,
'(A,I3,A,I3,A,I3,A)')
484 +
'(a4,1x,a6,i5,1x,''"'',a,''"'',1x,e16.8,1x,i3,',
486 >
'(1x,e16.8),',max(nlmata,1),
'(1x,e16.8),',
487 > max(nlmata,1),
'(1x,e16.8))'
491 + (
a(k), k=1,abs(nlmat)),
492 + (
z(k), k=1,abs(nlmat)),
493 + (wmat(k), k=1,abs(nlmat))
495 if (luncode.ne.0)
then
496 write(luncode,
'(''{'')')
497 call
rtocp(
'dens',dens)
500 call
artocp(
'wmat',wmat,abs(nlmat))
501 write(luncode,1000) imate,
name,nlmat
502 1000
format(
'G4gsmixt(imate=',i5,
',name="',
a,
503 +
'",aa,zz,dens,nlmat=',i3,
',wmat);')
504 write(luncode,
'(''}'')')
511 + itmed,
name, nmat, isvol, ifield, fieldm,
512 + tmaxfd, stemax, deemax, epsil, stmin, ubuf, nwbuf)
515 + itmed,
name, nmat, isvol, ifield, fieldm,
516 + tmaxfd, stemax, deemax, epsil, stmin, ubuf, nwbuf)
522 integer itmed, nmat, isvol, ifield, nwbuf, k
523 real fieldm, tmaxfd, stemax, deemax, epsil, stmin, ubuf(nwbuf)
524 character rname*6, fmt*150
525 #include "G3toG4.inc"
526 data rname /
'GSTMED'/
530 if (dogeom) call gstmed(
531 + itmed,
name, nmat, isvol, ifield, fieldm,
532 + tmaxfd, stemax, deemax, epsil, stmin, ubuf, nwbuf)
534 if (lunlist.ne.0)
then
540 write(fmt,
'(A,I3,A)')
541 >
'(a4,1x,a6,i5,1x,''"'',a,''"'',3i3,6(1x,e16.8),i3,',
542 > max(nwbuf,1),
'(1x,e16.8))'
544 +
context, rname, itmed,
name, nmat, isvol, ifield, fieldm,
545 + tmaxfd, stemax, deemax, epsil, stmin,
546 + nwbuf, (ubuf(k),k=1,nwbuf)
548 if (luncode.ne.0)
then
549 write(luncode,
'(''{'')')
550 call
rtocp(
'fieldm',fieldm)
551 call
rtocp(
'tmaxfd',tmaxfd)
552 call
rtocp(
'stemax',stemax)
553 call
rtocp(
'deemax',deemax)
554 call
rtocp(
'epsil',epsil)
555 call
rtocp(
'stmin',stmin)
557 write(luncode,1000) itmed,
name,nmat,isvol,ifield,nwbuf
558 1000
format(
'G4gstmed(itmed=',i4,
',name="',
a,
'",nmat=',i4,
559 +
',isvol=',i2,
',ifield=',i2,
',',/
560 +
' fieldm,tmaxfd,stemax,deemax,epsil,stmin,par,npar=',
562 write(luncode,
'(''}'')')
568 subroutine gstpar(itmed, chpar, parval)
579 #include "G3toG4.inc"
580 data rname /
'GSTPAR'/
584 if (dogeom) call gstpar(itmed, chpar, parval)
586 if (lunlist.ne.0)
then
588 +
'(a4,1x,a6,i5,1x,a4,(1x,e16.8))')
589 +
context, rname, itmed, chpar, parval
591 if (luncode.ne.0)
then
592 write(luncode,
'(''{'')')
593 write(luncode,1000) itmed, chpar, parval
594 1000
format(
'G4gstpar(itmed=',i4,
',chpar="',
a,
'",parval=',
596 write(luncode,
'(''}'')')
603 +
ipart, chpar, itrtyp, amass, charge, tlife, ub, nwb)
606 +
ipart, chpar, itrtyp, amass, charge, tlife, ub, nwb)
612 integer ipart, itrtyp, nwb, k
613 real amass, charge, tlife, ub(nwb)
614 character rname*6, fmt*150
615 #include "G3toG4.inc"
616 data rname /
'GSPART'/
620 if (dogeom) call gspart(
621 +
ipart, chpar, itrtyp, amass, charge, tlife, ub, nwb)
623 if (lunlist.ne.0)
then
628 write(fmt,
'(A,I3,A)')
629 >
'(a4,1x,a6,i5,1x,''"'',a,''"'',i3,3(1x,e16.8),i3,',
630 > max(nwb,1),
'(1x,e16.8))'
634 + nwb, (ub(k), k=1,nwb)
636 if (luncode.ne.0)
then
637 write(luncode,
'(''{'')')
638 call
rtocp(
'amass',amass)
639 call
rtocp(
'charge',charge)
640 call
rtocp(
'tlife',tlife)
642 write(luncode,1000)
ipart,chpar,itrtyp,nwb
643 1000
format(
'G4gspart(ipart=',i8,
',chpar="',
a,
'",itrtyp=',i8,
644 +
',amass,charge,'/
' tlife,par,npar=',i4,
');')
645 write(luncode,
'(''}'')')
651 subroutine gsdk(ipart, bratio, mode)
653 subroutine ksdk(ipart, bratio, mode)
658 integer ipart, mode(6)
661 #include "G3toG4.inc"
666 if (dogeom) call gsdk(
ipart, bratio, mode)
668 if (lunlist.ne.0)
then
672 +
'(a4,1x,a6,i5,i3,6(1x,e16.8),6i8)')
675 if (luncode.ne.0)
then
676 write(luncode,
'(''{'')')
677 call
artocp(
'bratio',bratio,6)
678 call
aitocp(
'mode',mode,6)
679 write(luncode,1000)
ipart
680 1000
format(
'G4gsdk(ipart=',i8,
',bratio,mode);')
681 write(luncode,
'(''}'')')
687 subroutine gsdet(chset, chdet, nv, chnam, nbits, idtyp, nwhi,
690 subroutine ksdet(chset, chdet, nv, chnam, nbits, idtyp, nwhi,
696 integer nv, nbits(nv), idtyp, nwhi, nwdi, iset, idet, k
697 character rname*6, chset*4, chdet*4, chnam(nv)*4, fmt*150
698 #include "G3toG4.inc"
699 data rname /
'GSDET '/
703 if (dogeom) call gsdet(chset, chdet, nv, chnam, nbits, idtyp,
704 + nwhi, nwdi, iset, idet)
706 if (lunlist.ne.0)
then
711 write(fmt,
'(A,I3,A,I3,A)')
'(a4,1x,a6,1x,a4,1x,a4,i5,',
712 > max(nv,1),
'(1x,a4),',max(nv,1),
'i10,i10,2i5)'
714 +
context, rname, chset, chdet, nv, (chnam(k), k=1,nv),
715 + (nbits(k), k=1,nv), idtyp, nwhi, nwdi
717 if (luncode.ne.0)
then
718 write(luncode,
'(''{'')')
719 call
astocp(
'chnam',chnam,nv)
720 call
aitocp(
'nbits',nbits,nv)
721 write(luncode,1000) chset, chdet, nv, idtyp, nwhi, nwdi
722 1000
format(
'G4gsdet(chset="',
a,
'",chdet="',
a,
'",nv=',i3,
723 +
',chnam,nbits,idtyp=',i8,
','/
724 +
' nwhi=',i8,
',nwdi=',i8,
');')
725 write(luncode,
'(''}'')')
731 subroutine gsdetv(chset, chdet, idtyp, nwhi, nwdi, iset, idet)
733 subroutine ksdetv(chset, chdet, idtyp, nwhi, nwdi, iset, idet)
738 integer idtyp, nwhi, nwdi, iset, idet
739 character rname*6, chset*4, chdet*4
740 #include "G3toG4.inc"
741 data rname /
'GSDETV'/
745 if (dogeom) call gsdetv(chset, chdet, idtyp,
746 + nwhi, nwdi, iset, idet)
748 if (lunlist.ne.0)
then
750 +
'(a4,1x,a6,1x,a4,1x,a4,i10,2i5)')
751 +
context, rname, chset, chdet, idtyp, nwhi, nwdi
753 if (luncode.ne.0)
then
754 write(luncode,
'(''{'')')
755 write(luncode,1000) chset, chdet, idtyp, nwhi, nwdi
756 1000
format(
'G4gsdetv(chset="',
a,
'",chdet="',
a,
'",idtyp=',i8,
757 +
',nwhi=',i8,
',nwdi=',i8,
');')
758 write(luncode,
'(''}'')')
764 subroutine gsdeta(chset, chdet, chali, nwhi, nwdi, iali)
766 subroutine ksdeta(chset, chdet, chali, nwhi, nwdi, iali)
771 integer nwhi, nwdi, iali
772 character rname*6, chset*4, chdet*4, chali*4
773 #include "G3toG4.inc"
774 data rname /
'GSDETA'/
778 if (dogeom) call gsdeta(chset, chdet, chali, nwhi, nwdi, iali)
780 if (lunlist.ne.0)
then
782 +
'(a4,1x,a6,1x,a4,1x,a4,1x,a4,2i5)')
783 +
context, rname, chset, chdet, chali, nwhi, nwdi
785 if (luncode.ne.0)
then
786 write(luncode,
'(''{'')')
787 write(luncode,1000) chset, chdet, chali, nwhi, nwdi
788 1000
format(
'G4gsdeta(chset="',
a,
'",chdet="',
a,
'",chali="',
a,
789 +
'",nwhi=',i8,
',nwdi=',i8,
');')
790 write(luncode,
'(''}'')')
796 subroutine gsdeth(chset, chdet, nh, chnam, nbits, orig, fact)
798 subroutine ksdeth(chset, chdet, nh, chnam, nbits, orig, fact)
803 integer nh, nbits(nh), k
804 real orig(nh), fact(nh)
805 character rname*6, chset*4, chdet*4, chnam(nh)*4, fmt*150
806 #include "G3toG4.inc"
807 data rname /
'GSDETH'/
811 if (dogeom) call gsdeth(chset, chdet, nh, chnam, nbits,
814 if (lunlist.ne.0)
then
820 write(fmt,
'(A,I3,A,I3,A,I3,A,I3,A)')
821 >
'(a4,1x,a6,1x,a4,1x,a4,i5,',max(nh,1),
'(1x,a4),',
822 > max(nh,1),
'i5,',max(nh,1),
'(1x,e16.8),',max(nh,1),
825 +
context, rname, chset, chdet, nh, (chnam(k), k=1,nh),
826 + (nbits(k), k=1,nh), (orig(k), k=1,nh), (fact(k), k=1,nh)
828 if (luncode.ne.0)
then
829 write(luncode,
'(''{'')')
830 call
astocp(
'chnam',chnam,nh)
831 call
aitocp(
'nbits',nbits,nh)
832 call
artocp(
'orig',orig,nh)
833 call
artocp(
'fact',fact,nh)
834 write(luncode,1000) chset,chdet,nh
835 1000
format(
'G4gsdeth(chset="',
a,
'",chdet="',
a,
'",nh=',i4,
836 +
',chnam,nbits,orig,fact);')
837 write(luncode,
'(''}'')')
843 subroutine gsdetd(chset, chdet, nd, chnam, nbits)
845 subroutine ksdetd(chset, chdet, nd, chnam, nbits)
850 integer nd, nbits(nd), k
851 character rname*6, chset*4, chdet*4, chnam(nd)*4, fmt*150
852 #include "G3toG4.inc"
853 data rname /
'GSDETD'/
857 if (dogeom) call gsdetd(chset, chdet, nd, chnam, nbits)
859 if (lunlist.ne.0)
then
864 write(fmt,
'(A,I3,A,I3,A)')
865 +
'(a4,1x,a6,1x,a4,1x,a4,i5,',max(nd,1),
'(1x,a4),',
868 +
context, rname, chset, chdet, nd, (chnam(k), k=1,nd),
871 if (luncode.ne.0)
then
872 write(luncode,
'(''{'')')
873 call
astocp(
'chnam',chnam,nd)
874 call
aitocp(
'nbits',nbits,nd)
875 write(luncode,1000) chset, chdet, nd
876 1000
format(
'G4gsdetd(chset="',
a,
'",chdet="',
a,
'",nd=',i4,
878 write(luncode,
'(''}'')')
884 subroutine gsdetu(chset, chdet, nupar, upar)
886 subroutine ksdetu(chset, chdet, nupar, upar)
893 character rname*6, chset*4, chdet*4, fmt*150
894 #include "G3toG4.inc"
895 data rname /
'GSDETU'/
899 if (dogeom) call gsdetu(chset, chdet, nupar, upar)
901 if (lunlist.ne.0)
then
905 write(fmt,
'(A,I3,A)')
906 +
'(a4,1x,a6,1x,a4,1x,a4,i5,',max(nupar,1),
'(1x,e16.8))'
908 +
context, rname, chset, chdet, nupar, (upar(k), k=1,nupar)
910 if (luncode.ne.0)
then
911 write(luncode,
'(''{'')')
913 write(luncode,1000) chset, chdet, nupar
914 1000
format(
'G4gsdetu(chset="',
a,
'",chdet="',
a,
'",npar=',
916 write(luncode,
'(''}'')')
930 #include "G3toG4.inc"
931 data rname /
'GGCLOS'/
935 if (dogeom) call ggclos
937 if (lunlist.ne.0)
then
938 write(lunlist,
'(a4,1x,a6)')
context, rname
941 if (luncode.ne.0)
then
942 write(luncode,
'(''//GeoMgr->CloseGeometry();'')')
943 write(luncode,
'(''}'')')
955 character name*4, shape*4
956 real ph, par(*),
tt, raddeg
959 raddeg = 180./3.1415926
961 if (shape(1:3).eq.
'BOX'.and.npar.ne.3)
then
962 print *,
'!! error, BOX with ',npar,
' parameters, vol ',
name
964 if (shape.eq.
'TRD1'.and.npar.ne.4)
then
965 print *,
'!! error, TRD1 with ',npar,
' parameters, vol ',
name
967 if (shape.eq.
'TRD2'.and.npar.ne.5)
then
968 print *,
'!! error, TRD2 with ',npar,
' parameters, vol ',
name
970 if (shape.eq.
'TRAP'.and.npar.ne.35.and.npar.ne.11)
then
972 print *,
'!! error, TRAP with ',npar,
' parameters, vol ',
name
974 if (shape.eq.
'TUBE'.and.npar.ne.3)
then
975 print *,
'!! error, TUBE with ',npar,
' parameters, vol ',
name
977 if (shape.eq.
'TUBS'.and.npar.ne.5)
then
978 print *,
'!! error, TUBS with ',npar,
' parameters, vol ',
name
980 if (shape.eq.
'CONE'.and.npar.ne.5)
then
981 print *,
'!! error, CONE with ',npar,
' parameters, vol ',
name
983 if (shape.eq.
'CONS'.and.npar.ne.7)
then
984 print *,
'!! error, CONS with ',npar,
' parameters, vol ',
name
986 if (shape.eq.
'SPHE'.and.npar.ne.6)
then
987 print *,
'!! error, SPHE with ',npar,
' parameters, vol ',
name
989 if (shape.eq.
'PARA'.and.npar.ne.6)
then
990 print *,
'!! error, PARA with ',npar,
' parameters, vol ',
name
992 if (shape.eq.
'PARA')
then
997 if (par(5).ne.0.) ph = atan2(par(6),par(5))*raddeg
998 tt =
sqrt(par(5)**2+par(6)**2)
999 par(4) = atan(par(4))*raddeg
1000 if (par(4).gt.90.0) par(4) = par(4)-180.0
1001 par(5) = atan(
tt)*raddeg
1002 if (ph.lt.0.0) ph = ph + 360.0
1005 if (shape.eq.
'TRAP')
then
1011 if (par(2).ne.0.) ph = atan2(par(3),par(2))*raddeg
1012 tt =
sqrt(par(2)**2+par(3)**2)
1013 par(2) = atan(
tt)*raddeg
1014 if (ph.lt.0.0) ph = ph+360.0
1016 par(7) = atan(par(7))*raddeg
1017 if (par(7).gt.90.0) par(7) = par(7)-180.0
1018 par(11)= atan(par(11))*raddeg
1019 if (par(11).gt.90.0) par(11) = par(11)-180.0
subroutine kspart(ipart, chpar, itrtyp, amass, charge, tlife, ub, nwb)
subroutine ksdvx(name, moth, ndiv, iaxis, step, c0, numed, ndvmx)
subroutine ksdvn(name, moth, ndiv, iaxis)
subroutine ksposp(name, num, moth, x, y, z, irot, only, par, npar)
subroutine ksmixt(imate, name, a, z, dens, nlmat, wmat)
subroutine ksmate(imate, name, a, z, dens, radl, absl, ubf, nwbf)
subroutine astocp(string, ac, n)
subroutine ksdetu(chset, chdet, nupar, upar)
subroutine artocp(string, ax, n)
subroutine rtocp(string, x)
subroutine ksdetv(chset, chdet, idtyp, nwhi, nwdi, iset, idet)
subroutine aitocp(string, ai, n)
subroutine ksvolu(name, shape, nmed, par, npar, ivol)
subroutine ksdeta(chset, chdet, chali, nwhi, nwdi, iali)
subroutine ksdvt(name, moth, step, iaxis, numed, ndvmx)
subroutine checkshape(name, shape, par, npar)
subroutine ksrotm(irot, theta1, phi1, theta2, phi2, theta3, phi3)
subroutine ksatt(name, attr, ival)
subroutine kspos(name, num, moth, x, y, z, irot, only)
subroutine ksdet(chset, chdet, nv, chnam, nbits, idtyp, nwhi, nwdi, iset, idet)
subroutine ksdetd(chset, chdet, nd, chnam, nbits)
subroutine ksdvn2(name, moth, ndiv, iaxis, c0, numed)
subroutine kstmed(itmed, name, nmat, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin, ubuf, nwbuf)
static c2_sqrt_p< float_type > & sqrt()
make a *new object
subroutine ksdk(ipart, bratio, mode)
subroutine kstpar(itmed, chpar, parval)
void print(const std::vector< T > &data)
subroutine g3ldpar(par, npar)
subroutine ksdeth(chset, chdet, nh, chnam, nbits, orig, fact)
subroutine ksdvt2(name, moth, step, iaxis, c0, numed, ndvmx)