Geant4
10.03.p03
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Namespace List
Namespace Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Functions
test_voxel Namespace Reference
Functions
def
Configure
def
ConstructGeom
Function Documentation
def test_voxel.Configure
(
)
Definition at line
18
of file
test_voxel.py
.
18
19
def
Configure
():
20
# ------------------------------------------------------------------
21
# setup for materials
22
# ------------------------------------------------------------------
23
# simple materials for Qgeom
24
g4py.NISTmaterials.Construct()
25
26
# ------------------------------------------------------------------
27
# setup for geometry
28
# ------------------------------------------------------------------
29
#g4py.Qgeom.Construct()
30
g4py.ezgeom.Construct()
# initialize
31
32
# ------------------------------------------------------------------
33
# setup for physics list
34
# ------------------------------------------------------------------
35
g4py.EMSTDpl.Construct()
36
37
# ------------------------------------------------------------------
38
# setup for primary generator action
39
# ------------------------------------------------------------------
40
g4py.ParticleGun.Construct()
41
gControlExecute
(
"gun.mac"
)
42
43
44
# ==================================================================
45
# constructing geometry
# ==================================================================
test_voxel.Configure
def Configure
Definition:
test_voxel.py:18
python.gControlExecute
gControlExecute
Definition:
__init__.py:164
Here is the caller graph for this function:
def test_voxel.ConstructGeom
(
)
Definition at line
46
of file
test_voxel.py
.
46
47
def
ConstructGeom
():
48
print
"* Constructing geometry..."
49
# reset world material
50
air=
G4Material.GetMaterial
(
"G4_AIR"
)
51
g4py.ezgeom.SetWorldMaterial(air)
52
53
# phantom
54
global
phantom
55
phantom= G4EzVolume(
"DetectorBox"
)
56
water=
G4Material.GetMaterial
(
"G4_WATER"
)
57
phantom.CreateBoxVolume(water, 40.*cm, 40.*cm, 50.*cm)
58
phantom.PlaceIt(
G4ThreeVector
(0.,0.,20.*cm))
59
vsize=phantom.VoxelizeIt(100, 100, 100)
60
print
"voxel size="
, vsize
61
62
# ==================================================================
63
# main
64
# ==================================================================
65
# ------------------------------------------------------------------
66
# randum number
67
# ------------------------------------------------------------------
68
rand_engine= Ranlux64Engine()
69
HepRandom.setTheEngine(rand_engine)
70
HepRandom.setTheSeed(20050830L)
71
72
# setup...
73
Configure
()
74
ConstructGeom
()
75
76
# ------------------------------------------------------------------
77
# go...
78
# ------------------------------------------------------------------
79
gRunManager.Initialize()
80
81
# visualization
82
gControlExecute
(
"vis.mac"
)
83
84
# beamOn
85
#gRunManager.BeamOn(3)
86
CLHEP::Hep3Vector
Definition:
ThreeVector.h:41
test_voxel.Configure
def Configure
Definition:
test_voxel.py:18
G4Material::GetMaterial
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition:
G4Material.cc:602
test_voxel.ConstructGeom
def ConstructGeom
Definition:
test_voxel.py:46
python.gControlExecute
gControlExecute
Definition:
__init__.py:164
Here is the call graph for this function:
test_voxel
Generated on Tue Nov 28 2017 21:47:06 for Geant4 by
1.8.5