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

#include <Doxymodules_biasing.h>

Inheritance diagram for GB05DetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 GB05DetectorConstruction ()
 
 ~GB05DetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
virtual void ConstructSDandField ()
 

Detailed Description

Definition at line 125 of file Doxymodules_biasing.h.

Constructor & Destructor Documentation

◆ GB05DetectorConstruction()

GB05DetectorConstruction::GB05DetectorConstruction ( )

◆ ~GB05DetectorConstruction()

GB05DetectorConstruction::~GB05DetectorConstruction ( )

Definition at line 57 of file GB05DetectorConstruction.cc.

58{}

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * GB05DetectorConstruction::Construct ( )
virtual

Definition at line 62 of file GB05DetectorConstruction.cc.

63{
64 // -- Collect a few materials from NIST database:
65 auto nistManager = G4NistManager::Instance();
66 G4Material* worldMaterial = nistManager->FindOrBuildMaterial("G4_Galactic");
67 G4Material* defaultMaterial = nistManager->FindOrBuildMaterial("G4_CONCRETE");
68
69
70 G4VSolid* solidWorld = new G4Box("World", 10*m, 10*m, 10*m );
71
72 G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld, // its solid
73 worldMaterial, // its material
74 "World"); // its name
75
76 G4PVPlacement* physiWorld = new G4PVPlacement(0, // no rotation
77 G4ThreeVector(), // at (0,0,0)
78 logicWorld, // its logical volume
79 "World", // its name
80 0, // its mother volume
81 false, // no boolean operation
82 0); // copy number
83
84 // -----------------------------------
85 // -- volume where biasing is applied:
86 // -----------------------------------
87 G4double halfXY = 5.0*m;
88 G4double halfZ = 1.0*m;
89 G4VSolid* solidShield = new G4Box("shield.solid", halfXY, halfXY, halfZ );
90
91 G4LogicalVolume* logicShield = new G4LogicalVolume( solidShield, // its solid
92 defaultMaterial, // its material
93 "shield.logical"); // its name
94
95 new G4PVPlacement(0, // no rotation
96 G4ThreeVector(0,0, halfZ), // volume entrance at (0,0,0)
97 logicShield, // its logical volume
98 "shield.phys", // its name
99 logicWorld, // its mother volume
100 false, // no boolean operation
101 0); // copy number
102
103 // --------------------------------------------------------------------
104 // -- dummy volume to print information on particle exiting the shield:
105 // --------------------------------------------------------------------
106 G4double halfz = 1*cm;
107 G4VSolid* solidMeasurement = new G4Box("meas.solid", halfXY, halfXY, halfz );
108
109 G4LogicalVolume* logicMeasurement = new G4LogicalVolume(solidMeasurement,// its solid
110 worldMaterial, // its material
111 "meas.logical"); // its name
112
113 new G4PVPlacement(0, // no rotation
114 G4ThreeVector(0,0, 2*halfZ + halfz), // volume entrance at (0,0,0)
115 logicMeasurement, // its logical volume
116 "meas.phys", // its name
117 logicWorld, // its mother volume
118 false, // no boolean operation
119 0); // copy number
120
121
122 return physiWorld;
123}

◆ ConstructSDandField()

void GB05DetectorConstruction::ConstructSDandField ( )
virtual

Definition at line 126 of file GB05DetectorConstruction.cc.

127{
128 // -- Fetch volume for biasing:
129 G4LogicalVolume* logicShield =
130 G4LogicalVolumeStore::GetInstance()->GetVolume("shield.logical");
131
132 // -------------------------------------------------------------
133 // -- operator creation, configuration and attachment to volume:
134 // -------------------------------------------------------------
135 GB05BOptrSplitAndKillByCrossSection* biasingOperator =
137 // -- Now, we declare to our biasing operator all the processes we
138 // -- their disapperance effect on neutrons to be counterbalanced
139 // -- by the splitting by cross-section :
140 biasingOperator->AddProcessToEquipoise("Decay");
141 biasingOperator->AddProcessToEquipoise("nCapture");
142 biasingOperator->AddProcessToEquipoise("neutronInelastic");
143
144 biasingOperator->AttachTo(logicShield);
145
146 G4cout << " Attaching biasing operator " << biasingOperator->GetName()
147 << " to logical volume " << biasingOperator->GetName()
148 << G4endl;
149
150 // ------------------------------------------------------------------------------------
151 // -- Attach a sensitive detector to print information on particles exiting the shield:
152 // ------------------------------------------------------------------------------------
153 // -- create and register sensitive detector code module:
154 G4SDManager* SDman = G4SDManager::GetSDMpointer();
155 G4VSensitiveDetector* sd = new GB05SD("Scorer");
156 SDman->AddNewDetector(sd);
157 // -- Fetch volume for sensitivity and attach sensitive module to it:
158 G4LogicalVolume* logicSD =
159 G4LogicalVolumeStore::GetInstance()->GetVolume("meas.logical");
160 logicSD->SetSensitiveDetector(sd);
161
162}

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

Applications | User Support | Publications | Collaboration