49 : physicalTreatmentRoom(0),
50 patientPhysicalVolume(0),
51 patientLogicalVolume(0),
61 delete detectorMessenger;
69 return physicalTreatmentRoom;
72 void GammaKnifeDetectorConstruction::ConstructBeamLine()
88 steel -> AddElement(elFe, 70 *
perCent);
89 steel -> AddElement(elCr, 18 *
perCent);
90 steel -> AddElement(elNi, 12 *
perCent);
101 G4Box* treatmentRoom =
new G4Box(
"TreatmentRoom",worldX,worldY,worldZ);
105 "logicTreatmentRoom",
110 "physicalTreatmentRoom",
121 grayFe -> SetVisibility(
true);
122 grayFe -> SetForceSolid(
true);
125 blueCobalt -> SetVisibility(
true);
126 blueCobalt -> SetForceSolid(
true);
129 graySS -> SetVisibility(
true);
130 graySS -> SetForceSolid(
true);
133 grayAl -> SetVisibility(
true);
134 grayAl -> SetForceSolid(
true);
137 blackLead -> SetVisibility(
true);
138 blackLead -> SetForceSolid(
true);
142 colorTungsten -> SetVisibility(
true);
143 colorTungsten -> SetForceSolid(
true);
152 G4double innerRadiusOfTheTube_source = 0.;
153 G4double outerRadiusOfTheTube_source = 0.5*
mm;
160 solidTube_source =
new G4Tubs(
"solidTube_source",
161 innerRadiusOfTheTube_source,
162 outerRadiusOfTheTube_source,
163 hightOfTheTube_source,
165 spanningAngleOfTheTube);
166 logicTube_source =
new G4LogicalVolume(solidTube_source,cobalt,
"logicTube_source",0,0,0);
175 logicTube_source -> SetVisAttributes(blueCobalt);
188 solidTube =
new G4Tubs(
"solidTube",
189 innerRadiusOfTheTube,
190 outerRadiusOfTheTube,
193 spanningAngleOfTheTube);
203 logicTube -> SetVisAttributes(graySS);
214 solidTube_Al =
new G4Tubs(
"solidTube_Al",
215 innerRadiusOfTheTube_Al,
216 outerRadiusOfTheTube_Al,
219 spanningAngleOfTheTube);
220 logicTube_Al =
new G4LogicalVolume(solidTube_Al,Al,
"logicTube_Al",0,0,0);
229 logicTube_Al -> SetVisAttributes(grayAl);
241 solidTube_Fe =
new G4Tubs(
"solidTube_Fe",
242 innerRadiusOfTheTube_Fe,
243 outerRadiusOfTheTube_Fe,
246 spanningAngleOfTheTube);
247 logicTube_Fe =
new G4LogicalVolume(solidTube_Fe,Fe,
"logicTube_Fe",0,0,0);
256 logicTube_Fe -> SetVisAttributes(grayFe);
265 G4double innerRadiusOfTheTube_post = 0;
271 solidTube_post =
new G4Tubs(
"solidTube_post",
272 innerRadiusOfTheTube_post,
273 outerRadiusOfTheTube_post,
276 spanningAngleOfTheTube);
277 logicTube_post =
new G4LogicalVolume(solidTube_post,Fe,
"logicTube_post",0,0,0);
286 logicTube_post -> SetVisAttributes(grayFe);
299 solidTube_coll =
new G4Tubs(
"solidTube_coll",
300 innerRadiusOfTheTube_coll,
301 outerRadiusOfTheTube_coll,
304 spanningAngleOfTheTube);
305 logicTube_coll =
new G4LogicalVolume(solidTube_coll,tungsten,
"logicTube_coll",0,0,0);
314 logicTube_coll -> SetVisAttributes(colorTungsten);
321 G4double innerRadiusOfTheTube_coll_Fe = 15.*
mm;
322 G4double outerRadiusOfTheTube_coll_Fe = 50.*
mm;
327 solidTube_coll_Fe =
new G4Tubs(
"solidTube_coll_Fe",
328 innerRadiusOfTheTube_coll_Fe,
329 outerRadiusOfTheTube_coll_Fe,
330 hightOfTheTube_coll_Fe,
332 spanningAngleOfTheTube);
333 logicTube_coll_Fe =
new G4LogicalVolume(solidTube_coll_Fe,Fe,
"logicTube_coll_Fe",0,0,0);
335 positionTube_coll_Fe,
342 logicTube_coll_Fe -> SetVisAttributes(grayFe);
358 solidColl_fixed =
new G4Cons(
"solidColl_fixed",
365 spanningAngleOfTheTube);
366 logicColl_fixed =
new G4LogicalVolume(solidColl_fixed,Pb,
"logicColl_fixed",0,0,0);
375 logicColl_fixed -> SetVisAttributes(blackLead);
391 solidColl_fixed_Fe =
new G4Cons(
"solidColl_fixed_Fe",
398 spanningAngleOfTheTube);
399 logicColl_fixed_Fe =
new G4LogicalVolume(solidColl_fixed_Fe,Fe,
"logicColl_fixed_Fe",0,0,0);
401 positionColl_fixed_Fe,
408 logicColl_fixed_Fe -> SetVisAttributes(grayFe);
421 solidColl_helmet =
new G4Cons(
"solidColl_helmet",
428 spanningAngleOfTheTube);
431 logicColl_helmet =
new G4LogicalVolume(solidColl_helmet,tungsten,
"logicColl_helmet",0,0,0);
440 logicColl_helmet -> SetVisAttributes(colorTungsten);
454 solidColl_helmet_Fe =
new G4Cons(
"solidColl_helmet_Fe",
461 spanningAngleOfTheTube);
462 logicColl_helmet_Fe =
new G4LogicalVolume(solidColl_helmet_Fe,Fe,
"logicColl_helmet_Fe",0,0,0);
464 positionColl_helmet_Fe,
471 logicColl_helmet_Fe -> SetVisAttributes(grayFe);
481 "patientLog", 0, 0, 0);
485 patientLogicalVolume,
486 physicalTreatmentRoom,
491 redWire -> SetVisibility(
true);
492 redWire -> SetForceWireframe(
true);
493 redWire -> SetForceAuxEdgeVisible(
true);
494 patientLogicalVolume -> SetVisAttributes(redWire);
498 void GammaKnifeDetectorConstruction::UpdateHelmet()
500 if (solidColl_helmet)
531 if (size != helmetSize)
541 G4cout <<
"Helmet size set to " << helmetSize << std::endl;
545 G4Exception(
"GammaKnifeDetectorConstruction::SetHelmetSize()",
547 "Error: Invalid helmet size.");
void GeometryHasBeenModified(G4bool prop=true)
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
static constexpr double mm
void SetInnerRadiusMinusZ(G4double Rmin1)
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepRotation G4RotationMatrix
static constexpr double perCent
G4VPhysicalVolume * Construct()
static G4NistManager * Instance()
GammaKnifeDetectorConstruction()
G4GLOB_DLL std::ostream G4cout
void SetHelmetSize(G4int)
static constexpr double cm
static constexpr double cm3
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static G4RunManager * GetRunManager()
static constexpr double deg
G4Element * FindOrBuildElement(G4int Z, G4bool isotopes=true)
void SetInnerRadiusPlusZ(G4double Rmin2)
~GammaKnifeDetectorConstruction()
static const G4VisAttributes & GetInvisible()