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

#include <Doxymodules_field.h>

Inheritance diagram for F01DetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 F01DetectorConstruction ()
 
 ~F01DetectorConstruction () override
 
void SetAbsorberMaterial (G4String)
 
void SetAbsorberThickness (G4double)
 
void SetAbsorberRadius (G4double)
 
void SetAbsorberZpos (G4double)
 
void SetWorldMaterial (G4String)
 
void SetWorldSizeZ (G4double)
 
void SetWorldSizeR (G4double)
 
G4VPhysicalVolumeConstruct () override
 
void ConstructSDandField () override
 
void PrintCalorParameters ()
 
G4MaterialGetWorldMaterial ()
 
G4double GetWorldSizeZ ()
 
G4double GetWorldSizeR ()
 
G4double GetAbsorberZpos ()
 
G4double GetZStartAbs ()
 
G4double GetZEndAbs ()
 
G4MaterialGetAbsorberMaterial ()
 
G4double GetAbsorberThickness ()
 
G4double GetAbsorberRadius ()
 
const G4VPhysicalVolumeGetPhysiWorld ()
 
const G4VPhysicalVolumeGetAbsorber ()
 
G4LogicalVolumeGetLogicalAbsorber ()
 
void SetUseFSALstepper (G4bool val)
 
G4bool AreUsingFSALstepper ()
 

Private Member Functions

void DefineMaterials ()
 
void ComputeCalorParameters ()
 
G4VPhysicalVolumeConstructCalorimeter ()
 

Private Attributes

F01DetectorMessengerfDetectorMessenger = nullptr
 
G4Cache< F01CalorimeterSD * > fCalorimeterSD
 
G4Cache< F01FieldSetup * > fEmFieldSetup
 
G4TubsfSolidWorld = nullptr
 
G4LogicalVolumefLogicWorld = nullptr
 
G4VPhysicalVolumefPhysiWorld = nullptr
 
G4TubsfSolidAbsorber = nullptr
 
G4LogicalVolumefLogicAbsorber = nullptr
 
G4VPhysicalVolumefPhysiAbsorber = nullptr
 
G4MaterialfAbsorberMaterial = nullptr
 
G4double fAbsorberThickness = 1.0 * CLHEP::mm
 
G4double fAbsorberRadius = 20000. * CLHEP::mm
 
G4double fZAbsorber = 21990. * CLHEP::mm
 
G4double fZStartAbs = 0.
 
G4double fZEndAbs = 0.
 
G4MaterialfWorldMaterial = nullptr
 
G4double fWorldSizeR = 22000. * CLHEP::mm
 
G4double fWorldSizeZ = 44000. * CLHEP::mm
 
G4bool fUseFSALstepper = false
 

Detailed Description

Definition at line 35 of file Doxymodules_field.h.

Constructor & Destructor Documentation

◆ F01DetectorConstruction()

F01DetectorConstruction::F01DetectorConstruction ( )

Definition at line 59 of file F01DetectorConstruction.cc.

60{
61 // create commands for interactive definition of the calorimeter
62
64
65 // create materials
66
68
69}
F01DetectorMessenger * fDetectorMessenger

◆ ~F01DetectorConstruction()

F01DetectorConstruction::~F01DetectorConstruction ( )
override

Definition at line 73 of file F01DetectorConstruction.cc.

74{
75 delete fDetectorMessenger;
76}

Member Function Documentation

◆ SetAbsorberMaterial()

void F01DetectorConstruction::SetAbsorberMaterial ( G4String  materialChoice)

Definition at line 282 of file F01DetectorConstruction.cc.

283{
284 // get the pointer to the material table
285 const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
286
287 // search the material by its name
288 G4Material* material;
289 for (size_t j=0 ; j<theMaterialTable->size() ; j++)
290 { material = (*theMaterialTable)[j];
291 if (material->GetName() == materialChoice)
292 {
293 fAbsorberMaterial = material;
294 fLogicAbsorber->SetMaterial(material);
295 G4RunManager::GetRunManager()->PhysicsHasBeenModified();
296 }
297 }
298}

◆ SetAbsorberThickness()

void F01DetectorConstruction::SetAbsorberThickness ( G4double  val)

Definition at line 322 of file F01DetectorConstruction.cc.

323{
324 // change Absorber thickness and recompute the calorimeter parameters
325 fAbsorberThickness = val;
327 G4RunManager::GetRunManager()->ReinitializeGeometry();
328}

◆ SetAbsorberRadius()

void F01DetectorConstruction::SetAbsorberRadius ( G4double  val)

Definition at line 332 of file F01DetectorConstruction.cc.

333{
334 // change the transverse size and recompute the calorimeter parameters
335 fAbsorberRadius = val;
337 G4RunManager::GetRunManager()->ReinitializeGeometry();
338}

◆ SetAbsorberZpos()

void F01DetectorConstruction::SetAbsorberZpos ( G4double  val)

Definition at line 360 of file F01DetectorConstruction.cc.

361{
362 fZAbsorber = val;
364 G4RunManager::GetRunManager()->ReinitializeGeometry();
365}

◆ SetWorldMaterial()

void F01DetectorConstruction::SetWorldMaterial ( G4String  materialChoice)

Definition at line 302 of file F01DetectorConstruction.cc.

303{
304 // get the pointer to the material table
305 const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
306
307 // search the material by its name
308 G4Material* material;
309 for (size_t j=0 ; j<theMaterialTable->size() ; j++)
310 { material = (*theMaterialTable)[j];
311 if(material->GetName() == materialChoice)
312 {
313 fWorldMaterial = material;
314 fLogicWorld->SetMaterial(material);
315 G4RunManager::GetRunManager()->PhysicsHasBeenModified();
316 }
317 }
318}

◆ SetWorldSizeZ()

void F01DetectorConstruction::SetWorldSizeZ ( G4double  val)

Definition at line 342 of file F01DetectorConstruction.cc.

343{
344 fWorldSizeZ = val;
346 G4RunManager::GetRunManager()->ReinitializeGeometry();
347}

◆ SetWorldSizeR()

void F01DetectorConstruction::SetWorldSizeR ( G4double  val)

Definition at line 351 of file F01DetectorConstruction.cc.

352{
353 fWorldSizeR = val;
355 G4RunManager::GetRunManager()->ReinitializeGeometry();
356}

◆ Construct()

G4VPhysicalVolume * F01DetectorConstruction::Construct ( )
override

Definition at line 80 of file F01DetectorConstruction.cc.

81{
82 return ConstructCalorimeter();
83}
G4VPhysicalVolume * ConstructCalorimeter()

◆ ConstructSDandField()

void F01DetectorConstruction::ConstructSDandField ( )
override

Definition at line 370 of file F01DetectorConstruction.cc.

371{
372 // Sensitive Detectors: Absorber
373
374 if (!fCalorimeterSD.Get()) {
375 auto calorimeterSD = new F01CalorimeterSD("CalorSD",this);
376 fCalorimeterSD.Put(calorimeterSD);
377 }
378 G4SDManager::GetSDMpointer()->AddNewDetector(fCalorimeterSD.Get());
379 SetSensitiveDetector(fLogicAbsorber, fCalorimeterSD.Get());
380
381 // Construct the field creator - this will register the field it creates
382 if (!fEmFieldSetup.Get()) {
383 auto fieldSetup
384 = new F01FieldSetup(G4ThreeVector( 0.0, 0.0, 3.3*tesla ),
386 G4AutoDelete::Register(fieldSetup); // Kernel will delete the F01FieldSetup
387 fEmFieldSetup.Put(fieldSetup);
388 }
389}
G4Cache< F01FieldSetup * > fEmFieldSetup
G4Cache< F01CalorimeterSD * > fCalorimeterSD

◆ PrintCalorParameters()

void F01DetectorConstruction::PrintCalorParameters ( )

Definition at line 265 of file F01DetectorConstruction.cc.

266{
267 G4cout << "\n The WORLD is made of "
268 << fWorldSizeZ/mm << "mm of " << fWorldMaterial->GetName();
269 G4cout << ", the transverse size (R) of the world is "
270 << fWorldSizeR/mm << " mm. " << G4endl;
271 G4cout << " The ABSORBER is made of "
272 << fAbsorberThickness/mm << "mm of " << fAbsorberMaterial->GetName();
273 G4cout << ", the transverse size (R) is " << fAbsorberRadius/mm
274 << " mm. " << G4endl;
275 G4cout << " Z position of the (middle of the) absorber "
276 << fZAbsorber/mm << " mm." << G4endl;
277 G4cout << G4endl;
278}

◆ GetWorldMaterial()

G4Material * F01DetectorConstruction::GetWorldMaterial ( )
inline

Definition at line 83 of file F01DetectorConstruction.hh.

83{return fWorldMaterial;}

◆ GetWorldSizeZ()

G4double F01DetectorConstruction::GetWorldSizeZ ( )
inline

Definition at line 84 of file F01DetectorConstruction.hh.

84{return fWorldSizeZ;}

◆ GetWorldSizeR()

G4double F01DetectorConstruction::GetWorldSizeR ( )
inline

Definition at line 85 of file F01DetectorConstruction.hh.

85{return fWorldSizeR;}

◆ GetAbsorberZpos()

G4double F01DetectorConstruction::GetAbsorberZpos ( )
inline

Definition at line 87 of file F01DetectorConstruction.hh.

87{return fZAbsorber;}

◆ GetZStartAbs()

G4double F01DetectorConstruction::GetZStartAbs ( )
inline

Definition at line 88 of file F01DetectorConstruction.hh.

◆ GetZEndAbs()

G4double F01DetectorConstruction::GetZEndAbs ( )
inline

Definition at line 89 of file F01DetectorConstruction.hh.

◆ GetAbsorberMaterial()

G4Material * F01DetectorConstruction::GetAbsorberMaterial ( )
inline

Definition at line 91 of file F01DetectorConstruction.hh.

91{return fAbsorberMaterial;}

◆ GetAbsorberThickness()

G4double F01DetectorConstruction::GetAbsorberThickness ( )
inline

Definition at line 92 of file F01DetectorConstruction.hh.

92{return fAbsorberThickness;}

◆ GetAbsorberRadius()

G4double F01DetectorConstruction::GetAbsorberRadius ( )
inline

Definition at line 93 of file F01DetectorConstruction.hh.

93{return fAbsorberRadius;}

◆ GetPhysiWorld()

const G4VPhysicalVolume * F01DetectorConstruction::GetPhysiWorld ( )
inline

Definition at line 95 of file F01DetectorConstruction.hh.

95{return fPhysiWorld;}

◆ GetAbsorber()

const G4VPhysicalVolume * F01DetectorConstruction::GetAbsorber ( )
inline

Definition at line 96 of file F01DetectorConstruction.hh.

96{return fPhysiAbsorber;}

◆ GetLogicalAbsorber()

G4LogicalVolume * F01DetectorConstruction::GetLogicalAbsorber ( )
inline

Definition at line 97 of file F01DetectorConstruction.hh.

97{return fLogicAbsorber;}

◆ SetUseFSALstepper()

void F01DetectorConstruction::SetUseFSALstepper ( G4bool  val)
inline

Definition at line 99 of file F01DetectorConstruction.hh.

99{ fUseFSALstepper = val; }

◆ AreUsingFSALstepper()

G4bool F01DetectorConstruction::AreUsingFSALstepper ( )
inline

Definition at line 100 of file F01DetectorConstruction.hh.

100{ return fUseFSALstepper; }

◆ DefineMaterials()

void F01DetectorConstruction::DefineMaterials ( )
private

Definition at line 87 of file F01DetectorConstruction.cc.

88{
89 //This function illustrates the possible ways to define materials
90
91 G4String name, symbol; // a=mass of a mole;
92 G4double a, z, density; // z=mean number of protons;
93 G4int nel;
94 G4int ncomponents;
95 G4double fractionmass, pressure, temperature;
96
97 //
98 // define Elements
99 //
100
101 a = 1.01*g/mole;
102 auto elH = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
103
104 a = 12.01*g/mole;
105 auto elC = new G4Element(name="Carbon", symbol="C", z=6., a);
106
107 a = 14.01*g/mole;
108 auto elN = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
109
110 a = 16.00*g/mole;
111 auto elO = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
112
113 a = 39.948*g/mole;
114 auto elAr = new G4Element(name="Argon", symbol="Ar", z=18., a);
115
116 //
117 // define simple materials
118 //
119
120 // Mylar
121
122 density = 1.39*g/cm3;
123 auto mylar = new G4Material(name="Mylar", density, nel=3);
124 mylar->AddElement(elO,2);
125 mylar->AddElement(elC,5);
126 mylar->AddElement(elH,4);
127
128 // Polypropelene
129
130 auto CH2 = new G4Material ("Polypropelene" , 0.91*g/cm3, 2);
131 CH2->AddElement(elH,2);
132 CH2->AddElement(elC,1);
133
134 // Krypton as detector gas, STP
135
136 density = 3.700*mg/cm3;
137 a = 83.80*g/mole;
138 auto Kr = new G4Material(name="Kr",z=36., a, density );
139
140 // Dry air (average composition)
141
142 density = 1.7836*mg/cm3; // STP
143 auto argon = new G4Material(name="Argon" , density, ncomponents=1);
144 argon->AddElement(elAr, 1);
145
146 density = 1.25053*mg/cm3; // STP
147 auto nitrogen = new G4Material(name="N2" , density, ncomponents=1);
148 nitrogen->AddElement(elN, 2);
149
150 density = 1.4289*mg/cm3; // STP
151 auto oxygen = new G4Material(name="O2" , density, ncomponents=1);
152 oxygen->AddElement(elO, 2);
153
154 density = 1.2928*mg/cm3; // STP
155 density *= 1.0e-8; // pumped vacuum
156
157 temperature = STP_Temperature;
158 pressure = 1.0e-8*STP_Pressure;
159
160 auto air = new G4Material(name="Air" , density, ncomponents=3,
161 kStateGas,temperature,pressure);
162 air->AddMaterial( nitrogen, fractionmass = 0.7557 );
163 air->AddMaterial( oxygen, fractionmass = 0.2315 );
164
165 air->AddMaterial( argon, fractionmass = 0.0128 );
166
167 // Xenon as detector gas, STP
168
169 density = 5.858*mg/cm3;
170 a = 131.29*g/mole;
171 auto Xe = new G4Material(name="Xenon",z=54., a, density );
172
173 // Carbon dioxide, STP
174
175 density = 1.842*mg/cm3;
176 auto CarbonDioxide = new G4Material(name="CO2", density, nel=2);
177 CarbonDioxide->AddElement(elC,1);
178 CarbonDioxide->AddElement(elO,2);
179
180 // 80% Xe + 20% CO2, STP
181
182 density = 5.0818*mg/cm3;
183 auto Xe20CO2 = new G4Material(name="Xe20CO2", density, ncomponents=2);
184 Xe20CO2->AddMaterial( Xe, fractionmass = 0.922 );
185 Xe20CO2->AddMaterial( CarbonDioxide, fractionmass = 0.078 );
186
187 // 80% Kr + 20% CO2, STP
188
189 density = 3.601*mg/cm3;
190 auto Kr20CO2 = new G4Material(name="Kr20CO2", density, ncomponents=2);
191 Kr20CO2->AddMaterial( Kr, fractionmass = 0.89 );
192 Kr20CO2->AddMaterial( CarbonDioxide, fractionmass = 0.11 );
193
194 // Print material table -- silence it for now
195 // G4cout << *(G4Material::GetMaterialTable()) << G4endl;
196 G4cout << "F01DetectorConstruction: not printing material table - to see it edit the source."
197 << G4endl;
198
199 // default materials of the calorimeter
200
201 fAbsorberMaterial = air; // Kr20CO2; // XeCO2CF4;
202
203 fWorldMaterial = air;
204}
std::vector< ExP01TrackerHit * > a

◆ ComputeCalorParameters()

void F01DetectorConstruction::ComputeCalorParameters ( )
inlineprivate

Definition at line 139 of file F01DetectorConstruction.hh.

140{
141 // Compute derived parameters of the calorimeter
142
145
146 G4cout << "-- Calorimeter Absorber z-coords: Start= "
147 << fZStartAbs << " End= " << fZEndAbs << G4endl;
148}

◆ ConstructCalorimeter()

G4VPhysicalVolume * F01DetectorConstruction::ConstructCalorimeter ( )
private

Definition at line 208 of file F01DetectorConstruction.cc.

209{
210 // Cleanup old geometry
211
212 if (fPhysiWorld)
213 {
214 G4GeometryManager::GetInstance()->OpenGeometry();
215 G4PhysicalVolumeStore::GetInstance()->Clean();
216 G4LogicalVolumeStore::GetInstance()->Clean();
217 G4SolidStore::GetInstance()->Clean();
218 }
219
220 // complete the Calor parameters definition and Print
221
224
225 // World
226
227 fSolidWorld = new G4Tubs("World", // its name
228 0.,fWorldSizeR,fWorldSizeZ/2.,0.,twopi);// its size
229
230 fLogicWorld = new G4LogicalVolume(fSolidWorld, // its solid
231 fWorldMaterial, // its material
232 "World"); // its name
233
234 fPhysiWorld = new G4PVPlacement(nullptr, // no rotation
235 G4ThreeVector(), // at (0,0,0)
236 "World", // its name
237 fLogicWorld, // its logical volume
238 nullptr, // its mother volume
239 false, // no boolean op.
240 0); // copy number
241 // Absorber
242
243 fSolidAbsorber = new G4Tubs("Absorber", 1.0*mm,
246 0.0,twopi);
247
250 "Absorber");
251
252 fPhysiAbsorber = new G4PVPlacement(nullptr,
253 G4ThreeVector(0.,0.,fZAbsorber),
254 "Absorber",
257 false,
258 0);
259
260 return fPhysiWorld;
261}

Member Data Documentation

◆ fDetectorMessenger

F01DetectorMessenger* F01DetectorConstruction::fDetectorMessenger = nullptr
private

Definition at line 104 of file F01DetectorConstruction.hh.

◆ fCalorimeterSD

G4Cache<F01CalorimeterSD*> F01DetectorConstruction::fCalorimeterSD
private

Definition at line 105 of file F01DetectorConstruction.hh.

◆ fEmFieldSetup

G4Cache<F01FieldSetup*> F01DetectorConstruction::fEmFieldSetup
private

Definition at line 106 of file F01DetectorConstruction.hh.

◆ fSolidWorld

G4Tubs* F01DetectorConstruction::fSolidWorld = nullptr
private

Definition at line 108 of file F01DetectorConstruction.hh.

◆ fLogicWorld

G4LogicalVolume* F01DetectorConstruction::fLogicWorld = nullptr
private

Definition at line 109 of file F01DetectorConstruction.hh.

◆ fPhysiWorld

G4VPhysicalVolume* F01DetectorConstruction::fPhysiWorld = nullptr
private

Definition at line 110 of file F01DetectorConstruction.hh.

◆ fSolidAbsorber

G4Tubs* F01DetectorConstruction::fSolidAbsorber = nullptr
private

Definition at line 112 of file F01DetectorConstruction.hh.

◆ fLogicAbsorber

G4LogicalVolume* F01DetectorConstruction::fLogicAbsorber = nullptr
private

Definition at line 113 of file F01DetectorConstruction.hh.

◆ fPhysiAbsorber

G4VPhysicalVolume* F01DetectorConstruction::fPhysiAbsorber = nullptr
private

Definition at line 114 of file F01DetectorConstruction.hh.

◆ fAbsorberMaterial

G4Material* F01DetectorConstruction::fAbsorberMaterial = nullptr
private

Definition at line 116 of file F01DetectorConstruction.hh.

◆ fAbsorberThickness

G4double F01DetectorConstruction::fAbsorberThickness = 1.0 * CLHEP::mm
private

Definition at line 117 of file F01DetectorConstruction.hh.

◆ fAbsorberRadius

G4double F01DetectorConstruction::fAbsorberRadius = 20000. * CLHEP::mm
private

Definition at line 118 of file F01DetectorConstruction.hh.

◆ fZAbsorber

G4double F01DetectorConstruction::fZAbsorber = 21990. * CLHEP::mm
private

Definition at line 120 of file F01DetectorConstruction.hh.

◆ fZStartAbs

G4double F01DetectorConstruction::fZStartAbs = 0.
private

Definition at line 121 of file F01DetectorConstruction.hh.

◆ fZEndAbs

G4double F01DetectorConstruction::fZEndAbs = 0.
private

Definition at line 122 of file F01DetectorConstruction.hh.

◆ fWorldMaterial

G4Material* F01DetectorConstruction::fWorldMaterial = nullptr
private

Definition at line 124 of file F01DetectorConstruction.hh.

◆ fWorldSizeR

G4double F01DetectorConstruction::fWorldSizeR = 22000. * CLHEP::mm
private

Definition at line 125 of file F01DetectorConstruction.hh.

◆ fWorldSizeZ

G4double F01DetectorConstruction::fWorldSizeZ = 44000. * CLHEP::mm
private

Definition at line 126 of file F01DetectorConstruction.hh.

◆ fUseFSALstepper

G4bool F01DetectorConstruction::fUseFSALstepper = false
private

Definition at line 128 of file F01DetectorConstruction.hh.


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

Applications | User Support | Publications | Collaboration