77 using namespace CLHEP;
94 fWorldMaterialName(
"G4_Galactic"),
95 fTargetMaterialName(
"G4_B"),
96 fCasingMaterialName(
"G4_WATER"),
100 fMfdName(
"Target_MFD")
141 G4bool check_overlap =
true;
148 materials.find(
"World")
155 0,
false, 0, check_overlap);
187 world_log->SetVisAttributes(white);
189 for(
G4int k = 0; k < nz; ++k)
190 for(
G4int j = 0; j < ny; ++j)
191 for(
G4int i = 0; i < nx; ++i)
202 std::stringstream ss_name;
203 ss_name <<
"Target_" << i <<
"_" << j <<
"_" << k;
205 G4Box* target_solid =
new G4Box(ss_name.str(),
214 if(j == 0 || j+1 == ny || i == 0 || i+1 == nx ||
215 (nz > 1 && (k == 0 || k+1 == nz)))
216 target_material = materials.find(
"Casing")->second;
218 target_material = materials.find(
"Target")->second;
245 G4bool even_z = (k%2 == 0) ?
true :
false;
246 G4bool even_y = (j%2 == 0) ?
true :
false;
247 G4bool even_x = (i%2 == 0) ?
true :
false;
253 if((even_y && even_x) || (!even_y && !even_x))
259 if((!even_y && even_x) || (even_y && !even_x))
G4ThreeVector fTargetSections
CLHEP::Hep3Vector G4ThreeVector
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
virtual ~TSDetectorConstruction()
void AddNewDetector(G4VSensitiveDetector *aSD)
ScoringVolumes_t fScoringVolumes
G4VPhysicalVolume * Construct()
virtual MaterialCollection_t ConstructMaterials()
static TSDetectorConstruction * Instance()
virtual void ConstructSDandField()
std::map< G4String, G4Material * > MaterialCollection_t
virtual G4VPhysicalVolume * ConstructWorld(const MaterialCollection_t &)
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
G4String fCasingMaterialName
G4bool RegisterPrimitive(G4VPrimitiveScorer *)
void SetVisAttributes(const G4VisAttributes *pVA)
void SetUserLimits(G4UserLimits *pULimits)
static constexpr double m
void SetForceSolid(G4bool=true)
void SetVisibility(G4bool=true)
static G4SDManager * GetSDMpointer()
G4String fWorldMaterialName
G4VPhysicalVolume * fWorldPhys
void SetForceWireframe(G4bool=true)
G4String fTargetMaterialName
Definition of the TSDetectorConstruction class.
static TSDetectorConstruction * fgInstance
static G4NistManager * Instance()