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

#include <GB06DetectorConstruction.hh>

Inheritance diagram for GB06DetectorConstruction:
Collaboration diagram for GB06DetectorConstruction:

Public Member Functions

 GB06DetectorConstruction ()
 
 ~GB06DetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
virtual void ConstructSDandField ()
 
- Public Member Functions inherited from G4VUserDetectorConstruction
 G4VUserDetectorConstruction ()
 
virtual ~G4VUserDetectorConstruction ()
 
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 GB06DetectorConstruction.hh.

Constructor & Destructor Documentation

GB06DetectorConstruction::GB06DetectorConstruction ( )
GB06DetectorConstruction::~GB06DetectorConstruction ( )

Definition at line 54 of file GB06DetectorConstruction.cc.

55 {}

Member Function Documentation

G4VPhysicalVolume * GB06DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 59 of file GB06DetectorConstruction.cc.

60 {
61  G4Material* worldMaterial =
63  G4Material* concreteMaterial =
65 
66 
67  G4VSolid* solidWorld = new G4Box("World.solid", 10*m, 10*m, 10*m );
68 
69  G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld, // its solid
70  worldMaterial, // its material
71  "World.logical");// its name
72 
73  G4PVPlacement* physiWorld = new G4PVPlacement(nullptr, // no rotation
74  G4ThreeVector(), // at (0,0,0)
75  logicWorld, // its logical volume
76  "World.physical",// its name
77  nullptr, // its mother volume
78  false, // no bool. operation
79  0); // copy number
80 
81  // ----------------------------------------------------
82  // -- volume of shield, made of concrete, in one block:
83  // ----------------------------------------------------
84  G4double halfXY = 1.5*m;
85  G4double halfZ = 2.5*m;
86  G4VSolid* solidShield = new G4Box("shield.solid", halfXY, halfXY, halfZ );
87 
88  G4LogicalVolume* logicTest = new G4LogicalVolume(solidShield, // its solid
89  concreteMaterial, // its material
90  "shield.logical"); // its name
91 
92  new G4PVPlacement(nullptr, // no rotation
93  G4ThreeVector(0, 0, halfZ), // volume entrance is set at (0,0,0)
94  logicTest, // its logical volume
95  "shield.physical", // its name
96  logicWorld, // its mother volume
97  false, // no boolean operation
98  0); // copy number
99 
100  // ------------------------------------------------------------
101  // -- dummy volume to display exiting neutron flux information:
102  // ------------------------------------------------------------
103  G4double halfz = 1*cm;
104  G4VSolid* solidMeasurement = new G4Box("meas.solid", halfXY, halfXY, halfz );
105 
106  G4LogicalVolume* logicMeasurement = new G4LogicalVolume(solidMeasurement,// its solid
107  worldMaterial, // its material
108  "meas.logical"); // its name
109 
110  new G4PVPlacement(nullptr, // no rotation
111  G4ThreeVector(0, 0, 2*halfZ + halfz), // entrance set after shield
112  logicMeasurement, // its logical volume
113  "meas.physical", // its name
114  logicWorld, // its mother volume
115  false, // no boolean operation
116  0); // copy number
117 
118 
119  // -- world volume pointer returned:
120  return physiWorld;
121 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
CLHEP::Hep3Vector G4ThreeVector
Definition: G4Box.hh:64
static G4NistManager * Instance()
static constexpr double m
Definition: G4SIunits.hh:129
static constexpr double cm
Definition: G4SIunits.hh:119
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

void GB06DetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 124 of file GB06DetectorConstruction.cc.

125 {
126 
127  // ---------------------------------------------------------------------------------
128  // -- Attach sensitive detector to print information on particle exiting the shield:
129  // ---------------------------------------------------------------------------------
130  // -- create and register sensitive detector code module:
132  G4VSensitiveDetector* sd = new GB06SD("Measurer");
133  SDman->AddNewDetector(sd);
134  // -- Fetch volume for sensitivity and attach sensitive module to it:
135  G4LogicalVolume* logicSD =
136  G4LogicalVolumeStore::GetInstance()->GetVolume("meas.logical");
137  logicSD->SetSensitiveDetector(sd);
138 
139 }
G4LogicalVolume * GetVolume(const G4String &name, G4bool verbose=true) const
static G4LogicalVolumeStore * GetInstance()
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:71
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
Definition: GB06SD.hh:37
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)

Here is the call graph for this function:


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