Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GeometryConstruction Class Reference

#include <GeometryConstruction.hh>

Inheritance diagram for GeometryConstruction:
Collaboration diagram for GeometryConstruction:

Public Member Functions

 GeometryConstruction ()
 
 ~GeometryConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
- Public Member Functions inherited from G4VUserDetectorConstruction
 G4VUserDetectorConstruction ()
 
virtual ~G4VUserDetectorConstruction ()
 
virtual void ConstructSDandField ()
 
virtual void CloneSD ()
 
virtual void CloneF ()
 
void RegisterParallelWorld (G4VUserParallelWorld *)
 
G4int ConstructParallelGeometries ()
 
void ConstructParallelSD ()
 
G4int GetNumberOfParallelWorld () const
 
G4VUserParallelWorldGetParallelWorld (G4int i) const
 

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 44 of file GeometryConstruction.hh.

Constructor & Destructor Documentation

GeometryConstruction::GeometryConstruction ( )

Definition at line 51 of file GeometryConstruction.cc.

53  fUniverse_phys(0),
54  fAl_phys(0),
55  fSphere_phys(0)
56 {;}
GeometryConstruction::~GeometryConstruction ( )

Definition at line 60 of file GeometryConstruction.cc.

61 {;}

Member Function Documentation

G4VPhysicalVolume * GeometryConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 65 of file GeometryConstruction.cc.

66 {
67  //
68  //
69  // Define materials.
70  //
71  G4double a, z, density,pressure, temperature;
72  G4String name, symbol;
73 
74 
75  density = universe_mean_density; //from PhysicalConstants.h
76  pressure = 3.e-18*pascal;
77  temperature = 2.73*kelvin;
78  G4Material* Vacuum = new G4Material("Vacuum",
79  1., 1.01*g/mole, density,
80  kStateGas,temperature,pressure);
81  a = 26.98154*g/mole;
82  density = 2.70*g/cm3;
83  G4Material* Aluminium = new G4Material(name="aluminium", z=13., a, density);
84 
85  a = 28.0855*g/mole;
86  G4Element* elSi = new G4Element(name="silicon", symbol="Si", z=14., a);
87 
88  a = 16.00*g/mole;
89  G4Element* elO = new G4Element(name="Oxygen", symbol="O", z=8., a);
90 
91  density = 2.65*g/cm3;
92  G4Material* SiliconDioxide =
93  new G4Material(name="silicon oxide", density, 2);
94  SiliconDioxide->AddElement(elSi, 1);
95  SiliconDioxide->AddElement(elO, 2);
96  //
97  // Define size of world and volumes in it.
98  //
99  G4double world_r = 18*cm;
100 
101  G4double box_x = 10*cm;
102  G4double box_y = 10*cm;
103  G4double box_z = 10*cm;
104 
105  G4double sphere_r = 5*cm;
106 
107  // Define bodies, logical volumes and physical volumes.
108  // First define the experimental hall.
109  //
110  G4Sphere * universe_s
111  = new G4Sphere("universe_s", 0, world_r, 0, twopi, 0, pi);
112  G4LogicalVolume * universe_log
113  = new G4LogicalVolume(universe_s,Vacuum,"universe_L",0,0,0);
114  //
115  fUniverse_phys
116  = new G4PVPlacement(0,G4ThreeVector(),"universe_P",
117  universe_log,0,false,0);
118 
119  //define an aluminium box
120  //
121  G4Box * Al_box
122  = new G4Box("Al_b", box_x, box_y, box_z);
123  G4LogicalVolume * Al_log
124  = new G4LogicalVolume(Al_box,Aluminium,"Box_log",0,0,0);
125  //
126  fAl_phys
127  = new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),"Box_phys",
128  Al_log,fUniverse_phys,false,0);
129 
130  // Define an inner sphere.
131  //
132  G4Sphere * aSphere_sph
133  = new G4Sphere("aSphere", 0, sphere_r, 0, twopi, 0, pi);
134  G4LogicalVolume * aSphere_log
135  = new G4LogicalVolume(aSphere_sph,SiliconDioxide,"Sphere_log",0,0,0);
136  //
137  fSphere_phys
138  = new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),"Sphere_phys",aSphere_log,
139  fAl_phys,false,0);
140 
141 //--------- Visualization attributes -------------------------------
143  G4VisAttributes* aVisAtt= new G4VisAttributes(G4Colour(0,1.0,1.0));
144  Al_log->SetVisAttributes(aVisAtt);
145  G4VisAttributes* bVisAtt= new G4VisAttributes(G4Colour(1.0,2.0,.0));
146  aSphere_log->SetVisAttributes(bVisAtt);
147 
148  return fUniverse_phys;
149 }
const XML_Char * name
Definition: expat.h:151
CLHEP::Hep3Vector G4ThreeVector
std::vector< ExP01TrackerHit * > a
Definition: ExP01Classes.hh:33
int universe_mean_density
Definition: hepunit.py:307
Definition: G4Box.hh:64
static constexpr double twopi
Definition: G4SIunits.hh:76
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5205
static constexpr double cm
Definition: G4SIunits.hh:119
#define pascal
static constexpr double kelvin
Definition: G4SIunits.hh:281
static constexpr double cm3
Definition: G4SIunits.hh:121
tuple z
Definition: test.py:28
void AddElement(G4Element *element, G4int nAtoms)
Definition: G4Material.cc:362
static constexpr double pi
Definition: G4SIunits.hh:75
double G4double
Definition: G4Types.hh:76
static constexpr double mole
Definition: G4SIunits.hh:286
static const G4VisAttributes & GetInvisible()
void SetVisAttributes(const G4VisAttributes *pVA)

Here is the call graph for this function:


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