Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
test.MyDetectorConstruction Class Reference
Inheritance diagram for test.MyDetectorConstruction:
Collaboration diagram for test.MyDetectorConstruction:

Public Member Functions

def __init__
 
def ConstructWorld
 
def ConstructBox
 
def ConstructTubs
 
def ConstructCons
 
def ConstructPara
 
def ConstructTrd
 
def ConstructTrap
 
def ConstructSphere
 
def ConstructOrb
 
def ConstructTorus
 
def ConstructPolycone
 
def ConstructPolyhedra
 
def ConstructEllipticalTube
 
def ConstructEllipsoid
 
def ConstructEllipticalCone
 
def ConstructHype
 
def ConstructTet
 
def ConstructTwistedBox
 
def ConstructTwistedTrap
 
def ConstructTwistedTrd
 
def ConstructTwistedTubs
 
def Construct
 
def __init__
 
def ConstructWorld
 
def ConstructBox
 
def ConstructTubs
 
def ConstructCons
 
def ConstructPara
 
def ConstructTrd
 
def ConstructTrap
 
def ConstructSphere
 
def ConstructOrb
 
def ConstructTorus
 
def ConstructPolycone
 
def ConstructPolyhedra
 
def ConstructEllipticalTube
 
def ConstructEllipsoid
 
def ConstructEllipticalCone
 
def ConstructHype
 
def ConstructTet
 
def ConstructTwistedBox
 
def ConstructTwistedTrap
 
def ConstructTwistedTrd
 
def ConstructTwistedTubs
 
def Construct
 
def __init__
 
def ConstructWorld
 
def ConstructUnion
 
def ConstructIntersection
 
def ConstructSubtraction
 
def Construct
 
def __init__
 
def ConstructWorld
 
def ConstructUnion
 
def ConstructIntersection
 
def ConstructSubtraction
 
def Construct
 
def __init__
 
def Construct
 
def __init__
 
def Construct
 
- Public Member Functions inherited from G4VUserDetectorConstruction
 G4VUserDetectorConstruction ()
 
virtual ~G4VUserDetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()=0
 
virtual void ConstructSDandField ()
 
virtual void CloneSD ()
 
virtual void CloneF ()
 
void RegisterParallelWorld (G4VUserParallelWorld *)
 
G4int ConstructParallelGeometries ()
 
void ConstructParallelSD ()
 
G4int GetNumberOfParallelWorld () const
 
G4VUserParallelWorldGetParallelWorld (G4int i) const
 

Public Attributes

 air
 
 lv_object
 
 world
 
 va_red
 
 va_cyan
 
 va_green
 
 va_blue
 
 va_magenta
 
 sld_box
 
 sld_cyl
 

Additional Inherited Members

- Protected Member Functions inherited from G4VUserDetectorConstruction
void SetSensitiveDetector (const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
 
void SetSensitiveDetector (G4LogicalVolume *logVol, G4VSensitiveDetector *aSD)
 

Detailed Description

Definition at line 15 of file test.py.

Constructor & Destructor Documentation

def test.MyDetectorConstruction.__init__ (   self)

Definition at line 18 of file test.py.

18 
19  def __init__(self):
20  G4VUserDetectorConstruction.__init__(self)
21  self.air= gNistManager.FindOrBuildMaterial("G4_AIR")
22  self.lv_object= None
23  self.world= self.ConstructWorld()
24 
25  self.va_red= G4VisAttributes(G4Color(1.,0.,0.))
26  self.va_cyan= G4VisAttributes(G4Color(0.,1.,1.))
27  self.va_green= G4VisAttributes(G4Color(0.,1.,0.))
28  self.va_blue= G4VisAttributes(G4Color(0.,0.,1.))
29  self.va_magenta= G4VisAttributes(G4Color(1.,0.,1.))

Here is the caller graph for this function:

def test.MyDetectorConstruction.__init__ (   self)

Definition at line 18 of file test.py.

18 
19  def __init__(self):
20  G4VUserDetectorConstruction.__init__(self)
21  self.air= gNistManager.FindOrBuildMaterial("G4_AIR")
22  self.lv_object= None
23  self.world= self.ConstructWorld()
24 
25  self.va_red= G4VisAttributes(G4Color(1.,0.,0.))
26  self.va_cyan= G4VisAttributes(G4Color(0.,1.,1.))
27  self.va_green= G4VisAttributes(G4Color(0.,1.,0.))
28  self.va_blue= G4VisAttributes(G4Color(0.,0.,1.))
29  self.va_magenta= G4VisAttributes(G4Color(1.,0.,1.))

Here is the call graph for this function:

def test.MyDetectorConstruction.__init__ (   self)

Definition at line 17 of file test.py.

17 
18  def __init__(self):
19  G4VUserDetectorConstruction.__init__(self)
20  self.air= gNistManager.FindOrBuildMaterial("G4_AIR")
21  self.lv_object= None
22  self.world= self.ConstructWorld()
23 
24  self.va_red= G4VisAttributes(G4Color(1.,0.,0.))
25  self.va_cyan= G4VisAttributes(G4Color(0.,1.,1.))
26  self.va_green= G4VisAttributes(G4Color(0.,1.,0.))
27  self.va_blue= G4VisAttributes(G4Color(0.,0.,1.))
28  self.va_magenta= G4VisAttributes(G4Color(1.,0.,1.))
29 
30  self.sld_box= G4Box("box",20.*cm, 20.*cm, 20.*cm);
31  self.sld_cyl= G4Tubs("cylinder",0., 10.*cm, 30.*cm, 0., twopi)
Definition: G4Box.hh:64
Definition: G4Tubs.hh:85

Here is the call graph for this function:

def test.MyDetectorConstruction.__init__ (   self)

Definition at line 17 of file test.py.

17 
18  def __init__(self):
19  G4VUserDetectorConstruction.__init__(self)
20  self.air= gNistManager.FindOrBuildMaterial("G4_AIR")
21  self.lv_object= None
22  self.world= self.ConstructWorld()
23 
24  self.va_red= G4VisAttributes(G4Color(1.,0.,0.))
25  self.va_cyan= G4VisAttributes(G4Color(0.,1.,1.))
26  self.va_green= G4VisAttributes(G4Color(0.,1.,0.))
27  self.va_blue= G4VisAttributes(G4Color(0.,0.,1.))
28  self.va_magenta= G4VisAttributes(G4Color(1.,0.,1.))
29 
30  self.sld_box= G4Box("box",20.*cm, 20.*cm, 20.*cm);
31  self.sld_cyl= G4Tubs("cylinder",0., 10.*cm, 30.*cm, 0., twopi)
Definition: G4Box.hh:64
Definition: G4Tubs.hh:85

Here is the call graph for this function:

def test.MyDetectorConstruction.__init__ (   self)

Definition at line 17 of file test.py.

17 
18  def __init__(self):
19  G4VUserDetectorConstruction.__init__(self)

Here is the call graph for this function:

def test.MyDetectorConstruction.__init__ (   self)

Definition at line 17 of file test.py.

17 
18  def __init__(self):
19  G4VUserDetectorConstruction.__init__(self)

Here is the call graph for this function:

Member Function Documentation

def test.MyDetectorConstruction.Construct (   self)

Definition at line 21 of file test.py.

21 
22  def Construct(self):
23  # Python has automatic garbage collection system.
24  # Geometry objects must be defined as GLOBAL not to be deleted.
25  air= gNistManager.FindOrBuildMaterial("G4_AIR")
26 
27  # world volume
28  global sld_world, lv_world, pv_world
29  sld_world= G4Box("world", 1.*m, 1.*m, 1.*m)
30  lv_world= G4LogicalVolume(sld_world, air, "world")
31  pv_world= G4PVPlacement(G4Transform3D(), lv_world, "world",
32  None, False, 0)
33 
34  # box
35  global sld_box, lv_box, pv_box
36  sld_box= G4Box("box", 10.*cm, 10.*cm, 10.*cm);
37  lv_box= G4LogicalVolume(sld_box, air, "box")
38  pv_box= G4PVPlacement(None, G4ThreeVector(), "box", lv_box,
39  pv_world, False, 0, True)
40 
41  # cylinder
42  global sld_cyl, lv_cyl, pv_cyl1, pv_cyl2, pv_cyl3
43  sld_cyl= G4Tubs("cylinder",0., 2.*cm, 2.*cm, 0., twopi)
44  lv_cyl= G4LogicalVolume(sld_cyl, air, "cylinder")
45 
46  #
47  # the following placements are !! overlapped !!
48  #
49  # doubly placed
50  pv_cyl1= G4PVPlacement(None, G4ThreeVector(), "cylinder", lv_cyl,
51  pv_world, False, 0, True)
52 
53  # overlaped
54  pv_cyl2= G4PVPlacement(None, G4ThreeVector(10.*cm,0.,0.),
55  "cylinder", lv_cyl,
56  pv_world, False, 1, True)
57 
58  # sticked out
59  pv_cyl3= G4PVPlacement(None, G4ThreeVector(10.*cm,0.,0.),
60  "cylinder", lv_cyl,
61  pv_box, False, 0, True)
62 
63  return pv_world
64 
65 # ==================================================================
66 # main
67 # ==================================================================
68 # set geometry
70 gRunManager.SetUserInitialization(myDC)
71 
72 # minimal physics list
73 g4py.ExN01pl.Construct()
74 
75 # set primary generator action
76 g4py.ParticleGun.Construct()
77 
78 # initialize
79 gRunManager.Initialize() # overlap should be detected !!
80 
81 
virtual G4VPhysicalVolume * Construct()=0
Definition: G4Box.hh:64
Definition: G4Tubs.hh:85

Here is the call graph for this function:

def test.MyDetectorConstruction.Construct (   self)

Definition at line 21 of file test.py.

21 
22  def Construct(self):
23  # Python has automatic garbage collection system.
24  # Geometry objects must be defined as GLOBAL not to be deleted.
25  air= gNistManager.FindOrBuildMaterial("G4_AIR")
26 
27  # world volume
28  global sld_world, lv_world, pv_world
29  sld_world= G4Box("world", 1.*m, 1.*m, 1.*m)
30  lv_world= G4LogicalVolume(sld_world, air, "world")
31  pv_world= G4PVPlacement(G4Transform3D(), lv_world, "world",
32  None, False, 0)
33 
34  # box
35  global sld_box, lv_box, pv_box
36  sld_box= G4Box("box", 10.*cm, 10.*cm, 10.*cm);
37  lv_box= G4LogicalVolume(sld_box, air, "box")
38  pv_box= G4PVPlacement(None, G4ThreeVector(), "box", lv_box,
39  pv_world, False, 0, True)
40 
41  # cylinder
42  global sld_cyl, lv_cyl, pv_cyl1, pv_cyl2, pv_cyl3
43  sld_cyl= G4Tubs("cylinder",0., 2.*cm, 2.*cm, 0., twopi)
44  lv_cyl= G4LogicalVolume(sld_cyl, air, "cylinder")
45 
46  #
47  # the following placements are !! overlapped !!
48  #
49  # doubly placed
50  pv_cyl1= G4PVPlacement(None, G4ThreeVector(), "cylinder", lv_cyl,
51  pv_world, False, 0, True)
52 
53  # overlaped
54  pv_cyl2= G4PVPlacement(None, G4ThreeVector(10.*cm,0.,0.),
55  "cylinder", lv_cyl,
56  pv_world, False, 1, True)
57 
58  # sticked out
59  pv_cyl3= G4PVPlacement(None, G4ThreeVector(10.*cm,0.,0.),
60  "cylinder", lv_cyl,
61  pv_box, False, 0, True)
62 
63  return pv_world
64 
65 # ==================================================================
66 # main
67 # ==================================================================
68 # set geometry
70 gRunManager.SetUserInitialization(myDC)
71 
72 # minimal physics list
73 g4py.ExN01pl.Construct()
74 
75 # set primary generator action
76 g4py.ParticleGun.Construct()
77 
78 # initialize
79 gRunManager.Initialize() # overlap should be detected !!
80 
81 
virtual G4VPhysicalVolume * Construct()=0
Definition: G4Box.hh:64
Definition: G4Tubs.hh:85

Here is the call graph for this function:

def test.MyDetectorConstruction.Construct (   self)

Definition at line 88 of file test.py.

88 
89  def Construct(self): # return the world volume
90  return self.world
91 
92 # ==================================================================
93 # main
94 # ==================================================================
95 # set geometry
97 gRunManager.SetUserInitialization(myDC)
98 
99 # minimal physics list
100 g4py.ExN01pl.Construct()
101 
102 # set primary generator action
103 g4py.ParticleGun.Construct()
104 
105 # initialize
106 gRunManager.Initialize()
107 
108 # visualization
109 gApplyUICommand("/vis/open RayTracer")
110 gApplyUICommand("/vis/rayTracer/headAngle 40.")
111 gApplyUICommand("/vis/rayTracer/eyePosition 100 100 150 cm")
112 
113 # create a vrml file for each solid type
f_list= (
virtual G4VPhysicalVolume * Construct()=0
gApplyUICommand
Definition: __init__.py:165

Here is the call graph for this function:

def test.MyDetectorConstruction.Construct (   self)

Definition at line 88 of file test.py.

88 
89  def Construct(self): # return the world volume
90  return self.world
91 
92 # ==================================================================
93 # main
94 # ==================================================================
95 # set geometry
97 gRunManager.SetUserInitialization(myDC)
98 
99 # minimal physics list
100 g4py.ExN01pl.Construct()
101 
102 # set primary generator action
103 g4py.ParticleGun.Construct()
104 
105 # initialize
106 gRunManager.Initialize()
107 
108 # visualization
109 gApplyUICommand("/vis/open RayTracer")
110 gApplyUICommand("/vis/rayTracer/headAngle 40.")
111 gApplyUICommand("/vis/rayTracer/eyePosition 100 100 150 cm")
112 
113 # create a vrml file for each solid type
f_list= (
virtual G4VPhysicalVolume * Construct()=0
gApplyUICommand
Definition: __init__.py:165

Here is the call graph for this function:

def test.MyDetectorConstruction.Construct (   self)

Definition at line 251 of file test.py.

252  def Construct(self): # return the world volume
253  return self.world
254 
255 # ==================================================================
256 # main
257 # ==================================================================
258 os.environ["G4VRML_DEST_DIR"]= "."
259 os.environ["G4VRMLFILE_MAX_FILE_NUM"]= "1"
260 os.environ["G4VRMLFILE_VIEWER"]= "echo"
261 
262 # set geometry
264 gRunManager.SetUserInitialization(myDC)
265 
266 # minimal physics list
267 g4py.ExN01pl.Construct()
268 
269 # set primary generator action
270 g4py.ParticleGun.Construct()
271 
272 # initialize
273 gRunManager.Initialize()
274 
275 # visualization
276 gApplyUICommand("/vis/open VRML2FILE")
277 gApplyUICommand("/vis/scene/create")
278 gApplyUICommand("/vis/scene/add/volume")
279 gApplyUICommand("/vis/sceneHandler/attach")
280 gApplyUICommand("/vis/scene/add/axes 0. 0. 0. 10. cm")
281 
282 # create a vrml file for each solid type
f_list= (
virtual G4VPhysicalVolume * Construct()=0
gApplyUICommand
Definition: __init__.py:165

Here is the call graph for this function:

def test.MyDetectorConstruction.Construct (   self)

Definition at line 251 of file test.py.

252  def Construct(self): # return the world volume
253  return self.world
254 
255 # ==================================================================
256 # main
257 # ==================================================================
258 os.environ["G4VRML_DEST_DIR"]= "."
259 os.environ["G4VRMLFILE_MAX_FILE_NUM"]= "1"
260 os.environ["G4VRMLFILE_VIEWER"]= "echo"
261 
262 # set geometry
264 gRunManager.SetUserInitialization(myDC)
265 
266 # minimal physics list
267 g4py.ExN01pl.Construct()
268 
269 # set primary generator action
270 g4py.ParticleGun.Construct()
271 
272 # initialize
273 gRunManager.Initialize()
274 
275 # visualization
276 gApplyUICommand("/vis/open VRML2FILE")
277 gApplyUICommand("/vis/scene/create")
278 gApplyUICommand("/vis/scene/add/volume")
279 gApplyUICommand("/vis/sceneHandler/attach")
280 gApplyUICommand("/vis/scene/add/axes 0. 0. 0. 10. cm")
281 
282 # create a vrml file for each solid type
f_list= (
virtual G4VPhysicalVolume * Construct()=0
gApplyUICommand
Definition: __init__.py:165

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructBox (   self)

Definition at line 55 of file test.py.

55 
56  def ConstructBox(self):
57  global sld_box
58  sld_box= G4Box("box", 30.*cm, 40.*cm, 60.*cm)
59  self.lv_object.SetSolid(sld_box)
60  self.lv_object.SetVisAttributes(self.va_red)
61  gRunManager.GeometryHasBeenModified()
Definition: G4Box.hh:64

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructBox (   self)

Definition at line 55 of file test.py.

55 
56  def ConstructBox(self):
57  global sld_box
58  sld_box= G4Box("box", 30.*cm, 40.*cm, 60.*cm)
59  self.lv_object.SetSolid(sld_box)
60  self.lv_object.SetVisAttributes(self.va_red)
61  gRunManager.GeometryHasBeenModified()
Definition: G4Box.hh:64

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructCons (   self)

Definition at line 71 of file test.py.

71 
72  def ConstructCons(self):
73  global sld_cons
74  sld_cons= G4Cons("cons", 5.*cm, 10.*cm, 20.*cm, 25.*cm,
75  40.*cm, 0., 4./3.*pi)
76  self.lv_object.SetSolid(sld_cons)
77  self.lv_object.SetVisAttributes(self.va_green)
78  gRunManager.GeometryHasBeenModified()
Definition: G4Cons.hh:83

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructCons (   self)

Definition at line 71 of file test.py.

71 
72  def ConstructCons(self):
73  global sld_cons
74  sld_cons= G4Cons("cons", 5.*cm, 10.*cm, 20.*cm, 25.*cm,
75  40.*cm, 0., 4./3.*pi)
76  self.lv_object.SetSolid(sld_cons)
77  self.lv_object.SetVisAttributes(self.va_green)
78  gRunManager.GeometryHasBeenModified()
Definition: G4Cons.hh:83

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructEllipsoid (   self)

Definition at line 173 of file test.py.

174  def ConstructEllipsoid(self):
175  global sld_es
176  sld_es= G4Ellipsoid("ellipsoid", 10.*cm, 20.*cm, 50.*cm,
177  -10.*cm, 40.*cm)
178  self.lv_object.SetSolid(sld_es)
179  self.lv_object.SetVisAttributes(self.va_red)
180  gRunManager.GeometryHasBeenModified()

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructEllipsoid (   self)

Definition at line 173 of file test.py.

174  def ConstructEllipsoid(self):
175  global sld_es
176  sld_es= G4Ellipsoid("ellipsoid", 10.*cm, 20.*cm, 50.*cm,
177  -10.*cm, 40.*cm)
178  self.lv_object.SetSolid(sld_es)
179  self.lv_object.SetVisAttributes(self.va_red)
180  gRunManager.GeometryHasBeenModified()

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructEllipticalCone (   self)

Definition at line 182 of file test.py.

183  def ConstructEllipticalCone(self):
184  global sld_ec
185  sld_ec= G4EllipticalCone("ellipticalcone", 30.*cm, 60.*cm,
186  50.*cm, 25.*cm)
187  self.lv_object.SetSolid(sld_ec)
188  self.lv_object.SetVisAttributes(self.va_magenta)
189  gRunManager.GeometryHasBeenModified()

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructEllipticalCone (   self)

Definition at line 182 of file test.py.

183  def ConstructEllipticalCone(self):
184  global sld_ec
185  sld_ec= G4EllipticalCone("ellipticalcone", 30.*cm, 60.*cm,
186  50.*cm, 25.*cm)
187  self.lv_object.SetSolid(sld_ec)
188  self.lv_object.SetVisAttributes(self.va_magenta)
189  gRunManager.GeometryHasBeenModified()

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructEllipticalTube (   self)

Definition at line 165 of file test.py.

166  def ConstructEllipticalTube(self):
167  global sld_et
168  sld_et= G4EllipticalTube("ellipticaltube", 5.*cm, 10.*cm, 20.*cm)
169  self.lv_object.SetSolid(sld_et)
170  self.lv_object.SetVisAttributes(self.va_cyan)
171  gRunManager.GeometryHasBeenModified()

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructEllipticalTube (   self)

Definition at line 165 of file test.py.

166  def ConstructEllipticalTube(self):
167  global sld_et
168  sld_et= G4EllipticalTube("ellipticaltube", 5.*cm, 10.*cm, 20.*cm)
169  self.lv_object.SetSolid(sld_et)
170  self.lv_object.SetVisAttributes(self.va_cyan)
171  gRunManager.GeometryHasBeenModified()

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructHype (   self)

Definition at line 191 of file test.py.

192  def ConstructHype(self):
193  global sld_hype
194  sld_hype= G4Hype("hype", 20.*cm, 30.*cm, 0.7, 0.7, 50.*cm)
195  self.lv_object.SetSolid(sld_hype)
196  self.lv_object.SetVisAttributes(self.va_blue)
197  gRunManager.GeometryHasBeenModified()
Definition: G4Hype.hh:67

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructHype (   self)

Definition at line 191 of file test.py.

192  def ConstructHype(self):
193  global sld_hype
194  sld_hype= G4Hype("hype", 20.*cm, 30.*cm, 0.7, 0.7, 50.*cm)
195  self.lv_object.SetSolid(sld_hype)
196  self.lv_object.SetVisAttributes(self.va_blue)
197  gRunManager.GeometryHasBeenModified()
Definition: G4Hype.hh:67

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructIntersection (   self)

Definition at line 66 of file test.py.

66 
67  def ConstructIntersection(self):
68  offset= G4ThreeVector(20.*cm, 20.*cm, 0.)
69  global sld_intersection
70  sld_intersection= G4IntersectionSolid("box*cylinder",
71  self.sld_box, self.sld_cyl,
72  None, offset)
73 
74  self.lv_object.SetSolid(sld_intersection)
75  self.lv_object.SetVisAttributes(self.va_magenta)
76  gRunManager.GeometryHasBeenModified()

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructIntersection (   self)

Definition at line 66 of file test.py.

66 
67  def ConstructIntersection(self):
68  offset= G4ThreeVector(20.*cm, 20.*cm, 0.)
69  global sld_intersection
70  sld_intersection= G4IntersectionSolid("box*cylinder",
71  self.sld_box, self.sld_cyl,
72  None, offset)
73 
74  self.lv_object.SetSolid(sld_intersection)
75  self.lv_object.SetVisAttributes(self.va_magenta)
76  gRunManager.GeometryHasBeenModified()

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructOrb (   self)

Definition at line 115 of file test.py.

116  def ConstructOrb(self):
117  global sld_orb
118  sld_orb= G4Orb("orb", 100.*cm)
119  self.lv_object.SetSolid(sld_orb)
120  self.lv_object.SetVisAttributes(self.va_red)
121  gRunManager.GeometryHasBeenModified()
Definition: G4Orb.hh:61

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructOrb (   self)

Definition at line 115 of file test.py.

116  def ConstructOrb(self):
117  global sld_orb
118  sld_orb= G4Orb("orb", 100.*cm)
119  self.lv_object.SetSolid(sld_orb)
120  self.lv_object.SetVisAttributes(self.va_red)
121  gRunManager.GeometryHasBeenModified()
Definition: G4Orb.hh:61

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructPara (   self)

Definition at line 80 of file test.py.

80 
81  def ConstructPara(self):
82  global sld_para
83  sld_para= G4Para("para", 30.*cm, 40.*cm, 60.*cm, pi/4., pi/8., 0.)
84  self.lv_object.SetSolid(sld_para)
85  self.lv_object.SetVisAttributes(self.va_blue)
86  gRunManager.GeometryHasBeenModified()
Definition: G4Para.hh:77

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructPara (   self)

Definition at line 80 of file test.py.

80 
81  def ConstructPara(self):
82  global sld_para
83  sld_para= G4Para("para", 30.*cm, 40.*cm, 60.*cm, pi/4., pi/8., 0.)
84  self.lv_object.SetSolid(sld_para)
85  self.lv_object.SetVisAttributes(self.va_blue)
86  gRunManager.GeometryHasBeenModified()
Definition: G4Para.hh:77

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructPolycone (   self)

Definition at line 131 of file test.py.

132  def ConstructPolycone(self):
133  zvec= G4doubleVector()
134  rinvec= G4doubleVector()
135  routvec= G4doubleVector()
136 
137  zvec[:]= [ 5.*cm, 7.*cm, 9.*cm, 11.*cm, 25.*cm, 27.*cm, 29.*cm,
138  31.*cm, 35.*cm ]
139  rinvec[:]= [0.,0.,0.,0.,0.,0.,0.,0.,0.]
140  routvec[:]= [ 0., 10.*cm, 10.*cm, 5.*cm, 5.*cm, 10.*cm,
141  10.*cm, 2.*cm, 2.*cm ]
142 
143  global sld_pcon
144  sld_pcon= CreatePolycone("pcon", 0., twopi, 9, zvec, rinvec,routvec)
145  self.lv_object.SetSolid(sld_pcon)
146  self.lv_object.SetVisAttributes(self.va_cyan)
147  gRunManager.GeometryHasBeenModified()
std::vector< G4double > G4doubleVector
Definition: pyglobals.cc:65

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructPolycone (   self)

Definition at line 131 of file test.py.

132  def ConstructPolycone(self):
133  zvec= G4doubleVector()
134  rinvec= G4doubleVector()
135  routvec= G4doubleVector()
136 
137  zvec[:]= [ 5.*cm, 7.*cm, 9.*cm, 11.*cm, 25.*cm, 27.*cm, 29.*cm,
138  31.*cm, 35.*cm ]
139  rinvec[:]= [0.,0.,0.,0.,0.,0.,0.,0.,0.]
140  routvec[:]= [ 0., 10.*cm, 10.*cm, 5.*cm, 5.*cm, 10.*cm,
141  10.*cm, 2.*cm, 2.*cm ]
142 
143  global sld_pcon
144  sld_pcon= CreatePolycone("pcon", 0., twopi, 9, zvec, rinvec,routvec)
145  self.lv_object.SetSolid(sld_pcon)
146  self.lv_object.SetVisAttributes(self.va_cyan)
147  gRunManager.GeometryHasBeenModified()
std::vector< G4double > G4doubleVector
Definition: pyglobals.cc:65

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructPolyhedra (   self)

Definition at line 149 of file test.py.

150  def ConstructPolyhedra(self):
151  zvec= G4doubleVector()
152  rinvec= G4doubleVector()
153  routvec= G4doubleVector()
154 
155  zvec[:]= [ 0., 5.*cm, 8.*cm, 13.*cm, 30.*cm, 32.*cm, 35.*cm ]
156  rinvec[:]= [0.,0.,0.,0.,0.,0.,0. ]
157  routvec[:]= [ 0., 15.*cm, 15.*cm, 4.*cm, 4.*cm, 10.*cm, 10.*cm ]
158 
159  global sld_pgon
160  sld_pgon= CreatePolyhedra("pgon", 0., twopi, 5, 7, zvec, rinvec,routvec)
161  self.lv_object.SetSolid(sld_pgon)
162  self.lv_object.SetVisAttributes(self.va_green)
163  gRunManager.GeometryHasBeenModified()
std::vector< G4double > G4doubleVector
Definition: pyglobals.cc:65

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructPolyhedra (   self)

Definition at line 149 of file test.py.

150  def ConstructPolyhedra(self):
151  zvec= G4doubleVector()
152  rinvec= G4doubleVector()
153  routvec= G4doubleVector()
154 
155  zvec[:]= [ 0., 5.*cm, 8.*cm, 13.*cm, 30.*cm, 32.*cm, 35.*cm ]
156  rinvec[:]= [0.,0.,0.,0.,0.,0.,0. ]
157  routvec[:]= [ 0., 15.*cm, 15.*cm, 4.*cm, 4.*cm, 10.*cm, 10.*cm ]
158 
159  global sld_pgon
160  sld_pgon= CreatePolyhedra("pgon", 0., twopi, 5, 7, zvec, rinvec,routvec)
161  self.lv_object.SetSolid(sld_pgon)
162  self.lv_object.SetVisAttributes(self.va_green)
163  gRunManager.GeometryHasBeenModified()
std::vector< G4double > G4doubleVector
Definition: pyglobals.cc:65

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructSphere (   self)

Definition at line 106 of file test.py.

107  def ConstructSphere(self):
108  global sld_sphere
109  sld_sphere= G4Sphere("sphere", 100.*cm, 120.*cm, 0., 180.*deg,
110  0., 180.*deg)
111  self.lv_object.SetSolid(sld_sphere)
112  self.lv_object.SetVisAttributes(self.va_cyan)
113  gRunManager.GeometryHasBeenModified()

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructSphere (   self)

Definition at line 106 of file test.py.

107  def ConstructSphere(self):
108  global sld_sphere
109  sld_sphere= G4Sphere("sphere", 100.*cm, 120.*cm, 0., 180.*deg,
110  0., 180.*deg)
111  self.lv_object.SetSolid(sld_sphere)
112  self.lv_object.SetVisAttributes(self.va_cyan)
113  gRunManager.GeometryHasBeenModified()

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructSubtraction (   self)

Definition at line 78 of file test.py.

78 
79  def ConstructSubtraction(self):
80  global sld_subtraction
81  sld_subtraction= G4SubtractionSolid("box-cylinder",
82  self.sld_box, self.sld_cyl)
83 
84  self.lv_object.SetSolid(sld_subtraction)
85  self.lv_object.SetVisAttributes(self.va_red)
86  gRunManager.GeometryHasBeenModified()

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructSubtraction (   self)

Definition at line 78 of file test.py.

78 
79  def ConstructSubtraction(self):
80  global sld_subtraction
81  sld_subtraction= G4SubtractionSolid("box-cylinder",
82  self.sld_box, self.sld_cyl)
83 
84  self.lv_object.SetSolid(sld_subtraction)
85  self.lv_object.SetVisAttributes(self.va_red)
86  gRunManager.GeometryHasBeenModified()

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructTet (   self)

Definition at line 199 of file test.py.

200  def ConstructTet(self):
201  global sld_tet
202  p1= G4ThreeVector(0., 0., math.sqrt(3.)*cm)
203  p2= G4ThreeVector(0., 2*math.sqrt(2./3.)*cm, -1./math.sqrt(3)*cm)
204  p3= G4ThreeVector(-math.sqrt(2.)*cm, -math.sqrt(2./3.)*cm,
205  -1./math.sqrt(3)*cm)
206  p4= G4ThreeVector(math.sqrt(2)*cm, -math.sqrt(2./3.)*cm,
207  -1./math.sqrt(3)*cm)
208 
209  sld_tet= G4Tet("tet", 20.*p1, 20.*p2, 20.*p3, 20.*p4)
210  self.lv_object.SetSolid(sld_tet)
211  self.lv_object.SetVisAttributes(self.va_green)
212  gRunManager.GeometryHasBeenModified()
Definition: G4Tet.hh:66

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructTet (   self)

Definition at line 199 of file test.py.

200  def ConstructTet(self):
201  global sld_tet
202  p1= G4ThreeVector(0., 0., math.sqrt(3.)*cm)
203  p2= G4ThreeVector(0., 2*math.sqrt(2./3.)*cm, -1./math.sqrt(3)*cm)
204  p3= G4ThreeVector(-math.sqrt(2.)*cm, -math.sqrt(2./3.)*cm,
205  -1./math.sqrt(3)*cm)
206  p4= G4ThreeVector(math.sqrt(2)*cm, -math.sqrt(2./3.)*cm,
207  -1./math.sqrt(3)*cm)
208 
209  sld_tet= G4Tet("tet", 20.*p1, 20.*p2, 20.*p3, 20.*p4)
210  self.lv_object.SetSolid(sld_tet)
211  self.lv_object.SetVisAttributes(self.va_green)
212  gRunManager.GeometryHasBeenModified()
Definition: G4Tet.hh:66

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructTorus (   self)

Definition at line 123 of file test.py.

124  def ConstructTorus(self):
125  global sld_torus
126  sld_torus= G4Torus("torus", 40.*cm, 60.*cm, 200.*cm, 0., 90.*deg)
127  self.lv_object.SetSolid(sld_torus)
128  self.lv_object.SetVisAttributes(self.va_magenta)
129  gRunManager.GeometryHasBeenModified()

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructTorus (   self)

Definition at line 123 of file test.py.

124  def ConstructTorus(self):
125  global sld_torus
126  sld_torus= G4Torus("torus", 40.*cm, 60.*cm, 200.*cm, 0., 90.*deg)
127  self.lv_object.SetSolid(sld_torus)
128  self.lv_object.SetVisAttributes(self.va_magenta)
129  gRunManager.GeometryHasBeenModified()

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructTrap (   self)

Definition at line 96 of file test.py.

96 
97  def ConstructTrap(self):
98  global sld_trap
99  sld_trap= G4Trap("trap", 60.*cm, 20.*degree, 5.*degree,
100  40.*cm, 30.*cm, 40.*cm, 10.*degree,
101  16.*cm, 10*cm, 14.*cm, 10.*deg)
102  self.lv_object.SetSolid(sld_trap)
103  self.lv_object.SetVisAttributes(self.va_green)
104  gRunManager.GeometryHasBeenModified()

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructTrap (   self)

Definition at line 96 of file test.py.

96 
97  def ConstructTrap(self):
98  global sld_trap
99  sld_trap= G4Trap("trap", 60.*cm, 20.*degree, 5.*degree,
100  40.*cm, 30.*cm, 40.*cm, 10.*degree,
101  16.*cm, 10*cm, 14.*cm, 10.*deg)
102  self.lv_object.SetSolid(sld_trap)
103  self.lv_object.SetVisAttributes(self.va_green)
104  gRunManager.GeometryHasBeenModified()

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructTrd (   self)

Definition at line 88 of file test.py.

88 
89  def ConstructTrd(self):
90  global sld_trd
91  sld_trd= G4Trd("trd", 30.*cm, 10.*cm, 40.*cm, 15.*cm, 60.*cm)
92  self.lv_object.SetSolid(sld_trd)
93  self.lv_object.SetVisAttributes(self.va_blue)
94  gRunManager.GeometryHasBeenModified()
Definition: G4Trd.hh:72

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructTrd (   self)

Definition at line 88 of file test.py.

88 
89  def ConstructTrd(self):
90  global sld_trd
91  sld_trd= G4Trd("trd", 30.*cm, 10.*cm, 40.*cm, 15.*cm, 60.*cm)
92  self.lv_object.SetSolid(sld_trd)
93  self.lv_object.SetVisAttributes(self.va_blue)
94  gRunManager.GeometryHasBeenModified()
Definition: G4Trd.hh:72

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructTubs (   self)

Definition at line 63 of file test.py.

63 
64  def ConstructTubs(self):
65  global sld_tubs
66  sld_tubs= G4Tubs("tubs", 10.*cm, 15.*cm, 20.*cm, 0., pi)
67  self.lv_object.SetSolid(sld_tubs)
68  self.lv_object.SetVisAttributes(self.va_cyan)
69  gRunManager.GeometryHasBeenModified()
Definition: G4Tubs.hh:85

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructTubs (   self)

Definition at line 63 of file test.py.

63 
64  def ConstructTubs(self):
65  global sld_tubs
66  sld_tubs= G4Tubs("tubs", 10.*cm, 15.*cm, 20.*cm, 0., pi)
67  self.lv_object.SetSolid(sld_tubs)
68  self.lv_object.SetVisAttributes(self.va_cyan)
69  gRunManager.GeometryHasBeenModified()
Definition: G4Tubs.hh:85

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructTwistedBox (   self)

Definition at line 214 of file test.py.

215  def ConstructTwistedBox(self):
216  global sld_twb
217  sld_twb= G4TwistedBox("twistedbox", 30.*deg, 30.*cm, 40.*cm, 60.*cm)
218  self.lv_object.SetSolid(sld_twb)
219  self.lv_object.SetVisAttributes(self.va_cyan)
220  gRunManager.GeometryHasBeenModified()

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructTwistedBox (   self)

Definition at line 214 of file test.py.

215  def ConstructTwistedBox(self):
216  global sld_twb
217  sld_twb= G4TwistedBox("twistedbox", 30.*deg, 30.*cm, 40.*cm, 60.*cm)
218  self.lv_object.SetSolid(sld_twb)
219  self.lv_object.SetVisAttributes(self.va_cyan)
220  gRunManager.GeometryHasBeenModified()

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructTwistedTrap (   self)

Definition at line 222 of file test.py.

223  def ConstructTwistedTrap(self):
224  global sld_twtrp
225  sld_twtrp= G4TwistedTrap("twistedtrap", 30.*deg,
226  60.*cm, 20.*deg, 5.*deg,
227  40.*cm, 30.*cm, 40.*cm,
228  16.*cm, 10.*cm, 14.*cm, 10.*deg)
229  self.lv_object.SetSolid(sld_twtrp)
230  self.lv_object.SetVisAttributes(self.va_blue)
231  gRunManager.GeometryHasBeenModified()

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructTwistedTrap (   self)

Definition at line 222 of file test.py.

223  def ConstructTwistedTrap(self):
224  global sld_twtrp
225  sld_twtrp= G4TwistedTrap("twistedtrap", 30.*deg,
226  60.*cm, 20.*deg, 5.*deg,
227  40.*cm, 30.*cm, 40.*cm,
228  16.*cm, 10.*cm, 14.*cm, 10.*deg)
229  self.lv_object.SetSolid(sld_twtrp)
230  self.lv_object.SetVisAttributes(self.va_blue)
231  gRunManager.GeometryHasBeenModified()

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructTwistedTrd (   self)

Definition at line 233 of file test.py.

234  def ConstructTwistedTrd(self):
235  global sld_twtrd
236  sld_twtrd= G4TwistedTrd("twistedtrd", 30.*cm, 10.*cm,
237  40.*cm, 15.*cm, 60.*cm, 30.*deg)
238  self.lv_object.SetSolid(sld_twtrd)
239  self.lv_object.SetVisAttributes(self.va_green)
240  gRunManager.GeometryHasBeenModified()

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructTwistedTrd (   self)

Definition at line 233 of file test.py.

234  def ConstructTwistedTrd(self):
235  global sld_twtrd
236  sld_twtrd= G4TwistedTrd("twistedtrd", 30.*cm, 10.*cm,
237  40.*cm, 15.*cm, 60.*cm, 30.*deg)
238  self.lv_object.SetSolid(sld_twtrd)
239  self.lv_object.SetVisAttributes(self.va_green)
240  gRunManager.GeometryHasBeenModified()

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructTwistedTubs (   self)

Definition at line 242 of file test.py.

243  def ConstructTwistedTubs(self):
244  global sld_twt
245  sld_twt= G4TwistedTubs("twistedtube", 60.*deg,
246  10.*cm, 15.*cm, 20.*cm, 90.*deg)
247  self.lv_object.SetSolid(sld_twt)
248  self.lv_object.SetVisAttributes(self.va_magenta)
249  gRunManager.GeometryHasBeenModified()

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructTwistedTubs (   self)

Definition at line 242 of file test.py.

243  def ConstructTwistedTubs(self):
244  global sld_twt
245  sld_twt= G4TwistedTubs("twistedtube", 60.*deg,
246  10.*cm, 15.*cm, 20.*cm, 90.*deg)
247  self.lv_object.SetSolid(sld_twt)
248  self.lv_object.SetVisAttributes(self.va_magenta)
249  gRunManager.GeometryHasBeenModified()

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructUnion (   self)

Definition at line 57 of file test.py.

57 
58  def ConstructUnion(self):
59  global sld_union
60  sld_union= G4UnionSolid("box+cylinder", self.sld_box, self.sld_cyl);
61 
62  self.lv_object.SetSolid(sld_union)
63  self.lv_object.SetVisAttributes(self.va_blue)
64  gRunManager.GeometryHasBeenModified()

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructUnion (   self)

Definition at line 57 of file test.py.

57 
58  def ConstructUnion(self):
59  global sld_union
60  sld_union= G4UnionSolid("box+cylinder", self.sld_box, self.sld_cyl);
61 
62  self.lv_object.SetSolid(sld_union)
63  self.lv_object.SetVisAttributes(self.va_blue)
64  gRunManager.GeometryHasBeenModified()

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructWorld (   self)

Definition at line 31 of file test.py.

31 
32  def ConstructWorld(self):
33  # Python has automatic garbage collection system.
34  # Geometry objects must be defined as GLOBAL not to be deleted.
35  global sld_world, lv_world, pv_world, va_world
36 
37  sld_world= G4Box("world", 1.*m, 1.*m, 1.*m)
38  lv_world= G4LogicalVolume(sld_world, self.air, "world")
39  pv_world= G4PVPlacement(G4Transform3D(), lv_world, "world",
40  None, False, 0)
41 
42  va_world= G4VisAttributes()
43  va_world.SetVisibility(False)
44  lv_world.SetVisAttributes(va_world)
45 
46  # solid object (dummy)
47  global sld_sld, lv_sld, pv_sld
48  sld_sld= G4Box("dummy", 10.*cm, 10.*cm, 10.*cm)
49  self.lv_object= lv_sld= G4LogicalVolume(sld_sld, self.air, "dummy")
50  pv_sld= G4PVPlacement(None, G4ThreeVector(), "dummy", lv_sld,
51  pv_world, False, 0)
52 
53  return pv_world
Definition: G4Box.hh:64

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructWorld (   self)

Definition at line 31 of file test.py.

31 
32  def ConstructWorld(self):
33  # Python has automatic garbage collection system.
34  # Geometry objects must be defined as GLOBAL not to be deleted.
35  global sld_world, lv_world, pv_world, va_world
36 
37  sld_world= G4Box("world", 1.*m, 1.*m, 1.*m)
38  lv_world= G4LogicalVolume(sld_world, self.air, "world")
39  pv_world= G4PVPlacement(G4Transform3D(), lv_world, "world",
40  None, False, 0)
41 
42  va_world= G4VisAttributes()
43  va_world.SetVisibility(False)
44  lv_world.SetVisAttributes(va_world)
45 
46  # solid object (dummy)
47  global sld_sld, lv_sld, pv_sld
48  sld_sld= G4Box("dummy", 10.*cm, 10.*cm, 10.*cm)
49  self.lv_object= lv_sld= G4LogicalVolume(sld_sld, self.air, "dummy")
50  pv_sld= G4PVPlacement(None, G4ThreeVector(), "dummy", lv_sld,
51  pv_world, False, 0)
52 
53  return pv_world
Definition: G4Box.hh:64

Here is the caller graph for this function:

def test.MyDetectorConstruction.ConstructWorld (   self)

Definition at line 33 of file test.py.

33 
34  def ConstructWorld(self):
35  # Python has automatic garbage collection system.
36  # Geometry objects must be defined as GLOBAL not to be deleted.
37  global sld_world, lv_world, pv_world, va_world
38 
39  sld_world= G4Box("world", 1.*m, 1.*m, 1.*m)
40  lv_world= G4LogicalVolume(sld_world, self.air, "world")
41  pv_world= G4PVPlacement(G4Transform3D(), lv_world, "world",
42  None, False, 0)
43 
44  va_world= G4VisAttributes()
45  va_world.SetVisibility(False)
46  lv_world.SetVisAttributes(va_world)
47 
48  # solid object (dummy)
49  global sld_sld, lv_sld, pv_sld
50  sld_sld= G4Box("dummy", 10.*cm, 10.*cm, 10.*cm)
51  self.lv_object= lv_sld= G4LogicalVolume(sld_sld, self.air, "dummy")
52  pv_sld= G4PVPlacement(None, G4ThreeVector(), "dummy", lv_sld,
53  pv_world, False, 0)
54 
55  return pv_world
Definition: G4Box.hh:64

Here is the call graph for this function:

def test.MyDetectorConstruction.ConstructWorld (   self)

Definition at line 33 of file test.py.

33 
34  def ConstructWorld(self):
35  # Python has automatic garbage collection system.
36  # Geometry objects must be defined as GLOBAL not to be deleted.
37  global sld_world, lv_world, pv_world, va_world
38 
39  sld_world= G4Box("world", 1.*m, 1.*m, 1.*m)
40  lv_world= G4LogicalVolume(sld_world, self.air, "world")
41  pv_world= G4PVPlacement(G4Transform3D(), lv_world, "world",
42  None, False, 0)
43 
44  va_world= G4VisAttributes()
45  va_world.SetVisibility(False)
46  lv_world.SetVisAttributes(va_world)
47 
48  # solid object (dummy)
49  global sld_sld, lv_sld, pv_sld
50  sld_sld= G4Box("dummy", 10.*cm, 10.*cm, 10.*cm)
51  self.lv_object= lv_sld= G4LogicalVolume(sld_sld, self.air, "dummy")
52  pv_sld= G4PVPlacement(None, G4ThreeVector(), "dummy", lv_sld,
53  pv_world, False, 0)
54 
55  return pv_world
Definition: G4Box.hh:64

Here is the call graph for this function:

Member Data Documentation

test.MyDetectorConstruction.air

Definition at line 20 of file test.py.

test.MyDetectorConstruction.lv_object

Definition at line 21 of file test.py.

test.MyDetectorConstruction.sld_box

Definition at line 29 of file test.py.

test.MyDetectorConstruction.sld_cyl

Definition at line 30 of file test.py.

test.MyDetectorConstruction.va_blue

Definition at line 27 of file test.py.

test.MyDetectorConstruction.va_cyan

Definition at line 25 of file test.py.

test.MyDetectorConstruction.va_green

Definition at line 26 of file test.py.

test.MyDetectorConstruction.va_magenta

Definition at line 28 of file test.py.

test.MyDetectorConstruction.va_red

Definition at line 24 of file test.py.

test.MyDetectorConstruction.world

Definition at line 22 of file test.py.


The documentation for this class was generated from the following files: