59 G4int GB03DetectorConstruction::fNumberOfLayers = 40;
66 fTotalThickness (2.0*
m), fLayerThickness(0.),
68 fWorldMaterial(0), fAbsorberMaterial(0), fGapMaterial(0),
69 fLayerSolid(0), fGapSolid(0),
70 fWorldLogical(0), fCalorLogical(0), fLayerLogical(0), fGapLogical(0),
71 fWorldPhysical(0), fCalorPhysical(0), fLayerPhysical(0), fGapPhysical(0),
72 fDetectorMessenger(0), fVerboseLevel(1)
74 fLayerThickness = fTotalThickness / fNumberOfLayers;
82 {
delete fDetectorMessenger;}
97 return fWorldPhysical;
104 if(!fConstructedSDandField)
106 fConstructedSDandField =
true;
114 void GB03DetectorConstruction::DefineMaterials()
121 G4int ncomponents, natoms;
162 density = 1.390*
g/
cm3;
164 new G4Material(name=
"liquidArgon", z=18., a, density);
166 density = 11.35*
g/
cm3;
174 density = 1.000*
g/
cm3;
179 density = 1.032*
g/
cm3;
188 density = 1.290*
mg/
cm3;
199 temperature = 2.73*
kelvin;
208 fWorldMaterial = Vacuum;
209 fAbsorberMaterial = Pb;
215 void GB03DetectorConstruction::SetupGeometry()
220 G4VSolid* worldSolid =
new G4Box(
"World",2.*
m,2.*
m,fTotalThickness*2.);
221 fWorldLogical =
new G4LogicalVolume(worldSolid,fWorldMaterial,
"World");
228 G4VSolid* calorSolid =
new G4Box(
"Calor",0.5*
m,0.5*
m,fTotalThickness/2.);
229 fCalorLogical =
new G4LogicalVolume(calorSolid,fAbsorberMaterial,fCalName);
231 fCalorLogical,fCalName,fWorldLogical,
false,0);
236 fLayerSolid =
new G4Box(
"Layer",0.5*
m,0.5*
m,fLayerThickness/2.);
238 =
new G4LogicalVolume(fLayerSolid,fAbsorberMaterial,fCalName+
"_LayerLog");
240 =
new G4PVReplica(fCalName+
"_Layer",fLayerLogical,fCalorLogical,
241 kZAxis,fNumberOfLayers,fLayerThickness);
246 fGapSolid =
new G4Box(
"Gap",0.5*
m,0.5*
m,fLayerThickness/4.);
247 fGapLogical =
new G4LogicalVolume(fGapSolid,fGapMaterial,fCalName+
"_Gap");
249 fGapLogical,fCalName+
"_gap",fLayerLogical,
false,0);
265 void GB03DetectorConstruction::SetupDetectors()
275 for(
G4int j=0;j<2;j++)
281 { detName +=
"_abs"; }
283 { detName +=
"_gap"; }
314 void GB03DetectorConstruction::SetupBiasing()
317 biasingOperator->
AttachTo(fLayerLogical);
325 <<
"--------------------------------------------------------" <<
G4endl;
327 <<
" Absorber is made of " << fAbsorberMaterial->
GetName() << G4endl
328 <<
" Gap is made of " << fGapMaterial->
GetName() << G4endl
329 <<
"--------------------------------------------------------" <<
G4endl;
340 fAbsorberMaterial = pttoMaterial;
354 << materialChoice <<
" is not defined. - Command is ignored." <<
G4endl;
361 {
return fAbsorberMaterial->
GetName(); }
371 fGapMaterial = pttoMaterial;
382 << materialChoice <<
" is not defined. - Command is ignored." <<
G4endl;
389 {
return fGapMaterial->
GetName(); }
395 fNumberOfLayers = nl;
396 fLayerThickness = fTotalThickness/fNumberOfLayers;
397 if(!fConstructed)
return;
403 delete fLayerPhysical;
405 =
new G4PVReplica(fCalName+
"_Layer",fLayerLogical,fCalorLogical,
406 kZAxis,fNumberOfLayers,fLayerThickness);
void GeometryHasBeenModified(G4bool prop=true)
G4bool RegisterPrimitive(G4VPrimitiveScorer *)
void SetZHalfLength(G4double dz)
GB03DetectorConstruction()
static constexpr double mg
CLHEP::Hep3Vector G4ThreeVector
std::vector< ExP01TrackerHit * > a
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
int universe_mean_density
G4String GetGapMaterial() const
Definition of the GB03DetectorConstruction class.
void SetVerboseLevel(G4int vl)
static constexpr double perCent
const G4String & GetName() const
static G4MaterialTable * GetMaterialTable()
void SetFilter(G4VSDFilter *f)
Definition of the GB03BOptrGeometryBasedBiasing class.
Definition of the GB03DetectorMessenger class.
virtual ~GB03DetectorConstruction()
void SetGapMaterial(G4String materialChoice)
G4GLOB_DLL std::ostream G4cout
static constexpr double m
void SetVisibility(G4bool=true)
G4int GetVerboseLevel() const
void AddIsotope(G4Isotope *isotope, G4double RelativeAbundance)
void SetTranslation(const G4ThreeVector &v)
void SetNumberOfLayers(G4int nl)
static constexpr double kelvin
static constexpr double cm3
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
void AttachTo(const G4LogicalVolume *)
void AddNewDetector(G4VSensitiveDetector *aSD)
static G4RunManager * GetRunManager()
void PrintCalorParameters() const
void SetAbsorberMaterial(G4String materialChoice)
static G4SDManager * GetSDMpointer()
void AddElement(G4Element *element, G4int nAtoms)
G4String GetAbsorberMaterial() const
virtual void ConstructSDandField()
void SetMaterial(G4Material *pMaterial)
static constexpr double mole
static const G4VisAttributes & GetInvisible()
virtual G4VPhysicalVolume * Construct()
void SetVisAttributes(const G4VisAttributes *pVA)
void RemoveDaughter(const G4VPhysicalVolume *p)
G4GLOB_DLL std::ostream G4cerr