Geant4-11
Data Structures | Functions | Variables
Lesson1 Namespace Reference

Data Structures

class  App
 

Functions

def Configure ()
 
def ConstructGeom ()
 

Variables

 app = App()
 

Function Documentation

◆ Configure()

def Lesson1.Configure ( )

Definition at line 20 of file Lesson1.py.

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

References source.gControlExecute.

Referenced by ConstructGeom().

◆ ConstructGeom()

def Lesson1.ConstructGeom ( )

Definition at line 47 of file Lesson1.py.

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

References Configure(), ConstructGeom(), source.gControlExecute, G4Material.GetMaterial(), and print().

Referenced by ConstructGeom().

Variable Documentation

◆ app

Lesson1.app = App()

Definition at line 293 of file Lesson1.py.