54 modulator(0), physicalTreatmentRoom(0),hadrontherapyDetectorConstruction(0),
55 physiBeamLineSupport(0), physiBeamLineCover(0), physiBeamLineCover2(0),
56 firstScatteringFoil(0), physiFirstScatteringFoil(0), physiKaptonWindow(0),
57 solidStopper(0), physiStopper(0),
58 secondScatteringFoil(0), physiSecondScatteringFoil(0),
59 physiFirstCollimator(0), solidRangeShifterBox(0), logicRangeShifterBox(0),
60 physiRangeShifterBox(0), physiSecondCollimator(0),
61 physiFirstCollimatorModulatorBox(0),
62 physiHoleFirstCollimatorModulatorBox(0),
63 physiSecondCollimatorModulatorBox(0),
64 physiHoleSecondCollimatorModulatorBox(0),
65 physiMOPIMotherVolume(0),
66 physiFirstMonitorLayer1(0), physiFirstMonitorLayer2(0),
67 physiFirstMonitorLayer3(0), physiFirstMonitorLayer4(0),
68 physiSecondMonitorLayer1(0), physiSecondMonitorLayer2(0),
69 physiSecondMonitorLayer3(0), physiSecondMonitorLayer4(0),
70 physiNozzleSupport(0),
72 solidFinalCollimator(0),
73 physiFinalCollimator(0)
82 delete passiveMessenger;
83 delete hadrontherapyDetectorConstruction;
90 SetDefaultDimensions();
93 ConstructPassiveProtonBeamLine();
98 return physicalTreatmentRoom;
111 void PassiveProtonBeamLine::SetDefaultDimensions()
115 white -> SetVisibility(
true);
116 white -> SetForceSolid(
true);
119 blue -> SetVisibility(
true);
120 blue -> SetForceSolid(
true);
123 gray-> SetVisibility(
true);
124 gray-> SetForceSolid(
true);
127 red-> SetVisibility(
true);
128 red-> SetForceSolid(
true);
131 yellow-> SetVisibility(
true);
132 yellow-> SetForceSolid(
true);
135 green -> SetVisibility(
true);
136 green -> SetForceSolid(
true);
139 darkGreen -> SetVisibility(
true);
140 darkGreen -> SetForceSolid(
true);
143 darkOrange3 -> SetVisibility(
true);
144 darkOrange3 -> SetForceSolid(
true);
147 skyBlue -> SetVisibility(
true);
148 skyBlue -> SetForceSolid(
true);
154 vacuumZoneXSize = defaultVacuumZoneXSize;
157 vacuumZoneYSize = defaultVacuumZoneYSize;
160 vacuumZoneZSize = defaultVacuumZoneZSize;
162 G4double defaultVacuumZoneXPosition = -3010.0 *
mm;
163 vacuumZoneXPosition = defaultVacuumZoneXPosition;
167 G4double defaultFirstScatteringFoilXSize = 0.0075 *
mm;
168 firstScatteringFoilXSize = defaultFirstScatteringFoilXSize;
170 G4double defaultFirstScatteringFoilYSize = 52.5 *
mm;
171 firstScatteringFoilYSize = defaultFirstScatteringFoilYSize;
173 G4double defaultFirstScatteringFoilZSize = 52.5 *
mm;
174 firstScatteringFoilZSize = defaultFirstScatteringFoilZSize;
176 G4double defaultFirstScatteringFoilXPosition = 0.0 *
mm;
177 firstScatteringFoilXPosition = defaultFirstScatteringFoilXPosition;
181 kaptonWindowXSize = defaultKaptonWindowXSize;
184 kaptonWindowYSize = defaultKaptonWindowYSize;
187 kaptonWindowZSize = defaultKaptonWindowZSize;
189 G4double defaultKaptonWindowXPosition = 100.0*
mm - defaultKaptonWindowXSize;
190 kaptonWindowXPosition = defaultKaptonWindowXPosition;
196 innerRadiusStopper = defaultInnerRadiusStopper;
199 heightStopper = defaultHeightStopper;
202 startAngleStopper = defaultStartAngleStopper;
205 spanningAngleStopper = defaultSpanningAngleStopper;
207 G4double defaultStopperXPosition = -2705.0 *
mm;
208 stopperXPosition = defaultStopperXPosition;
211 stopperYPosition = defaultStopperYPosition;
214 stopperZPosition = defaultStopperZPosition;
217 outerRadiusStopper = defaultOuterRadiusStopper;
222 G4double defaultSecondScatteringFoilXSize = 0.0125 *
mm;
223 secondScatteringFoilXSize = defaultSecondScatteringFoilXSize;
225 G4double defaultSecondScatteringFoilYSize = 52.5 *
mm;
226 secondScatteringFoilYSize = defaultSecondScatteringFoilYSize;
228 G4double defaultSecondScatteringFoilZSize = 52.5 *
mm;
229 secondScatteringFoilZSize = defaultSecondScatteringFoilZSize;
231 G4double defaultSecondScatteringFoilXPosition = defaultStopperXPosition + defaultHeightStopper + defaultSecondScatteringFoilXSize;
232 secondScatteringFoilXPosition = defaultSecondScatteringFoilXPosition;
234 G4double defaultSecondScatteringFoilYPosition = 0 *
mm;
235 secondScatteringFoilYPosition = defaultSecondScatteringFoilYPosition;
237 G4double defaultSecondScatteringFoilZPosition = 0 *
mm;
238 secondScatteringFoilZPosition = defaultSecondScatteringFoilZPosition;
246 rangeShifterXSize = defaultRangeShifterXSize;
249 rangeShifterYSize = defaultRangeShifterYSize;
252 rangeShifterZSize = defaultRangeShifterZSize;
254 G4double defaultRangeShifterXPosition = -2393.0 *
mm;
255 rangeShifterXPosition = defaultRangeShifterXPosition;
257 G4double defaultRangeShifterYPosition = 0. *
mm;
258 rangeShifterYPosition = defaultRangeShifterYPosition;
260 G4double defaultRangeShifterZPosition = 0. *
mm;
261 rangeShifterZPosition = defaultRangeShifterZPosition;
271 G4double defaultMOPIMotherVolumeXSize = 12127.0 *um;
272 MOPIMotherVolumeXSize = defaultMOPIMotherVolumeXSize;
274 G4double defaultMOPIMotherVolumeYSize = 40.0 *
cm;
275 MOPIMotherVolumeYSize = defaultMOPIMotherVolumeYSize;
277 G4double defaultMOPIMotherVolumeZSize = 40.0 *
cm;
278 MOPIMotherVolumeZSize = defaultMOPIMotherVolumeZSize;
280 G4double defaultMOPIMotherVolumeXPosition = -1000.0 *
mm;
281 MOPIMotherVolumeXPosition = defaultMOPIMotherVolumeXPosition;
283 G4double defaultMOPIMotherVolumeYPosition = 0.0 *
mm;
284 MOPIMotherVolumeYPosition = defaultMOPIMotherVolumeYPosition;
286 G4double defaultMOPIMotherVolumeZPosition = 0.0 *
mm;
287 MOPIMotherVolumeYPosition = defaultMOPIMotherVolumeZPosition;
290 G4double defaultMOPIFirstKaptonLayerXSize = 35 *um;
291 MOPIFirstKaptonLayerXSize = defaultMOPIFirstKaptonLayerXSize;
293 G4double defaultMOPIFirstKaptonLayerYSize = 30 *
cm;
294 MOPIFirstKaptonLayerYSize = defaultMOPIFirstKaptonLayerYSize;
296 G4double defaultMOPIFirstKaptonLayerZSize = 30 *
cm;
297 MOPIFirstKaptonLayerZSize = defaultMOPIFirstKaptonLayerZSize;
299 G4double defaultMOPIFirstKaptonLayerXPosition = -(MOPIMotherVolumeXSize/2 - (MOPIFirstKaptonLayerXSize/2));
300 MOPIFirstKaptonLayerXPosition = defaultMOPIFirstKaptonLayerXPosition;
302 G4double defaultMOPIFirstKaptonLayerYPosition = 0.0 *
mm;
303 MOPIFirstKaptonLayerYPosition = defaultMOPIFirstKaptonLayerYPosition;
305 G4double defaultMOPIFirstKaptonLayerZPosition = 0.0 *
mm;
306 MOPIFirstKaptonLayerZPosition = defaultMOPIFirstKaptonLayerZPosition;
309 G4double defaultMOPIFirstAluminumLayerXSize = 15 *um;
310 MOPIFirstAluminumLayerXSize = defaultMOPIFirstAluminumLayerXSize;
312 G4double defaultMOPIFirstAluminumLayerYSize = 30 *
cm;
313 MOPIFirstAluminumLayerYSize = defaultMOPIFirstAluminumLayerYSize;
315 G4double defaultMOPIFirstAluminumLayerZSize = 30 *
cm;
316 MOPIFirstAluminumLayerZSize = defaultMOPIFirstAluminumLayerZSize;
318 G4double defaultMOPIFirstAluminumLayerXPosition =
319 MOPIFirstKaptonLayerXPosition + MOPIFirstKaptonLayerXSize/2 + MOPIFirstAluminumLayerXSize/2;
320 MOPIFirstAluminumLayerXPosition = defaultMOPIFirstAluminumLayerXPosition;
322 G4double defaultMOPIFirstAluminumLayerYPosition = 0.0 *
mm;
323 MOPIFirstAluminumLayerYPosition = defaultMOPIFirstAluminumLayerYPosition;
325 G4double defaultMOPIFirstAluminumLayerZPosition = 0.0 *
mm;
326 MOPIFirstAluminumLayerZPosition = defaultMOPIFirstAluminumLayerZPosition;
329 G4double defaultMOPIFirstAirGapXSize = 6000 *um;
330 MOPIFirstAirGapXSize = defaultMOPIFirstAirGapXSize;
332 G4double defaultMOPIFirstAirGapYSize = 30 *
cm;
333 MOPIFirstAirGapYSize = defaultMOPIFirstAirGapYSize;
335 G4double defaultMOPIFirstAirGapZSize = 30 *
cm;
336 MOPIFirstAirGapZSize = defaultMOPIFirstAirGapZSize;
338 G4double defaultMOPIFirstAirGapXPosition =
339 MOPIFirstAluminumLayerXPosition + MOPIFirstAluminumLayerXSize/2 + MOPIFirstAirGapXSize/2;
340 MOPIFirstAirGapXPosition = defaultMOPIFirstAirGapXPosition;
342 G4double defaultMOPIFirstAirGapYPosition = 0.0 *
mm;
343 MOPIFirstAirGapYPosition = defaultMOPIFirstAirGapYPosition;
345 G4double defaultMOPIFirstAirGapZPosition = 0.0 *
mm;
346 MOPIFirstAirGapZPosition = defaultMOPIFirstAirGapZPosition;
349 G4double defaultMOPICathodeXSize = 25.0 *um;
350 MOPICathodeXSize = defaultMOPICathodeXSize;
353 MOPICathodeYSize = defaultMOPICathodeYSize;
356 MOPICathodeZSize = defaultMOPICathodeZSize;
358 G4double defaultMOPICathodeXPosition =
359 MOPIFirstAirGapXPosition + MOPIFirstAirGapXSize/2 + MOPICathodeXSize/2;
360 MOPICathodeXPosition = defaultMOPICathodeXPosition;
362 G4double defaultMOPICathodeYPosition = 0.0 *
mm;
363 MOPICathodeYPosition = defaultMOPICathodeYPosition;
365 G4double defaultMOPICathodeZPosition = 0.0 *
mm;
366 MOPICathodeZPosition = defaultMOPICathodeZPosition;
369 G4double defaultMOPISecondAirGapXSize = 6000 *um;
370 MOPISecondAirGapXSize = defaultMOPISecondAirGapXSize;
372 G4double defaultMOPISecondAirGapYSize = 30 *
cm;
373 MOPISecondAirGapYSize = defaultMOPISecondAirGapYSize;
375 G4double defaultMOPISecondAirGapZSize = 30 *
cm;
376 MOPISecondAirGapZSize = defaultMOPISecondAirGapZSize;
378 G4double defaultMOPISecondAirGapXPosition =
379 MOPICathodeXPosition + MOPICathodeXSize/2 + MOPISecondAirGapXSize/2;
380 MOPISecondAirGapXPosition = defaultMOPISecondAirGapXPosition;
382 G4double defaultMOPISecondAirGapYPosition = 0.0 *
mm;
383 MOPISecondAirGapYPosition = defaultMOPISecondAirGapYPosition;
385 G4double defaultMOPISecondAirGapZPosition = 0.0 *
mm;
386 MOPISecondAirGapZPosition = defaultMOPISecondAirGapZPosition;
389 G4double defaultMOPISecondAluminumLayerXSize = 15 *um;
390 MOPISecondAluminumLayerXSize = defaultMOPISecondAluminumLayerXSize;
392 G4double defaultMOPISecondAluminumLayerYSize = 30 *
cm;
393 MOPISecondAluminumLayerYSize = defaultMOPISecondAluminumLayerYSize;
395 G4double defaultMOPISecondAluminumLayerZSize = 30 *
cm;
396 MOPISecondAluminumLayerZSize = defaultMOPISecondAluminumLayerZSize;
398 G4double defaultMOPISecondAluminumLayerXPosition =
399 MOPISecondAirGapXPosition + MOPISecondAirGapXSize/2 + MOPISecondAluminumLayerXSize/2;
400 MOPISecondAluminumLayerXPosition = defaultMOPISecondAluminumLayerXPosition;
402 G4double defaultMOPISecondAluminumLayerYPosition = 0.0 *
mm;
403 MOPISecondAluminumLayerYPosition = defaultMOPISecondAluminumLayerYPosition;
405 G4double defaultMOPISecondAluminumLayerZPosition = 0.0 *
mm;
406 MOPISecondAluminumLayerZPosition = defaultMOPISecondAluminumLayerZPosition;
409 G4double defaultMOPISecondKaptonLayerXSize = 35 *um;
410 MOPISecondKaptonLayerXSize = defaultMOPISecondKaptonLayerXSize;
412 G4double defaultMOPISecondKaptonLayerYSize = 30 *
cm;
413 MOPISecondKaptonLayerYSize = defaultMOPISecondKaptonLayerYSize;
415 G4double defaultMOPISecondKaptonLayerZSize = 30 *
cm;
416 MOPISecondKaptonLayerZSize = defaultMOPISecondKaptonLayerZSize;
418 G4double defaultMOPISecondKaptonLayerXPosition =
419 MOPISecondAluminumLayerXPosition + MOPISecondAluminumLayerXSize/2 + MOPISecondKaptonLayerXSize/2;
420 MOPISecondKaptonLayerXPosition = defaultMOPISecondKaptonLayerXPosition;
422 G4double defaultMOPISecondKaptonLayerYPosition = 0.0 *
mm;
423 MOPISecondKaptonLayerYPosition = defaultMOPISecondKaptonLayerYPosition;
425 G4double defaultMOPISecondKaptonLayerZPosition = 0.0 *
mm;
426 MOPISecondKaptonLayerZPosition = defaultMOPISecondKaptonLayerZPosition;
431 G4double defaultinnerRadiusFinalCollimator = 7.5 *
mm;
432 innerRadiusFinalCollimator = defaultinnerRadiusFinalCollimator;
465 rangeShifterMaterial = airNist;
468 beamLineSupportMaterial = aluminumNist;
471 vacuumZoneMaterial = galacticNist;
474 firstScatteringFoilMaterial = tantalumNist;
477 kaptonWindowMaterial = kaptonNist;
480 stopperMaterial = brass;
483 secondScatteringFoilMaterial = tantalumNist;
486 firstCollimatorMaterial = PMMANist;
487 holeFirstCollimatorMaterial = airNist;
490 modulatorBoxMaterial = aluminumNist;
491 holeModulatorBoxMaterial = airNist;
494 layer1MonitorChamberMaterial = kaptonNist;
495 layer2MonitorChamberMaterial = copperNistAsMaterial;
496 layer3MonitorChamberMaterial = airNist;
497 layer4MonitorChamberMaterial = copperNistAsMaterial;
500 MOPIMotherVolumeMaterial = airNist;
501 MOPIFirstKaptonLayerMaterial = kaptonNist;
502 MOPIFirstAluminumLayerMaterial = aluminumNist;
503 MOPIFirstAirGapMaterial = airNist;
504 MOPICathodeMaterial = mylarNist;
505 MOPISecondAirGapMaterial = airNist;
506 MOPISecondAluminumLayerMaterial = aluminumNist;
507 MOPISecondKaptonLayerMaterial = kaptonNist;
510 nozzleSupportMaterial = PMMANist;
511 brassTubeMaterial = brassTube2Material = brassTube3Material = brass;
512 holeNozzleSupportMaterial = airNist;
515 finalCollimatorMaterial = brass;
519 void PassiveProtonBeamLine::ConstructPassiveProtonBeamLine()
531 G4Box* treatmentRoom =
new G4Box(
"TreatmentRoom",worldX,worldY,worldZ);
534 "logicTreatmentRoom",
538 "physicalTreatmentRoom",
560 modulator -> BuildModulator(physicalTreatmentRoom);
569 const G4double beamLineSupportXSize = 1.5*
m;
571 const G4double beamLineSupportZSize = 600.*
mm;
573 const G4double beamLineSupportXPosition = -1745.09 *
mm;
574 const G4double beamLineSupportYPosition = -230. *
mm;
575 const G4double beamLineSupportZPosition = 0.*
mm;
577 G4Box* beamLineSupport =
new G4Box(
"BeamLineSupport",
578 beamLineSupportXSize,
579 beamLineSupportYSize,
580 beamLineSupportZSize);
583 beamLineSupportMaterial,
586 beamLineSupportYPosition,
587 beamLineSupportZPosition),
589 logicBeamLineSupport,
590 physicalTreatmentRoom,
false, 0);
594 logicBeamLineSupport -> SetVisAttributes(gray);
599 const G4double beamLineCoverXSize = 1.5*
m;
603 const G4double beamLineCoverXPosition = -1745.09 *
mm;
604 const G4double beamLineCoverYPosition = -1000.*
mm;
605 const G4double beamLineCoverZPosition = 600.*
mm;
607 G4Box* beamLineCover =
new G4Box(
"BeamLineCover",
613 beamLineSupportMaterial,
617 beamLineCoverYPosition,
618 beamLineCoverZPosition),
621 physicalTreatmentRoom,
630 beamLineCoverYPosition,
631 - beamLineCoverZPosition),
634 physicalTreatmentRoom,
638 logicBeamLineCover -> SetVisAttributes(blue);
650 G4Box* vacuumZone =
new G4Box(
"VacuumZone", vacuumZoneXSize, vacuumZoneYSize, vacuumZoneZSize);
653 "VacuumZone", logicVacuumZone, physicalTreatmentRoom,
false, 0);
659 firstScatteringFoil =
new G4Box(
"FirstScatteringFoil",
660 firstScatteringFoilXSize,
661 firstScatteringFoilYSize,
662 firstScatteringFoilZSize);
665 firstScatteringFoilMaterial,
666 "FirstScatteringFoil");
669 "FirstScatteringFoil", logicFirstScatteringFoil, physiVacuumZone,
672 logicFirstScatteringFoil -> SetVisAttributes(skyBlue);
677 G4Box* solidKaptonWindow =
new G4Box(
"KaptonWindow",
683 kaptonWindowMaterial,
687 "KaptonWindow", logicKaptonWindow,
688 physiVacuumZone,
false, 0);
690 logicKaptonWindow -> SetVisAttributes(darkOrange3);
703 solidStopper =
new G4Tubs(
"Stopper",
708 spanningAngleStopper);
720 physicalTreatmentRoom,
724 logicStopper -> SetVisAttributes(red);
733 secondScatteringFoil =
new G4Box(
"SecondScatteringFoil",
734 secondScatteringFoilXSize,
735 secondScatteringFoilYSize,
736 secondScatteringFoilZSize);
739 secondScatteringFoilMaterial,
740 "SecondScatteringFoil");
743 secondScatteringFoilYPosition,
744 secondScatteringFoilZPosition),
745 "SeconScatteringFoil",
746 logicSecondScatteringFoil,
747 physicalTreatmentRoom,
751 logicSecondScatteringFoil -> SetVisAttributes(skyBlue);
761 solidRangeShifterBox =
new G4Box(
"RangeShifterBox",
767 rangeShifterMaterial,
772 logicRangeShifterBox,
773 physicalTreatmentRoom,
778 logicRangeShifterBox -> SetVisAttributes(yellow);
788 const G4double firstCollimatorYSize = 100.*
mm;
789 const G4double firstCollimatorZSize = 100.*
mm;
791 const G4double firstCollimatorXPosition = -2673.00*
mm;
792 const G4double firstCollimatorYPosition = 0.*
mm;
793 const G4double firstCollimatorZPosition = 0.*
mm;
795 G4Box* solidFirstCollimator =
new G4Box(
"FirstCollimator",
796 firstCollimatorXSize,
797 firstCollimatorYSize,
798 firstCollimatorZSize);
801 firstCollimatorMaterial,
805 firstCollimatorYPosition,
806 firstCollimatorZPosition),
808 logicFirstCollimator,
809 physicalTreatmentRoom,
815 G4double innerRadiusHoleFirstCollimator = 0.*
mm;
816 G4double outerRadiusHoleFirstCollimator = 15.*
mm;
819 G4double spanningAngleHoleFirstCollimator = 360.*
deg;
821 G4Tubs* solidHoleFirstCollimator =
new G4Tubs(
"HoleFirstCollimator",
822 innerRadiusHoleFirstCollimator,
823 outerRadiusHoleFirstCollimator,
824 hightHoleFirstCollimator,
825 startAngleHoleFirstCollimator,
826 spanningAngleHoleFirstCollimator);
829 holeFirstCollimatorMaterial,
830 "HoleFirstCollimator",
838 "HoleFirstCollimator",
839 logicHoleFirstCollimator,
840 physiFirstCollimator,
847 const G4double secondCollimatorXPosition = -1900.00*
mm;
848 const G4double secondCollimatorYPosition = 0*
mm;
849 const G4double secondCollimatorZPosition = 0*
mm;
852 secondCollimatorYPosition,
853 secondCollimatorZPosition),
855 logicFirstCollimator,
856 physicalTreatmentRoom,
864 "HoleSecondCollimator",
865 logicHoleFirstCollimator,
866 physiSecondCollimator,
879 const G4double firstCollimatorModulatorXSize = 10.*
mm;
880 const G4double firstCollimatorModulatorYSize = 200.*
mm;
881 const G4double firstCollimatorModulatorZSize = 200.*
mm;
883 const G4double firstCollimatorModulatorXPosition = -2523.00*
mm;
884 const G4double firstCollimatorModulatorYPosition = 0.*
mm;
885 const G4double firstCollimatorModulatorZPosition = 0.*
mm;
887 G4Box* solidFirstCollimatorModulatorBox =
new G4Box(
"FirstCollimatorModulatorBox",
888 firstCollimatorModulatorXSize,
889 firstCollimatorModulatorYSize,
890 firstCollimatorModulatorZSize);
893 modulatorBoxMaterial,
894 "FirstCollimatorModulatorBox");
897 firstCollimatorModulatorYPosition,
898 firstCollimatorModulatorZPosition),
899 "FirstCollimatorModulatorBox",
900 logicFirstCollimatorModulatorBox,
901 physicalTreatmentRoom,
false, 0);
906 const G4double innerRadiusHoleFirstCollimatorModulatorBox = 0.*
mm;
907 const G4double outerRadiusHoleFirstCollimatorModulatorBox = 31.*
mm;
908 const G4double hightHoleFirstCollimatorModulatorBox = 10.*
mm;
909 const G4double startAngleHoleFirstCollimatorModulatorBox = 0.*
deg;
910 const G4double spanningAngleHoleFirstCollimatorModulatorBox = 360.*
deg;
912 G4Tubs* solidHoleFirstCollimatorModulatorBox =
new G4Tubs(
"HoleFirstCollimatorModulatorBox",
913 innerRadiusHoleFirstCollimatorModulatorBox,
914 outerRadiusHoleFirstCollimatorModulatorBox,
915 hightHoleFirstCollimatorModulatorBox ,
916 startAngleHoleFirstCollimatorModulatorBox,
917 spanningAngleHoleFirstCollimatorModulatorBox);
920 holeModulatorBoxMaterial,
921 "HoleFirstCollimatorModulatorBox",
925 "HoleFirstCollimatorModulatorBox",
926 logicHoleFirstCollimatorModulatorBox,
927 physiFirstCollimatorModulatorBox,
false, 0);
932 const G4double secondCollimatorModulatorXSize = 10.*
mm;
933 const G4double secondCollimatorModulatorYSize = 200.*
mm;
934 const G4double secondCollimatorModulatorZSize = 200.*
mm;
936 const G4double secondCollimatorModulatorXPosition = -1953.00 *
mm;
938 const G4double secondCollimatorModulatorYPosition = 0.*
mm;
939 const G4double secondCollimatorModulatorZPosition = 0.*
mm;
941 G4Box* solidSecondCollimatorModulatorBox =
new G4Box(
"SecondCollimatorModulatorBox",
942 secondCollimatorModulatorXSize,
943 secondCollimatorModulatorYSize,
944 secondCollimatorModulatorZSize);
947 modulatorBoxMaterial,
948 "SecondCollimatorModulatorBox");
951 secondCollimatorModulatorYPosition,
952 secondCollimatorModulatorZPosition),
953 "SecondCollimatorModulatorBox",
954 logicSecondCollimatorModulatorBox,
955 physicalTreatmentRoom,
false, 0);
960 const G4double innerRadiusHoleSecondCollimatorModulatorBox = 0.*
mm;
961 const G4double outerRadiusHoleSecondCollimatorModulatorBox = 31.*
mm;
962 const G4double hightHoleSecondCollimatorModulatorBox = 10.*
mm;
963 const G4double startAngleHoleSecondCollimatorModulatorBox = 0.*
deg;
964 const G4double spanningAngleHoleSecondCollimatorModulatorBox = 360.*
deg;
966 G4Tubs* solidHoleSecondCollimatorModulatorBox =
new G4Tubs(
"HoleSecondCollimatorModulatorBox",
967 innerRadiusHoleSecondCollimatorModulatorBox,
968 outerRadiusHoleSecondCollimatorModulatorBox,
969 hightHoleSecondCollimatorModulatorBox ,
970 startAngleHoleSecondCollimatorModulatorBox,
971 spanningAngleHoleSecondCollimatorModulatorBox);
974 holeModulatorBoxMaterial,
975 "HoleSecondCollimatorModulatorBox",
979 "HoleSecondCollimatorModulatorBox",
980 logicHoleSecondCollimatorModulatorBox,
981 physiSecondCollimatorModulatorBox,
false, 0);
983 logicFirstCollimator -> SetVisAttributes(yellow);
984 logicFirstCollimatorModulatorBox -> SetVisAttributes(blue);
985 logicSecondCollimatorModulatorBox -> SetVisAttributes(blue);
1006 const G4double monitor1XPosition = -1262.47498 *
mm;
1007 const G4double monitor2XPosition = -4.500011*
mm;
1008 const G4double monitor4XPosition = 4.500011*
mm;
1010 G4Box* solidFirstMonitorLayer1 =
new G4Box(
"FirstMonitorLayer1",
1016 layer1MonitorChamberMaterial,
1017 "FirstMonitorLayer1");
1021 "FirstMonitorLayer1",
1022 logicFirstMonitorLayer1,
1023 physicalTreatmentRoom,
1027 G4Box* solidFirstMonitorLayer2 =
new G4Box(
"FirstMonitorLayer2",
1033 layer2MonitorChamberMaterial,
1034 "FirstMonitorLayer2");
1037 "FirstMonitorLayer2",
1038 logicFirstMonitorLayer2,
1039 physiFirstMonitorLayer1,
1043 G4Box* solidFirstMonitorLayer3 =
new G4Box(
"FirstMonitorLayer3",
1049 layer3MonitorChamberMaterial,
1050 "FirstMonitorLayer3");
1055 logicFirstMonitorLayer3,
1056 physiFirstMonitorLayer1,
1060 G4Box* solidFirstMonitorLayer4 =
new G4Box(
"FirstMonitorLayer4",
1066 layer4MonitorChamberMaterial,
1067 "FirstMonitorLayer4");
1070 "FirstMonitorLayer4",
1071 logicFirstMonitorLayer4,
1072 physiFirstMonitorLayer1,
false, 0);
1077 "SecondMonitorLayer1", logicFirstMonitorLayer1,physicalTreatmentRoom,
false, 0);
1080 logicFirstMonitorLayer2, physiSecondMonitorLayer1,
false, 0);
1083 logicFirstMonitorLayer3, physiSecondMonitorLayer1,
false, 0);
1086 logicFirstMonitorLayer4, physiSecondMonitorLayer1,
false, 0);
1088 logicFirstMonitorLayer3 -> SetVisAttributes(white);
1114 solidMOPIMotherVolume =
new G4Box(
"MOPIMotherVolume",
1115 MOPIMotherVolumeXSize/2,
1116 MOPIMotherVolumeYSize/2,
1117 MOPIMotherVolumeYSize/2);
1120 MOPIMotherVolumeMaterial,
1121 "MOPIMotherVolume");
1124 MOPIMotherVolumeYPosition,
1125 MOPIMotherVolumeZPosition),
1127 logicMOPIMotherVolume,
1128 physicalTreatmentRoom,
1133 solidMOPIFirstKaptonLayer =
new G4Box(
"MOPIFirstKaptonLayer",
1134 MOPIFirstKaptonLayerXSize/2,
1135 MOPIFirstKaptonLayerYSize/2 ,
1136 MOPIFirstKaptonLayerZSize/2);
1138 logicMOPIFirstKaptonLayer =
new G4LogicalVolume(solidMOPIFirstKaptonLayer,
1139 MOPIFirstKaptonLayerMaterial,
1140 "MOPIFirstKaptonLayer");
1144 MOPIFirstKaptonLayerYPosition ,
1145 MOPIFirstKaptonLayerZPosition),
1146 "MOPIFirstKaptonLayer",
1147 logicMOPIFirstKaptonLayer,
1148 physiMOPIMotherVolume,
1153 solidMOPIFirstAluminumLayer =
new G4Box(
"MOPIFirstAluminumLayer",
1154 MOPIFirstAluminumLayerXSize/2,
1155 MOPIFirstAluminumLayerYSize/2 ,
1156 MOPIFirstAluminumLayerZSize/2);
1158 logicMOPIFirstAluminumLayer =
new G4LogicalVolume(solidMOPIFirstAluminumLayer,
1159 MOPIFirstAluminumLayerMaterial,
1160 "MOPIFirstAluminumLayer");
1164 MOPIFirstAluminumLayerYPosition ,
1165 MOPIFirstAluminumLayerZPosition),
1166 "MOPIFirstAluminumLayer",
1167 logicMOPIFirstAluminumLayer, physiMOPIMotherVolume,
false, 0);
1170 solidMOPIFirstAirGap =
new G4Box(
"MOPIFirstAirGap",
1171 MOPIFirstAirGapXSize/2,
1172 MOPIFirstAirGapYSize/2,
1173 MOPIFirstAirGapZSize/2);
1176 MOPIFirstAirGapMaterial,
1181 MOPIFirstAirGapYPosition ,
1182 MOPIFirstAirGapZPosition),
1184 logicMOPIFirstAirGap, physiMOPIMotherVolume,
false, 0);
1188 solidMOPICathode =
new G4Box(
"MOPICathode",
1191 MOPICathodeZSize/2);
1194 MOPICathodeMaterial,
1199 MOPICathodeYPosition ,
1200 MOPICathodeZPosition),
1203 physiMOPIMotherVolume,
false, 0);
1206 solidMOPISecondAirGap =
new G4Box(
"MOPISecondAirGap",
1207 MOPISecondAirGapXSize/2,
1208 MOPISecondAirGapYSize/2,
1209 MOPISecondAirGapZSize/2);
1212 MOPISecondAirGapMaterial,
1213 "MOPISecondAirgap");
1217 MOPISecondAirGapYPosition ,
1218 MOPISecondAirGapZPosition),
1220 logicMOPISecondAirGap, physiMOPIMotherVolume,
false, 0);
1223 solidMOPISecondAluminumLayer =
new G4Box(
"MOPISecondAluminumLayer",
1224 MOPISecondAluminumLayerXSize/2,
1225 MOPISecondAluminumLayerYSize/2 ,
1226 MOPISecondAluminumLayerZSize/2);
1228 logicMOPISecondAluminumLayer =
new G4LogicalVolume(solidMOPISecondAluminumLayer,
1229 MOPISecondAluminumLayerMaterial,
1230 "MOPISecondAluminumLayer");
1234 MOPISecondAluminumLayerYPosition ,
1235 MOPISecondAluminumLayerZPosition),
1236 "MOPISecondAluminumLayer",
1237 logicMOPISecondAluminumLayer,
1238 physiMOPIMotherVolume,
1243 solidMOPISecondKaptonLayer =
new G4Box(
"MOPISecondKaptonLayer",
1244 MOPISecondKaptonLayerXSize/2,
1245 MOPISecondKaptonLayerYSize/2 ,
1246 MOPISecondKaptonLayerZSize/2);
1248 logicMOPISecondKaptonLayer =
new G4LogicalVolume(solidMOPISecondKaptonLayer,
1249 MOPIFirstKaptonLayerMaterial,
1250 "MOPISecondKaptonLayer");
1254 MOPISecondKaptonLayerYPosition ,
1255 MOPISecondKaptonLayerZPosition),
1256 "MOPISecondKaptonLayer",
1257 logicMOPISecondKaptonLayer,
1258 physiMOPIMotherVolume,
1262 logicMOPIFirstAirGap -> SetVisAttributes(darkGreen);
1263 logicMOPISecondAirGap -> SetVisAttributes(darkGreen);
1280 const G4double nozzleSupportXSize = 29.5 *
mm;
1281 const G4double nozzleSupportYSize = 180. *
mm;
1282 const G4double nozzleSupportZSize = 180. *
mm;
1284 const G4double nozzleSupportXPosition = -397.50 *
mm;
1291 G4Box* solidNozzleSupport =
new G4Box(
"NozzleSupport",
1294 nozzleSupportZSize);
1297 nozzleSupportMaterial,
1303 physicalTreatmentRoom,
1307 logicNozzleSupport -> SetVisAttributes(yellow);
1314 const G4double innerRadiusHoleNozzleSupport = 0.*
mm;
1315 const G4double outerRadiusHoleNozzleSupport = 21.5*
mm;
1316 const G4double hightHoleNozzleSupport = 29.5 *
mm;
1317 const G4double startAngleHoleNozzleSupport = 0.*
deg;
1318 const G4double spanningAngleHoleNozzleSupport = 360.*
deg;
1320 G4Tubs* solidHoleNozzleSupport =
new G4Tubs(
"HoleNozzleSupport",
1321 innerRadiusHoleNozzleSupport,
1322 outerRadiusHoleNozzleSupport,
1323 hightHoleNozzleSupport,
1324 startAngleHoleNozzleSupport,
1325 spanningAngleHoleNozzleSupport);
1328 holeNozzleSupportMaterial,
1329 "HoleNozzleSupport",
1336 "HoleNozzleSupport",
1337 logicHoleNozzleSupport,
1341 logicHoleNozzleSupport -> SetVisAttributes(darkOrange3);
1347 const G4double outerRadiusBrassTube = 21.5 *
mm;
1352 const G4double brassTubeXPosition = -227.5 *
mm;
1355 innerRadiusBrassTube,
1356 outerRadiusBrassTube,
1358 startAngleBrassTube,
1359 spanningAngleBrassTube);
1372 physicalTreatmentRoom,
1376 logicBrassTube -> SetVisAttributes(darkOrange3);
1381 const G4double innerRadiusBrassTube2= 18.*
mm;
1382 const G4double outerRadiusBrassTube2 = 21.5 *
mm;
1385 const G4double spanningAngleBrassTube2 = 360.*
deg;
1390 innerRadiusBrassTube2,
1391 outerRadiusBrassTube2,
1393 startAngleBrassTube2,
1394 spanningAngleBrassTube2);
1411 logicBrassTube2 -> SetVisAttributes(darkOrange3);
1417 const G4double innerRadiusBrassTube3= 18.*
mm;
1418 const G4double outerRadiusBrassTube3 = 21.5 *
mm;
1421 const G4double spanningAngleBrassTube3 = 360.*
deg;
1423 const G4double brassTube3XPosition = -437 *
mm;
1426 innerRadiusBrassTube3,
1427 outerRadiusBrassTube3,
1429 startAngleBrassTube3,
1430 spanningAngleBrassTube3);
1443 physicalTreatmentRoom,
1447 logicBrassTube3 -> SetVisAttributes(darkOrange3);
1456 const G4double outerRadiusFinalCollimator = 21.5*
mm;
1457 const G4double hightFinalCollimator = 3.5*
mm;
1458 const G4double startAngleFinalCollimator = 0.*
deg;
1459 const G4double spanningAngleFinalCollimator = 360.*
deg;
1460 const G4double finalCollimatorXPosition = -83.5 *
mm;
1468 solidFinalCollimator =
new G4Tubs(
"FinalCollimator",
1469 innerRadiusFinalCollimator,
1470 outerRadiusFinalCollimator,
1471 hightFinalCollimator,
1472 startAngleFinalCollimator,
1473 spanningAngleFinalCollimator);
1476 finalCollimatorMaterial,
1483 "FinalCollimator", logicFinalCollimator, physicalTreatmentRoom,
false, 0);
1485 logicFinalCollimator -> SetVisAttributes(yellow);
1491 physiRangeShifterBox -> SetTranslation(
G4ThreeVector(value, 0., 0.));
1493 G4cout <<
"The Range Shifter is translated to"<< value/
mm <<
"mm along the X axis" <<
G4endl;
1499 solidRangeShifterBox -> SetXHalfLength(value) ;
1500 G4cout <<
"RangeShifter size X (mm): "<< ((solidRangeShifterBox -> GetXHalfLength())*2.)/
mm
1508 firstScatteringFoil -> SetXHalfLength(value);
1510 G4cout <<
"The X size of the first scattering foil is (mm):"<<
1511 ((firstScatteringFoil -> GetXHalfLength())*2.)/
mm
1518 secondScatteringFoil -> SetXHalfLength(value);
1520 G4cout <<
"The X size of the second scattering foil is (mm):"<<
1521 ((secondScatteringFoil -> GetXHalfLength())*2.)/
mm
1528 solidStopper -> SetOuterRadius(value);
1530 G4cout <<
"OuterRadius od the Stopper is (mm):"
1531 << solidStopper -> GetOuterRadius()/
mm
1538 solidFinalCollimator -> SetInnerRadius(value);
1540 G4cout<<
"Inner Radius of the final collimator is (mm):"
1541 << solidFinalCollimator -> GetInnerRadius()/
mm
1552 rangeShifterMaterial = pttoMaterial;
1553 logicRangeShifterBox ->
SetMaterial(pttoMaterial);
1554 G4cout <<
"The material of the Range Shifter has been changed to " << materialChoice <<
G4endl;
1559 G4cout <<
"WARNING: material \"" << materialChoice <<
"\" doesn't exist in NIST elements/materials"
1560 " table [located in $G4INSTALL/source/materials/src/G4NistMaterialBuilder.cc]" <<
G4endl;
1561 G4cout <<
"Use command \"/parameter/nist\" to see full materials list!" <<
G4endl;