Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
exGPSGeometryConstruction Class Reference

#include <exGPSGeometryConstruction.hh>

Inheritance diagram for exGPSGeometryConstruction:
G4VUserDetectorConstruction

Public Member Functions

 exGPSGeometryConstruction ()
 
virtual ~exGPSGeometryConstruction ()
 
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 41 of file exGPSGeometryConstruction.hh.

Constructor & Destructor Documentation

exGPSGeometryConstruction::exGPSGeometryConstruction ( )

Definition at line 49 of file exGPSGeometryConstruction.cc.

51  fUniverse_phys(0),
52  fAl_phys(0),
53  fSphere_phys(0)
54 {;}
exGPSGeometryConstruction::~exGPSGeometryConstruction ( )
virtual

Definition at line 58 of file exGPSGeometryConstruction.cc.

59 {;}

Member Function Documentation

G4VPhysicalVolume * exGPSGeometryConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 63 of file exGPSGeometryConstruction.cc.

References test::a, G4Material::AddElement(), python.hepunit::cm3, python.hepunit::deg, density, elO, g(), G4VisAttributes::Invisible, iz, python.hepunit::kelvin, kStateGas, python.hepunit::mm, python.hepunit::mole, pascal, G4LogicalVolume::SetVisAttributes(), symbol, python.hepunit::universe_mean_density, and z.

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

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