Geant4  10.02.p03
RMC01DetectorConstruction Class Reference

#include <RMC01DetectorConstruction.hh>

Inheritance diagram for RMC01DetectorConstruction:
Collaboration diagram for RMC01DetectorConstruction:

Public Member Functions

 RMC01DetectorConstruction ()
 
virtual ~RMC01DetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
void UpdateGeometry ()
 
void SetSensitiveVolumeHeight (G4double h)
 
void SetSensitiveVolumeRadius (G4double r)
 
void SetShieldingThickness (G4double d)
 
- 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
 

Private Member Functions

void DefineMaterials ()
 
G4VPhysicalVolumeConstructSimpleGeometry ()
 

Private Attributes

RMC01DetectorMessengerfDetectorMessenger
 
G4double fShield_Thickness
 
G4double fSensitive_cylinder_H
 
G4double fSensitive_cylinder_Rout
 

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 58 of file RMC01DetectorConstruction.hh.

Constructor & Destructor Documentation

◆ RMC01DetectorConstruction()

RMC01DetectorConstruction::RMC01DetectorConstruction ( )

◆ ~RMC01DetectorConstruction()

RMC01DetectorConstruction::~RMC01DetectorConstruction ( )
virtual

Definition at line 78 of file RMC01DetectorConstruction.cc.

79 { delete fDetectorMessenger;
80 }
RMC01DetectorMessenger * fDetectorMessenger

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * RMC01DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 84 of file RMC01DetectorConstruction.cc.

85 {
87  return ConstructSimpleGeometry();
88 }
G4VPhysicalVolume * ConstructSimpleGeometry()
Here is the call graph for this function:

◆ ConstructSimpleGeometry()

G4VPhysicalVolume * RMC01DetectorConstruction::ConstructSimpleGeometry ( )
private

Definition at line 133 of file RMC01DetectorConstruction.cc.

134 {
135 
136  // Clean old geometry, if any
137 
142 
143  // World
144  //-----------
145 
146  G4Box* solidWorld = new G4Box("World",15.*cm, 15.*cm, 15.*cm);
147  G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld,
148  G4Material::GetMaterial("Vacuum"),
149  "World");
150 
151  G4VPhysicalVolume* physiWorld = new G4PVPlacement(0, //no rotation
152  G4ThreeVector(), //at (0,0,0)
153  logicWorld, //its logical volume
154  "World", //its name
155  0, //its mother volume
156  false, //no boolean operation
157  0);
158 
159  //Shielding Aluminum Sphere
160  //-------------------
161 
162  G4double radiusShieldingSphere =10.*cm;
163 
164  G4Orb* solidShieldingSphere=new G4Orb("Shielding", radiusShieldingSphere);
165  G4LogicalVolume* logicShieldingSphere=
166  new G4LogicalVolume(solidShieldingSphere,
167  G4Material::GetMaterial("Aluminum"),
168  "Shielding"); //its name;
169 
170  new G4PVPlacement(0, //no rotation
171  G4ThreeVector(), //at (0,0,0)
172  logicShieldingSphere, //its logical volume
173  "Shielding", //its name
174  logicWorld, //its mother volume
175  false, //no boolean operation
176  0);
177 
178  //Bulk Sphere
179  //-------------------
180 
181  G4Orb* solidBulkSphere=new G4Orb("Bulk",
182  radiusShieldingSphere-fShield_Thickness);
183  G4LogicalVolume* logicBulkSphere=new G4LogicalVolume(
184  solidBulkSphere,//its solid
185  G4Material::GetMaterial("Air"),//its material
186  "Bulk"); //its name;
187 
188  new G4PVPlacement(0, //no rotation
189  G4ThreeVector(), //at (0,0,0)
190  logicBulkSphere, //its logical volume
191  "Bulk", //its name
192  logicShieldingSphere, //its mother volume
193  false, //no boolean operation
194  0);
195 
196  //Detecting cylinder
197  //-------------------
198 
199  G4Tubs* solidDetecting=new G4Tubs("SensitiveVolume",
201  0.,twopi);
202 
203  G4LogicalVolume* logicDetectingCylinder=new G4LogicalVolume(solidDetecting,
204  G4Material::GetMaterial("Silicon"),
205  "SensitiveVolume");
206 
207  new G4PVPlacement(0, //no rotation
208  G4ThreeVector(0.,0.,0.), //at (0,0,0)
209  logicDetectingCylinder, //its logical volume
210  "SensitiveVolume", //its name
211  logicBulkSphere, //its mother volume
212  false, //no boolean operation
213  0);
214 
215 
216  RMC01SD* theSensitiveDetector = new RMC01SD("/SensitiveCylinder");
217 
218  G4SDManager::GetSDMpointer()->AddNewDetector(theSensitiveDetector);
219  logicDetectingCylinder->SetSensitiveDetector(theSensitiveDetector);
220 
221  //Tantalum Plates on the top and beside
222  //-------------------------------------
223  G4Box* solidPlate=new G4Box("TantalumPlate",4.*cm,4.*cm,0.25*mm);
224  G4LogicalVolume* logicPlate=new G4LogicalVolume(solidPlate, //its solid
225  G4Material::GetMaterial("Tantalum"),//its material
226  "TantalumPlate"); //its name;
227 
228 
229  new G4PVPlacement(0, //no rotation
230  G4ThreeVector(0.,0.,6.*cm), //at (0,0,0)
231  logicPlate, //its logical volume
232  "TantalumPlate1", //its name
233  logicBulkSphere, //its mother volume
234  false, //no boolean operation
235  0);
236 
237  new G4PVPlacement(0, //no rotation
238  G4ThreeVector(0.,0.,-6.*cm), //at (0,0,0)
239  logicPlate, //its logical volume
240  "TantalumPlate2", //its name
241  logicBulkSphere, //its mother volume
242  false, //no boolean operation
243  0);
244 
245  return physiWorld;
246 
247 }
static const double cm
Definition: G4SIunits.hh:118
CLHEP::Hep3Vector G4ThreeVector
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:604
Definition: G4Box.hh:64
Definition: G4Tubs.hh:85
static void Clean()
Definition: G4SolidStore.cc:79
static G4PhysicalVolumeStore * GetInstance()
static const double twopi
Definition: G4SIunits.hh:75
static G4LogicalVolumeStore * GetInstance()
static G4SolidStore * GetInstance()
static G4GeometryManager * GetInstance()
Definition: G4Orb.hh:61
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:71
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
void OpenGeometry(G4VPhysicalVolume *vol=0)
double G4double
Definition: G4Types.hh:76
static const double mm
Definition: G4SIunits.hh:114
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DefineMaterials()

void RMC01DetectorConstruction::DefineMaterials ( )
private

Definition at line 92 of file RMC01DetectorConstruction.cc.

93 {
94 
95  G4String symbol; //a=mass of a mole;
96  G4double a, z, density; //z=mean number of protons;
97  G4double fractionmass;
98  G4int ncomponents;
99 
100  //
101  // define Elements
102  //
103 
104  G4Element* N = new G4Element("Nitrogen",symbol="N" , z= 7., a= 14.01*g/mole);
105  G4Element* O = new G4Element("Oxygen" ,symbol="O" , z= 8., a= 16.00*g/mole);
106 
107  //
108  // define simple materials
109  //
110 
111  new G4Material("Aluminum", z=13., a=26.98*g/mole, density=2.700*g/cm3);
112  new G4Material("Silicon", z=14., a=28.09*g/mole, density=2.33*g/cm3);
113  new G4Material("Tantalum", z=73., a=180.9479*g/mole, density=16.654*g/cm3);
114 
115  //
116  // define air
117  //
118 
119  G4Material* Air = new G4Material("Air", density= 1.290*mg/cm3, ncomponents=2);
120  Air->AddElement(N, fractionmass=0.7);
121  Air->AddElement(O, fractionmass=0.3);
122 
123  //
124  //Example of Vacuum
125  //
126 
127  new G4Material("Vacuum", z=1., a=1.01*g/mole,density= universe_mean_density,
128  kStateGas, 3.e-18*pascal, 2.73*kelvin);
129 }
G4String symbol
Definition: TRTMaterials.hh:40
G4Material * Air
Definition: TRTMaterials.hh:57
int universe_mean_density
Definition: hepunit.py:307
static const double mg
Definition: G4SIunits.hh:181
int G4int
Definition: G4Types.hh:78
G4double density
Definition: TRTMaterials.hh:39
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5206
#define pascal
static const double cm3
Definition: G4SIunits.hh:120
static const double kelvin
Definition: G4SIunits.hh:278
static const double mole
Definition: G4SIunits.hh:283
**D E S C R I P T I O N
void AddElement(G4Element *element, G4int nAtoms)
Definition: G4Material.cc:364
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetSensitiveVolumeHeight()

void RMC01DetectorConstruction::SetSensitiveVolumeHeight ( G4double  h)

Definition at line 257 of file RMC01DetectorConstruction.cc.

Here is the caller graph for this function:

◆ SetSensitiveVolumeRadius()

void RMC01DetectorConstruction::SetSensitiveVolumeRadius ( G4double  r)

Definition at line 251 of file RMC01DetectorConstruction.cc.

Here is the caller graph for this function:

◆ SetShieldingThickness()

void RMC01DetectorConstruction::SetShieldingThickness ( G4double  d)

Definition at line 263 of file RMC01DetectorConstruction.cc.

Here is the caller graph for this function:

◆ UpdateGeometry()

void RMC01DetectorConstruction::UpdateGeometry ( )

Member Data Documentation

◆ fDetectorMessenger

RMC01DetectorMessenger* RMC01DetectorConstruction::fDetectorMessenger
private

Definition at line 75 of file RMC01DetectorConstruction.hh.

◆ fSensitive_cylinder_H

G4double RMC01DetectorConstruction::fSensitive_cylinder_H
private

Definition at line 80 of file RMC01DetectorConstruction.hh.

◆ fSensitive_cylinder_Rout

G4double RMC01DetectorConstruction::fSensitive_cylinder_Rout
private

Definition at line 81 of file RMC01DetectorConstruction.hh.

◆ fShield_Thickness

G4double RMC01DetectorConstruction::fShield_Thickness
private

Definition at line 79 of file RMC01DetectorConstruction.hh.


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