76 using namespace CLHEP;
93 fWorldMaterialName(
"G4_Galactic"),
94 fTargetMaterialName(
"G4_B"),
95 fCasingMaterialName(
"G4_WATER"),
99 fMfdName(
"Target_MFD")
140 G4bool check_overlap =
true;
147 materials.find(
"World")
154 0,
false, 0, check_overlap);
186 world_log->SetVisAttributes(white);
188 for(
G4int k = 0; k < nz; ++k)
189 for(
G4int j = 0; j < ny; ++j)
190 for(
G4int i = 0; i < nx; ++i)
201 std::stringstream ss_name;
202 ss_name <<
"Target_" << i <<
"_" << j <<
"_" << k;
204 G4Box* target_solid =
new G4Box(ss_name.str(),
213 if(j == 0 || j+1 == ny || i == 0 || i+1 == nx ||
214 (nz > 1 && (k == 0 || k+1 == nz)))
215 target_material = materials.find(
"Casing")->second;
217 target_material = materials.find(
"Target")->second;
244 G4bool even_z = (k%2 == 0) ?
true :
false;
245 G4bool even_y = (j%2 == 0) ?
true :
false;
246 G4bool even_x = (i%2 == 0) ?
true :
false;
252 if((even_y && even_x) || (!even_y && !even_x))
258 if((!even_y && even_x) || (even_y && !even_x))
virtual void ConstructSDandField()
G4String fWorldMaterialName
G4bool RegisterPrimitive(G4VPrimitiveScorer *)
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
void SetForceWireframe(G4bool)
CLHEP::Hep3Vector G4ThreeVector
virtual MaterialCollection_t ConstructMaterials()
void SetVisibility(G4bool)
void SetUserLimits(G4UserLimits *pULimits)
void SetForceSolid(G4bool)
static G4NistManager * Instance()
G4String fTargetMaterialName
static TSDetectorConstruction * Instance()
virtual G4VPhysicalVolume * ConstructWorld(const MaterialCollection_t &)
static TSDetectorConstruction * fgInstance
G4ThreeVector fTargetSections
G4String fCasingMaterialName
std::map< G4String, G4Material * > MaterialCollection_t
G4VPhysicalVolume * fWorldPhys
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
virtual ~TSDetectorConstruction()
Definition of the TSDetectorConstruction class.
G4VPhysicalVolume * Construct()
void SetVisAttributes(const G4VisAttributes *pVA)
ScoringVolumes_t fScoringVolumes