31 #include "DetectorConstruction0.hh"
47 fMaterialName(materialName),
48 fDimensions(hx, hy, hz),
69 auto material = nistManager->FindOrBuildMaterial(
fMaterialName);
104 auto newMaterial = nistManager->FindOrBuildMaterial(materialName);
105 if ( ! newMaterial ) {
106 G4cerr <<
"Material " << materialName <<
" not found." <<
G4endl;
107 G4cerr <<
"The box material was not changed." <<
G4endl;
111 if ( fWorldVolume ) fWorldVolume->SetMaterial(newMaterial);
112 G4cout <<
"Material of box changed to " << materialName <<
G4endl;
138 "Set world material name.");
144 auto& setDimensionsCmd
147 "Set world dimensions (in half lentgh).");
G4LogicalVolume * fWorldVolume
This class is generic messenger.
CLHEP::Hep3Vector G4ThreeVector
Command & DeclareMethodWithUnit(const G4String &name, const G4String &defaultUnit, const G4AnyMethod &fun, const G4String &doc="")
Command & SetDefaultValue(const G4String &)
Command & DeclareMethod(const G4String &name, const G4AnyMethod &fun, const G4String &doc="")
virtual G4VPhysicalVolume * Construct()
Command & SetStates(G4ApplicationState s0)
G4ThreeVector fDimensions
G4GLOB_DLL std::ostream G4cerr
void SetMaterial(const G4String &materialName)
Command & SetParameterName(const G4String &, G4bool, G4bool=false)
DetectorConstruction0(const G4String &materialName="G4_AIR", G4double hx=50 *CLHEP::cm, G4double hy=50 *CLHEP::cm, G4double hz=50 *CLHEP::cm)
G4GLOB_DLL std::ostream G4cout
void SetDimensions(G4ThreeVector dimensions)
G4GenericMessenger * fMessenger
static G4NistManager * Instance()