Import Geant4 9.2.0 source tree
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
# Plotting photon cross sections and stopping power with ROOT
|
||||
# ==================================================================
|
||||
from Geant4 import *
|
||||
import NISTmaterials
|
||||
from EZsim import *
|
||||
import g4py.NISTmaterials
|
||||
import g4py.ezgeom
|
||||
|
||||
# ==================================================================
|
||||
# geometry setup
|
||||
@@ -16,15 +16,15 @@ from EZsim import *
|
||||
# setup
|
||||
# ------------------------------------------------------------------
|
||||
def Configure():
|
||||
NISTmaterials.Construct()
|
||||
EZgeom.Construct()
|
||||
g4py.NISTmaterials.Construct()
|
||||
g4py.ezgeom.Construct()
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# constructing geometry
|
||||
# ------------------------------------------------------------------
|
||||
def SetMaterial(material_name):
|
||||
material= gNistManager.FindOrBuildMaterial(material_name)
|
||||
EZgeom.SetWorldMaterial(material)
|
||||
g4py.ezgeom.SetWorldMaterial(material)
|
||||
|
||||
|
||||
# ==================================================================
|
||||
|
||||
@@ -5,14 +5,15 @@
|
||||
# Plotting photon cross sections and stopping power
|
||||
# ==================================================================
|
||||
from Geant4 import *
|
||||
import ExN03pl
|
||||
import g4py.ExN03pl
|
||||
import g4py.emcalculator
|
||||
import EmPlot
|
||||
|
||||
# initialize
|
||||
EmPlot.Configure()
|
||||
|
||||
# user physics list
|
||||
ExN03pl.Construct()
|
||||
g4py.ExN03pl.Construct()
|
||||
|
||||
# target material
|
||||
material= "G4_Cu"
|
||||
@@ -30,7 +31,7 @@ for n in range(-3, 3):
|
||||
|
||||
# calculate stopping power
|
||||
pname= "e-"
|
||||
dedx_list= CalculateDEDX(pname, material, elist, 1)
|
||||
dedx_list= g4py.emcalculator.CalculateDEDX(pname, material, elist, 1)
|
||||
xlist_tot=[]
|
||||
xlist_ioni=[]
|
||||
xlist_brems=[]
|
||||
|
||||
@@ -5,14 +5,15 @@
|
||||
# Plotting photon cross sections and stopping power
|
||||
# ==================================================================
|
||||
from Geant4 import *
|
||||
import ExN03pl
|
||||
import g4py.ExN03pl
|
||||
import g4py.emcalculator
|
||||
import EmPlot
|
||||
|
||||
# initialize
|
||||
EmPlot.Configure()
|
||||
|
||||
# user physics list
|
||||
ExN03pl.Construct()
|
||||
g4py.ExN03pl.Construct()
|
||||
|
||||
# target material
|
||||
material= "G4_Pb"
|
||||
@@ -30,7 +31,7 @@ for n in range(-3, 4):
|
||||
|
||||
|
||||
# calculate cross sections
|
||||
xsection_list= CalculatePhotonCrossSection(material, elist, 1)
|
||||
xsection_list= g4py.emcalculator.CalculatePhotonCrossSection(material, elist, 1)
|
||||
xlist_tot=[]
|
||||
xlist_comp=[]
|
||||
xlist_pe=[]
|
||||
|
||||
Reference in New Issue
Block a user