Loading...
Searching...
No Matches
Public Member Functions | List of all members
GB06DetectorConstruction Class Reference

#include <Doxymodules_biasing.h>

Inheritance diagram for GB06DetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 GB06DetectorConstruction ()
 
 ~GB06DetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
virtual void ConstructSDandField ()
 

Detailed Description

Definition at line 140 of file Doxymodules_biasing.h.

Constructor & Destructor Documentation

◆ GB06DetectorConstruction()

GB06DetectorConstruction::GB06DetectorConstruction ( )

◆ ~GB06DetectorConstruction()

GB06DetectorConstruction::~GB06DetectorConstruction ( )

Definition at line 54 of file GB06DetectorConstruction.cc.

55{}

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * GB06DetectorConstruction::Construct ( )
virtual

Definition at line 59 of file GB06DetectorConstruction.cc.

60{
61 G4Material* worldMaterial =
62 G4NistManager::Instance()->FindOrBuildMaterial("G4_Galactic");
63 G4Material* concreteMaterial =
64 G4NistManager::Instance()->FindOrBuildMaterial("G4_CONCRETE");
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}

◆ ConstructSDandField()

void GB06DetectorConstruction::ConstructSDandField ( )
virtual

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:
131 G4SDManager* SDman = G4SDManager::GetSDMpointer();
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}

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

Applications | User Support | Publications | Collaboration