Import Geant4 9.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:58:43 +02:00
parent 96c8bcd0af
commit b79225fb37
7544 changed files with 245407 additions and 91099 deletions
@@ -6,11 +6,11 @@
# - using site-module packages
# ==================================================================
from Geant4 import *
import NISTmaterials
from EZsim import EZgeom
from EZsim.EZgeom import G4EzVolume
import EMSTDpl
import ParticleGun
import g4py.NISTmaterials
import g4py.ezgeom
from g4py.ezgeom import G4EzVolume
import g4py.EMSTDpl
import g4py.ParticleGun
from time import *
import sys
@@ -22,23 +22,23 @@ def Configure():
# setup for materials
# ------------------------------------------------------------------
# simple materials for Qgeom
NISTmaterials.Construct()
g4py.NISTmaterials.Construct()
# ------------------------------------------------------------------
# setup for geometry
# ------------------------------------------------------------------
#Qgeom.Construct()
EZgeom.Construct() # initialize
#g4py.Qgeom.Construct()
g4py.ezgeom.Construct() # initialize
# ------------------------------------------------------------------
# setup for physics list
# ------------------------------------------------------------------
EMSTDpl.Construct()
g4py.EMSTDpl.Construct()
# ------------------------------------------------------------------
# setup for primary generator action
# ------------------------------------------------------------------
ParticleGun.Construct()
g4py.ParticleGun.Construct()
gControlExecute("gun.mac")
# ==================================================================
@@ -58,8 +58,8 @@ def ConstructGeom():
lead = G4Material.GetMaterial("G4_Pb", 1)
water = G4Material.GetMaterial("G4_WATER", 1)
absorber = {"air":air, "aluminum":aluminum, "iron":iron, "lead":lead, "water":water, "gold":gold}
EZgeom.SetWorldMaterial(galactic)
EZgeom.ResizeWorld(120.*cm, 120.*cm, 100.*cm)
g4py.ezgeom.SetWorldMaterial(galactic)
g4py.ezgeom.ResizeWorld(120.*cm, 120.*cm, 100.*cm)
# water phantom
global water_phantom, water_phantom_pv
@@ -84,7 +84,6 @@ HepRandom.setTheSeed(20050830L)
Configure()
ConstructGeom()
# ------------------------------------------------------------------
# go...
# ------------------------------------------------------------------
@@ -99,7 +98,6 @@ gControlExecute("oglx.mac")
from Tkinter import *
class App(Frame):
def init(self):
@@ -131,7 +129,7 @@ class App(Frame):
thick.grid(row=3, column=1, columnspan=5, sticky=W)
#get logical volume and set its half length
self.solid = EZgeom.G4EzVolume.GetSold(water_phantom)
self.solid = g4py.ezgeom.G4EzVolume.GetSold(water_phantom)
#particle row=4
particleLabel = Label(self, bg="green", text="Particle")
@@ -1,9 +1,11 @@
#!/usr/bin/python
from Geant4 import *
import NISTmaterials
from EZsim import EZgeom
from EZsim.EZgeom import G4EzVolume
import ExN03pl
import ParticleGun
import g4py.NISTmaterials
import g4py.ezgeom
from g4py.ezgeom import G4EzVolume
import g4py.ExN03pl
import g4py.ParticleGun
from time import *
import sys
from subprocess import *
@@ -17,22 +19,22 @@ def Configure():
# setup for materials
# ------------------------------------------------------------------
# simple materials for Qgeom
NISTmaterials.Construct()
g4py.NISTmaterials.Construct()
# ------------------------------------------------------------------
# setup for geometry
# ------------------------------------------------------------------
EZgeom.Construct() # initialize
g4py.ezgeom.Construct() # initialize
# ------------------------------------------------------------------
# setup for physics list of N03
# ------------------------------------------------------------------
ExN03pl.Construct()
g4py.ExN03pl.Construct()
# ------------------------------------------------------------------
# setup for primary generator action
# ------------------------------------------------------------------
ParticleGun.Construct()
g4py.ParticleGun.Construct()
gControlExecute("gun.mac")
# ==================================================================
@@ -54,8 +56,8 @@ def ConstructGeom():
water = G4Material.GetMaterial("G4_WATER", 1)
absorber = {"air":air, "aluminum":aluminum, "iron":iron, "lead":lead, "water":water, "gold":gold
}
EZgeom.SetWorldMaterial(galactic)
EZgeom.ResizeWorld(120.*cm, 120.*cm, 100.*cm)
g4py.ezgeom.SetWorldMaterial(galactic)
g4py.ezgeom.ResizeWorld(120.*cm, 120.*cm, 100.*cm)
# water phantom
global water_phantom, water_phantom_pv
@@ -490,7 +492,7 @@ class MyApp(wx.Frame):
bxsizer.Add(wx.StaticLine(panel), 0, wx.EXPAND|wx.TOP|wx.BOTTOM, 5)
bxsizer.Add(self.eventNo.sizer, 0, wx.EXPAND)
self.solid = EZgeom.G4EzVolume.GetSold(water_phantom)
self.solid = g4py.ezgeom.G4EzVolume.GetSold(water_phantom)
panel.SetSizer(bxsizer)
bxsizer.Fit(self)
@@ -6,11 +6,11 @@
# - using site-module packages
# ==================================================================
from Geant4 import *
import NISTmaterials
from EZsim import EZgeom
from EZsim.EZgeom import G4EzVolume
import ExN03pl
import ParticleGun
import g4py.NISTmaterials
import g4py.ezgeom
from g4py.ezgeom import G4EzVolume
import g4py.ExN03pl
import g4py.ParticleGun
from time import *
import sys
@@ -22,23 +22,23 @@ def Configure():
# setup for materials
# ------------------------------------------------------------------
# simple materials for Qgeom
NISTmaterials.Construct()
g4py.NISTmaterials.Construct()
# ------------------------------------------------------------------
# setup for geometry
# ------------------------------------------------------------------
#Qgeom.Construct()
EZgeom.Construct() # initialize
#g4py.Qgeom.Construct()
g4py.ezgeom.Construct() # initialize
# ------------------------------------------------------------------
# setup for physics list
# ------------------------------------------------------------------
ExN03pl.Construct()
g4py.ExN03pl.Construct()
# ------------------------------------------------------------------
# setup for primary generator action
# ------------------------------------------------------------------
ParticleGun.Construct()
g4py.ParticleGun.Construct()
gControlExecute("gun.mac")
# ==================================================================
@@ -58,8 +58,8 @@ def ConstructGeom():
lead = G4Material.GetMaterial("G4_Pb", 1)
water = G4Material.GetMaterial("G4_WATER", 1)
absorber = {"air":air, "aluminum":aluminum, "iron":iron, "lead":lead, "water":water, "gold":gold}
EZgeom.SetWorldMaterial(galactic)
EZgeom.ResizeWorld(120.*cm, 120.*cm, 100.*cm)
g4py.ezgeom.SetWorldMaterial(galactic)
g4py.ezgeom.ResizeWorld(120.*cm, 120.*cm, 100.*cm)
# water phantom
global water_phantom, water_phantom_pv
@@ -131,7 +131,7 @@ class App(Frame):
thick.grid(row=3, column=1, columnspan=5, sticky=W)
#get logical volume and set its half length
self.solid = EZgeom.G4EzVolume.GetSold(water_phantom)
self.solid = g4py.ezgeom.G4EzVolume.GetSold(water_phantom)
#particle row=4
particleLabel = Label(self, bg="green", text="Particle")
@@ -6,10 +6,10 @@
# using site-module packages
# ==================================================================
from Geant4 import *
import Qmaterials, NISTmaterials
import ExN03geom
import ExN03pl
import ParticleGun, MedicalBeam
import g4py.Qmaterials, g4py.NISTmaterials
import g4py.ExN03geom
import g4py.ExN03pl
import g4py.ParticleGun, g4py.MedicalBeam
import sys
from time import *
from subprocess import *
@@ -30,7 +30,7 @@ HepRandom.setTheSeed(20050830L)
# ------------------------------------------------------------------
# NIST materials
#NISTmaterials.Construct()
#g4py.NISTmaterials.Construct()
# ------------------------------------------------------------------
# setup for geometry
@@ -38,13 +38,13 @@ HepRandom.setTheSeed(20050830L)
# normal way for constructing user geometry
exN03geom= ExN03geom.ExN03DetectorConstruction()
exN03geom= g4py.ExN03geom.ExN03DetectorConstruction()
gRunManager.SetUserInitialization(exN03geom)
# 2nd way, short-cut way
#ExN01geom.Construct()
#ExN03geom.Construct()
#g4py.ExN01geom.Construct()
#g4py.ExN03geom.Construct()
# magnetic field
#exN03geom.SetMagField(0.1 * tesla)
@@ -53,23 +53,23 @@ gRunManager.SetUserInitialization(exN03geom)
# setup for physics list
# ------------------------------------------------------------------
# normal way for constructing user physics list
exN03PL= ExN03pl.ExN03PhysicsList()
exN03PL= g4py.ExN03pl.ExN03PhysicsList()
gRunManager.SetUserInitialization(exN03PL)
# 2nd way, short-cut way
#ExN01pl.Construct()
#EMSTDpl.Construct()
#g4py.ExN01pl.Construct()
#g4py.EMSTDpl.Construct()
# ------------------------------------------------------------------
# setup for primary generator action
# ------------------------------------------------------------------
# normal way for constructing user physics list
#pgPGA= ParticleGun.ParticleGunAction()
#pgPGA= g4py.ParticleGun.ParticleGunAction()
#gRunManager.SetUserAction(pgPGA)
#pg= pgPGA.GetParticleGun()
# 2nd way, short-cut way
pg= ParticleGun.Construct()
pg= g4py.ParticleGun.Construct()
# set parameters of particle gun
pg.SetParticleByName("e-")
@@ -1,11 +1,13 @@
#!/usr/bin/python
#### 2006 Sep 26, the first draft version
## Wired not yet. g4pipe control and Popen
from Geant4 import *
import Qmaterials, NISTmaterials
import ExN03geom
import ExN03pl
import ParticleGun, MedicalBeam
import g4py.Qmaterials, g4py.NISTmaterials
import g4py.ExN03geom
import g4py.ExN03pl
import g4py.ParticleGun, g4py.MedicalBeam
import sys
from time import *
from subprocess import *
@@ -27,20 +29,20 @@ HepRandom.setTheSeed(20050830L)
# NIST materials
#NISTmaterials.Construct()
#g4py.NISTmaterials.Construct()
# ------------------------------------------------------------------
# setup for geometry
# ------------------------------------------------------------------
# normal way for constructing user geometry
exN03geom= ExN03geom.ExN03DetectorConstruction()
exN03geom= g4py.ExN03geom.ExN03DetectorConstruction()
gRunManager.SetUserInitialization(exN03geom)
# 2nd way, short-cut way
#ExN01geom.Construct()
#ExN03geom.Construct()
#g4py.ExN01geom.Construct()
#g4py.ExN03geom.Construct()
# magnetic field
#exN03geom.SetMagField(0.1 * tesla)
@@ -49,23 +51,23 @@ gRunManager.SetUserInitialization(exN03geom)
# setup for physics list
# ------------------------------------------------------------------
# normal way for constructing user physics list
exN03PL= ExN03pl.ExN03PhysicsList()
exN03PL= g4py.ExN03pl.ExN03PhysicsList()
gRunManager.SetUserInitialization(exN03PL)
# 2nd way, short-cut way
#ExN01pl.Construct()
#g4py.ExN01pl.Construct()
# ------------------------------------------------------------------
# setup for primary generator action
# ------------------------------------------------------------------
# normal way for constructing user physics list
#pgPGA= ParticleGun.ParticleGunAction()
#pgPGA= g4py.ParticleGun.ParticleGunAction()
#gRunManager.SetUserAction(pgPGA)
#pg= pgPGA.GetParticleGun()
# 2nd way, short-cut way
pg= ParticleGun.Construct()
pg= g4py.ParticleGun.Construct()
# set parameters of particle gun
pg.SetParticleByName("e-")