Geant4  10.02.p03
RE04DetectorConstruction Class Reference

#include <RE04DetectorConstruction.hh>

Inheritance diagram for RE04DetectorConstruction:
Collaboration diagram for RE04DetectorConstruction:

Public Member Functions

 RE04DetectorConstruction ()
 
virtual ~RE04DetectorConstruction ()
 
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
 

Private Member Functions

void DefineMaterials ()
 
void SetupGeometry ()
 

Private Attributes

G4MaterialfAir
 
G4MaterialfWater
 
G4MaterialfPb
 
G4VPhysicalVolumefWorldPhys
 
G4bool fConstructed
 

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

User detector construction class

Definition at line 50 of file RE04DetectorConstruction.hh.

Constructor & Destructor Documentation

◆ RE04DetectorConstruction()

RE04DetectorConstruction::RE04DetectorConstruction ( )

◆ ~RE04DetectorConstruction()

RE04DetectorConstruction::~RE04DetectorConstruction ( )
virtual

Definition at line 54 of file RE04DetectorContruction.cc.

55 {;}

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * RE04DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 58 of file RE04DetectorContruction.cc.

59 {
60  if(!fConstructed)
61  {
62  fConstructed = true;
64  SetupGeometry();
65  }
66  return fWorldPhys;
67 }
Here is the call graph for this function:

◆ DefineMaterials()

void RE04DetectorConstruction::DefineMaterials ( void  )
private

Definition at line 70 of file RE04DetectorContruction.cc.

71 {
72  //=====================
73  // Material Definitions
74  //=====================
75  //
76  //-------- NIST Materials ----------------------------------------------------
77  // Material Information imported from NIST database.
78  //
80  fAir = pNISTman->FindOrBuildMaterial("G4_AIR");
81  fWater = pNISTman->FindOrBuildMaterial("G4_WATER");
82  fPb = pNISTman->FindOrBuildMaterial("G4_Pb");
83 
84  //
85  // Print all the materials defined.
86  G4cout << G4endl << "The materials defined are : " << G4endl << G4endl;
87  G4cout << *(G4Material::GetMaterialTable()) << G4endl;
88 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
static G4MaterialTable * GetMaterialTable()
Definition: G4Material.cc:589
static G4NistManager * Instance()
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetupGeometry()

void RE04DetectorConstruction::SetupGeometry ( )
private

Definition at line 91 of file RE04DetectorContruction.cc.

92 {
93  //
94  // World
95  //
96  G4VSolid* worldSolid = new G4Box("World",1.*m,1.*m,1.*m);
97  G4LogicalVolume* worldLogical = new G4LogicalVolume(worldSolid,fAir,"World");
98  fWorldPhys = new G4PVPlacement(0,G4ThreeVector(),worldLogical,"World",
99  0,false,0);
100 
101  //
102  // Phantom
103  //
104  G4VSolid* phantomSolid = new G4Box("Phantom",50.*cm,50.*cm,50.*cm);
105  G4LogicalVolume* phantomLogical = new G4LogicalVolume(phantomSolid,fAir,
106  "Phantom");
107  new G4PVPlacement(0,G4ThreeVector(),phantomLogical,"Phantom",
108  worldLogical,false,0);
109 
110  //
111  // Visualization attributes
112  //
114  G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
115  simpleBoxVisAtt->SetVisibility(true);
116  phantomLogical->SetVisAttributes(simpleBoxVisAtt);
117 }
static const double cm
Definition: G4SIunits.hh:118
CLHEP::Hep3Vector G4ThreeVector
Definition: G4Box.hh:64
void SetVisibility(G4bool)
static const G4VisAttributes Invisible
static const double m
Definition: G4SIunits.hh:128
void SetVisAttributes(const G4VisAttributes *pVA)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fAir

G4Material* RE04DetectorConstruction::fAir
private

Definition at line 64 of file RE04DetectorConstruction.hh.

◆ fConstructed

G4bool RE04DetectorConstruction::fConstructed
private

Definition at line 68 of file RE04DetectorConstruction.hh.

◆ fPb

G4Material* RE04DetectorConstruction::fPb
private

Definition at line 66 of file RE04DetectorConstruction.hh.

◆ fWater

G4Material* RE04DetectorConstruction::fWater
private

Definition at line 65 of file RE04DetectorConstruction.hh.

◆ fWorldPhys

G4VPhysicalVolume* RE04DetectorConstruction::fWorldPhys
private

Definition at line 67 of file RE04DetectorConstruction.hh.


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