71 fTotalThickness (2.0*
m),
82 fDetectorMessenger(0),
85 fLayerThickness = fTotalThickness / fNumberOfLayers;
87 for(
size_t i=0;i<3;i++)
92 fCalorPhysical[i] = 0;
93 fLayerPhysical[i] = 0;
97 fCalName[0] =
"Calor-A";
98 fCalName[1] =
"Calor-B";
99 fCalName[2] =
"Calor-C";
107 {
delete fDetectorMessenger;}
120 return fWorldPhysical;
125 if(!fConstructedSDandField)
127 fConstructedSDandField =
true;
134 void RE06DetectorConstruction::DefineMaterials()
141 G4int ncomponents, natoms;
182 density = 1.390*
g/
cm3;
186 density = 11.35*
g/
cm3;
194 density = 1.000*
g/
cm3;
199 density = 1.032*
g/
cm3;
208 density = 1.290*
mg/
cm3;
219 temperature = 2.73*
kelvin;
228 fWorldMaterial = Vacuum;
229 fAbsorberMaterial = Pb;
235 void RE06DetectorConstruction::SetupGeometry()
240 G4VSolid* worldSolid =
new G4Box(
"World",2.*
m,2.*
m,fTotalThickness*2.);
241 fWorldLogical =
new G4LogicalVolume(worldSolid,fWorldMaterial,
"World");
248 G4VSolid* calorSolid =
new G4Box(
"Calor",0.5*
m,0.5*
m,fTotalThickness/2.);
258 fCalorLogical[i],fCalName[i],fWorldLogical,
false,i);
264 fCalorLogical[i],fCalName[i],fWorldLogical,
false,i);
271 fLayerSolid =
new G4Box(
"Layer",0.5*
m,0.5*
m,fLayerThickness/2.);
275 =
new G4LogicalVolume(fLayerSolid,fAbsorberMaterial,fCalName[i]+
"_LayerLog");
277 =
new G4PVReplica(fCalName[i]+
"_Layer",fLayerLogical[i],fCalorLogical[i],
278 kZAxis,fNumberOfLayers,fLayerThickness);
284 fGapSolid =
new G4Box(
"Gap",0.5*
m,0.5*
m,fLayerThickness/4.);
287 fGapLogical[i] =
new G4LogicalVolume(fGapSolid,fGapMaterial,fCalName[i]+
"_Gap");
289 fGapLogical[i],fCalName[i]+
"_gap",fLayerLogical[i],
false,0);
319 void RE06DetectorConstruction::SetupDetectors()
332 epFilter->
add(particleName=
"e-");
333 epFilter->
add(particleName=
"e+");
336 for(
G4int i=0;i<3;i++)
338 for(
G4int j=0;j<2;j++)
344 { detName +=
"_abs"; }
346 { detName +=
"_gap"; }
397 <<
"--------------------------------------------------------" <<
G4endl;
399 {
G4cout <<
" Calorimeters are placed in serial." <<
G4endl; }
401 {
G4cout <<
" Calorimeters are placed in parallel." <<
G4endl; }
403 <<
" Absorber is made of " << fAbsorberMaterial->
GetName() << G4endl
404 <<
" Gap is made of " << fGapMaterial->
GetName() << G4endl
405 <<
"--------------------------------------------------------" <<
G4endl;
416 fAbsorberMaterial = pttoMaterial;
417 if(fConstructed)
for(
size_t i=0;i<3;i++)
430 << materialChoice <<
" is not defined. - Command is ignored." <<
G4endl;
437 {
return fAbsorberMaterial->
GetName(); }
447 fGapMaterial = pttoMaterial;
448 if(fConstructed)
for(
size_t i=0;i<3;i++)
458 << materialChoice <<
" is not defined. - Command is ignored." <<
G4endl;
463 {
return fGapMaterial->
GetName(); }
469 if(fSerial==serial)
return;
474 if(!fConstructed)
return;
475 for(
G4int i=0;i<3;i++)
496 fNumberOfLayers = nl;
497 fLayerThickness = fTotalThickness/fNumberOfLayers;
498 if(!fConstructed)
return;
502 for(
size_t i=0;i<3;i++)
505 delete fLayerPhysical[i];
507 =
new G4PVReplica(fCalName[i]+
"_Layer",fLayerLogical[i],fCalorLogical[i],
508 kZAxis,fNumberOfLayers,fLayerThickness);
518 static G4bool isAdded =
false;
520 if( isAdded )
return;
525 G4int ncomponents, natoms;
void GeometryHasBeenModified(G4bool prop=true)
G4bool RegisterPrimitive(G4VPrimitiveScorer *)
const G4VUserPrimaryGeneratorAction * GetUserPrimaryGeneratorAction() const
void SetZHalfLength(G4double dz)
Definition of the RE06DetectorMessenger class.
static constexpr double mg
CLHEP::Hep3Vector G4ThreeVector
void AddRootLogicalVolume(G4LogicalVolume *lv)
static G4Element * GetElement(G4String name, G4bool warning=true)
void PrintCalorParameters() const
std::vector< ExP01TrackerHit * > a
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
int universe_mean_density
void SetVerboseLevel(G4int vl)
static constexpr double perCent
const G4String & GetName() const
static G4MaterialTable * GetMaterialTable()
void SetFilter(G4VSDFilter *f)
virtual ~RE06DetectorConstruction()
Definition of the RE06ParallelWorld class.
G4String GetGapMaterial() const
void SetRegion(G4Region *reg)
G4GLOB_DLL std::ostream G4cout
static constexpr double m
void SetVisibility(G4bool=true)
void SetSerialGeometry(G4bool ser)
RE06DetectorConstruction()
void AddIsotope(G4Isotope *isotope, G4double RelativeAbundance)
void SetTranslation(const G4ThreeVector &v)
G4String GetAbsorberMaterial() const
G4VUserParallelWorld * GetParallelWorld(G4int i) const
void SetSerial(G4bool serial)
static constexpr double kelvin
static constexpr double cm3
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
void AddNewDetector(G4VSensitiveDetector *aSD)
static G4RunManager * GetRunManager()
void SetAbsorberMaterial(G4String materialChoice)
void add(const G4String &particleName)
virtual G4VPhysicalVolume * Construct()
static G4SDManager * GetSDMpointer()
void SetNumberOfLayers(G4int nl)
Definition of the RE06PrimaryGeneratorAction class.
void AddElement(G4Element *element, G4int nAtoms)
Definition of the RE06DetectorConstruction class.
void ConstructSDandField()
void SetMaterial(G4Material *pMaterial)
void SetGapMaterial(G4String materialChoice)
static constexpr double atmosphere
static constexpr double mole
static const G4VisAttributes & GetInvisible()
void SetVisAttributes(const G4VisAttributes *pVA)
void RemoveDaughter(const G4VPhysicalVolume *p)
G4GLOB_DLL std::ostream G4cerr
G4int GetVerboseLevel() const