61 subroutine g3tog4(luni,lunc,chopt)
90 print *,
'Initializing Geant3 to Geant4 conversion' 98 if (luni.eq.0.and.lunc.eq.0)
then 99 print *,
'G3TOG4: No output requested by user. No output'//
100 +
' will be generated.' 104 if (lunlist.ne.0)
then 109 if (luncode.ne.0)
then 115 if (lunlist.gt.0)
then 116 open(unit=lunlist,
file=
'g3calls.dat',status=
'unknown')
118 if (luncode.gt.0)
then 129 #include "G3toG4.inc" 131 if (luncode.ne.0)
then 133 +
'(''//G4GeometryManager* GeoMgr = new G4GeometryManager();'')')
152 #include "G3toG4.inc" 154 if (luncode.le.0)
return 155 if (nfile.gt.1)
write(luncode,
'(''}'')')
157 write (fname,
'(''G3toG4code_'',i2.2,''.cc'')') nfile
158 open(unit=luncode,
file=fname,status=
'unknown')
159 write(luncode,
'(''#include "G3toG4.hh"'')')
161 write(luncode,
'(/''void G3toG4code_'',i2.2,''()'')') nfile
162 write(luncode,
'(''{'')')
163 call ctocp(
'// init to 0 avoids "unused" warnings')
164 call ctocp(
'G4int nd=0,nh=0,nv=0,imate=0,itmed=0,nmat=0,')
165 call ctocp(
' isvol=0,ifield=0,nwhi=0,nwdi=0,idtyp=0,ipart=0,')
166 call ctocp(
' itrtyp=0,nlmat=0,npar=0,ndvmx=0,numed=0,iaxis=0,')
168 +
' ndiv=0,irot=0,ival=0,num=0,nmed=0,nbits[100],mode[6];')
169 call ctocp(
'G4String chnam[100];')
170 call ctocp(
'G4String name="",moth="",attr="",only="",shape="";')
171 call ctocp(
'G4String chset="",chdet="",chali="",chpar="";')
172 call ctocp(
'G4double amass=0.,charge=0.,tlife=0.,parval=0.;')
173 call ctocp(
'G4double c0=0.,step=0.,a=0.,dens=0.,radl=0.,x=0.;')
174 call ctocp(
'G4double y=0.,z=0.,theta1=0.,phi1=0.,theta2=0.;')
175 call ctocp(
'G4double phi2=0.,theta3=0.,phi3=0.,fieldm=0.;')
176 call ctocp(
'G4double tmaxfd=0.,stemax=0.,deemax=0.,epsil=0.;')
177 call ctocp(
'G4double stmin=0.,par[100],fact[100],orig[100];')
178 call ctocp(
'G4double bratio[6],aa[100],zz[100],wmat[100];')
179 call ctocp(
'nbits[0]=mode[0]=0;chnam[0]="";par[0]=0.;')
180 call ctocp(
'fact[0]=orig[0]=bratio[0]=aa[0]=zz[0]=wmat[0]=0.;')
192 #include "G3toG4.inc" 196 open(unit=luncode,
file=
'G3toG4code.cc',status=
'unknown')
198 write(luncode,
'('' void G3toG4code_'',i2.2,''();'')') i
200 call ctocp(
'void G3toG4code()')
203 write(luncode,
'('' G3toG4code_'',i2.2,''();'')') i
222 #include "G3toG4.inc" 226 subroutine ctocp(string)
231 #include "G3toG4.inc" 232 write (luncode,*) string
235 subroutine rtocp(string,x)
241 #include "G3toG4.inc" 242 write(luncode,
'(4x,a,'' = '',e14.8,'';'')')
246 subroutine artocp(string,ax,n)
253 #include "G3toG4.inc" 255 write(luncode,
'('' '',a,''['',i3,''] = '',e14.8,'';'')')
260 subroutine aitocp(string,ai,n)
267 #include "G3toG4.inc" 269 write(luncode,
'('' '',a,''['',i3,''] = '',i10,'';'')')
274 subroutine astocp(string,ac,n)
278 character*(*) string, ac(*)
280 #include "G3toG4.inc" 283 write(luncode,
'('' '',a,''['',i3,''] = "'',a,''";'')')
298 #include "G3toG4.inc" 301 write(luncode,
'('' par['',i4,''] = '',e14.8,'';'')')
302 + (i-1,par(i),i=1,npar)
310 #include "G3toG4.inc" 311 if (luncode.ne.0)
then 313 if (
nlines.gt.maxlines)
then subroutine astocp(string, ac, n)
subroutine artocp(string, ax, n)
subroutine rtocp(string, x)
subroutine aitocp(string, ai, n)
void print(G4double elem)
subroutine g3context(cntxt)
subroutine g3tog4(luni, lunc, chopt)
subroutine g3ldpar(par, npar)