Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Lesson1 Namespace Reference

Classes

class  App
 

Functions

def Configure
 
def ConstructGeom
 

Variables

tuple app = App()
 

Function Documentation

def Lesson1.Configure ( )

Definition at line 20 of file Lesson1.py.

20 
21 def Configure():
22  # ------------------------------------------------------------------
23  # setup for materials
24  # ------------------------------------------------------------------
25  # simple materials for Qgeom
26  g4py.NISTmaterials.Construct()
27 
28  # ------------------------------------------------------------------
29  # setup for geometry
30  # ------------------------------------------------------------------
31  #g4py.Qgeom.Construct()
32  g4py.ezgeom.Construct() # initialize
33 
34  # ------------------------------------------------------------------
35  # setup for physics list
36  # ------------------------------------------------------------------
37  g4py.EMSTDpl.Construct()
38 
39  # ------------------------------------------------------------------
40  # setup for primary generator action
41  # ------------------------------------------------------------------
42  g4py.ParticleGun.Construct()
43  gControlExecute("gun.mac")
44 
45 # ==================================================================
46 # constructing geometry
# ==================================================================
def Configure
Definition: Lesson1.py:20
gControlExecute
Definition: __init__.py:164

Here is the caller graph for this function:

def Lesson1.ConstructGeom ( )

Definition at line 47 of file Lesson1.py.

47 
48 def ConstructGeom():
49  print("* Constructing geometry...")
50  # reset world material
51  global absorber
52  air= G4Material.GetMaterial("G4_AIR", 1)
53  galactic = G4Material.GetMaterial("G4_Galactic", 1)
54  absorber = {} # material's dictionary to be used by a radiobutton
55  aluminum = G4Material.GetMaterial("G4_Al", 1)
56  iron = G4Material.GetMaterial("G4_Fe", 1)
57  silver = G4Material.GetMaterial("G4_Ag", 1)
58  gold = G4Material.GetMaterial("G4_Au", 1)
59  lead = G4Material.GetMaterial("G4_Pb", 1)
60  water = G4Material.GetMaterial("G4_WATER", 1)
61  absorber = {"air":air, "aluminum":aluminum, "iron":iron, "lead":lead, "water":water, "gold":gold}
62  g4py.ezgeom.SetWorldMaterial(galactic)
63  g4py.ezgeom.ResizeWorld(120.*cm, 120.*cm, 100.*cm)
64  # water phantom
65  global water_phantom, water_phantom_pv
66 
67  water_phantom= G4EzVolume("WaterPhantom")
68  water_phantom.CreateBoxVolume(water, 110.*cm, 110.*cm, 10.*cm)
69 
70  water_phantom_pv = water_phantom.PlaceIt(G4ThreeVector(0.,0.,0.*cm))
71 
72 # ==================================================================
73 # main
74 # ==================================================================
75 # ------------------------------------------------------------------
76 # randum number
77 # ------------------------------------------------------------------
78 print("Random numbers...")
79 rand_engine= Ranlux64Engine()
80 HepRandom.setTheEngine(rand_engine)
81 HepRandom.setTheSeed(20050830)
82 
83 # setup...
84 
85 Configure()
87 
88 # ------------------------------------------------------------------
89 # go...
90 # ------------------------------------------------------------------
91 gRunManager.Initialize()
92 
93 # visualization not here but after "Start a run" button
94 gControlExecute("oglx.mac")
95 #gControlExecute("vrml.mac")
96 
97 # creating widgets using grid layout
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:602
def ConstructGeom
Definition: Lesson1.py:47
void print(G4double elem)
def Configure
Definition: Lesson1.py:20
gControlExecute
Definition: __init__.py:164

Here is the call graph for this function:

Variable Documentation

tuple Lesson1.app = App()

Definition at line 293 of file Lesson1.py.