VMC Examples Version 6.8
Loading...
Searching...
No Matches
Ex03DetectorConstructionOld Class Reference

The old detector construction (via VMC functions). More...

#include <Ex03DetectorConstructionOld.h>

Inheritance diagram for Ex03DetectorConstructionOld:

Public Member Functions

 Ex03DetectorConstructionOld ()
virtual ~Ex03DetectorConstructionOld ()
void ConstructMaterials ()
void ConstructGeometry (Bool_t useReflection=kFALSE)
void PrintCalorParameters ()
void SetNbOfLayers (Int_t value)
void SetDefaultMaterial (const TString &materialName)
void SetAbsorberMaterial (const TString &materialName)
void SetGapMaterial (const TString &materialName)
void SetCalorSizeYZ (Double_t value)
void SetAbsorberThickness (Double_t value)
void SetGapThickness (Double_t value)
Int_t GetNbOfLayers () const
Double_t GetWorldSizeX () const
Double_t GetWorldSizeYZ () const
Double_t GetCalorSizeYZ () const
Double_t GetCalorThickness () const
Double_t GetAbsorberThickness () const
Double_t GetGapThickness () const
 Ex03DetectorConstructionOld ()
virtual ~Ex03DetectorConstructionOld ()
void ConstructMaterials ()
void ConstructGeometry (Bool_t useReflection=kFALSE)
void PrintCalorParameters ()
void SetNbOfLayers (Int_t value)
void SetDefaultMaterial (const TString &materialName)
void SetAbsorberMaterial (const TString &materialName)
void SetGapMaterial (const TString &materialName)
void SetCalorSizeYZ (Double_t value)
void SetAbsorberThickness (Double_t value)
void SetGapThickness (Double_t value)
Int_t GetNbOfLayers () const
Double_t GetWorldSizeX () const
Double_t GetWorldSizeYZ () const
Double_t GetCalorSizeYZ () const
Double_t GetCalorThickness () const
Double_t GetAbsorberThickness () const
Double_t GetGapThickness () const
 Ex03DetectorConstructionOld ()
virtual ~Ex03DetectorConstructionOld ()
void ConstructMaterials ()
void ConstructGeometry ()
void PrintCalorParameters ()
void SetNbOfLayers (Int_t value)
void SetDefaultMaterial (const TString &materialName)
void SetAbsorberMaterial (const TString &materialName)
void SetGapMaterial (const TString &materialName)
void SetCalorSizeYZ (Double_t value)
void SetAbsorberThickness (Double_t value)
void SetGapThickness (Double_t value)
Int_t GetNbOfLayers () const
Double_t GetWorldSizeX () const
Double_t GetWorldSizeYZ () const
Double_t GetCalorSizeYZ () const
Double_t GetCalorThickness () const
Double_t GetAbsorberThickness () const
Double_t GetGapThickness () const

Private Member Functions

void ComputeCalorParameters ()
void ComputeCalorParameters ()
void ComputeCalorParameters ()

Private Attributes

Int_t fNbOfLayers
 The number of calorimeter layers.
Double_t fWorldSizeX
 The world size x component.
Double_t fWorldSizeYZ
 The world size y,z component.
Double_t fCalorSizeYZ
 The calorimeter size y,z component.
Double_t fCalorThickness
 The calorimeter thickness.
Double_t fLayerThickness
 The calorimeter layer thickness.
Double_t fAbsorberThickness
 The absorber thickness.
Double_t fGapThickness
 The gap thickness.
TString fDefaultMaterial
 The default material name.
TString fAbsorberMaterial
 The absorber material name.
TString fGapMaterial
 The gap material name.

Detailed Description

The old detector construction (via VMC functions).

Date
06/03/2003
Author
I. Hrivnacova; IPN, Orsay

Definition at line 34 of file Ex03DetectorConstructionOld.h.

Constructor & Destructor Documentation

◆ Ex03DetectorConstructionOld() [1/3]

Ex03DetectorConstructionOld::Ex03DetectorConstructionOld ( )

Default constuctor

Definition at line 40 of file Ex03DetectorConstructionOld.cxx.

41 : TObject(),
42 fNbOfLayers(0),
43 fWorldSizeX(0.),
44 fWorldSizeYZ(0.),
45 fCalorSizeYZ(0.),
49 fGapThickness(0.),
50 fDefaultMaterial("Galactic"),
51 fAbsorberMaterial("Lead"),
52 fGapMaterial("liquidArgon")
53{
54 /// Default constuctor
55
56 // default parameter values of the calorimeter (in cm)
58 fGapThickness = 0.5;
59 fNbOfLayers = 10;
60 fCalorSizeYZ = 10.;
61
63}
Int_t fNbOfLayers
The number of calorimeter layers.
TString fGapMaterial
The gap material name.
Double_t fWorldSizeYZ
The world size y,z component.
Double_t fCalorSizeYZ
The calorimeter size y,z component.
TString fDefaultMaterial
The default material name.
TString fAbsorberMaterial
The absorber material name.
Double_t fWorldSizeX
The world size x component.
Double_t fAbsorberThickness
The absorber thickness.
Double_t fCalorThickness
The calorimeter thickness.
Double_t fLayerThickness
The calorimeter layer thickness.
Double_t fGapThickness
The gap thickness.

◆ ~Ex03DetectorConstructionOld() [1/3]

Ex03DetectorConstructionOld::~Ex03DetectorConstructionOld ( )
virtual

Destructor

Definition at line 66 of file Ex03DetectorConstructionOld.cxx.

67{
68 /// Destructor
69}

◆ Ex03DetectorConstructionOld() [2/3]

Ex03DetectorConstructionOld::Ex03DetectorConstructionOld ( )

◆ ~Ex03DetectorConstructionOld() [2/3]

virtual Ex03DetectorConstructionOld::~Ex03DetectorConstructionOld ( )
virtual

◆ Ex03DetectorConstructionOld() [3/3]

Ex03DetectorConstructionOld::Ex03DetectorConstructionOld ( )

◆ ~Ex03DetectorConstructionOld() [3/3]

virtual Ex03DetectorConstructionOld::~Ex03DetectorConstructionOld ( )
virtual

Member Function Documentation

◆ ConstructMaterials() [1/3]

void Ex03DetectorConstructionOld::ConstructMaterials ( )

Construct materials using VMC functions

Definition at line 92 of file Ex03DetectorConstructionOld.cxx.

93{
94 /// Construct materials using VMC functions
95
96 //
97 // Tracking medias (defaut parameters)
98 //
99
100 Int_t ifield = 2; // User defined magnetic field
101 Double_t fieldm = 10.; // Maximum field value (in kiloGauss)
102 Double_t epsil = .001; // Tracking precision,
103 Double_t stemax = -0.01; // Maximum displacement for multiple scat
104 Double_t tmaxfd = -20.; // Maximum angle due to field deflection
105 Double_t deemax = -.3; // Maximum fractional energy loss, DLS
106 Double_t stmin = -.8;
107
108 // stemax = 1.0; // Maximum step limit
109
110 //--------- Material definition ---------
111
112 TString name;
113 Double_t a;
114 Double_t z;
115 Double_t density;
116 Double_t radl;
117 Double_t absl;
118 Float_t* ubuf = 0;
119
120 //
121 // define simple materials
122 //
123
124 name = "Aluminium";
125 a = 26.98;
126 z = 13.;
127 density = 2.700;
128 radl = 8.893;
129 absl = 0.1;
130 Int_t imat;
131 gMC->Material(imat, name.Data(), a, z, density, radl, absl, ubuf, 0);
132 Int_t mediumId;
133 gMC->Medium(mediumId, name.Data(), imat, 0, ifield, fieldm, tmaxfd, stemax,
134 deemax, epsil, stmin, ubuf, 0);
135
136 name = "liquidArgon";
137 a = 39.95;
138 z = 18.;
139 density = 1.390;
140 radl = 14.064;
141 absl = 0.1;
142 gMC->Material(imat, name.Data(), a, z, density, radl, absl, ubuf, 0);
143 gMC->Medium(mediumId, name.Data(), imat, 0, ifield, fieldm, tmaxfd, stemax,
144 deemax, epsil, stmin, ubuf, 0);
145
146 name = "Lead";
147 a = 207.19;
148 z = 82.;
149 density = 11.35;
150 radl = 0.5612;
151 absl = 0.1;
152 gMC->Material(imat, name.Data(), a, z, density, radl, absl, ubuf, 0);
153 gMC->Medium(mediumId, name.Data(), imat, 0, ifield, fieldm, tmaxfd, stemax,
154 deemax, epsil, stmin, ubuf, 0);
155
156 //
157 // define a material from elements. case 1: chemical molecule
158 //
159
160 name = "Water";
161 Double_t aw2[2] = { 1.01, 16.00 };
162 Double_t zw2[2] = { 1.0, 8.0 };
163 Double_t ww2[2] = { 2., 1. };
164 density = 1.000;
165 gMC->Mixture(imat, name.Data(), aw2, zw2, density, -2, ww2);
166 gMC->Medium(mediumId, name.Data(), imat, 0, ifield, fieldm, tmaxfd, stemax,
167 deemax, epsil, stmin, ubuf, 0);
168
169 name = "Scintillator";
170 Double_t as2[2] = { 1.01, 12.01 };
171 Double_t zs2[2] = { 1.0, 6.0 };
172 Double_t ws2[2] = { 10., 9. };
173 density = 1.032;
174 gMC->Mixture(imat, name.Data(), as2, zs2, density, -2, ws2);
175 gMC->Medium(mediumId, name.Data(), imat, 0, ifield, fieldm, tmaxfd, stemax,
176 deemax, epsil, stmin, ubuf, 0);
177
178 name = "Mylar";
179 Double_t am2[3] = { 12.01, 1.01, 16.00 };
180 Double_t zm2[3] = { 6.0, 1.0, 8.0 };
181 Double_t wm2[3] = { 10., 8., 4. };
182 density = 1.397;
183 gMC->Mixture(imat, name.Data(), am2, zm2, density, -3, wm2);
184 gMC->Medium(mediumId, name.Data(), imat, 0, ifield, fieldm, tmaxfd, stemax,
185 deemax, epsil, stmin, ubuf, 0);
186
187 name = "quartz";
188 Double_t aq2[2] = { 28.09, 16.00 };
189 Double_t zq2[2] = { 14.0, 8.0 };
190 Double_t wq2[2] = { 1., 2. };
191 density = 2.200;
192 gMC->Mixture(imat, name.Data(), aq2, zq2, density, -2, wq2);
193 gMC->Medium(mediumId, name.Data(), imat, 0, ifield, fieldm, tmaxfd, stemax,
194 deemax, epsil, stmin, ubuf, 0);
195
196 //
197 // define a material from elements. case 2: mixture by fractional mass
198 //
199
200 name = "Air";
201 Double_t aa2[2] = { 14.01, 16.00 };
202 Double_t za2[2] = { 7.0, 8.0 };
203 Double_t wa2[2] = { 0.7, 0.3 };
204 density = 1.29e-03;
205 gMC->Mixture(imat, name.Data(), aa2, za2, density, 2, wa2);
206 gMC->Medium(mediumId, name.Data(), imat, 0, ifield, fieldm, tmaxfd, stemax,
207 deemax, epsil, stmin, ubuf, 0);
208
209 //
210 // !! NOT SUPPORTED BY VMC
211 //
212 // define a material from elements and/or others materials (mixture of
213 // mixtures)
214 //
215 // density = 0.200*g/cm3;
216 // G4Material* Aerog = new G4Material(name="Aerogel", density, ncomponents=3);
217 // Aerog->AddMaterial(SiO2, fractionmass=62.5*perCent);
218 // Aerog->AddMaterial(H2O , fractionmass=37.4*perCent);
219 // Aerog->AddElement (C , fractionmass= 0.1*perCent);
220
221 //
222 // !! NOT SUPPORTED BY VMC
223 //
224 // examples of gas in non STP conditions
225 //
226 //
227 // density = 27.*mg/cm3;
228 // pressure = 50.*atmosphere;
229 // temperature = 325.*kelvin;
230 // G4Material* CO2 = new G4Material(name="CarbonicGas", density,
231 // ncomponents=2,
232 // kStateGas,temperature,pressure);
233 // CO2->AddElement(C, natoms=1);
234 // CO2->AddElement(O, natoms=2);
235 //
236 //
237 // !! NOT SUPPORTED BY VMC
238 //
239 // density = 0.3*mg/cm3;
240 // pressure = 2.*atmosphere;
241 // temperature = 500.*kelvin;
242 // G4Material* steam = new G4Material(name="WaterSteam", density,
243 // ncomponents=1,
244 // kStateGas,temperature,pressure);
245 // steam->AddMaterial(H2O, fractionmass=1.);
246
247 name = "Galactic";
248 a = 1.e-16;
249 z = 1.e-16;
250 density = 1.e-16;
251 radl = 1.e16;
252 absl = 1.e16; //??
253 gMC->Material(imat, name.Data(), a, z, density, radl, absl, ubuf, 0);
254 gMC->Medium(mediumId, name.Data(), imat, 0, ifield, fieldm, tmaxfd, stemax,
255 deemax, epsil, stmin, ubuf, 0);
256}

◆ ConstructGeometry() [1/3]

void Ex03DetectorConstructionOld::ConstructGeometry ( Bool_t useReflection = kFALSE)

Construct volumes using VMC functions. In the optional mixed-geometry test, add the reflected sensitive placements directly with TGeo.

Parameters
useReflectionEnable the mixed VMC/ROOT reflected-volume test

Definition at line 259 of file Ex03DetectorConstructionOld.cxx.

260{
261 /// Construct volumes using VMC functions. In the optional mixed-geometry
262 /// test, add the reflected sensitive placements directly with TGeo.
263 /// \param useReflection Enable the mixed VMC/ROOT reflected-volume test
264
265 // Complete the Calor parameters definition
267
268 //
269 // World
270 //
271
272 Double_t world[3];
273 world[0] = fWorldSizeX / 2.;
274 world[1] = fWorldSizeYZ / 2.;
275 world[2] = fWorldSizeYZ / 2.;
276 gMC->Gsvolu("WRLD", "BOX", gMC->MediumId(fDefaultMaterial.Data()), world, 3);
277
278 //
279 // Calorimeter
280 //
281 if (fCalorThickness > 0.) {
282
283 Double_t calo[3];
284 calo[0] = fCalorThickness / 2.;
285 calo[1] = fCalorSizeYZ / 2.;
286 calo[2] = fCalorSizeYZ / 2.;
287 gMC->Gsvolu("CALO", "BOX", gMC->MediumId(fDefaultMaterial.Data()), calo, 3);
288
289 Double_t posX = 0.;
290 Double_t posY = 0.;
291 Double_t posZ = 0.;
292 gMC->Gspos("CALO", 1, "WRLD", posX, posY, posZ, 0, "ONLY");
293
294 // Divide calorimeter along X axis to place layers
295 //
296 gMC->Gsdvn("CELL", "CALO", fNbOfLayers, 1);
297
298 //
299 // Layer
300 //
301 Double_t layer[3];
302 layer[0] = fLayerThickness / 2.;
303 layer[1] = fCalorSizeYZ / 2.;
304 layer[2] = fCalorSizeYZ / 2.;
305 gMC->Gsvolu(
306 "LAYE", "BOX", gMC->MediumId(fDefaultMaterial.Data()), layer, 3);
307
308 posX = 0.;
309 posY = 0.;
310 posZ = 0.;
311 gMC->Gspos("LAYE", 1, "CELL", posX, posY, posZ, 0, "ONLY");
312 }
313
314 //
315 // Absorber
316 //
317
318 if (fAbsorberThickness > 0.) {
319
320 Double_t abso[3];
321 abso[0] = fAbsorberThickness / (useReflection ? 4. : 2.);
322 abso[1] = fCalorSizeYZ / 2.;
323 abso[2] = fCalorSizeYZ / 2.;
324 gMC->Gsvolu(
325 "ABSO", "BOX", gMC->MediumId(fAbsorberMaterial.Data()), abso, 3);
326
327 Double_t posX = -fGapThickness / 2.;
328 Double_t posY = 0.;
329 Double_t posZ = 0.;
330 if (useReflection) {
331 // VMC defines the ordinary placement; ROOT adds its reflected copy.
332 gMC->Gspos("ABSO", 1, "LAYE", posX + abso[0], posY, posZ, 0, "ONLY");
333 auto volume = gGeoManager ? gGeoManager->GetVolume("ABSO") : nullptr;
334 auto mother = gGeoManager ? gGeoManager->GetVolume("LAYE") : nullptr;
335 if (!volume || !mother || gGeoManager->IsClosed()) {
336 Fatal("ConstructGeometry",
337 "Reflected VMC geometry requires geomVMC+RootToGeant4");
338 return;
339 }
340 auto reflection = new TGeoHMatrix();
341 reflection->ReflectX(kTRUE);
342 reflection->SetDx(posX - abso[0]);
343 mother->AddNode(volume, 2, reflection);
344 }
345 else {
346 gMC->Gspos("ABSO", 1, "LAYE", posX, posY, posZ, 0, "ONLY");
347 }
348 }
349
350 //
351 // Gap
352 //
353
354 if (fGapThickness > 0.) {
355
356 Double_t gap[3];
357 gap[0] = fGapThickness / (useReflection ? 4. : 2.);
358 gap[1] = fCalorSizeYZ / 2.;
359 gap[2] = fCalorSizeYZ / 2.;
360 gMC->Gsvolu("GAPX", "BOX", gMC->MediumId(fGapMaterial.Data()), gap, 3);
361
362 Double_t posX = fAbsorberThickness / 2.;
363 Double_t posY = 0.;
364 Double_t posZ = 0.;
365 if (useReflection) {
366 // VMC defines the ordinary placement; ROOT adds its reflected copy.
367 gMC->Gspos("GAPX", 1, "LAYE", posX + gap[0], posY, posZ, 0, "ONLY");
368 auto volume = gGeoManager ? gGeoManager->GetVolume("GAPX") : nullptr;
369 auto mother = gGeoManager ? gGeoManager->GetVolume("LAYE") : nullptr;
370 if (!volume || !mother || gGeoManager->IsClosed()) {
371 Fatal("ConstructGeometry",
372 "Reflected VMC geometry requires geomVMC+RootToGeant4");
373 return;
374 }
375 auto reflection = new TGeoHMatrix();
376 reflection->ReflectX(kTRUE);
377 reflection->SetDx(posX - gap[0]);
378 mother->AddNode(volume, 2, reflection);
379 }
380 else {
381 gMC->Gspos("GAPX", 1, "LAYE", posX, posY, posZ, 0, "ONLY");
382 }
383 }
384
385 /*
386 //
387 // Visualization attributes
388 //
389 logicWorld->SetVisAttributes (G4VisAttributes::Invisible);
390 G4VisAttributes* simpleBoxVisAtt= new
391 G4VisAttributes(G4Colour(1.0,1.0,1.0));
392 simpleBoxVisAtt->SetVisibility(true);
393 logicCalor->SetVisAttributes(simpleBoxVisAtt);
394 */
395
397}

◆ PrintCalorParameters() [1/3]

void Ex03DetectorConstructionOld::PrintCalorParameters ( )

Print calorimeter parameters

Definition at line 400 of file Ex03DetectorConstructionOld.cxx.

401{
402 /// Print calorimeter parameters
403
404 cout << "\n------------------------------------------------------------"
405 << "\n---> The calorimeter is " << fNbOfLayers << " layers of: [ "
406 << fAbsorberThickness << "cm of " << fAbsorberMaterial << " + "
407 << fGapThickness << "cm of " << fGapMaterial << " ] "
408 << "\n------------------------------------------------------------\n";
409}

◆ SetNbOfLayers() [1/3]

void Ex03DetectorConstructionOld::SetNbOfLayers ( Int_t value)

Set the number of layers.

Parameters
valueThe new number of calorimeter layers

Definition at line 412 of file Ex03DetectorConstructionOld.cxx.

413{
414 /// Set the number of layers.
415 /// \param value The new number of calorimeter layers
416
417 fNbOfLayers = value;
418}

◆ SetDefaultMaterial() [1/3]

void Ex03DetectorConstructionOld::SetDefaultMaterial ( const TString & materialName)

Set default material

Parameters
materialNameThe new default material name.

Definition at line 421 of file Ex03DetectorConstructionOld.cxx.

423{
424 /// Set default material
425 /// \param materialName The new default material name.
426
427 fDefaultMaterial = materialName;
428}

◆ SetAbsorberMaterial() [1/3]

void Ex03DetectorConstructionOld::SetAbsorberMaterial ( const TString & materialName)

Set absorer material

Parameters
materialNameThe new absorber material name.

Definition at line 431 of file Ex03DetectorConstructionOld.cxx.

433{
434 /// Set absorer material
435 /// \param materialName The new absorber material name.
436
437 fAbsorberMaterial = materialName;
438}

◆ SetGapMaterial() [1/3]

void Ex03DetectorConstructionOld::SetGapMaterial ( const TString & materialName)

Set gap material

Parameters
materialNameThe new gap material name.

Definition at line 441 of file Ex03DetectorConstructionOld.cxx.

442{
443 /// Set gap material
444 /// \param materialName The new gap material name.
445
446 fGapMaterial = materialName;
447}

◆ SetCalorSizeYZ() [1/3]

void Ex03DetectorConstructionOld::SetCalorSizeYZ ( Double_t value)

Change the transverse size and recompute the calorimeter parameters

Parameters
valueThe new calorimeter tranverse size

Definition at line 450 of file Ex03DetectorConstructionOld.cxx.

451{
452 /// Change the transverse size and recompute the calorimeter parameters
453 /// \param value The new calorimeter tranverse size
454
455 fCalorSizeYZ = value;
456}

◆ SetAbsorberThickness() [1/3]

void Ex03DetectorConstructionOld::SetAbsorberThickness ( Double_t value)

Change the absorber thickness and recompute the calorimeter parameters

Parameters
valueThe new absorber thickness

Definition at line 459 of file Ex03DetectorConstructionOld.cxx.

460{
461 /// Change the absorber thickness and recompute the calorimeter parameters
462 /// \param value The new absorber thickness
463
464 fAbsorberThickness = value;
465}

◆ SetGapThickness() [1/3]

void Ex03DetectorConstructionOld::SetGapThickness ( Double_t value)

Change the gap thickness and recompute the calorimeter parameters

Parameters
valueThe new gap thickness

Definition at line 468 of file Ex03DetectorConstructionOld.cxx.

469{
470 /// Change the gap thickness and recompute the calorimeter parameters
471 /// \param value The new gap thickness
472
473 fGapThickness = value;
474}

◆ GetNbOfLayers() [1/3]

Int_t Ex03DetectorConstructionOld::GetNbOfLayers ( ) const
inline
Returns
The number of calorimeter layers

Definition at line 59 of file Ex03DetectorConstructionOld.h.

59{ return fNbOfLayers; }

◆ GetWorldSizeX() [1/3]

Double_t Ex03DetectorConstructionOld::GetWorldSizeX ( ) const
inline
Returns
The world size x component

Definition at line 62 of file Ex03DetectorConstructionOld.h.

62{ return fWorldSizeX; }

◆ GetWorldSizeYZ() [1/3]

Double_t Ex03DetectorConstructionOld::GetWorldSizeYZ ( ) const
inline
Returns
The world size y,z component

Definition at line 65 of file Ex03DetectorConstructionOld.h.

65{ return fWorldSizeYZ; }

◆ GetCalorSizeYZ() [1/3]

Double_t Ex03DetectorConstructionOld::GetCalorSizeYZ ( ) const
inline
Returns
The calorimeter size y,z component

Definition at line 68 of file Ex03DetectorConstructionOld.h.

68{ return fCalorSizeYZ; }

◆ GetCalorThickness() [1/3]

Double_t Ex03DetectorConstructionOld::GetCalorThickness ( ) const
inline
Returns
The calorimeter thickness

Definition at line 71 of file Ex03DetectorConstructionOld.h.

71{ return fCalorThickness; }

◆ GetAbsorberThickness() [1/3]

Double_t Ex03DetectorConstructionOld::GetAbsorberThickness ( ) const
inline
Returns
The absorber thickness

Definition at line 74 of file Ex03DetectorConstructionOld.h.

74{ return fAbsorberThickness; }

◆ GetGapThickness() [1/3]

Double_t Ex03DetectorConstructionOld::GetGapThickness ( ) const
inline
Returns
The gap thickness

Definition at line 77 of file Ex03DetectorConstructionOld.h.

77{ return fGapThickness; }

◆ ComputeCalorParameters() [1/3]

void Ex03DetectorConstructionOld::ComputeCalorParameters ( )
private

Compute derived parameters of the calorimeter

Definition at line 76 of file Ex03DetectorConstructionOld.cxx.

77{
78 /// Compute derived parameters of the calorimeter
79
82
85}

◆ ConstructMaterials() [2/3]

void Ex03DetectorConstructionOld::ConstructMaterials ( )

◆ ConstructGeometry() [2/3]

void Ex03DetectorConstructionOld::ConstructGeometry ( Bool_t useReflection = kFALSE)

◆ PrintCalorParameters() [2/3]

void Ex03DetectorConstructionOld::PrintCalorParameters ( )

◆ SetNbOfLayers() [2/3]

void Ex03DetectorConstructionOld::SetNbOfLayers ( Int_t value)

◆ SetDefaultMaterial() [2/3]

void Ex03DetectorConstructionOld::SetDefaultMaterial ( const TString & materialName)

◆ SetAbsorberMaterial() [2/3]

void Ex03DetectorConstructionOld::SetAbsorberMaterial ( const TString & materialName)

◆ SetGapMaterial() [2/3]

void Ex03DetectorConstructionOld::SetGapMaterial ( const TString & materialName)

◆ SetCalorSizeYZ() [2/3]

void Ex03DetectorConstructionOld::SetCalorSizeYZ ( Double_t value)

◆ SetAbsorberThickness() [2/3]

void Ex03DetectorConstructionOld::SetAbsorberThickness ( Double_t value)

◆ SetGapThickness() [2/3]

void Ex03DetectorConstructionOld::SetGapThickness ( Double_t value)

◆ GetNbOfLayers() [2/3]

Int_t Ex03DetectorConstructionOld::GetNbOfLayers ( ) const
inline
Returns
The number of calorimeter layers

Definition at line 59 of file Ex03DetectorConstructionOld.h.

59{ return fNbOfLayers; }

◆ GetWorldSizeX() [2/3]

Double_t Ex03DetectorConstructionOld::GetWorldSizeX ( ) const
inline
Returns
The world size x component

Definition at line 62 of file Ex03DetectorConstructionOld.h.

62{ return fWorldSizeX; }

◆ GetWorldSizeYZ() [2/3]

Double_t Ex03DetectorConstructionOld::GetWorldSizeYZ ( ) const
inline
Returns
The world size y,z component

Definition at line 65 of file Ex03DetectorConstructionOld.h.

65{ return fWorldSizeYZ; }

◆ GetCalorSizeYZ() [2/3]

Double_t Ex03DetectorConstructionOld::GetCalorSizeYZ ( ) const
inline
Returns
The calorimeter size y,z component

Definition at line 68 of file Ex03DetectorConstructionOld.h.

68{ return fCalorSizeYZ; }

◆ GetCalorThickness() [2/3]

Double_t Ex03DetectorConstructionOld::GetCalorThickness ( ) const
inline
Returns
The calorimeter thickness

Definition at line 71 of file Ex03DetectorConstructionOld.h.

71{ return fCalorThickness; }

◆ GetAbsorberThickness() [2/3]

Double_t Ex03DetectorConstructionOld::GetAbsorberThickness ( ) const
inline
Returns
The absorber thickness

Definition at line 74 of file Ex03DetectorConstructionOld.h.

74{ return fAbsorberThickness; }

◆ GetGapThickness() [2/3]

Double_t Ex03DetectorConstructionOld::GetGapThickness ( ) const
inline
Returns
The gap thickness

Definition at line 77 of file Ex03DetectorConstructionOld.h.

77{ return fGapThickness; }

◆ ComputeCalorParameters() [2/3]

void Ex03DetectorConstructionOld::ComputeCalorParameters ( )
private

◆ ConstructMaterials() [3/3]

void Ex03DetectorConstructionOld::ConstructMaterials ( )

◆ ConstructGeometry() [3/3]

void Ex03DetectorConstructionOld::ConstructGeometry ( )

Contruct volumes using VMC functions

Definition at line 256 of file Ex03DetectorConstructionOld.cxx.

257{
258 /// Contruct volumes using VMC functions
259
260 // Complete the Calor parameters definition
262
263 //
264 // World
265 //
266
267 Double_t world[3];
268 world[0] = fWorldSizeX / 2.;
269 world[1] = fWorldSizeYZ / 2.;
270 world[2] = fWorldSizeYZ / 2.;
271 gMC->Gsvolu("WRLD", "BOX", gMC->MediumId(fDefaultMaterial.Data()), world, 3);
272
273 //
274 // Calorimeter
275 //
276 if (fCalorThickness > 0.) {
277
278 Double_t calo[3];
279 calo[0] = fCalorThickness / 2.;
280 calo[1] = fCalorSizeYZ / 2.;
281 calo[2] = fCalorSizeYZ / 2.;
282 gMC->Gsvolu("CALO", "BOX", gMC->MediumId(fDefaultMaterial.Data()), calo, 3);
283
284 Double_t posX = 0.;
285 Double_t posY = 0.;
286 Double_t posZ = 0.;
287 gMC->Gspos("CALO", 1, "WRLD", posX, posY, posZ, 0, "ONLY");
288
289 // Divide calorimeter along X axis to place layers
290 //
291 gMC->Gsdvn("CELL", "CALO", fNbOfLayers, 1);
292
293 //
294 // Layer
295 //
296 Double_t layer[3];
297 layer[0] = fLayerThickness / 2.;
298 layer[1] = fCalorSizeYZ / 2.;
299 layer[2] = fCalorSizeYZ / 2.;
300 gMC->Gsvolu(
301 "LAYE", "BOX", gMC->MediumId(fDefaultMaterial.Data()), layer, 3);
302
303 posX = 0.;
304 posY = 0.;
305 posZ = 0.;
306 gMC->Gspos("LAYE", 1, "CELL", posX, posY, posZ, 0, "ONLY");
307 }
308
309 //
310 // Absorber
311 //
312
313 if (fAbsorberThickness > 0.) {
314
315 Double_t abso[3];
316 abso[0] = fAbsorberThickness / 2;
317 abso[1] = fCalorSizeYZ / 2.;
318 abso[2] = fCalorSizeYZ / 2.;
319 gMC->Gsvolu(
320 "ABSO", "BOX", gMC->MediumId(fAbsorberMaterial.Data()), abso, 3);
321
322 Double_t posX = -fGapThickness / 2.;
323 Double_t posY = 0.;
324 Double_t posZ = 0.;
325 gMC->Gspos("ABSO", 1, "LAYE", posX, posY, posZ, 0, "ONLY");
326 }
327
328 //
329 // Gap
330 //
331
332 if (fGapThickness > 0.) {
333
334 Double_t gap[3];
335 gap[0] = fGapThickness / 2;
336 gap[1] = fCalorSizeYZ / 2.;
337 gap[2] = fCalorSizeYZ / 2.;
338 gMC->Gsvolu("GAPX", "BOX", gMC->MediumId(fGapMaterial.Data()), gap, 3);
339
340 Double_t posX = fAbsorberThickness / 2.;
341 Double_t posY = 0.;
342 Double_t posZ = 0.;
343 gMC->Gspos("GAPX", 1, "LAYE", posX, posY, posZ, 0, "ONLY");
344 }
345
346 /*
347 //
348 // Visualization attributes
349 //
350 logicWorld->SetVisAttributes (G4VisAttributes::Invisible);
351 G4VisAttributes* simpleBoxVisAtt= new
352 G4VisAttributes(G4Colour(1.0,1.0,1.0));
353 simpleBoxVisAtt->SetVisibility(true);
354 logicCalor->SetVisAttributes(simpleBoxVisAtt);
355 */
356
358}

◆ PrintCalorParameters() [3/3]

void Ex03DetectorConstructionOld::PrintCalorParameters ( )

◆ SetNbOfLayers() [3/3]

void Ex03DetectorConstructionOld::SetNbOfLayers ( Int_t value)

◆ SetDefaultMaterial() [3/3]

void Ex03DetectorConstructionOld::SetDefaultMaterial ( const TString & materialName)

◆ SetAbsorberMaterial() [3/3]

void Ex03DetectorConstructionOld::SetAbsorberMaterial ( const TString & materialName)

◆ SetGapMaterial() [3/3]

void Ex03DetectorConstructionOld::SetGapMaterial ( const TString & materialName)

◆ SetCalorSizeYZ() [3/3]

void Ex03DetectorConstructionOld::SetCalorSizeYZ ( Double_t value)

◆ SetAbsorberThickness() [3/3]

void Ex03DetectorConstructionOld::SetAbsorberThickness ( Double_t value)

◆ SetGapThickness() [3/3]

void Ex03DetectorConstructionOld::SetGapThickness ( Double_t value)

◆ GetNbOfLayers() [3/3]

Int_t Ex03DetectorConstructionOld::GetNbOfLayers ( ) const
inline
Returns
The number of calorimeter layers

Definition at line 58 of file Ex03DetectorConstructionOld.h.

58{ return fNbOfLayers; }

◆ GetWorldSizeX() [3/3]

Double_t Ex03DetectorConstructionOld::GetWorldSizeX ( ) const
inline
Returns
The world size x component

Definition at line 61 of file Ex03DetectorConstructionOld.h.

61{ return fWorldSizeX; }

◆ GetWorldSizeYZ() [3/3]

Double_t Ex03DetectorConstructionOld::GetWorldSizeYZ ( ) const
inline
Returns
The world size y,z component

Definition at line 64 of file Ex03DetectorConstructionOld.h.

64{ return fWorldSizeYZ; }

◆ GetCalorSizeYZ() [3/3]

Double_t Ex03DetectorConstructionOld::GetCalorSizeYZ ( ) const
inline
Returns
The calorimeter size y,z component

Definition at line 67 of file Ex03DetectorConstructionOld.h.

67{ return fCalorSizeYZ; }

◆ GetCalorThickness() [3/3]

Double_t Ex03DetectorConstructionOld::GetCalorThickness ( ) const
inline
Returns
The calorimeter thickness

Definition at line 70 of file Ex03DetectorConstructionOld.h.

70{ return fCalorThickness; }

◆ GetAbsorberThickness() [3/3]

Double_t Ex03DetectorConstructionOld::GetAbsorberThickness ( ) const
inline
Returns
The absorber thickness

Definition at line 73 of file Ex03DetectorConstructionOld.h.

73{ return fAbsorberThickness; }

◆ GetGapThickness() [3/3]

Double_t Ex03DetectorConstructionOld::GetGapThickness ( ) const
inline
Returns
The gap thickness

Definition at line 76 of file Ex03DetectorConstructionOld.h.

76{ return fGapThickness; }

◆ ComputeCalorParameters() [3/3]

void Ex03DetectorConstructionOld::ComputeCalorParameters ( )
private

Member Data Documentation

◆ fNbOfLayers

Int_t Ex03DetectorConstructionOld::fNbOfLayers
private

The number of calorimeter layers.

Definition at line 84 of file Ex03DetectorConstructionOld.h.

◆ fWorldSizeX

Double_t Ex03DetectorConstructionOld::fWorldSizeX
private

The world size x component.

Definition at line 85 of file Ex03DetectorConstructionOld.h.

◆ fWorldSizeYZ

Double_t Ex03DetectorConstructionOld::fWorldSizeYZ
private

The world size y,z component.

Definition at line 86 of file Ex03DetectorConstructionOld.h.

◆ fCalorSizeYZ

Double_t Ex03DetectorConstructionOld::fCalorSizeYZ
private

The calorimeter size y,z component.

Definition at line 87 of file Ex03DetectorConstructionOld.h.

◆ fCalorThickness

Double_t Ex03DetectorConstructionOld::fCalorThickness
private

The calorimeter thickness.

Definition at line 88 of file Ex03DetectorConstructionOld.h.

◆ fLayerThickness

Double_t Ex03DetectorConstructionOld::fLayerThickness
private

The calorimeter layer thickness.

Definition at line 89 of file Ex03DetectorConstructionOld.h.

◆ fAbsorberThickness

Double_t Ex03DetectorConstructionOld::fAbsorberThickness
private

The absorber thickness.

Definition at line 90 of file Ex03DetectorConstructionOld.h.

◆ fGapThickness

Double_t Ex03DetectorConstructionOld::fGapThickness
private

The gap thickness.

Definition at line 91 of file Ex03DetectorConstructionOld.h.

◆ fDefaultMaterial

TString Ex03DetectorConstructionOld::fDefaultMaterial
private

The default material name.

Definition at line 93 of file Ex03DetectorConstructionOld.h.

◆ fAbsorberMaterial

TString Ex03DetectorConstructionOld::fAbsorberMaterial
private

The absorber material name.

Definition at line 94 of file Ex03DetectorConstructionOld.h.

◆ fGapMaterial

TString Ex03DetectorConstructionOld::fGapMaterial
private

The gap material name.

Definition at line 95 of file Ex03DetectorConstructionOld.h.


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