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

#include <MoviesDetectorConstruction.hh>

Inheritance diagram for MoviesDetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 MoviesDetectorConstruction ()
 
virtual ~MoviesDetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 

Private Member Functions

void DefineMaterials ()
 
G4VPhysicalVolumeDefineVolumes ()
 

Detailed Description

Definition at line 37 of file MoviesDetectorConstruction.hh.

Constructor & Destructor Documentation

◆ MoviesDetectorConstruction()

MoviesDetectorConstruction::MoviesDetectorConstruction ( )
inline

Definition at line 40 of file MoviesDetectorConstruction.hh.

40{}

◆ ~MoviesDetectorConstruction()

virtual MoviesDetectorConstruction::~MoviesDetectorConstruction ( )
inlinevirtual

Definition at line 41 of file MoviesDetectorConstruction.hh.

41{}

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * MoviesDetectorConstruction::Construct ( )
virtual

Definition at line 45 of file MoviesDetectorConstruction.cc.

46{
47 // Define materials
49
50 // Define volumes
51 return DefineVolumes();
52}

◆ DefineMaterials()

void MoviesDetectorConstruction::DefineMaterials ( )
private

Definition at line 54 of file MoviesDetectorConstruction.cc.

55{
56 auto nistManager = G4NistManager::Instance();
57
58 // Lead material defined using NIST Manager
59 nistManager->FindOrBuildMaterial("G4_Pb");
60
61 // Liquid argon material
62 G4double a; // mass of a mole;
63 G4double z; // z=mean number of protons;
64 G4double density;
65 new G4Material("liquidArgon", z=18., a=39.95*g/mole, density=1.390*g/cm3);
66 // The argon by NIST Manager is a gas with a different density
67
68 // Vacuum
69 nistManager->FindOrBuildMaterial("G4_Galactic");
70
71 // Print materials
72 G4cout << *(G4Material::GetMaterialTable()) << G4endl;
73}
std::vector< ExP01TrackerHit * > a

◆ DefineVolumes()

G4VPhysicalVolume * MoviesDetectorConstruction::DefineVolumes ( )
private

Definition at line 75 of file MoviesDetectorConstruction.cc.

76{
77 // Geometry parameters
78 const G4bool checkOverlaps = true;
79
80 // A generous world
81 const G4double worldSizeXY = 1.*m;
82 const G4double worldSizeZ = 1.*m;
83
84 // Lead-argon calorimeter
85 G4int nofLayers = 10;
86 G4double absoThickness = 10.*mm;
87 G4double gapThickness = 5.*mm;
88 G4double calorSizeXY = 10.*cm;
89
90 auto layerThickness = absoThickness + gapThickness;
91 auto calorThickness = nofLayers * layerThickness;
92
93 // Get materials
94 auto defaultMaterial = G4Material::GetMaterial("G4_Galactic");
95 auto absorberMaterial = G4Material::GetMaterial("G4_Pb");
96 auto gapMaterial = G4Material::GetMaterial("liquidArgon");
97
98 // World
99 auto worldS
100 = new G4Box("World",worldSizeXY/2,worldSizeXY/2,worldSizeZ/2);
101
102 auto worldLV
103 = new G4LogicalVolume(
104 worldS, // its solid
105 defaultMaterial, // its material
106 "World"); // its name
107
108 auto worldPV
109 = new G4PVPlacement(
110 0, // no rotation
111 G4ThreeVector(), // at (0,0,0)
112 worldLV, // its logical volume
113 "World", // its name
114 0, // its mother volume
115 false, // no boolean operation
116 0, // copy number
117 checkOverlaps); // checking overlaps
118
119
120 // Calorimeter
121
122 auto calorimeterS
123 = new G4Box("Calorimeter",calorSizeXY/2,calorSizeXY/2,calorThickness/2);
124
125 auto calorLV
126 = new G4LogicalVolume(
127 calorimeterS, // its solid
128 defaultMaterial, // its material
129 "Calorimeter"); // its name
130
131 new G4PVPlacement(
132 0, // no rotation
133 G4ThreeVector(), // at (0,0,0)
134 calorLV, // its logical volume
135 "Calorimeter", // its name
136 worldLV, // its mother volume
137 false, // no boolean operation
138 0, // copy number
139 checkOverlaps); // checking overlaps
140
141 // Layer
142
143 auto layerS
144 = new G4Box("Layer", // its name
145 calorSizeXY/2, calorSizeXY/2, layerThickness/2); // its size
146
147 auto layerLV
148 = new G4LogicalVolume(
149 layerS, // its solid
150 defaultMaterial, // its material
151 "Layer"); // its name
152
153 new G4PVReplica(
154 "Layer", // its name
155 layerLV, // its logical volume
156 calorLV, // its mother
157 kZAxis, // axis of replication
158 nofLayers, // number of replica
159 layerThickness); // witdth of replica
160
161 // Absorber
162
163 auto absorberS
164 = new G4Box("Abso", // its name
165 calorSizeXY/2, calorSizeXY/2, absoThickness/2); // its size
166
167 auto absorberLV
168 = new G4LogicalVolume(
169 absorberS, // its solid
170 absorberMaterial, // its material
171 "Abso"); // its name
172
173 new G4PVPlacement(
174 0, // no rotation
175 G4ThreeVector(0., 0., -gapThickness/2), // its position
176 absorberLV, // its logical volume
177 "Abso", // its name
178 layerLV, // its mother volume
179 false, // no boolean operation
180 0, // copy number
181 checkOverlaps); // checking overlaps
182
183 // Gap
184
185 auto gapS
186 = new G4Box("Gap", // its name
187 calorSizeXY/2, calorSizeXY/2, gapThickness/2); // its size
188
189 auto gapLV
190 = new G4LogicalVolume(
191 gapS, // its solid
192 gapMaterial, // its material
193 "Gap"); // its name
194
195 new G4PVPlacement(
196 0, // no rotation
197 G4ThreeVector(0., 0., absoThickness/2), // its position
198 gapLV, // its logical volume
199 "Gap", // its name
200 layerLV, // its mother volume
201 false, // no boolean operation
202 0, // copy number
203 checkOverlaps); // checking overlaps
204
205 // Visualization attributes
206 worldLV->SetVisAttributes (G4VisAttributes::GetInvisible());
207
208 return worldPV;
209}

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

Applications | User Support | Publications | Collaboration