53 :fSolidWorld(0), fLogicWorld(0), fPhysiWorld(0),
54 fSolidTarget(0), fLogicTarget(0), fPhysiTarget(0),
55 fSolidDetector(0),fLogicDetector(0),fPhysiDetector(0),
57 fDefaultMater(0),fTargetMater(0),fDetectorMater(0),
58 fTargetLength (1.*
cm), fTargetRadius(0.5*
cm),
59 fDetectorLength(5.0 *
cm), fDetectorThickness(2.0 *
cm),
60 fWorldLength (std::max(fTargetLength,fDetectorLength)),
61 fWorldRadius (fTargetRadius + fDetectorThickness),
62 fTargetRegion(0), fDetectorRegion(0)
72 delete fDetectorMessenger;
77 void exrdmDetectorConstruction::DefineMaterials()
92 fDefaultMater = fMaterialsManager->
GetMaterial(
"Air");
93 fTargetMater = fMaterialsManager->
GetMaterial(
"CsI");
94 fDetectorMater = fMaterialsManager->
GetMaterial(
"Germanium");
104 fWorldLength = std::max(fTargetLength,fDetectorLength);
105 fWorldRadius = fTargetRadius + fDetectorThickness;
111 fSolidWorld=
new G4Tubs(
"world",0.,fWorldRadius,fWorldLength/2.,0.,
twopi);
112 fLogicWorld=
new G4LogicalVolume( fSolidWorld, fDefaultMater,
"World", 0, 0, 0);
130 fSolidTarget =
new G4Tubs(
"target",0.,fTargetRadius,fTargetLength/2.,0.,
twopi);
131 fLogicTarget =
new G4LogicalVolume(fSolidTarget,fTargetMater,
"Target",0,0,0);
149 fSolidDetector =
new G4Tubs(
"detector",fTargetRadius,fWorldRadius,
150 fDetectorLength/2.,0.,
twopi);
178 fTargetRegion =
new G4Region(
"Target");
179 fDetectorRegion =
new G4Region(
"Detector");
201 G4String command =
"/gps/pos/centre ";
202 std::ostringstream os;
207 command =
"/gps/position ";
224 {fTargetMater = pttoMaterial;
225 if (fLogicTarget) fLogicTarget->
SetMaterial(pttoMaterial);
226 G4cout <<
"\n----> The target has been changed to " << fTargetLength/
cm
228 << materialName <<
G4endl;
239 {fDetectorMater = pttoMaterial;
240 if (fLogicDetector) fLogicDetector->
SetMaterial(pttoMaterial);
241 G4cout <<
"\n----> The Deetctor has been changed to" << fDetectorLength/
cm
243 << materialName <<
G4endl;