56 modulator(0), physicalTreatmentRoom(0),hadrontherapyDetectorConstruction(0),
57 physiBeamLineSupport(0), physiBeamLineCover(0), physiBeamLineCover2(0),
58 firstScatteringFoil(0), physiFirstScatteringFoil(0), physiKaptonWindow(0),
59 solidStopper(0), physiStopper(0),
60 secondScatteringFoil(0), physiSecondScatteringFoil(0),
61 physiFirstCollimator(0), solidRangeShifterBox(0), logicRangeShifterBox(0),
62 physiRangeShifterBox(0), physiSecondCollimator(0),
63 physiFirstCollimatorModulatorBox(0),
64 physiHoleFirstCollimatorModulatorBox(0),
65 physiSecondCollimatorModulatorBox(0),
66 physiHoleSecondCollimatorModulatorBox(0),
67 physiMOPIMotherVolume(0),
68 physiFirstMonitorLayer1(0), physiFirstMonitorLayer2(0),
69 physiFirstMonitorLayer3(0), physiFirstMonitorLayer4(0),
70 physiSecondMonitorLayer1(0), physiSecondMonitorLayer2(0),
71 physiSecondMonitorLayer3(0), physiSecondMonitorLayer4(0),
72 physiNozzleSupport(0),
74 solidFinalCollimator(0),
75 physiFinalCollimator(0)
83 static G4String ROGeometryName =
"DetectorROGeometry";
88 G4cout <<
"Going to register Parallel world...";
97 delete passiveMessenger;
98 delete hadrontherapyDetectorConstruction;
104 SetDefaultDimensions();
107 ConstructPassiveProtonBeamLine();
111 if (!hadrontherapyDetectorConstruction)
128 return physicalTreatmentRoom;
141 void PassiveProtonBeamLine::SetDefaultDimensions()
145 white -> SetVisibility(
true);
146 white -> SetForceSolid(
true);
149 blue -> SetVisibility(
true);
150 blue -> SetForceSolid(
true);
153 gray-> SetVisibility(
true);
154 gray-> SetForceSolid(
true);
157 red-> SetVisibility(
true);
158 red-> SetForceSolid(
true);
161 yellow-> SetVisibility(
true);
162 yellow-> SetForceSolid(
true);
165 green -> SetVisibility(
true);
166 green -> SetForceSolid(
true);
169 darkGreen -> SetVisibility(
true);
170 darkGreen -> SetForceSolid(
true);
173 darkOrange3 -> SetVisibility(
true);
174 darkOrange3 -> SetForceSolid(
true);
177 skyBlue -> SetVisibility(
true);
178 skyBlue -> SetForceSolid(
true);
184 vacuumZoneXSize = defaultVacuumZoneXSize;
187 vacuumZoneYSize = defaultVacuumZoneYSize;
190 vacuumZoneZSize = defaultVacuumZoneZSize;
192 G4double defaultVacuumZoneXPosition = -3010.0 *
mm;
193 vacuumZoneXPosition = defaultVacuumZoneXPosition;
197 G4double defaultFirstScatteringFoilXSize = 0.0075 *
mm;
198 firstScatteringFoilXSize = defaultFirstScatteringFoilXSize;
200 G4double defaultFirstScatteringFoilYSize = 52.5 *
mm;
201 firstScatteringFoilYSize = defaultFirstScatteringFoilYSize;
203 G4double defaultFirstScatteringFoilZSize = 52.5 *
mm;
204 firstScatteringFoilZSize = defaultFirstScatteringFoilZSize;
206 G4double defaultFirstScatteringFoilXPosition = 0.0 *
mm;
207 firstScatteringFoilXPosition = defaultFirstScatteringFoilXPosition;
211 kaptonWindowXSize = defaultKaptonWindowXSize;
214 kaptonWindowYSize = defaultKaptonWindowYSize;
217 kaptonWindowZSize = defaultKaptonWindowZSize;
219 G4double defaultKaptonWindowXPosition = 100.0*
mm - defaultKaptonWindowXSize;
220 kaptonWindowXPosition = defaultKaptonWindowXPosition;
226 innerRadiusStopper = defaultInnerRadiusStopper;
229 heightStopper = defaultHeightStopper;
232 startAngleStopper = defaultStartAngleStopper;
235 spanningAngleStopper = defaultSpanningAngleStopper;
237 G4double defaultStopperXPosition = -2705.0 *
mm;
238 stopperXPosition = defaultStopperXPosition;
241 stopperYPosition = defaultStopperYPosition;
244 stopperZPosition = defaultStopperZPosition;
247 outerRadiusStopper = defaultOuterRadiusStopper;
252 G4double defaultSecondScatteringFoilXSize = 0.0125 *
mm;
253 secondScatteringFoilXSize = defaultSecondScatteringFoilXSize;
255 G4double defaultSecondScatteringFoilYSize = 52.5 *
mm;
256 secondScatteringFoilYSize = defaultSecondScatteringFoilYSize;
258 G4double defaultSecondScatteringFoilZSize = 52.5 *
mm;
259 secondScatteringFoilZSize = defaultSecondScatteringFoilZSize;
261 G4double defaultSecondScatteringFoilXPosition = defaultStopperXPosition + defaultHeightStopper + defaultSecondScatteringFoilXSize;
262 secondScatteringFoilXPosition = defaultSecondScatteringFoilXPosition;
264 G4double defaultSecondScatteringFoilYPosition = 0 *
mm;
265 secondScatteringFoilYPosition = defaultSecondScatteringFoilYPosition;
267 G4double defaultSecondScatteringFoilZPosition = 0 *
mm;
268 secondScatteringFoilZPosition = defaultSecondScatteringFoilZPosition;
276 rangeShifterXSize = defaultRangeShifterXSize;
279 rangeShifterYSize = defaultRangeShifterYSize;
282 rangeShifterZSize = defaultRangeShifterZSize;
284 G4double defaultRangeShifterXPosition = -2393.0 *
mm;
285 rangeShifterXPosition = defaultRangeShifterXPosition;
287 G4double defaultRangeShifterYPosition = 0. *
mm;
288 rangeShifterYPosition = defaultRangeShifterYPosition;
290 G4double defaultRangeShifterZPosition = 0. *
mm;
291 rangeShifterZPosition = defaultRangeShifterZPosition;
301 G4double defaultMOPIMotherVolumeXSize = 12127.0 *um;
302 MOPIMotherVolumeXSize = defaultMOPIMotherVolumeXSize;
304 G4double defaultMOPIMotherVolumeYSize = 40.0 *
cm;
305 MOPIMotherVolumeYSize = defaultMOPIMotherVolumeYSize;
307 G4double defaultMOPIMotherVolumeZSize = 40.0 *
cm;
308 MOPIMotherVolumeZSize = defaultMOPIMotherVolumeZSize;
310 G4double defaultMOPIMotherVolumeXPosition = -1000.0 *
mm;
311 MOPIMotherVolumeXPosition = defaultMOPIMotherVolumeXPosition;
313 G4double defaultMOPIMotherVolumeYPosition = 0.0 *
mm;
314 MOPIMotherVolumeYPosition = defaultMOPIMotherVolumeYPosition;
316 G4double defaultMOPIMotherVolumeZPosition = 0.0 *
mm;
317 MOPIMotherVolumeYPosition = defaultMOPIMotherVolumeZPosition;
320 G4double defaultMOPIFirstKaptonLayerXSize = 35 *um;
321 MOPIFirstKaptonLayerXSize = defaultMOPIFirstKaptonLayerXSize;
323 G4double defaultMOPIFirstKaptonLayerYSize = 30 *
cm;
324 MOPIFirstKaptonLayerYSize = defaultMOPIFirstKaptonLayerYSize;
326 G4double defaultMOPIFirstKaptonLayerZSize = 30 *
cm;
327 MOPIFirstKaptonLayerZSize = defaultMOPIFirstKaptonLayerZSize;
329 G4double defaultMOPIFirstKaptonLayerXPosition = -(MOPIMotherVolumeXSize/2 - (MOPIFirstKaptonLayerXSize/2));
330 MOPIFirstKaptonLayerXPosition = defaultMOPIFirstKaptonLayerXPosition;
332 G4double defaultMOPIFirstKaptonLayerYPosition = 0.0 *
mm;
333 MOPIFirstKaptonLayerYPosition = defaultMOPIFirstKaptonLayerYPosition;
335 G4double defaultMOPIFirstKaptonLayerZPosition = 0.0 *
mm;
336 MOPIFirstKaptonLayerZPosition = defaultMOPIFirstKaptonLayerZPosition;
339 G4double defaultMOPIFirstAluminumLayerXSize = 15 *um;
340 MOPIFirstAluminumLayerXSize = defaultMOPIFirstAluminumLayerXSize;
342 G4double defaultMOPIFirstAluminumLayerYSize = 30 *
cm;
343 MOPIFirstAluminumLayerYSize = defaultMOPIFirstAluminumLayerYSize;
345 G4double defaultMOPIFirstAluminumLayerZSize = 30 *
cm;
346 MOPIFirstAluminumLayerZSize = defaultMOPIFirstAluminumLayerZSize;
348 G4double defaultMOPIFirstAluminumLayerXPosition =
349 MOPIFirstKaptonLayerXPosition + MOPIFirstKaptonLayerXSize/2 + MOPIFirstAluminumLayerXSize/2;
350 MOPIFirstAluminumLayerXPosition = defaultMOPIFirstAluminumLayerXPosition;
352 G4double defaultMOPIFirstAluminumLayerYPosition = 0.0 *
mm;
353 MOPIFirstAluminumLayerYPosition = defaultMOPIFirstAluminumLayerYPosition;
355 G4double defaultMOPIFirstAluminumLayerZPosition = 0.0 *
mm;
356 MOPIFirstAluminumLayerZPosition = defaultMOPIFirstAluminumLayerZPosition;
359 G4double defaultMOPIFirstAirGapXSize = 6000 *um;
360 MOPIFirstAirGapXSize = defaultMOPIFirstAirGapXSize;
362 G4double defaultMOPIFirstAirGapYSize = 30 *
cm;
363 MOPIFirstAirGapYSize = defaultMOPIFirstAirGapYSize;
365 G4double defaultMOPIFirstAirGapZSize = 30 *
cm;
366 MOPIFirstAirGapZSize = defaultMOPIFirstAirGapZSize;
368 G4double defaultMOPIFirstAirGapXPosition =
369 MOPIFirstAluminumLayerXPosition + MOPIFirstAluminumLayerXSize/2 + MOPIFirstAirGapXSize/2;
370 MOPIFirstAirGapXPosition = defaultMOPIFirstAirGapXPosition;
372 G4double defaultMOPIFirstAirGapYPosition = 0.0 *
mm;
373 MOPIFirstAirGapYPosition = defaultMOPIFirstAirGapYPosition;
375 G4double defaultMOPIFirstAirGapZPosition = 0.0 *
mm;
376 MOPIFirstAirGapZPosition = defaultMOPIFirstAirGapZPosition;
379 G4double defaultMOPICathodeXSize = 25.0 *um;
380 MOPICathodeXSize = defaultMOPICathodeXSize;
383 MOPICathodeYSize = defaultMOPICathodeYSize;
386 MOPICathodeZSize = defaultMOPICathodeZSize;
388 G4double defaultMOPICathodeXPosition =
389 MOPIFirstAirGapXPosition + MOPIFirstAirGapXSize/2 + MOPICathodeXSize/2;
390 MOPICathodeXPosition = defaultMOPICathodeXPosition;
392 G4double defaultMOPICathodeYPosition = 0.0 *
mm;
393 MOPICathodeYPosition = defaultMOPICathodeYPosition;
395 G4double defaultMOPICathodeZPosition = 0.0 *
mm;
396 MOPICathodeZPosition = defaultMOPICathodeZPosition;
399 G4double defaultMOPISecondAirGapXSize = 6000 *um;
400 MOPISecondAirGapXSize = defaultMOPISecondAirGapXSize;
402 G4double defaultMOPISecondAirGapYSize = 30 *
cm;
403 MOPISecondAirGapYSize = defaultMOPISecondAirGapYSize;
405 G4double defaultMOPISecondAirGapZSize = 30 *
cm;
406 MOPISecondAirGapZSize = defaultMOPISecondAirGapZSize;
408 G4double defaultMOPISecondAirGapXPosition =
409 MOPICathodeXPosition + MOPICathodeXSize/2 + MOPISecondAirGapXSize/2;
410 MOPISecondAirGapXPosition = defaultMOPISecondAirGapXPosition;
412 G4double defaultMOPISecondAirGapYPosition = 0.0 *
mm;
413 MOPISecondAirGapYPosition = defaultMOPISecondAirGapYPosition;
415 G4double defaultMOPISecondAirGapZPosition = 0.0 *
mm;
416 MOPISecondAirGapZPosition = defaultMOPISecondAirGapZPosition;
419 G4double defaultMOPISecondAluminumLayerXSize = 15 *um;
420 MOPISecondAluminumLayerXSize = defaultMOPISecondAluminumLayerXSize;
422 G4double defaultMOPISecondAluminumLayerYSize = 30 *
cm;
423 MOPISecondAluminumLayerYSize = defaultMOPISecondAluminumLayerYSize;
425 G4double defaultMOPISecondAluminumLayerZSize = 30 *
cm;
426 MOPISecondAluminumLayerZSize = defaultMOPISecondAluminumLayerZSize;
428 G4double defaultMOPISecondAluminumLayerXPosition =
429 MOPISecondAirGapXPosition + MOPISecondAirGapXSize/2 + MOPISecondAluminumLayerXSize/2;
430 MOPISecondAluminumLayerXPosition = defaultMOPISecondAluminumLayerXPosition;
432 G4double defaultMOPISecondAluminumLayerYPosition = 0.0 *
mm;
433 MOPISecondAluminumLayerYPosition = defaultMOPISecondAluminumLayerYPosition;
435 G4double defaultMOPISecondAluminumLayerZPosition = 0.0 *
mm;
436 MOPISecondAluminumLayerZPosition = defaultMOPISecondAluminumLayerZPosition;
439 G4double defaultMOPISecondKaptonLayerXSize = 35 *um;
440 MOPISecondKaptonLayerXSize = defaultMOPISecondKaptonLayerXSize;
442 G4double defaultMOPISecondKaptonLayerYSize = 30 *
cm;
443 MOPISecondKaptonLayerYSize = defaultMOPISecondKaptonLayerYSize;
445 G4double defaultMOPISecondKaptonLayerZSize = 30 *
cm;
446 MOPISecondKaptonLayerZSize = defaultMOPISecondKaptonLayerZSize;
448 G4double defaultMOPISecondKaptonLayerXPosition =
449 MOPISecondAluminumLayerXPosition + MOPISecondAluminumLayerXSize/2 + MOPISecondKaptonLayerXSize/2;
450 MOPISecondKaptonLayerXPosition = defaultMOPISecondKaptonLayerXPosition;
452 G4double defaultMOPISecondKaptonLayerYPosition = 0.0 *
mm;
453 MOPISecondKaptonLayerYPosition = defaultMOPISecondKaptonLayerYPosition;
455 G4double defaultMOPISecondKaptonLayerZPosition = 0.0 *
mm;
456 MOPISecondKaptonLayerZPosition = defaultMOPISecondKaptonLayerZPosition;
461 G4double defaultinnerRadiusFinalCollimator = 7.5 *
mm;
462 innerRadiusFinalCollimator = defaultinnerRadiusFinalCollimator;
504 rangeShifterMaterial = airNist;
507 beamLineSupportMaterial = aluminumNist;
510 vacuumZoneMaterial = galacticNist;
513 firstScatteringFoilMaterial = tantalumNist;
516 kaptonWindowMaterial = kaptonNist;
519 stopperMaterial = brass;
522 secondScatteringFoilMaterial = tantalumNist;
525 firstCollimatorMaterial = PMMANist;
526 holeFirstCollimatorMaterial = airNist;
529 modulatorBoxMaterial = aluminumNist;
530 holeModulatorBoxMaterial = airNist;
533 layer1MonitorChamberMaterial = kaptonNist;
534 layer2MonitorChamberMaterial = copperNistAsMaterial;
535 layer3MonitorChamberMaterial = airNist;
536 layer4MonitorChamberMaterial = copperNistAsMaterial;
539 MOPIMotherVolumeMaterial = airNist;
540 MOPIFirstKaptonLayerMaterial = kaptonNist;
541 MOPIFirstAluminumLayerMaterial = aluminumNist;
542 MOPIFirstAirGapMaterial = airNist;
543 MOPICathodeMaterial = mylarNist;
544 MOPISecondAirGapMaterial = airNist;
545 MOPISecondAluminumLayerMaterial = aluminumNist;
546 MOPISecondKaptonLayerMaterial = kaptonNist;
549 nozzleSupportMaterial = PMMANist;
550 brassTubeMaterial = brassTube2Material = brassTube3Material = brass;
551 holeNozzleSupportMaterial = airNist;
554 finalCollimatorMaterial = brass;
558 void PassiveProtonBeamLine::ConstructPassiveProtonBeamLine()
570 G4Box* treatmentRoom =
new G4Box(
"TreatmentRoom",worldX,worldY,worldZ);
573 "logicTreatmentRoom",
577 "physicalTreatmentRoom",
599 modulator -> BuildModulator(physicalTreatmentRoom);
608 const G4double beamLineSupportXSize = 1.5*
m;
610 const G4double beamLineSupportZSize = 600.*
mm;
612 const G4double beamLineSupportXPosition = -1745.09 *
mm;
613 const G4double beamLineSupportYPosition = -230. *
mm;
614 const G4double beamLineSupportZPosition = 0.*
mm;
616 G4Box* beamLineSupport =
new G4Box(
"BeamLineSupport",
617 beamLineSupportXSize,
618 beamLineSupportYSize,
619 beamLineSupportZSize);
622 beamLineSupportMaterial,
625 beamLineSupportYPosition,
626 beamLineSupportZPosition),
628 logicBeamLineSupport,
629 physicalTreatmentRoom,
false, 0);
633 logicBeamLineSupport -> SetVisAttributes(gray);
638 const G4double beamLineCoverXSize = 1.5*
m;
642 const G4double beamLineCoverXPosition = -1745.09 *
mm;
643 const G4double beamLineCoverYPosition = -1000.*
mm;
644 const G4double beamLineCoverZPosition = 600.*
mm;
646 G4Box* beamLineCover =
new G4Box(
"BeamLineCover",
652 beamLineSupportMaterial,
656 beamLineCoverYPosition,
657 beamLineCoverZPosition),
660 physicalTreatmentRoom,
669 beamLineCoverYPosition,
670 - beamLineCoverZPosition),
673 physicalTreatmentRoom,
677 logicBeamLineCover -> SetVisAttributes(blue);
689 G4Box* vacuumZone =
new G4Box(
"VacuumZone", vacuumZoneXSize, vacuumZoneYSize, vacuumZoneZSize);
692 "VacuumZone", logicVacuumZone, physicalTreatmentRoom,
false, 0);
698 firstScatteringFoil =
new G4Box(
"FirstScatteringFoil",
699 firstScatteringFoilXSize,
700 firstScatteringFoilYSize,
701 firstScatteringFoilZSize);
704 firstScatteringFoilMaterial,
705 "FirstScatteringFoil");
708 "FirstScatteringFoil", logicFirstScatteringFoil, physiVacuumZone,
711 logicFirstScatteringFoil -> SetVisAttributes(skyBlue);
716 G4Box* solidKaptonWindow =
new G4Box(
"KaptonWindow",
722 kaptonWindowMaterial,
726 "KaptonWindow", logicKaptonWindow,
727 physiVacuumZone,
false, 0);
729 logicKaptonWindow -> SetVisAttributes(darkOrange3);
742 solidStopper =
new G4Tubs(
"Stopper",
747 spanningAngleStopper);
759 physicalTreatmentRoom,
763 logicStopper -> SetVisAttributes(red);
772 secondScatteringFoil =
new G4Box(
"SecondScatteringFoil",
773 secondScatteringFoilXSize,
774 secondScatteringFoilYSize,
775 secondScatteringFoilZSize);
778 secondScatteringFoilMaterial,
779 "SecondScatteringFoil");
782 secondScatteringFoilYPosition,
783 secondScatteringFoilZPosition),
784 "SeconScatteringFoil",
785 logicSecondScatteringFoil,
786 physicalTreatmentRoom,
790 logicSecondScatteringFoil -> SetVisAttributes(skyBlue);
800 solidRangeShifterBox =
new G4Box(
"RangeShifterBox",
806 rangeShifterMaterial,
811 logicRangeShifterBox,
812 physicalTreatmentRoom,
817 logicRangeShifterBox -> SetVisAttributes(yellow);
827 const G4double firstCollimatorYSize = 100.*
mm;
828 const G4double firstCollimatorZSize = 100.*
mm;
830 const G4double firstCollimatorXPosition = -2673.00*
mm;
831 const G4double firstCollimatorYPosition = 0.*
mm;
832 const G4double firstCollimatorZPosition = 0.*
mm;
834 G4Box* solidFirstCollimator =
new G4Box(
"FirstCollimator",
835 firstCollimatorXSize,
836 firstCollimatorYSize,
837 firstCollimatorZSize);
840 firstCollimatorMaterial,
844 firstCollimatorYPosition,
845 firstCollimatorZPosition),
847 logicFirstCollimator,
848 physicalTreatmentRoom,
854 G4double innerRadiusHoleFirstCollimator = 0.*
mm;
855 G4double outerRadiusHoleFirstCollimator = 15.*
mm;
858 G4double spanningAngleHoleFirstCollimator = 360.*
deg;
860 G4Tubs* solidHoleFirstCollimator =
new G4Tubs(
"HoleFirstCollimator",
861 innerRadiusHoleFirstCollimator,
862 outerRadiusHoleFirstCollimator,
863 hightHoleFirstCollimator,
864 startAngleHoleFirstCollimator,
865 spanningAngleHoleFirstCollimator);
868 holeFirstCollimatorMaterial,
869 "HoleFirstCollimator",
877 "HoleFirstCollimator",
878 logicHoleFirstCollimator,
879 physiFirstCollimator,
886 const G4double secondCollimatorXPosition = -1900.00*
mm;
887 const G4double secondCollimatorYPosition = 0*
mm;
888 const G4double secondCollimatorZPosition = 0*
mm;
891 secondCollimatorYPosition,
892 secondCollimatorZPosition),
894 logicFirstCollimator,
895 physicalTreatmentRoom,
903 "HoleSecondCollimator",
904 logicHoleFirstCollimator,
905 physiSecondCollimator,
918 const G4double firstCollimatorModulatorXSize = 10.*
mm;
919 const G4double firstCollimatorModulatorYSize = 200.*
mm;
920 const G4double firstCollimatorModulatorZSize = 200.*
mm;
922 const G4double firstCollimatorModulatorXPosition = -2523.00*
mm;
923 const G4double firstCollimatorModulatorYPosition = 0.*
mm;
924 const G4double firstCollimatorModulatorZPosition = 0.*
mm;
926 G4Box* solidFirstCollimatorModulatorBox =
new G4Box(
"FirstCollimatorModulatorBox",
927 firstCollimatorModulatorXSize,
928 firstCollimatorModulatorYSize,
929 firstCollimatorModulatorZSize);
932 modulatorBoxMaterial,
933 "FirstCollimatorModulatorBox");
936 firstCollimatorModulatorYPosition,
937 firstCollimatorModulatorZPosition),
938 "FirstCollimatorModulatorBox",
939 logicFirstCollimatorModulatorBox,
940 physicalTreatmentRoom,
false, 0);
945 const G4double innerRadiusHoleFirstCollimatorModulatorBox = 0.*
mm;
946 const G4double outerRadiusHoleFirstCollimatorModulatorBox = 31.*
mm;
947 const G4double hightHoleFirstCollimatorModulatorBox = 10.*
mm;
948 const G4double startAngleHoleFirstCollimatorModulatorBox = 0.*
deg;
949 const G4double spanningAngleHoleFirstCollimatorModulatorBox = 360.*
deg;
951 G4Tubs* solidHoleFirstCollimatorModulatorBox =
new G4Tubs(
"HoleFirstCollimatorModulatorBox",
952 innerRadiusHoleFirstCollimatorModulatorBox,
953 outerRadiusHoleFirstCollimatorModulatorBox,
954 hightHoleFirstCollimatorModulatorBox ,
955 startAngleHoleFirstCollimatorModulatorBox,
956 spanningAngleHoleFirstCollimatorModulatorBox);
959 holeModulatorBoxMaterial,
960 "HoleFirstCollimatorModulatorBox",
964 "HoleFirstCollimatorModulatorBox",
965 logicHoleFirstCollimatorModulatorBox,
966 physiFirstCollimatorModulatorBox,
false, 0);
971 const G4double secondCollimatorModulatorXSize = 10.*
mm;
972 const G4double secondCollimatorModulatorYSize = 200.*
mm;
973 const G4double secondCollimatorModulatorZSize = 200.*
mm;
975 const G4double secondCollimatorModulatorXPosition = -1953.00 *
mm;
977 const G4double secondCollimatorModulatorYPosition = 0.*
mm;
978 const G4double secondCollimatorModulatorZPosition = 0.*
mm;
980 G4Box* solidSecondCollimatorModulatorBox =
new G4Box(
"SecondCollimatorModulatorBox",
981 secondCollimatorModulatorXSize,
982 secondCollimatorModulatorYSize,
983 secondCollimatorModulatorZSize);
986 modulatorBoxMaterial,
987 "SecondCollimatorModulatorBox");
990 secondCollimatorModulatorYPosition,
991 secondCollimatorModulatorZPosition),
992 "SecondCollimatorModulatorBox",
993 logicSecondCollimatorModulatorBox,
994 physicalTreatmentRoom,
false, 0);
999 const G4double innerRadiusHoleSecondCollimatorModulatorBox = 0.*
mm;
1000 const G4double outerRadiusHoleSecondCollimatorModulatorBox = 31.*
mm;
1001 const G4double hightHoleSecondCollimatorModulatorBox = 10.*
mm;
1002 const G4double startAngleHoleSecondCollimatorModulatorBox = 0.*
deg;
1003 const G4double spanningAngleHoleSecondCollimatorModulatorBox = 360.*
deg;
1005 G4Tubs* solidHoleSecondCollimatorModulatorBox =
new G4Tubs(
"HoleSecondCollimatorModulatorBox",
1006 innerRadiusHoleSecondCollimatorModulatorBox,
1007 outerRadiusHoleSecondCollimatorModulatorBox,
1008 hightHoleSecondCollimatorModulatorBox ,
1009 startAngleHoleSecondCollimatorModulatorBox,
1010 spanningAngleHoleSecondCollimatorModulatorBox);
1013 holeModulatorBoxMaterial,
1014 "HoleSecondCollimatorModulatorBox",
1018 "HoleSecondCollimatorModulatorBox",
1019 logicHoleSecondCollimatorModulatorBox,
1020 physiSecondCollimatorModulatorBox,
false, 0);
1022 logicFirstCollimator -> SetVisAttributes(yellow);
1023 logicFirstCollimatorModulatorBox -> SetVisAttributes(blue);
1024 logicSecondCollimatorModulatorBox -> SetVisAttributes(blue);
1045 const G4double monitor1XPosition = -1262.47498 *
mm;
1046 const G4double monitor2XPosition = -4.500011*
mm;
1047 const G4double monitor4XPosition = 4.500011*
mm;
1049 G4Box* solidFirstMonitorLayer1 =
new G4Box(
"FirstMonitorLayer1",
1055 layer1MonitorChamberMaterial,
1056 "FirstMonitorLayer1");
1060 "FirstMonitorLayer1",
1061 logicFirstMonitorLayer1,
1062 physicalTreatmentRoom,
1066 G4Box* solidFirstMonitorLayer2 =
new G4Box(
"FirstMonitorLayer2",
1072 layer2MonitorChamberMaterial,
1073 "FirstMonitorLayer2");
1076 "FirstMonitorLayer2",
1077 logicFirstMonitorLayer2,
1078 physiFirstMonitorLayer1,
1082 G4Box* solidFirstMonitorLayer3 =
new G4Box(
"FirstMonitorLayer3",
1088 layer3MonitorChamberMaterial,
1089 "FirstMonitorLayer3");
1094 logicFirstMonitorLayer3,
1095 physiFirstMonitorLayer1,
1099 G4Box* solidFirstMonitorLayer4 =
new G4Box(
"FirstMonitorLayer4",
1105 layer4MonitorChamberMaterial,
1106 "FirstMonitorLayer4");
1109 "FirstMonitorLayer4",
1110 logicFirstMonitorLayer4,
1111 physiFirstMonitorLayer1,
false, 0);
1116 "SecondMonitorLayer1", logicFirstMonitorLayer1,physicalTreatmentRoom,
false, 0);
1119 logicFirstMonitorLayer2, physiSecondMonitorLayer1,
false, 0);
1122 logicFirstMonitorLayer3, physiSecondMonitorLayer1,
false, 0);
1125 logicFirstMonitorLayer4, physiSecondMonitorLayer1,
false, 0);
1127 logicFirstMonitorLayer3 -> SetVisAttributes(white);
1153 solidMOPIMotherVolume =
new G4Box(
"MOPIMotherVolume",
1154 MOPIMotherVolumeXSize/2,
1155 MOPIMotherVolumeYSize/2,
1156 MOPIMotherVolumeYSize/2);
1159 MOPIMotherVolumeMaterial,
1160 "MOPIMotherVolume");
1163 MOPIMotherVolumeYPosition,
1164 MOPIMotherVolumeZPosition),
1166 logicMOPIMotherVolume,
1167 physicalTreatmentRoom,
1172 solidMOPIFirstKaptonLayer =
new G4Box(
"MOPIFirstKaptonLayer",
1173 MOPIFirstKaptonLayerXSize/2,
1174 MOPIFirstKaptonLayerYSize/2 ,
1175 MOPIFirstKaptonLayerZSize/2);
1177 logicMOPIFirstKaptonLayer =
new G4LogicalVolume(solidMOPIFirstKaptonLayer,
1178 MOPIFirstKaptonLayerMaterial,
1179 "MOPIFirstKaptonLayer");
1183 MOPIFirstKaptonLayerYPosition ,
1184 MOPIFirstKaptonLayerZPosition),
1185 "MOPIFirstKaptonLayer",
1186 logicMOPIFirstKaptonLayer,
1187 physiMOPIMotherVolume,
1192 solidMOPIFirstAluminumLayer =
new G4Box(
"MOPIFirstAluminumLayer",
1193 MOPIFirstAluminumLayerXSize/2,
1194 MOPIFirstAluminumLayerYSize/2 ,
1195 MOPIFirstAluminumLayerZSize/2);
1197 logicMOPIFirstAluminumLayer =
new G4LogicalVolume(solidMOPIFirstAluminumLayer,
1198 MOPIFirstAluminumLayerMaterial,
1199 "MOPIFirstAluminumLayer");
1203 MOPIFirstAluminumLayerYPosition ,
1204 MOPIFirstAluminumLayerZPosition),
1205 "MOPIFirstAluminumLayer",
1206 logicMOPIFirstAluminumLayer, physiMOPIMotherVolume,
false, 0);
1209 solidMOPIFirstAirGap =
new G4Box(
"MOPIFirstAirGap",
1210 MOPIFirstAirGapXSize/2,
1211 MOPIFirstAirGapYSize/2,
1212 MOPIFirstAirGapZSize/2);
1215 MOPIFirstAirGapMaterial,
1220 MOPIFirstAirGapYPosition ,
1221 MOPIFirstAirGapZPosition),
1223 logicMOPIFirstAirGap, physiMOPIMotherVolume,
false, 0);
1227 solidMOPICathode =
new G4Box(
"MOPICathode",
1230 MOPICathodeZSize/2);
1233 MOPICathodeMaterial,
1238 MOPICathodeYPosition ,
1239 MOPICathodeZPosition),
1242 physiMOPIMotherVolume,
false, 0);
1245 solidMOPISecondAirGap =
new G4Box(
"MOPISecondAirGap",
1246 MOPISecondAirGapXSize/2,
1247 MOPISecondAirGapYSize/2,
1248 MOPISecondAirGapZSize/2);
1251 MOPISecondAirGapMaterial,
1252 "MOPISecondAirgap");
1256 MOPISecondAirGapYPosition ,
1257 MOPISecondAirGapZPosition),
1259 logicMOPISecondAirGap, physiMOPIMotherVolume,
false, 0);
1262 solidMOPISecondAluminumLayer =
new G4Box(
"MOPISecondAluminumLayer",
1263 MOPISecondAluminumLayerXSize/2,
1264 MOPISecondAluminumLayerYSize/2 ,
1265 MOPISecondAluminumLayerZSize/2);
1267 logicMOPISecondAluminumLayer =
new G4LogicalVolume(solidMOPISecondAluminumLayer,
1268 MOPISecondAluminumLayerMaterial,
1269 "MOPISecondAluminumLayer");
1273 MOPISecondAluminumLayerYPosition ,
1274 MOPISecondAluminumLayerZPosition),
1275 "MOPISecondAluminumLayer",
1276 logicMOPISecondAluminumLayer,
1277 physiMOPIMotherVolume,
1282 solidMOPISecondKaptonLayer =
new G4Box(
"MOPISecondKaptonLayer",
1283 MOPISecondKaptonLayerXSize/2,
1284 MOPISecondKaptonLayerYSize/2 ,
1285 MOPISecondKaptonLayerZSize/2);
1287 logicMOPISecondKaptonLayer =
new G4LogicalVolume(solidMOPISecondKaptonLayer,
1288 MOPIFirstKaptonLayerMaterial,
1289 "MOPISecondKaptonLayer");
1293 MOPISecondKaptonLayerYPosition ,
1294 MOPISecondKaptonLayerZPosition),
1295 "MOPISecondKaptonLayer",
1296 logicMOPISecondKaptonLayer,
1297 physiMOPIMotherVolume,
1301 logicMOPIFirstAirGap -> SetVisAttributes(darkGreen);
1302 logicMOPISecondAirGap -> SetVisAttributes(darkGreen);
1319 const G4double nozzleSupportXSize = 29.5 *
mm;
1320 const G4double nozzleSupportYSize = 180. *
mm;
1321 const G4double nozzleSupportZSize = 180. *
mm;
1323 const G4double nozzleSupportXPosition = -397.50 *
mm;
1330 G4Box* solidNozzleSupport =
new G4Box(
"NozzleSupport",
1333 nozzleSupportZSize);
1336 nozzleSupportMaterial,
1342 physicalTreatmentRoom,
1346 logicNozzleSupport -> SetVisAttributes(yellow);
1353 const G4double innerRadiusHoleNozzleSupport = 0.*
mm;
1354 const G4double outerRadiusHoleNozzleSupport = 21.5*
mm;
1355 const G4double hightHoleNozzleSupport = 29.5 *
mm;
1356 const G4double startAngleHoleNozzleSupport = 0.*
deg;
1357 const G4double spanningAngleHoleNozzleSupport = 360.*
deg;
1359 G4Tubs* solidHoleNozzleSupport =
new G4Tubs(
"HoleNozzleSupport",
1360 innerRadiusHoleNozzleSupport,
1361 outerRadiusHoleNozzleSupport,
1362 hightHoleNozzleSupport,
1363 startAngleHoleNozzleSupport,
1364 spanningAngleHoleNozzleSupport);
1367 holeNozzleSupportMaterial,
1368 "HoleNozzleSupport",
1375 "HoleNozzleSupport",
1376 logicHoleNozzleSupport,
1380 logicHoleNozzleSupport -> SetVisAttributes(darkOrange3);
1386 const G4double outerRadiusBrassTube = 21.5 *
mm;
1391 const G4double brassTubeXPosition = -227.5 *
mm;
1394 innerRadiusBrassTube,
1395 outerRadiusBrassTube,
1397 startAngleBrassTube,
1398 spanningAngleBrassTube);
1411 physicalTreatmentRoom,
1415 logicBrassTube -> SetVisAttributes(darkOrange3);
1420 const G4double innerRadiusBrassTube2= 18.*
mm;
1421 const G4double outerRadiusBrassTube2 = 21.5 *
mm;
1424 const G4double spanningAngleBrassTube2 = 360.*
deg;
1429 innerRadiusBrassTube2,
1430 outerRadiusBrassTube2,
1432 startAngleBrassTube2,
1433 spanningAngleBrassTube2);
1450 logicBrassTube2 -> SetVisAttributes(darkOrange3);
1456 const G4double innerRadiusBrassTube3= 18.*
mm;
1457 const G4double outerRadiusBrassTube3 = 21.5 *
mm;
1460 const G4double spanningAngleBrassTube3 = 360.*
deg;
1462 const G4double brassTube3XPosition = -437 *
mm;
1465 innerRadiusBrassTube3,
1466 outerRadiusBrassTube3,
1468 startAngleBrassTube3,
1469 spanningAngleBrassTube3);
1482 physicalTreatmentRoom,
1486 logicBrassTube3 -> SetVisAttributes(darkOrange3);
1495 const G4double outerRadiusFinalCollimator = 21.5*
mm;
1496 const G4double hightFinalCollimator = 3.5*
mm;
1497 const G4double startAngleFinalCollimator = 0.*
deg;
1498 const G4double spanningAngleFinalCollimator = 360.*
deg;
1499 const G4double finalCollimatorXPosition = -83.5 *
mm;
1507 solidFinalCollimator =
new G4Tubs(
"FinalCollimator",
1508 innerRadiusFinalCollimator,
1509 outerRadiusFinalCollimator,
1510 hightFinalCollimator,
1511 startAngleFinalCollimator,
1512 spanningAngleFinalCollimator);
1515 finalCollimatorMaterial,
1522 "FinalCollimator", logicFinalCollimator, physicalTreatmentRoom,
false, 0);
1524 logicFinalCollimator -> SetVisAttributes(yellow);
1530 physiRangeShifterBox -> SetTranslation(
G4ThreeVector(value, 0., 0.));
1532 G4cout <<
"The Range Shifter is translated to"<< value/
mm <<
"mm along the X axis" <<
G4endl;
1538 solidRangeShifterBox -> SetXHalfLength(value) ;
1539 G4cout <<
"RangeShifter size X (mm): "<< ((solidRangeShifterBox -> GetXHalfLength())*2.)/
mm
1547 firstScatteringFoil -> SetXHalfLength(value);
1549 G4cout <<
"The X size of the first scattering foil is (mm):"<<
1550 ((firstScatteringFoil -> GetXHalfLength())*2.)/
mm
1557 secondScatteringFoil -> SetXHalfLength(value);
1559 G4cout <<
"The X size of the second scattering foil is (mm):"<<
1560 ((secondScatteringFoil -> GetXHalfLength())*2.)/
mm
1567 solidStopper -> SetOuterRadius(value);
1569 G4cout <<
"OuterRadius od the Stopper is (mm):"
1570 << solidStopper -> GetOuterRadius()/
mm
1577 solidFinalCollimator -> SetInnerRadius(value);
1579 G4cout<<
"Inner Radius of the final collimator is (mm):"
1580 << solidFinalCollimator -> GetInnerRadius()/
mm
1591 rangeShifterMaterial = pttoMaterial;
1592 logicRangeShifterBox ->
SetMaterial(pttoMaterial);
1593 G4cout <<
"The material of the Range Shifter has been changed to " << materialChoice <<
G4endl;
1598 G4cout <<
"WARNING: material \"" << materialChoice <<
"\" doesn't exist in NIST elements/materials"
1599 " table [located in $G4INSTALL/source/materials/src/G4NistMaterialBuilder.cc]" <<
G4endl;
1600 G4cout <<
"Use command \"/parameter/nist\" to see full materials list!" <<
G4endl;
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
CLHEP::Hep3Vector G4ThreeVector
void SetModulatorAngle(G4double angle)
void HadrontherapyBeamScatteringFoils()
void HadrontherapyBeamMonitoring()
void HadrontherapyBeamCollimators()
HepRotation & rotateY(double delta)
void SetSecondScatteringFoilXSize(G4double)
static G4NistManager * Instance()
void RegisterParallelWorld(G4VUserParallelWorld *)
void SetRangeShifterXPosition(G4double value)
void HadrontherapyBeamFinalCollimator()
G4GLOB_DLL std::ostream G4cout
void HadrontherapyBeamLineSupport()
void SetInnerRadiusFinalCollimator(G4double)
void SetOuterRadiusStopper(G4double)
void HadrontherapyBeamNozzle()
void SetFirstScatteringFoilXSize(G4double)
void SetRangeShifterXSize(G4double halfSize)
void HadrontherapyRangeShifter()
void SetRSMaterial(G4String)
static G4RunManager * GetRunManager()
static const G4VisAttributes Invisible
void HadrontherapyMOPIDetector()
const XML_Char int const XML_Char * value
G4VPhysicalVolume * Construct()
void InitializeDetectorROGeometry(HadrontherapyDetectorROGeometry *, G4ThreeVector detectorToWorldPosition)
G4Element * FindOrBuildElement(G4int Z, G4bool isotopes=true)
G4ThreeVector GetDetectorToWorldPosition()