50 modulator(0), physicalTreatmentRoom(0),hadrontherapyDetectorConstruction(0),
51 physiBeamLineSupport(0), physiBeamLineCover(0), physiBeamLineCover2(0),
52 firstScatteringFoil(0), physiFirstScatteringFoil(0), physiKaptonWindow(0),
53 solidStopper(0), physiStopper(0), secondScatteringFoil(0), physiSecondScatteringFoil(0),
54 physiFirstCollimator(0), solidRangeShifterBox(0), logicRangeShifterBox(0),
55 physiRangeShifterBox(0), physiSecondCollimator(0), physiFirstCollimatorModulatorBox(0),
56 physiHoleFirstCollimatorModulatorBox(0), physiSecondCollimatorModulatorBox(0),
57 physiHoleSecondCollimatorModulatorBox(0), physiMOPIMotherVolume(0),
58 physiFirstMonitorLayer1(0), physiFirstMonitorLayer2(0), physiFirstMonitorLayer3(0),
59 physiFirstMonitorLayer4(0), physiSecondMonitorLayer1(0), physiSecondMonitorLayer2(0),
60 physiSecondMonitorLayer3(0), physiSecondMonitorLayer4(0), physiNozzleSupport(0), physiBrassTube(0), solidFinalCollimator(0), physiFinalCollimator(0)
66 static G4String ROGeometryName =
"DetectorROGeometry";
69 G4cout <<
"Going to register Parallel world...";
123 white -> SetVisibility(
true);
124 white -> SetForceSolid(
true);
127 blue -> SetVisibility(
true);
128 blue -> SetForceSolid(
true);
131 gray-> SetVisibility(
true);
132 gray-> SetForceSolid(
true);
135 red-> SetVisibility(
true);
136 red-> SetForceSolid(
true);
139 yellow-> SetVisibility(
true);
140 yellow-> SetForceSolid(
true);
143 green -> SetVisibility(
true);
144 green -> SetForceSolid(
true);
155 skyBlue -> SetVisibility(
true);
156 skyBlue -> SetForceSolid(
true);
170 G4double defaultVacuumZoneXPosition = -3010.0 *
mm;
175 G4double defaultFirstScatteringFoilXSize = 0.0075 *
mm;
178 G4double defaultFirstScatteringFoilYSize = 52.5 *
mm;
181 G4double defaultFirstScatteringFoilZSize = 52.5 *
mm;
184 G4double defaultFirstScatteringFoilXPosition = 0.0 *
mm;
197 G4double defaultKaptonWindowXPosition = 100.0*
mm - defaultKaptonWindowXSize;
215 G4double defaultStopperXPosition = -2705.0 *
mm;
230 G4double defaultSecondScatteringFoilXSize = 0.0125 *
mm;
233 G4double defaultSecondScatteringFoilYSize = 52.5 *
mm;
236 G4double defaultSecondScatteringFoilZSize = 52.5 *
mm;
239 G4double defaultSecondScatteringFoilXPosition = defaultStopperXPosition + defaultHeightStopper + defaultSecondScatteringFoilXSize;
242 G4double defaultSecondScatteringFoilYPosition = 0 *
mm;
245 G4double defaultSecondScatteringFoilZPosition = 0 *
mm;
262 G4double defaultRangeShifterXPosition = -2393.0 *
mm;
265 G4double defaultRangeShifterYPosition = 0. *
mm;
268 G4double defaultRangeShifterZPosition = 0. *
mm;
279 G4double defaultMOPIMotherVolumeXSize = 12127.0 *
um;
282 G4double defaultMOPIMotherVolumeYSize = 40.0 *
cm;
285 G4double defaultMOPIMotherVolumeZSize = 40.0 *
cm;
288 G4double defaultMOPIMotherVolumeXPosition = -1000.0 *
mm;
291 G4double defaultMOPIMotherVolumeYPosition = 0.0 *
mm;
294 G4double defaultMOPIMotherVolumeZPosition = 0.0 *
mm;
298 G4double defaultMOPIFirstKaptonLayerXSize = 35 *
um;
301 G4double defaultMOPIFirstKaptonLayerYSize = 30 *
cm;
304 G4double defaultMOPIFirstKaptonLayerZSize = 30 *
cm;
310 G4double defaultMOPIFirstKaptonLayerYPosition = 0.0 *
mm;
313 G4double defaultMOPIFirstKaptonLayerZPosition = 0.0 *
mm;
317 G4double defaultMOPIFirstAluminumLayerXSize = 15 *
um;
320 G4double defaultMOPIFirstAluminumLayerYSize = 30 *
cm;
323 G4double defaultMOPIFirstAluminumLayerZSize = 30 *
cm;
326 G4double defaultMOPIFirstAluminumLayerXPosition =
330 G4double defaultMOPIFirstAluminumLayerYPosition = 0.0 *
mm;
333 G4double defaultMOPIFirstAluminumLayerZPosition = 0.0 *
mm;
337 G4double defaultMOPIFirstAirGapXSize = 6000 *
um;
340 G4double defaultMOPIFirstAirGapYSize = 30 *
cm;
343 G4double defaultMOPIFirstAirGapZSize = 30 *
cm;
346 G4double defaultMOPIFirstAirGapXPosition =
350 G4double defaultMOPIFirstAirGapYPosition = 0.0 *
mm;
353 G4double defaultMOPIFirstAirGapZPosition = 0.0 *
mm;
366 G4double defaultMOPICathodeXPosition =
370 G4double defaultMOPICathodeYPosition = 0.0 *
mm;
373 G4double defaultMOPICathodeZPosition = 0.0 *
mm;
377 G4double defaultMOPISecondAirGapXSize = 6000 *
um;
380 G4double defaultMOPISecondAirGapYSize = 30 *
cm;
383 G4double defaultMOPISecondAirGapZSize = 30 *
cm;
386 G4double defaultMOPISecondAirGapXPosition =
390 G4double defaultMOPISecondAirGapYPosition = 0.0 *
mm;
393 G4double defaultMOPISecondAirGapZPosition = 0.0 *
mm;
397 G4double defaultMOPISecondAluminumLayerXSize = 15 *
um;
400 G4double defaultMOPISecondAluminumLayerYSize = 30 *
cm;
403 G4double defaultMOPISecondAluminumLayerZSize = 30 *
cm;
406 G4double defaultMOPISecondAluminumLayerXPosition =
410 G4double defaultMOPISecondAluminumLayerYPosition = 0.0 *
mm;
413 G4double defaultMOPISecondAluminumLayerZPosition = 0.0 *
mm;
417 G4double defaultMOPISecondKaptonLayerXSize = 35 *
um;
420 G4double defaultMOPISecondKaptonLayerYSize = 30 *
cm;
423 G4double defaultMOPISecondKaptonLayerZSize = 30 *
cm;
426 G4double defaultMOPISecondKaptonLayerXPosition =
430 G4double defaultMOPISecondKaptonLayerYPosition = 0.0 *
mm;
433 G4double defaultMOPISecondKaptonLayerZPosition = 0.0 *
mm;
439 G4double defaultinnerRadiusFinalCollimator = 7.5 *
mm;
467 brass -> AddElement(zincNist, fractionmass = 30 *
perCent);
468 brass -> AddElement(copperNist, fractionmass = 70 *
perCent);
548 G4Box* treatmentRoom =
new G4Box(
"TreatmentRoom",worldX,worldY,worldZ);
551 "logicTreatmentRoom",
555 "physicalTreatmentRoom",
586 const G4double beamLineSupportXSize = 1.5*
m;
588 const G4double beamLineSupportZSize = 600.*
mm;
590 const G4double beamLineSupportXPosition = -1745.09 *
mm;
591 const G4double beamLineSupportYPosition = -230. *
mm;
592 const G4double beamLineSupportZPosition = 0.*
mm;
594 G4Box* beamLineSupport =
new G4Box(
"BeamLineSupport",
595 beamLineSupportXSize,
596 beamLineSupportYSize,
597 beamLineSupportZSize);
603 beamLineSupportYPosition,
604 beamLineSupportZPosition),
606 logicBeamLineSupport,
611 logicBeamLineSupport -> SetVisAttributes(
gray);
616 const G4double beamLineCoverXSize = 1.5*
m;
620 const G4double beamLineCoverXPosition = -1745.09 *
mm;
621 const G4double beamLineCoverYPosition = -1000.*
mm;
622 const G4double beamLineCoverZPosition = 600.*
mm;
624 G4Box* beamLineCover =
new G4Box(
"BeamLineCover",
634 beamLineCoverYPosition,
635 beamLineCoverZPosition),
647 beamLineCoverYPosition,
648 - beamLineCoverZPosition),
655 logicBeamLineCover -> SetVisAttributes(
blue);
684 "FirstScatteringFoil");
687 "FirstScatteringFoil", logicFirstScatteringFoil, physiVacuumZone,
690 logicFirstScatteringFoil -> SetVisAttributes(
skyBlue);
696 G4Box* solidKaptonWindow =
new G4Box(
"KaptonWindow",
706 "KaptonWindow", logicKaptonWindow,
707 physiVacuumZone,
false, 0);
709 logicKaptonWindow -> SetVisAttributes(
darkOrange3);
759 "SecondScatteringFoil");
764 "SeconScatteringFoil",
765 logicSecondScatteringFoil,
770 logicSecondScatteringFoil -> SetVisAttributes(
skyBlue);
815 const G4double firstCollimatorYSize = 100.*
mm;
816 const G4double firstCollimatorZSize = 100.*
mm;
818 const G4double firstCollimatorXPosition = -2673.00*
mm;
819 const G4double firstCollimatorYPosition = 0.*
mm;
820 const G4double firstCollimatorZPosition = 0.*
mm;
823 G4Box* solidFirstCollimator =
new G4Box(
"FirstCollimator",
824 firstCollimatorXSize,
825 firstCollimatorYSize,
826 firstCollimatorZSize);
833 firstCollimatorYPosition,
834 firstCollimatorZPosition),
836 logicFirstCollimator,
843 G4double innerRadiusHoleFirstCollimator = 0.*
mm;
844 G4double outerRadiusHoleFirstCollimator = 15.*
mm;
847 G4double spanningAngleHoleFirstCollimator = 360.*
deg;
849 G4Tubs* solidHoleFirstCollimator =
new G4Tubs(
"HoleFirstCollimator",
850 innerRadiusHoleFirstCollimator,
851 outerRadiusHoleFirstCollimator,
852 hightHoleFirstCollimator,
853 startAngleHoleFirstCollimator,
854 spanningAngleHoleFirstCollimator);
858 "HoleFirstCollimator",
866 "HoleFirstCollimator",
867 logicHoleFirstCollimator,
875 const G4double secondCollimatorXPosition = -1900.00*
mm;
876 const G4double secondCollimatorYPosition = 0*
mm;
877 const G4double secondCollimatorZPosition = 0*
mm;
880 secondCollimatorYPosition,
881 secondCollimatorZPosition),
883 logicFirstCollimator,
892 "HoleSecondCollimator",
893 logicHoleFirstCollimator,
907 const G4double firstCollimatorModulatorXSize = 10.*
mm;
908 const G4double firstCollimatorModulatorYSize = 200.*
mm;
909 const G4double firstCollimatorModulatorZSize = 200.*
mm;
911 const G4double firstCollimatorModulatorXPosition = -2523.00*
mm;
912 const G4double firstCollimatorModulatorYPosition = 0.*
mm;
913 const G4double firstCollimatorModulatorZPosition = 0.*
mm;
915 G4Box* solidFirstCollimatorModulatorBox =
new G4Box(
"FirstCollimatorModulatorBox",
916 firstCollimatorModulatorXSize,
917 firstCollimatorModulatorYSize,
918 firstCollimatorModulatorZSize);
922 "FirstCollimatorModulatorBox");
925 firstCollimatorModulatorYPosition,
926 firstCollimatorModulatorZPosition),
927 "FirstCollimatorModulatorBox",
928 logicFirstCollimatorModulatorBox,
934 const G4double innerRadiusHoleFirstCollimatorModulatorBox = 0.*
mm;
935 const G4double outerRadiusHoleFirstCollimatorModulatorBox = 31.*
mm;
936 const G4double hightHoleFirstCollimatorModulatorBox = 10.*
mm;
937 const G4double startAngleHoleFirstCollimatorModulatorBox = 0.*
deg;
938 const G4double spanningAngleHoleFirstCollimatorModulatorBox = 360.*
deg;
940 G4Tubs* solidHoleFirstCollimatorModulatorBox =
new G4Tubs(
"HoleFirstCollimatorModulatorBox",
941 innerRadiusHoleFirstCollimatorModulatorBox,
942 outerRadiusHoleFirstCollimatorModulatorBox,
943 hightHoleFirstCollimatorModulatorBox ,
944 startAngleHoleFirstCollimatorModulatorBox,
945 spanningAngleHoleFirstCollimatorModulatorBox);
949 "HoleFirstCollimatorModulatorBox",
953 "HoleFirstCollimatorModulatorBox",
954 logicHoleFirstCollimatorModulatorBox,
960 const G4double secondCollimatorModulatorXSize = 10.*
mm;
961 const G4double secondCollimatorModulatorYSize = 200.*
mm;
962 const G4double secondCollimatorModulatorZSize = 200.*
mm;
964 const G4double secondCollimatorModulatorXPosition = -1953.00 *
mm;
966 const G4double secondCollimatorModulatorYPosition = 0.*
mm;
967 const G4double secondCollimatorModulatorZPosition = 0.*
mm;
969 G4Box* solidSecondCollimatorModulatorBox =
new G4Box(
"SecondCollimatorModulatorBox",
970 secondCollimatorModulatorXSize,
971 secondCollimatorModulatorYSize,
972 secondCollimatorModulatorZSize);
976 "SecondCollimatorModulatorBox");
979 secondCollimatorModulatorYPosition,
980 secondCollimatorModulatorZPosition),
981 "SecondCollimatorModulatorBox",
982 logicSecondCollimatorModulatorBox,
988 const G4double innerRadiusHoleSecondCollimatorModulatorBox = 0.*
mm;
989 const G4double outerRadiusHoleSecondCollimatorModulatorBox = 31.*
mm;
990 const G4double hightHoleSecondCollimatorModulatorBox = 10.*
mm;
991 const G4double startAngleHoleSecondCollimatorModulatorBox = 0.*
deg;
992 const G4double spanningAngleHoleSecondCollimatorModulatorBox = 360.*
deg;
994 G4Tubs* solidHoleSecondCollimatorModulatorBox =
new G4Tubs(
"HoleSecondCollimatorModulatorBox",
995 innerRadiusHoleSecondCollimatorModulatorBox,
996 outerRadiusHoleSecondCollimatorModulatorBox,
997 hightHoleSecondCollimatorModulatorBox ,
998 startAngleHoleSecondCollimatorModulatorBox,
999 spanningAngleHoleSecondCollimatorModulatorBox);
1003 "HoleSecondCollimatorModulatorBox",
1007 "HoleSecondCollimatorModulatorBox",
1008 logicHoleSecondCollimatorModulatorBox,
1011 logicFirstCollimator -> SetVisAttributes(
yellow);
1012 logicFirstCollimatorModulatorBox -> SetVisAttributes(
blue);
1013 logicSecondCollimatorModulatorBox -> SetVisAttributes(
blue);
1037 const G4double monitor1XPosition = -1262.47498 *
mm;
1038 const G4double monitor2XPosition = -4.500011*
mm;
1039 const G4double monitor4XPosition = 4.500011*
mm;
1043 G4Box* solidFirstMonitorLayer1 =
new G4Box(
"FirstMonitorLayer1",
1050 "FirstMonitorLayer1");
1054 "FirstMonitorLayer1",
1055 logicFirstMonitorLayer1,
1060 G4Box* solidFirstMonitorLayer2 =
new G4Box(
"FirstMonitorLayer2",
1067 "FirstMonitorLayer2");
1070 "FirstMonitorLayer2",
1071 logicFirstMonitorLayer2,
1076 G4Box* solidFirstMonitorLayer3 =
new G4Box(
"FirstMonitorLayer3",
1083 "FirstMonitorLayer3");
1088 logicFirstMonitorLayer3,
1093 G4Box* solidFirstMonitorLayer4 =
new G4Box(
"FirstMonitorLayer4",
1100 "FirstMonitorLayer4");
1103 "FirstMonitorLayer4",
1104 logicFirstMonitorLayer4,
1121 logicFirstMonitorLayer3 -> SetVisAttributes(
white);
1157 "MOPIMotherVolume");
1176 "MOPIFirstKaptonLayer");
1182 "MOPIFirstKaptonLayer",
1196 "MOPIFirstAluminumLayer");
1202 "MOPIFirstAluminumLayer",
1249 "MOPISecondAirgap");
1266 "MOPISecondAluminumLayer");
1272 "MOPISecondAluminumLayer",
1286 "MOPISecondKaptonLayer");
1292 "MOPISecondKaptonLayer",
1317 const G4double nozzleSupportXSize = 29.5 *
mm;
1318 const G4double nozzleSupportYSize = 180. *
mm;
1319 const G4double nozzleSupportZSize = 180. *
mm;
1321 const G4double nozzleSupportXPosition = -397.50 *
mm;
1328 G4Box* solidNozzleSupport =
new G4Box(
"NozzleSupport",
1331 nozzleSupportZSize);
1344 logicNozzleSupport -> SetVisAttributes(
yellow);
1351 const G4double innerRadiusHoleNozzleSupport = 0.*
mm;
1352 const G4double outerRadiusHoleNozzleSupport = 21.5*
mm;
1353 const G4double hightHoleNozzleSupport = 29.5 *
mm;
1354 const G4double startAngleHoleNozzleSupport = 0.*
deg;
1355 const G4double spanningAngleHoleNozzleSupport = 360.*
deg;
1357 G4Tubs* solidHoleNozzleSupport =
new G4Tubs(
"HoleNozzleSupport",
1358 innerRadiusHoleNozzleSupport,
1359 outerRadiusHoleNozzleSupport,
1360 hightHoleNozzleSupport,
1361 startAngleHoleNozzleSupport,
1362 spanningAngleHoleNozzleSupport);
1366 "HoleNozzleSupport",
1373 "HoleNozzleSupport",
1374 logicHoleNozzleSupport,
1378 logicHoleNozzleSupport -> SetVisAttributes(
darkOrange3);
1384 const G4double outerRadiusBrassTube = 21.5 *
mm;
1389 const G4double brassTubeXPosition = -227.5 *
mm;
1392 innerRadiusBrassTube,
1393 outerRadiusBrassTube,
1395 startAngleBrassTube,
1396 spanningAngleBrassTube);
1418 const G4double innerRadiusBrassTube2= 18.*
mm;
1419 const G4double outerRadiusBrassTube2 = 21.5 *
mm;
1422 const G4double spanningAngleBrassTube2 = 360.*
deg;
1426 innerRadiusBrassTube2,
1427 outerRadiusBrassTube2,
1429 startAngleBrassTube2,
1430 spanningAngleBrassTube2);
1441 logicHoleNozzleSupport,
1451 const G4double innerRadiusBrassTube3= 18.*
mm;
1452 const G4double outerRadiusBrassTube3 = 21.5 *
mm;
1455 const G4double spanningAngleBrassTube3 = 360.*
deg;
1457 const G4double brassTube3XPosition = -437 *
mm;
1460 innerRadiusBrassTube3,
1461 outerRadiusBrassTube3,
1463 startAngleBrassTube3,
1464 spanningAngleBrassTube3);
1490 const G4double outerRadiusFinalCollimator = 21.5*
mm;
1491 const G4double hightFinalCollimator = 3.5*
mm;
1492 const G4double startAngleFinalCollimator = 0.*
deg;
1493 const G4double spanningAngleFinalCollimator = 360.*
deg;
1494 const G4double finalCollimatorXPosition = -83.5 *
mm;
1504 outerRadiusFinalCollimator,
1505 hightFinalCollimator,
1506 startAngleFinalCollimator,
1507 spanningAngleFinalCollimator);
1519 logicFinalCollimator -> SetVisAttributes(
yellow);
1527 G4cout <<
"The Range Shifter is translated to"<< value/
mm <<
"mm along the X axis" <<
G4endl;
1544 G4cout <<
"The X size of the first scattering foil is (mm):"<<
1554 G4cout <<
"The X size of the second scattering foil is (mm):"<<
1564 G4cout <<
"OuterRadius od the Stopper is (mm):"
1574 G4cout<<
"Inner Radius of the final collimator is (mm):"
1588 G4cout <<
"The material of the Range Shifter has been changed to " << materialChoice <<
G4endl;
1593 G4cout <<
"WARNING: material \"" << materialChoice <<
"\" doesn't exist in NIST elements/materials"
1594 " table [located in $G4INSTALL/source/materials/src/G4NistMaterialBuilder.cc]" <<
G4endl;
1595 G4cout <<
"Use command \"/parameter/nist\" to see full materials list!" <<
G4endl;