35 #include "DetectorConstruction.hh"
36 #include "DetectorMessenger.hh"
59 fAbsorMaterial(0), fLAbsor(0), fContainMaterial(0), fLContain(0),
60 fWorldMaterial(0), fPWorld(0), fDetectorMessenger(0)
64 fContainThickness = 2.4*
mm;
74 {
delete fDetectorMessenger;}
80 return ConstructVolumes();
85 void DetectorConstruction::DefineMaterials()
87 G4int ncomponents, natoms;
112 fWorldMaterial = Air;
149 G4double ContainRadius = fAbsorRadius + fContainThickness;
150 G4double ContainLength = fAbsorLength + 2*fContainThickness;
152 G4double WorldSizeXY = 2.4*ContainRadius;
153 G4double WorldSizeZ = 1.2*ContainLength;
158 sWorld =
new G4Box(
"World",
159 0.5*WorldSizeXY,0.5*WorldSizeXY,0.5*WorldSizeZ);
177 sContain =
new G4Tubs(
"Container",
178 0., ContainRadius, 0.5*ContainLength, 0.,
twopi);
195 sAbsor =
new G4Tubs(
"Absorber",
196 0., fAbsorRadius, 0.5*fAbsorLength, 0.,
twopi);
221 G4cout <<
"\n The Absorber is a cylinder of " << fAbsorMaterial->
GetName()
222 <<
" radius = " <<
G4BestUnit(fAbsorRadius,
"Length")
224 G4cout <<
" The Container is a cylinder of " << fContainMaterial->
GetName()
240 fAbsorMaterial = pttoMaterial;
241 if(fLAbsor) { fLAbsor->
SetMaterial(fAbsorMaterial); }
244 G4cout <<
"\n--> warning from DetectorConstruction::SetAbsorMaterial : "
245 << materialChoice <<
" not found" <<
G4endl;
258 fContainMaterial = pttoMaterial;
259 if(fLContain) { fLContain->
SetMaterial(fContainMaterial); }
262 G4cout <<
"\n--> warning from DetectorConstruction::SetContainMaterial : "
263 << materialChoice <<
" not found" <<
G4endl;
271 fAbsorRadius =
value;
279 fAbsorLength =
value;
287 fContainThickness =
value;
void SetAbsorLength(G4double)
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
static constexpr double mm
static constexpr double mg
CLHEP::Hep3Vector G4ThreeVector
static constexpr double perCent
const G4String & GetName() const
G4VPhysicalVolume * Construct()
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
static G4NistManager * Instance()
static constexpr double twopi
static G4PhysicalVolumeStore * GetInstance()
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
const XML_Char int const XML_Char * value
void PhysicsHasBeenModified()
void SetAbsorMaterial(G4int, const G4String &)
void AddIsotope(G4Isotope *isotope, G4double RelativeAbundance)
static G4LogicalVolumeStore * GetInstance()
static G4SolidStore * GetInstance()
static G4GeometryManager * GetInstance()
static constexpr double cm3
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
G4Material * MaterialWithSingleIsotope(G4String, G4String, G4double, G4int, G4int)
void SetAbsorRadius(G4double)
void SetContainMaterial(G4String)
void OpenGeometry(G4VPhysicalVolume *vol=0)
void AddElement(G4Element *element, G4int nAtoms)
void SetContainThickness(G4double)
void SetMaterial(G4Material *pMaterial)
static constexpr double mole