34 #include "DetectorConstruction.hh"
35 #include "DetectorMessenger.hh"
62 fWorldMaterial(0),fAbsorMaterial(0),fMagField(0),fLAbsor(0),
66 fAbsorSizeX = fAbsorSizeYZ = 20*
cm;
67 fWorldSizeX = fWorldSizeYZ = 1.2*fAbsorSizeX;
69 fWorldMaterial = fAbsorMaterial = 0;
76 fTallyMaterial[j] = 0;
92 {
delete fDetectorMessenger;}
98 return ConstructVolumes();
103 void DetectorConstruction::DefineMaterials()
118 G4int ncomponents, natoms;
129 BuildMaterialWithNewDensity(
"Water_1.05",
"G4_WATER",1.05*
g/
cm3);
136 density = 1.e-5*
g/
cm3;
137 pressure = 2.e-2*
bar;
145 temperature = 2.73*
kelvin;
151 fWorldMaterial = vacuum;
166 sWorld =
new G4Box(
"World",
167 fWorldSizeX/2,fWorldSizeYZ/2,fWorldSizeYZ/2);
186 sAbsor =
new G4Box(
"Absorber",
187 fAbsorSizeX/2,fAbsorSizeYZ/2,fAbsorSizeYZ/2);
204 if (fTallyNumber > 0) {
205 for (
G4int j=1; j<=fTallyNumber; j++) {
208 fTallySize[j].
x()/2,fTallySize[j].y()/2,fTallySize[j].
z()/2);
220 fTallyMass[j] = fTallySize[j].
x()*fTallySize[j].
y()*fTallySize[j].
z()
238 G4cout <<
"\n---------------------------------------------------------\n";
239 G4cout <<
"---> The Absorber is " <<
G4BestUnit(fAbsorSizeX,
"Length")
241 G4cout <<
"\n---------------------------------------------------------\n";
243 if (fTallyNumber > 0) {
244 G4cout <<
"---> There are " << fTallyNumber <<
" tallies : " <<
G4endl;
245 for (
G4int j=1; j<=fTallyNumber; j++) {
246 G4cout <<
"fTally " << j <<
": "
247 << fTallyMaterial[j]->
GetName()
248 <<
", mass = " <<
G4BestUnit(fTallyMass[j],
"Mass")
249 <<
" size = " <<
G4BestUnit(fTallySize[j],
"Length")
250 <<
" position = " <<
G4BestUnit(fTallyPosition[j],
"Length")
253 G4cout <<
"\n---------------------------------------------------------\n";
261 fAbsorSizeX =
value; fWorldSizeX = 1.2*fAbsorSizeX;
269 fAbsorSizeYZ =
value;
270 fWorldSizeYZ = 1.2*fAbsorSizeYZ;
282 fAbsorMaterial = pttoMaterial;
298 if (fMagField)
delete fMagField;
316 fTallyNumber =
value;
323 fTallySize[j] =
value;
335 fTallyMaterial[j] = pttoMaterial;
348 fTallyPosition[j] =
value;
void GeometryHasBeenModified(G4bool prop=true)
void SetTallyMaterial(G4int, G4String)
G4IonisParamMat * GetIonisation() const
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
CLHEP::Hep3Vector G4ThreeVector
G4bool SetDetectorField(G4Field *detectorField)
void AddMaterial(G4Material *material, G4double fraction)
int universe_mean_density
void SetMeanExcitationEnergy(G4double value)
const G4String & GetName() const
G4VPhysicalVolume * Construct()
static G4MaterialTable * GetMaterialTable()
G4double GetDensity() const
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
static G4NistManager * Instance()
virtual void DefineWorldVolume(G4VPhysicalVolume *worldVol, G4bool topologyIsChanged=true)
static G4PhysicalVolumeStore * GetInstance()
G4GLOB_DLL std::ostream G4cout
void PhysicsHasBeenModified()
static G4LogicalVolumeStore * GetInstance()
static G4SolidStore * GetInstance()
static G4GeometryManager * GetInstance()
static G4TransportationManager * GetTransportationManager()
G4FieldManager * GetFieldManager() const
static G4RunManager * GetRunManager()
void SetMagField(G4double)
void SetTallySize(G4int, G4ThreeVector)
const XML_Char int const XML_Char * value
void SetTallyPosition(G4int, G4ThreeVector)
void OpenGeometry(G4VPhysicalVolume *vol=0)
void AddElement(G4Element *element, G4int nAtoms)
void CreateChordFinder(G4MagneticField *detectorMagField)
void SetMaterial(G4Material *pMaterial)
void SetTallyNumber(G4int)
void SetMaterial(G4String)