49 : physicalTreatmentRoom(0),
50 patientPhysicalVolume(0),
51 patientLogicalVolume(0),
62 delete detectorMessenger;
70 return physicalTreatmentRoom;
73 void GammaKnifeDetectorConstruction::ConstructBeamLine()
102 G4Box* treatmentRoom =
new G4Box(
"TreatmentRoom",worldX,worldY,worldZ);
106 "logicTreatmentRoom",
111 "physicalTreatmentRoom",
122 grayFe -> SetVisibility(
true);
123 grayFe -> SetForceSolid(
true);
126 blueCobalt -> SetVisibility(
true);
127 blueCobalt -> SetForceSolid(
true);
130 graySS -> SetVisibility(
true);
131 graySS -> SetForceSolid(
true);
134 grayAl -> SetVisibility(
true);
135 grayAl -> SetForceSolid(
true);
138 blackLead -> SetVisibility(
true);
139 blackLead -> SetForceSolid(
true);
143 colorTungsten -> SetVisibility(
true);
144 colorTungsten -> SetForceSolid(
true);
153 G4double innerRadiusOfTheTube_source = 0.;
154 G4double outerRadiusOfTheTube_source = 0.5*
mm;
161 solidTube_source =
new G4Tubs(
"solidTube_source",
162 innerRadiusOfTheTube_source,
163 outerRadiusOfTheTube_source,
164 hightOfTheTube_source,
166 spanningAngleOfTheTube);
167 logicTube_source =
new G4LogicalVolume(solidTube_source,cobalt,
"logicTube_source",0,0,0);
176 logicTube_source -> SetVisAttributes(blueCobalt);
189 solidTube =
new G4Tubs(
"solidTube",
190 innerRadiusOfTheTube,
191 outerRadiusOfTheTube,
194 spanningAngleOfTheTube);
204 logicTube -> SetVisAttributes(graySS);
215 solidTube_Al =
new G4Tubs(
"solidTube_Al",
216 innerRadiusOfTheTube_Al,
217 outerRadiusOfTheTube_Al,
220 spanningAngleOfTheTube);
221 logicTube_Al =
new G4LogicalVolume(solidTube_Al,Al,
"logicTube_Al",0,0,0);
230 logicTube_Al -> SetVisAttributes(grayAl);
242 solidTube_Fe =
new G4Tubs(
"solidTube_Fe",
243 innerRadiusOfTheTube_Fe,
244 outerRadiusOfTheTube_Fe,
247 spanningAngleOfTheTube);
248 logicTube_Fe =
new G4LogicalVolume(solidTube_Fe,Fe,
"logicTube_Fe",0,0,0);
257 logicTube_Fe -> SetVisAttributes(grayFe);
266 G4double innerRadiusOfTheTube_post = 0;
272 solidTube_post =
new G4Tubs(
"solidTube_post",
273 innerRadiusOfTheTube_post,
274 outerRadiusOfTheTube_post,
277 spanningAngleOfTheTube);
278 logicTube_post =
new G4LogicalVolume(solidTube_post,Fe,
"logicTube_post",0,0,0);
287 logicTube_post -> SetVisAttributes(grayFe);
300 solidTube_coll =
new G4Tubs(
"solidTube_coll",
301 innerRadiusOfTheTube_coll,
302 outerRadiusOfTheTube_coll,
305 spanningAngleOfTheTube);
306 logicTube_coll =
new G4LogicalVolume(solidTube_coll,tungsten,
"logicTube_coll",0,0,0);
315 logicTube_coll -> SetVisAttributes(colorTungsten);
322 G4double innerRadiusOfTheTube_coll_Fe = 15.*
mm;
323 G4double outerRadiusOfTheTube_coll_Fe = 50.*
mm;
328 solidTube_coll_Fe =
new G4Tubs(
"solidTube_coll_Fe",
329 innerRadiusOfTheTube_coll_Fe,
330 outerRadiusOfTheTube_coll_Fe,
331 hightOfTheTube_coll_Fe,
333 spanningAngleOfTheTube);
334 logicTube_coll_Fe =
new G4LogicalVolume(solidTube_coll_Fe,Fe,
"logicTube_coll_Fe",0,0,0);
336 positionTube_coll_Fe,
343 logicTube_coll_Fe -> SetVisAttributes(grayFe);
359 solidColl_fixed =
new G4Cons(
"solidColl_fixed",
366 spanningAngleOfTheTube);
367 logicColl_fixed =
new G4LogicalVolume(solidColl_fixed,Pb,
"logicColl_fixed",0,0,0);
376 logicColl_fixed -> SetVisAttributes(blackLead);
392 solidColl_fixed_Fe =
new G4Cons(
"solidColl_fixed_Fe",
399 spanningAngleOfTheTube);
400 logicColl_fixed_Fe =
new G4LogicalVolume(solidColl_fixed_Fe,Fe,
"logicColl_fixed_Fe",0,0,0);
402 positionColl_fixed_Fe,
409 logicColl_fixed_Fe -> SetVisAttributes(grayFe);
422 solidColl_helmet =
new G4Cons(
"solidColl_helmet",
429 spanningAngleOfTheTube);
432 logicColl_helmet =
new G4LogicalVolume(solidColl_helmet,tungsten,
"logicColl_helmet",0,0,0);
441 logicColl_helmet -> SetVisAttributes(colorTungsten);
455 solidColl_helmet_Fe =
new G4Cons(
"solidColl_helmet_Fe",
462 spanningAngleOfTheTube);
463 logicColl_helmet_Fe =
new G4LogicalVolume(solidColl_helmet_Fe,Fe,
"logicColl_helmet_Fe",0,0,0);
465 positionColl_helmet_Fe,
472 logicColl_helmet_Fe -> SetVisAttributes(grayFe);
482 "patientLog", 0, 0, 0);
486 patientLogicalVolume,
487 physicalTreatmentRoom,
492 redWire -> SetVisibility(
true);
493 redWire -> SetForceWireframe(
true);
494 redWire -> SetForceAuxEdgeVisible(
true);
495 patientLogicalVolume -> SetVisAttributes(redWire);
499 void GammaKnifeDetectorConstruction::UpdateHelmet()
501 if (solidColl_helmet)
532 if (size != helmetSize)
542 G4cout <<
"Helmet size set to " << helmetSize << std::endl;
546 G4Exception(
"GammaKnifeDetectorConstruction::SetHelmetSize()",
"GammaKnife001",
FatalException,
"Error: Invalid helmet size.");