34 #include "DetectorConstruction.hh"
35 #include "DetectorMessenger.hh"
62 fAbsorberMaterial(0),fWorldMaterial(0),fDefaultWorld(true),
63 fSolidWorld(0),fLogicWorld(0),fPhysiWorld(0),
64 fSolidAbsorber(0),fLogicAbsorber(0),fPhysiAbsorber(0),
68 fAbsorberThickness = 1.*
cm;
69 fAbsorberSizeYZ = 2.*
cm;
71 ComputeCalorParameters();
86 delete fDetectorMessenger;
93 return ConstructCalorimeter();
98 void DetectorConstruction::DefineMaterials()
105 G4int ncomponents, natoms;
132 new G4Material(
"liquidArgon", density= 1.390*
g/
cm3, ncomponents=1);
230 new G4Material(
"XenonMethanePropane", density= 4.9196*
mg/
cm3, ncomponents=3,
250 temperature = 2.73*
kelvin;
257 void DetectorConstruction::ComputeCalorParameters()
260 fXstartAbs = fXposAbs-0.5*fAbsorberThickness;
261 fXendAbs = fXposAbs+0.5*fAbsorberThickness;
266 if (fDefaultWorld || 2*xmax >= fWorldSizeX ||
267 fAbsorberSizeYZ >= fWorldSizeYZ)
269 fWorldSizeX = 3*xmax;
270 fWorldSizeYZ= 1.2*fAbsorberSizeYZ;
280 fSolidWorld =
new G4Box(
"World",
281 fWorldSizeX/2,fWorldSizeYZ/2,fWorldSizeYZ/2);
297 fSolidAbsorber =
new G4Box(
"Absorber",
298 fAbsorberThickness/2,fAbsorberSizeYZ/2,fAbsorberSizeYZ/2);
327 <<
" of " << fWorldMaterial->
GetName();
328 G4cout <<
". The transverse size (YZ) of the world is "
330 G4cout <<
" The ABSORBER is made of "
332 <<
" of " << fAbsorberMaterial->
GetName();
333 G4cout <<
". The transverse size (YZ) is "
335 G4cout <<
" X position of the middle of the absorber "
348 if (pttoMaterial && fAbsorberMaterial != pttoMaterial) {
349 fAbsorberMaterial = pttoMaterial;
350 if(fLogicAbsorber) { fLogicAbsorber->
SetMaterial(fAbsorberMaterial); }
363 if (pttoMaterial && fWorldMaterial != pttoMaterial) {
364 fWorldMaterial = pttoMaterial;
365 if(fLogicWorld) { fLogicWorld->
SetMaterial(fWorldMaterial); }
374 fAbsorberThickness = val;
375 ComputeCalorParameters();
376 if(fPhysiWorld) { ChangeGeometry(); }
383 fAbsorberSizeYZ = val;
384 ComputeCalorParameters();
385 if(fPhysiWorld) { ChangeGeometry(); }
393 fDefaultWorld =
false;
394 ComputeCalorParameters();
395 if(fPhysiWorld) { ChangeGeometry(); }
403 fDefaultWorld =
false;
404 ComputeCalorParameters();
405 if(fPhysiWorld) { ChangeGeometry(); }
412 if(!fPhysiWorld) { fXposAbs = val; }
419 if ( fFieldMessenger.
Get() == 0 ) {
428 fFieldMessenger.
Put( msg );
434 void DetectorConstruction::ChangeGeometry()
G4IonisParamMat * GetIonisation() const
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
void SetZHalfLength(G4double dz)
void SetWorldSizeYZ(G4double)
static constexpr double mg
CLHEP::Hep3Vector G4ThreeVector
void AddMaterial(G4Material *material, G4double fraction)
std::vector< ExP01TrackerHit * > a
int universe_mean_density
void SetMeanExcitationEnergy(G4double value)
const G4String & GetName() const
G4VPhysicalVolume * Construct()
void SetWorldMaterial(const G4String &)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
static G4NistManager * Instance()
static constexpr double g
virtual void ConstructSDandField()
void SetAbsorberThickness(G4double)
G4GLOB_DLL std::ostream G4cout
void PhysicsHasBeenModified()
static constexpr double cm
static constexpr double eV
static constexpr double kelvin
static constexpr double cm3
static G4RunManager * GetRunManager()
T max(const T t1, const T t2)
brief Return the largest of the two arguments
void SetYHalfLength(G4double dy)
void SetXHalfLength(G4double dx)
void AddElement(G4Element *element, G4int nAtoms)
void SetWorldSizeX(G4double)
void SetAbsorberXpos(G4double)
void PrintCalorParameters()
void SetMaterial(G4Material *pMaterial)
void SetAbsorberMaterial(G4String)
void Put(const value_type &val) const
static constexpr double atmosphere
static constexpr double mole
void SetAbsorberSizeYZ(G4double)
static constexpr double cm3