Geant4  10.02.p03
RE06DetectorConstruction Class Reference

#include <RE06DetectorConstruction.hh>

Inheritance diagram for RE06DetectorConstruction:
Collaboration diagram for RE06DetectorConstruction:

Public Member Functions

 RE06DetectorConstruction ()
 
virtual ~RE06DetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
void ConstructSDandField ()
 
void PrintCalorParameters () const
 
void SetAbsorberMaterial (G4String materialChoice)
 
G4String GetAbsorberMaterial () const
 
void SetGapMaterial (G4String materialChoice)
 
G4String GetGapMaterial () const
 
void SetSerialGeometry (G4bool ser)
 
void SetNumberOfLayers (G4int nl)
 
G4int GetNumberOfLayers () const
 
G4bool IsSerial () const
 
void AddMaterial ()
 
G4int GetVerboseLevel () const
 
void SetVerboseLevel (G4int val)
 
- Public Member Functions inherited from G4VUserDetectorConstruction
 G4VUserDetectorConstruction ()
 
virtual ~G4VUserDetectorConstruction ()
 
virtual void CloneSD ()
 
virtual void CloneF ()
 
void RegisterParallelWorld (G4VUserParallelWorld *)
 
G4int ConstructParallelGeometries ()
 
void ConstructParallelSD ()
 
G4int GetNumberOfParallelWorld () const
 
G4VUserParallelWorldGetParallelWorld (G4int i) const
 

Private Member Functions

void DefineMaterials ()
 
void SetupGeometry ()
 
void SetupDetectors ()
 

Private Attributes

G4int fNumberOfLayers
 
G4double fTotalThickness
 total thinkness of one calorimeter More...
 
G4double fLayerThickness
 = fTotalThickness / fNumberOfLayers More...
 
G4bool fConstructed
 
G4String fCalName [3]
 
G4MaterialfWorldMaterial
 
G4MaterialfAbsorberMaterial
 
G4MaterialfGapMaterial
 
G4BoxfLayerSolid
 
G4BoxfGapSolid
 
G4LogicalVolumefWorldLogical
 
G4LogicalVolumefCalorLogical [3]
 
G4LogicalVolumefLayerLogical [3]
 
G4LogicalVolumefGapLogical [3]
 
G4VPhysicalVolumefWorldPhysical
 
G4VPhysicalVolumefCalorPhysical [3]
 
G4PVReplicafLayerPhysical [3]
 
G4VPhysicalVolumefGapPhysical [3]
 
G4bool fSerial
 
RE06DetectorMessengerfDetectorMessenger
 
G4int fVerboseLevel
 

Static Private Attributes

static G4ThreadLocal G4bool fConstructedSDandField = false
 

Additional Inherited Members

- Protected Member Functions inherited from G4VUserDetectorConstruction
void SetSensitiveDetector (const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
 
void SetSensitiveDetector (G4LogicalVolume *logVol, G4VSensitiveDetector *aSD)
 

Detailed Description

Definition at line 45 of file RE06DetectorConstruction.hh.

Constructor & Destructor Documentation

◆ RE06DetectorConstruction()

RE06DetectorConstruction::RE06DetectorConstruction ( )

Definition at line 68 of file RE06DetectorConstruction.cc.

70  fNumberOfLayers(40),
71  fTotalThickness (2.0*m),
72  fLayerThickness(0.),
73  fConstructed(false),
74  fWorldMaterial(0),
76  fGapMaterial(0),
77  fLayerSolid(0),
78  fGapSolid(0),
79  fWorldLogical(0),
80  fWorldPhysical(0),
81  fSerial(false),
83  fVerboseLevel(1)
84 {
86 
87  for(size_t i=0;i<3;i++)
88  {
89  fCalorLogical[i] = 0;
90  fLayerLogical[i] = 0;
91  fGapLogical[i] = 0;
92  fCalorPhysical[i] = 0;
93  fLayerPhysical[i] = 0;
94  fGapPhysical[i] = 0;
95  }
96 
97  fCalName[0] = "Calor-A";
98  fCalName[1] = "Calor-B";
99  fCalName[2] = "Calor-C";
100 
102 }
RE06DetectorMessenger * fDetectorMessenger
G4VPhysicalVolume * fGapPhysical[3]
G4LogicalVolume * fLayerLogical[3]
G4double fTotalThickness
total thinkness of one calorimeter
G4double fLayerThickness
= fTotalThickness / fNumberOfLayers
G4LogicalVolume * fCalorLogical[3]
static const double m
Definition: G4SIunits.hh:128
G4VPhysicalVolume * fCalorPhysical[3]

◆ ~RE06DetectorConstruction()

RE06DetectorConstruction::~RE06DetectorConstruction ( )
virtual

Definition at line 106 of file RE06DetectorConstruction.cc.

107 { delete fDetectorMessenger;}
RE06DetectorMessenger * fDetectorMessenger

Member Function Documentation

◆ AddMaterial()

void RE06DetectorConstruction::AddMaterial ( )

Definition at line 515 of file RE06DetectorConstruction.cc.

516 {
517  static G4bool isAdded = false;
518 
519  if( isAdded ) return;
520 
521  G4String name, symbol; //a=mass of a mole;
522  G4double a, z, density; //z=mean number of protons;
523 
524  G4int ncomponents, natoms;
525 
526  //
527  // define simple materials
528  //
529 
530  new G4Material(name="Copper", z=29., a=63.546*g/mole, density=8.96*g/cm3);
531  new G4Material(name="Tungsten", z=74., a=183.84*g/mole, density=19.3*g/cm3);
532 
533  G4Element* C = G4Element::GetElement("Carbon");
534  G4Element* O = G4Element::GetElement("Oxygen");
535 
536 
537  G4Material* CO2 =
538  new G4Material("CarbonicGas", density= 27.*mg/cm3, ncomponents=2,
539  kStateGas, 325.*kelvin, 50.*atmosphere);
540  CO2->AddElement(C, natoms=1);
541  CO2->AddElement(O, natoms=2);
542 
543  isAdded = true;
544 
545 }
G4String symbol
Definition: TRTMaterials.hh:40
static G4Element * GetElement(G4String name, G4bool warning=true)
Definition: G4Element.cc:409
G4String name
Definition: TRTMaterials.hh:40
double C(double temp)
static const double mg
Definition: G4SIunits.hh:181
int G4int
Definition: G4Types.hh:78
G4double density
Definition: TRTMaterials.hh:39
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5206
bool G4bool
Definition: G4Types.hh:79
static const double cm3
Definition: G4SIunits.hh:120
static const double kelvin
Definition: G4SIunits.hh:278
static const double atmosphere
Definition: G4SIunits.hh:234
static const double mole
Definition: G4SIunits.hh:283
void AddElement(G4Element *element, G4int nAtoms)
Definition: G4Material.cc:364
double G4double
Definition: G4Types.hh:76
G4Material * CO2
Definition: TRTMaterials.hh:81
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Construct()

G4VPhysicalVolume * RE06DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 109 of file RE06DetectorConstruction.cc.

110 {
111  if(!fConstructed)
112  {
113  fConstructed = true;
114  DefineMaterials();
115  SetupGeometry();
116  }
117  if (GetVerboseLevel()>0) {
119  }
120  return fWorldPhysical;
121 }
Here is the call graph for this function:

◆ ConstructSDandField()

void RE06DetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 123 of file RE06DetectorConstruction.cc.

124 {
126  {
127  fConstructedSDandField = true;
128  SetupDetectors();
129  }
130 }
static G4ThreadLocal G4bool fConstructedSDandField
Here is the call graph for this function:

◆ DefineMaterials()

void RE06DetectorConstruction::DefineMaterials ( void  )
private

Definition at line 134 of file RE06DetectorConstruction.cc.

135 {
136  G4String name, symbol; //a=mass of a mole;
137  G4double a, z, density; //z=mean number of protons;
138  G4int iz; //iz=number of protons in an isotope;
139  G4int n; // n=number of nucleons in an isotope;
140 
141  G4int ncomponents, natoms;
142  G4double abundance, fractionmass;
143  G4double temperature, pressure;
144 
145  //
146  // define Elements
147  //
148 
149  a = 1.01*g/mole;
150  G4Element* H = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
151 
152  a = 12.01*g/mole;
153  G4Element* C = new G4Element(name="Carbon" ,symbol="C" , z= 6., a);
154 
155  a = 14.01*g/mole;
156  G4Element* N = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
157 
158  a = 16.00*g/mole;
159  G4Element* O = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
160 
161  //
162  // define an Element from isotopes, by relative abundance
163  //
164 
165  G4Isotope* U5 = new G4Isotope(name="U235", iz=92, n=235, a=235.01*g/mole);
166  G4Isotope* U8 = new G4Isotope(name="U238", iz=92, n=238, a=238.03*g/mole);
167 
168  G4Element* U = new G4Element(name="enriched Uranium",symbol="U",ncomponents=2);
169  U->AddIsotope(U5, abundance= 90.*perCent);
170  U->AddIsotope(U8, abundance= 10.*perCent);
171 
172  //
173  // define simple materials
174  //
175 
176  new G4Material(name="Aluminium", z=13., a=26.98*g/mole, density=2.700*g/cm3);
177  new G4Material(name="Silicon", z=14., a= 28.09*g/mole, density= 2.33*g/cm3);
178  new G4Material(name="Iron", z=26., a=55.85*g/mole, density=7.87*g/cm3);
179  new G4Material(name="ArgonGas",z=18., a= 39.95*g/mole, density=1.782*mg/cm3);
180  new G4Material(name="He", z=2., a=4.0*g/mole, density=0.1786e-03*g/cm3);
181 
182  density = 1.390*g/cm3;
183  a = 39.95*g/mole;
184  G4Material* lAr = new G4Material(name="liquidArgon", z=18., a, density);
185 
186  density = 11.35*g/cm3;
187  a = 207.19*g/mole;
188  G4Material* Pb = new G4Material(name="Lead" , z=82., a, density);
189 
190  //
191  // define a material from elements. case 1: chemical molecule
192  //
193 
194  density = 1.000*g/cm3;
195  G4Material* H2O = new G4Material(name="Water", density, ncomponents=2);
196  H2O->AddElement(H, natoms=2);
197  H2O->AddElement(O, natoms=1);
198 
199  density = 1.032*g/cm3;
200  G4Material* Sci = new G4Material(name="Scintillator", density, ncomponents=2);
201  Sci->AddElement(C, natoms=9);
202  Sci->AddElement(H, natoms=10);
203 
204  //
205  // define a material from elements. case 2: mixture by fractional mass
206  //
207 
208  density = 1.290*mg/cm3;
209  G4Material* Air = new G4Material(name="Air" , density, ncomponents=2);
210  Air->AddElement(N, fractionmass=0.7);
211  Air->AddElement(O, fractionmass=0.3);
212 
213  //
214  // examples of vacuum
215  //
216 
217  density = universe_mean_density;
218  pressure = 3.e-18*pascal;
219  temperature = 2.73*kelvin;
220  G4Material* Vacuum = new G4Material(name="Galactic", z=1., a=1.01*g/mole,
221  density,kStateGas,temperature,pressure);
222 
223  if (GetVerboseLevel()>1) {
225  }
226 
227  //default materials of the calorimeter
228  fWorldMaterial = Vacuum;
229  fAbsorberMaterial = Pb;
230  fGapMaterial = lAr;
231 }
G4String symbol
Definition: TRTMaterials.hh:40
G4Material * Air
Definition: TRTMaterials.hh:57
int universe_mean_density
Definition: hepunit.py:307
G4String name
Definition: TRTMaterials.hh:40
static G4MaterialTable * GetMaterialTable()
Definition: G4Material.cc:589
double C(double temp)
static const double mg
Definition: G4SIunits.hh:181
int G4int
Definition: G4Types.hh:78
G4double density
Definition: TRTMaterials.hh:39
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5206
Char_t n[5]
G4GLOB_DLL std::ostream G4cout
G4double iz
Definition: TRTMaterials.hh:39
void AddIsotope(G4Isotope *isotope, G4double RelativeAbundance)
Definition: G4Element.cc:151
#define pascal
static const double cm3
Definition: G4SIunits.hh:120
static const double perCent
Definition: G4SIunits.hh:329
static const double kelvin
Definition: G4SIunits.hh:278
static const double mole
Definition: G4SIunits.hh:283
#define G4endl
Definition: G4ios.hh:61
**D E S C R I P T I O N
void AddElement(G4Element *element, G4int nAtoms)
Definition: G4Material.cc:364
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAbsorberMaterial()

G4String RE06DetectorConstruction::GetAbsorberMaterial ( ) const

Definition at line 435 of file RE06DetectorConstruction.cc.

436 { return fAbsorberMaterial->GetName(); }
const G4String & GetName() const
Definition: G4Material.hh:178
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetGapMaterial()

G4String RE06DetectorConstruction::GetGapMaterial ( ) const

Definition at line 461 of file RE06DetectorConstruction.cc.

462 { return fGapMaterial->GetName(); }
const G4String & GetName() const
Definition: G4Material.hh:178
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNumberOfLayers()

G4int RE06DetectorConstruction::GetNumberOfLayers ( ) const
inline

Definition at line 62 of file RE06DetectorConstruction.hh.

Here is the caller graph for this function:

◆ GetVerboseLevel()

G4int RE06DetectorConstruction::GetVerboseLevel ( ) const
inline

Definition at line 67 of file RE06DetectorConstruction.hh.

Here is the caller graph for this function:

◆ IsSerial()

G4bool RE06DetectorConstruction::IsSerial ( ) const
inline

Definition at line 63 of file RE06DetectorConstruction.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintCalorParameters()

void RE06DetectorConstruction::PrintCalorParameters ( ) const

Definition at line 393 of file RE06DetectorConstruction.cc.

394 {
395  G4cout
396  << "--------------------------------------------------------" << G4endl;
397  if(fSerial)
398  { G4cout << " Calorimeters are placed in serial." << G4endl; }
399  else
400  { G4cout << " Calorimeters are placed in parallel." << G4endl; }
401  G4cout
402  << " Absorber is made of " << fAbsorberMaterial->GetName() << G4endl
403  << " Gap is made of " << fGapMaterial->GetName() << G4endl
404  << "--------------------------------------------------------" << G4endl;
405 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
const G4String & GetName() const
Definition: G4Material.hh:178
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetAbsorberMaterial()

void RE06DetectorConstruction::SetAbsorberMaterial ( G4String  materialChoice)

Definition at line 409 of file RE06DetectorConstruction.cc.

410 {
411  // search the material by its name
412  G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
413  if(pttoMaterial)
414  {
415  fAbsorberMaterial = pttoMaterial;
416  if(fConstructed) for(size_t i=0;i<3;i++)
417  {
420  }
422  if (GetVerboseLevel()>1) {
424  }
425  }
426  else
427  {
428  G4cerr
429  << materialChoice << " is not defined. - Command is ignored." << G4endl;
430  }
431 }
void GeometryHasBeenModified(G4bool prop=true)
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:604
G4LogicalVolume * fLayerLogical[3]
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
G4LogicalVolume * fCalorLogical[3]
#define G4endl
Definition: G4ios.hh:61
void SetMaterial(G4Material *pMaterial)
G4GLOB_DLL std::ostream G4cerr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetGapMaterial()

void RE06DetectorConstruction::SetGapMaterial ( G4String  materialChoice)

Definition at line 440 of file RE06DetectorConstruction.cc.

441 {
442  // search the material by its name
443  G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
444  if(pttoMaterial)
445  {
446  fGapMaterial = pttoMaterial;
447  if(fConstructed) for(size_t i=0;i<3;i++)
450  if (GetVerboseLevel()>1) {
452  }
453  }
454  else
455  {
456  G4cerr
457  << materialChoice << " is not defined. - Command is ignored." << G4endl;
458  }
459 }
void GeometryHasBeenModified(G4bool prop=true)
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:604
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
#define G4endl
Definition: G4ios.hh:61
void SetMaterial(G4Material *pMaterial)
G4GLOB_DLL std::ostream G4cerr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetNumberOfLayers()

void RE06DetectorConstruction::SetNumberOfLayers ( G4int  nl)

Definition at line 493 of file RE06DetectorConstruction.cc.

494 {
495  fNumberOfLayers = nl;
497  if(!fConstructed) return;
498 
501  for(size_t i=0;i<3;i++)
502  {
504  delete fLayerPhysical[i];
505  fLayerPhysical[i]
506  = new G4PVReplica(fCalName[i]+"_Layer",fLayerLogical[i],fCalorLogical[i],
509  }
511 }
void GeometryHasBeenModified(G4bool prop=true)
void SetZHalfLength(G4double dz)
Definition: G4Box.cc:171
G4VPhysicalVolume * fGapPhysical[3]
CLHEP::Hep3Vector G4ThreeVector
G4LogicalVolume * fLayerLogical[3]
G4double fTotalThickness
total thinkness of one calorimeter
void SetTranslation(const G4ThreeVector &v)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
G4double fLayerThickness
= fTotalThickness / fNumberOfLayers
G4LogicalVolume * fCalorLogical[3]
void RemoveDaughter(const G4VPhysicalVolume *p)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetSerialGeometry()

void RE06DetectorConstruction::SetSerialGeometry ( G4bool  ser)

Definition at line 466 of file RE06DetectorConstruction.cc.

467 {
468  if(fSerial==serial) return;
469  fSerial=serial;
472  if(gen) gen->SetSerial(fSerial);
473  if(!fConstructed) return;
474  for(G4int i=0;i<3;i++)
475  {
476  if(fSerial)
477  {
478  fCalorPhysical[i]
479  ->SetTranslation(G4ThreeVector(0.,0.,G4double(i-1)*2.*m));
480  }
481  else
482  {
483  fCalorPhysical[i]
484  ->SetTranslation(G4ThreeVector(0.,G4double(i-1)*m,0.));
485  }
486  }
489 }
void GeometryHasBeenModified(G4bool prop=true)
CLHEP::Hep3Vector G4ThreeVector
int G4int
Definition: G4Types.hh:78
void SetTranslation(const G4ThreeVector &v)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
const G4VUserPrimaryGeneratorAction * GetUserPrimaryGeneratorAction() const
G4VUserParallelWorld * GetParallelWorld(G4int i) const
static const double m
Definition: G4SIunits.hh:128
double G4double
Definition: G4Types.hh:76
G4VPhysicalVolume * fCalorPhysical[3]
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetupDetectors()

void RE06DetectorConstruction::SetupDetectors ( )
private

Definition at line 319 of file RE06DetectorConstruction.cc.

320 {
322  G4String filterName, particleName;
323 
324  G4SDParticleFilter* gammaFilter
325  = new G4SDParticleFilter(filterName="gammaFilter",particleName="gamma");
326  G4SDParticleFilter* electronFilter
327  = new G4SDParticleFilter(filterName="electronFilter",particleName="e-");
328  G4SDParticleFilter* positronFilter
329  = new G4SDParticleFilter(filterName="positronFilter",particleName="e+");
330  G4SDParticleFilter* epFilter
331  = new G4SDParticleFilter(filterName="epFilter");
332  epFilter->add(particleName="e-");
333  epFilter->add(particleName="e+");
334 
335 
336  for(G4int i=0;i<3;i++)
337  {
338  for(G4int j=0;j<2;j++)
339  {
340  // Loop counter j = 0 : absorber
341  // = 1 : gap
342  G4String detName = fCalName[i];
343  if(j==0)
344  { detName += "_abs"; }
345  else
346  { detName += "_gap"; }
348 
349  // The second argument in each primitive means the "level" of geometrical
350  // hierarchy, the copy number of that level is used as the key of the
351  // G4THitsMap.
352  // For absorber (j = 0), the copy number of its own physical volume is used.
353  // For gap (j = 1), the copy number of its mother physical volume is used,
354  // since there is only one physical volume of gap is placed with respect
355  // to its mother.
356  G4VPrimitiveScorer* primitive;
357  primitive = new G4PSEnergyDeposit("eDep",j);
358  det->RegisterPrimitive(primitive);
359  primitive = new G4PSNofSecondary("nGamma",j);
360  primitive->SetFilter(gammaFilter);
361  det->RegisterPrimitive(primitive);
362  primitive = new G4PSNofSecondary("nElectron",j);
363  primitive->SetFilter(electronFilter);
364  det->RegisterPrimitive(primitive);
365  primitive = new G4PSNofSecondary("nPositron",j);
366  primitive->SetFilter(positronFilter);
367  det->RegisterPrimitive(primitive);
368  primitive = new G4PSMinKinEAtGeneration("minEkinGamma",j);
369  primitive->SetFilter(gammaFilter);
370  det->RegisterPrimitive(primitive);
371  primitive = new G4PSMinKinEAtGeneration("minEkinElectron",j);
372  primitive->SetFilter(electronFilter);
373  det->RegisterPrimitive(primitive);
374  primitive = new G4PSMinKinEAtGeneration("minEkinPositron",j);
375  primitive->SetFilter(positronFilter);
376  det->RegisterPrimitive(primitive);
377  primitive = new G4PSTrackLength("trackLength",j);
378  primitive->SetFilter(epFilter);
379  det->RegisterPrimitive(primitive);
380  primitive = new G4PSNofStep("nStep",j);
381  primitive->SetFilter(epFilter);
382  det->RegisterPrimitive(primitive);
383 
384  if(j==0)
385  { SetSensitiveDetector(fLayerLogical[i], det); }
386  else
387  { SetSensitiveDetector(fGapLogical[i], det);}
388  }
389  }
391 }
G4bool RegisterPrimitive(G4VPrimitiveScorer *)
void SetVerboseLevel(G4int vl)
Definition: G4SDManager.hh:90
void SetFilter(G4VSDFilter *f)
int G4int
Definition: G4Types.hh:78
G4LogicalVolume * fLayerLogical[3]
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
void add(const G4String &particleName)
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetupGeometry()

void RE06DetectorConstruction::SetupGeometry ( )
private

Definition at line 235 of file RE06DetectorConstruction.cc.

236 {
237  //
238  // World
239  //
240  G4VSolid* worldSolid = new G4Box("World",2.*m,2.*m,fTotalThickness*2.);
241  fWorldLogical = new G4LogicalVolume(worldSolid,fWorldMaterial,"World");
243  0,false,0);
244 
245  //
246  // Calorimeter
247  //
248  G4VSolid* calorSolid = new G4Box("Calor",0.5*m,0.5*m,fTotalThickness/2.);
249  G4int i;
250  for(i=0;i<3;i++)
251  {
252  fCalorLogical[i]
253  = new G4LogicalVolume(calorSolid,fAbsorberMaterial,fCalName[i]);
254  if(fSerial)
255  {
256  fCalorPhysical[i] = new G4PVPlacement(0,
258  fCalorLogical[i],fCalName[i],fWorldLogical,false,i);
259  }
260  else
261  {
262  fCalorPhysical[i] = new G4PVPlacement(0,
263  G4ThreeVector(0.,G4double(i-1)*m,0.),
264  fCalorLogical[i],fCalName[i],fWorldLogical,false,i);
265  }
266  }
267 
268  //
269  // Layers --- as absorbers
270  //
271  fLayerSolid = new G4Box("Layer",0.5*m,0.5*m,fLayerThickness/2.);
272  for(i=0;i<3;i++)
273  {
274  fLayerLogical[i]
276  fLayerPhysical[i]
277  = new G4PVReplica(fCalName[i]+"_Layer",fLayerLogical[i],fCalorLogical[i],
279  }
280 
281  //
282  // Gap
283  //
284  fGapSolid = new G4Box("Gap",0.5*m,0.5*m,fLayerThickness/4.);
285  for(i=0;i<3;i++)
286  {
289  fGapLogical[i],fCalName[i]+"_gap",fLayerLogical[i],false,0);
290  }
291 
292  //
293  // Regions
294  //
295  for(i=0;i<3;i++)
296  {
297  G4Region* aRegion = new G4Region(fCalName[i]);
298  fCalorLogical[i]->SetRegion(aRegion);
299  aRegion->AddRootLogicalVolume(fCalorLogical[i]);
300  }
301 
302  //
303  // Visualization attributes
304  //
306  G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
307  simpleBoxVisAtt->SetVisibility(true);
308  for(i=0;i<3;i++)
309  {
310  fCalorLogical[i]->SetVisAttributes(simpleBoxVisAtt);
311  fLayerLogical[i]->SetVisAttributes(simpleBoxVisAtt);
312  fGapLogical[i]->SetVisAttributes(simpleBoxVisAtt);
313  }
314 
315 }
G4VPhysicalVolume * fGapPhysical[3]
CLHEP::Hep3Vector G4ThreeVector
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
Definition: G4Box.hh:64
void SetVisibility(G4bool)
int G4int
Definition: G4Types.hh:78
G4LogicalVolume * fLayerLogical[3]
void SetRegion(G4Region *reg)
G4double fTotalThickness
total thinkness of one calorimeter
static const G4VisAttributes Invisible
G4double fLayerThickness
= fTotalThickness / fNumberOfLayers
G4LogicalVolume * fCalorLogical[3]
static const double m
Definition: G4SIunits.hh:128
double G4double
Definition: G4Types.hh:76
void SetVisAttributes(const G4VisAttributes *pVA)
G4VPhysicalVolume * fCalorPhysical[3]
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetVerboseLevel()

void RE06DetectorConstruction::SetVerboseLevel ( G4int  val)
inline

Definition at line 68 of file RE06DetectorConstruction.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fAbsorberMaterial

G4Material* RE06DetectorConstruction::fAbsorberMaterial
private

Definition at line 87 of file RE06DetectorConstruction.hh.

◆ fCalName

G4String RE06DetectorConstruction::fCalName[3]
private

Definition at line 84 of file RE06DetectorConstruction.hh.

◆ fCalorLogical

G4LogicalVolume* RE06DetectorConstruction::fCalorLogical[3]
private

Definition at line 94 of file RE06DetectorConstruction.hh.

◆ fCalorPhysical

G4VPhysicalVolume* RE06DetectorConstruction::fCalorPhysical[3]
private

Definition at line 99 of file RE06DetectorConstruction.hh.

◆ fConstructed

G4bool RE06DetectorConstruction::fConstructed
private

Definition at line 81 of file RE06DetectorConstruction.hh.

◆ fConstructedSDandField

G4ThreadLocal G4bool RE06DetectorConstruction::fConstructedSDandField = false
staticprivate

Definition at line 82 of file RE06DetectorConstruction.hh.

◆ fDetectorMessenger

RE06DetectorMessenger* RE06DetectorConstruction::fDetectorMessenger
private

Definition at line 105 of file RE06DetectorConstruction.hh.

◆ fGapLogical

G4LogicalVolume* RE06DetectorConstruction::fGapLogical[3]
private

Definition at line 96 of file RE06DetectorConstruction.hh.

◆ fGapMaterial

G4Material* RE06DetectorConstruction::fGapMaterial
private

Definition at line 88 of file RE06DetectorConstruction.hh.

◆ fGapPhysical

G4VPhysicalVolume* RE06DetectorConstruction::fGapPhysical[3]
private

Definition at line 101 of file RE06DetectorConstruction.hh.

◆ fGapSolid

G4Box* RE06DetectorConstruction::fGapSolid
private

Definition at line 91 of file RE06DetectorConstruction.hh.

◆ fLayerLogical

G4LogicalVolume* RE06DetectorConstruction::fLayerLogical[3]
private

Definition at line 95 of file RE06DetectorConstruction.hh.

◆ fLayerPhysical

G4PVReplica* RE06DetectorConstruction::fLayerPhysical[3]
private

Definition at line 100 of file RE06DetectorConstruction.hh.

◆ fLayerSolid

G4Box* RE06DetectorConstruction::fLayerSolid
private

Definition at line 90 of file RE06DetectorConstruction.hh.

◆ fLayerThickness

G4double RE06DetectorConstruction::fLayerThickness
private

= fTotalThickness / fNumberOfLayers

Definition at line 79 of file RE06DetectorConstruction.hh.

◆ fNumberOfLayers

G4int RE06DetectorConstruction::fNumberOfLayers
private

Definition at line 76 of file RE06DetectorConstruction.hh.

◆ fSerial

G4bool RE06DetectorConstruction::fSerial
private

Definition at line 103 of file RE06DetectorConstruction.hh.

◆ fTotalThickness

G4double RE06DetectorConstruction::fTotalThickness
private

total thinkness of one calorimeter

Definition at line 78 of file RE06DetectorConstruction.hh.

◆ fVerboseLevel

G4int RE06DetectorConstruction::fVerboseLevel
private

Definition at line 107 of file RE06DetectorConstruction.hh.

◆ fWorldLogical

G4LogicalVolume* RE06DetectorConstruction::fWorldLogical
private

Definition at line 93 of file RE06DetectorConstruction.hh.

◆ fWorldMaterial

G4Material* RE06DetectorConstruction::fWorldMaterial
private

Definition at line 86 of file RE06DetectorConstruction.hh.

◆ fWorldPhysical

G4VPhysicalVolume* RE06DetectorConstruction::fWorldPhysical
private

Definition at line 98 of file RE06DetectorConstruction.hh.


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