Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Collimator100BeamLine.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // This is the *BASIC* version of IORT, a Geant4-based application
27 //
28 // Main Authors: G.Russo(a,b), C.Casarino*(c), G.C. Candiano(c), G.A.P. Cirrone(d), F.Romano(d)
29 // Contributor Authors: S.Guatelli(e)
30 // Past Authors: G.Arnetta(c), S.E.Mazzaglia(d)
31 //
32 // (a) Fondazione Istituto San Raffaele G.Giglio, Cefalù, Italy
33 // (b) IBFM-CNR , Segrate (Milano), Italy
34 // (c) LATO (Laboratorio di Tecnologie Oncologiche), Cefalù, Italy
35 // (d) Laboratori Nazionali del Sud of the INFN, Catania, Italy
36 // (e) University of Wallongong, Australia
37 //
38 // *Corresponding author, email to carlo.casarino@polooncologicocefalu.it
40 
41 #include "globals.hh"
42 #include "G4SystemOfUnits.hh"
43 #include "G4Box.hh"
44 #include "G4Tubs.hh"
45 #include "G4Cons.hh"
46 #include "G4VisAttributes.hh"
47 #include "G4Colour.hh"
48 #include "G4RunManager.hh"
49 #include "G4LogicalVolume.hh"
50 #include "G4PVPlacement.hh"
51 #include "G4RotationMatrix.hh"
52 #include "G4NistManager.hh"
53 #include "G4NistElementBuilder.hh"
54 #include "G4SubtractionSolid.hh"
56 #include "Collimator100BeamLine.hh"
58 
60  physicalTreatmentRoom(0),iortDetectorConstruction(0),
61 
62 
63  solidFinalCollimatorIORT(0),
64  logicFinalCollimatorIORT(0),
65  physiFinalCollimatorIORT(0),
66 
67  solidGiunz1FinalCollIORT(0),
68  logicGiunz1FinalCollIORT(0),
69  physiGiunz1FinalCollIORT(0),
70 
71  solidGiunz2FinalCollIORT(0),
72  logicGiunz2FinalCollIORT(0),
73  physiGiunz2FinalCollIORT(0),
74 
75  solidGiunz3FinalCollIORT(0),
76  logicGiunz3FinalCollIORT(0),
77  physiGiunz3FinalCollIORT(0),
78 
79  solidGiunz3FinalCollIntIORT(0),
80  logicGiunz3FinalCollIntIORT(0),
81  physiGiunz3FinalCollIntIORT(0),
82 
83  solidGiunz4FinalCollIORT(0),
84  logicGiunz4FinalCollIORT(0),
85  physiGiunz4FinalCollIORT(0),
86 
87  solidGiunz5FinalCollIORT(0),
88  logicGiunz5FinalCollIORT(0),
89  physiGiunz5FinalCollIORT(0),
90 
91  solidBlocco1IORT(0),
92  logicBlocco1IORT(0),
93  physiBlocco1IORT(0),
94 
95  solidBlocco2IORT(0),
96  logicBlocco2IORT(0),
97  physiBlocco2IORT(0),
98 
99  solidBlocco3IORT(0),
100  logicBlocco3IORT(0),
101  physiBlocco3IORT(0),
102 
103  solidBlocco20mmIORT(0),
104  logicBlocco20mmIORT(0),
105  physiBlocco20mmIORT(0),
106 
107  solidCM1_1_2IORT(0),
108  logicCM1_1_2IORT(0),
109  physiCM1_1_2IORT(0),
110 
111  solidCM1_2_2IORT(0),
112  logicCM1_2_2IORT(0),
113  physiCM1_2_2IORT(0),
114 
115  solidCM2_1_2IORT(0),
116  logicCM2_1_2IORT(0),
117  physiCM2_1_2IORT(0),
118 
119  solidCM2_2_2IORT(0),
120  logicCM2_2_2IORT(0),
121  physiCM2_2_2IORT(0),
122 
123  solidCCMIORT(0),
124  logicCCMIORT(0),
125  physiCCMIORT(0),
126 
127  solidPFS1IORT(0),
128  logicPFS1IORT(0),
129  physiPFS1IORT(0),
130 
131  solidPFS2IORT(0),
132  logicPFS2IORT(0),
133  physiPFS2IORT(0),
134 
135  solidPFS3IORT(0),
136  logicPFS3IORT(0),
137  physiPFS3IORT(0),
138 
139  solidFTIORT(0),
140  logicFTIORT(0),
141  physiFTIORT(0)
142 
143 
144 {
145  // Messenger to change parameters of the collimator100BeamLine geometry
146  collimatorMessenger = new Collimator100BeamLineMessenger(this);
147 
148 }
151 {
152  delete collimatorMessenger;
153  delete iortDetectorConstruction;
154 }
155 
157 
158 
160 {
161  // Sets default geometry and materials
162  SetDefaultDimensions();
163 
164  // Construct the whole Collimator Beam Line
165  ConstructCollimator100BeamLine();
166 
167 
168  // IORTDetectorConstruction builds ONLY the phantom and the detector with its associated ROGeometry
169  iortDetectorConstruction = new IORTDetectorConstruction(physicalTreatmentRoom);
170 
171  return physicalTreatmentRoom;
172 }
173 
174 // In the following method the DEFAULTS used in the geometry of
175 // collimator beam line are provided
176 // HERE THE USER CAN CHANGE THE GEOMETRY CHARACTERISTICS OF BEAM
177 // LINE ELEMENTS, ALTERNATIVELY HE/SHE CAN USE THE MACRO FILE (IF A
178 // MESSENGER IS PROVIDED)
179 //
180 // DEFAULT MATERIAL ARE ALSO PROVIDED
181 // and COLOURS ARE ALSO DEFINED
182 // ----------------------------------------------------------
184 void Collimator100BeamLine::SetDefaultDimensions()
185 {
186 
187  // Set of coulors that can be used
188  white = new G4VisAttributes( G4Colour());
189  white -> SetVisibility(true);
190  //white -> SetForceSolid(true);
191 
192  blue = new G4VisAttributes(G4Colour(0. ,0. ,1.));
193  blue -> SetVisibility(true);
194  //blue -> SetForceSolid(true);
195 
196  gray = new G4VisAttributes( G4Colour(0.5, 0.5, 0.5 ));
197  gray-> SetVisibility(true);
198  //gray-> SetForceSolid(true);
199 
200  red = new G4VisAttributes(G4Colour(1. ,0. ,0.));
201  red-> SetVisibility(true);
202  //red-> SetForceSolid(true);
203 
204  yellow = new G4VisAttributes(G4Colour(1., 1., 0. ));
205  yellow-> SetVisibility(true);
206  //yellow-> SetForceSolid(true);
207 
208  green = new G4VisAttributes( G4Colour(25/255. , 255/255. , 25/255. ));
209  green -> SetVisibility(true);
210  //green -> SetForceSolid(true);
211 
212  darkGreen = new G4VisAttributes( G4Colour(0/255. , 100/255. , 0/255. ));
213  darkGreen -> SetVisibility(true);
214  //darkGreen -> SetForceSolid(true);
215 
216  darkOrange3 = new G4VisAttributes( G4Colour(205/255. , 102/255. , 000/255. ));
217  darkOrange3 -> SetVisibility(true);
218  //darkOrange3 -> SetForceSolid(true);
219 
220  skyBlue = new G4VisAttributes( G4Colour(135/255. , 206/255. , 235/255. ));
221  skyBlue -> SetVisibility(true);
222  //skyBlue -> SetForceSolid(true);
223 
224 
225 
226  // Geometry FINAL COLLIMATOR DEFAULTS
227 
228  G4double defaultOuterRadiusFinalCollimatorIORT = 55. *mm;
229  OuterRadiusFinalCollimatorIORT = defaultOuterRadiusFinalCollimatorIORT;
230 
231  G4double defaultinnerRadiusFinalCollimatorIORT = 50. *mm;
232  innerRadiusFinalCollimatorIORT = defaultinnerRadiusFinalCollimatorIORT;
233 
234  // DEFAULT DEFINITION OF THE MATERIALS
235  // All elements and compound definition follows the NIST database
236 
237  // ELEMENTS
238  G4bool isotopes = false;
239  G4Material* aluminumNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_Al", isotopes);
240  //G4Material* tantalumNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_Ta", isotopes);
241  //G4Material* copperNistAsMaterial = G4NistManager::Instance()->FindOrBuildMaterial("G4_Cu", isotopes);
244 
245  // COMPOUND
246  G4Material* airNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_AIR", isotopes);
247  //G4Material* kaptonNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_KAPTON", isotopes);
248  G4Material* galacticNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_Galactic", isotopes);
249  G4Material* PMMANist = G4NistManager::Instance()->FindOrBuildMaterial("G4_PLEXIGLASS", isotopes);
250  //G4Material* mylarNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_MYLAR", isotopes);
251  G4Material* titanioNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_Ti", isotopes);
252 
253 
254  G4double d; // Density
255  G4int nComponents;// Number of components
256  G4double fractionmass; // Fraction in mass of an element in a material
257 
258  d = 8.40*g/cm3; // brass
259  nComponents = 2;
260  G4Material* brass = new G4Material("Brass", d, nComponents);
261  brass -> AddElement(zincNist, fractionmass = 30 *perCent);
262  brass -> AddElement(copperNist, fractionmass = 70 *perCent);
263 
264 
265  // MATERIAL ASSIGNMENT
266 
267 
268  // Material of the FINAL COLLIMATOR IORT
269  finalCollimatorMaterialIORT = PMMANist;
270 
271  // Junction 1 FINAL COLLIMATOR IORT
272  Giunz1FinalCollMaterialIORT = PMMANist;
273 
274  // Junction 2 FINAL COLLIMATOR IORT
275  Giunz2FinalCollMaterialIORT = PMMANist;
276 
277  // Junction 3 FINAL COLLIMATOR IORT
278  Giunz3FinalCollMaterialIORT = PMMANist;
279 
280  // Junction 3 FINAL COLLIMATOR Int IORT
281  Giunz3FinalCollMaterialIntIORT = airNist;
282 
283  // Junction 4 FINAL COLLIMATOR IORT
284  Giunz4FinalCollMaterialIORT = PMMANist;
285 
286  // Junction 5 FINAL COLLIMATOR IORT
287  Giunz5FinalCollMaterialIORT = PMMANist;
288 
289  // Block 1 Diameter 30 mm
290  Blocco1IORTMaterialIORT = PMMANist;
291 
292  // Block 2 Diameter 30 mm
293  Blocco2IORTMaterialIORT = PMMANist;
294 
295  // Block 3 Diameter 30 mm
296  Blocco3IORTMaterialIORT = PMMANist;
297 
298  // Block Diameter 20 mm
299  Blocco20mmIORTMaterialIORT = PMMANist;
300 
301  // First Monitor Chamber Lamina Al 1 of 2
302  CM1_1_2IORTMaterialIORT = aluminumNist;
303 
304  // First Monitor Chamber Lamina Al 2 of 2
305  CM1_2_2IORTMaterialIORT = aluminumNist;
306 
307  // Second Monitor Chamber Lamina Al 1 of 2
308  CM2_1_2IORTMaterialIORT = aluminumNist;
309 
310  // Second Monitor Chamber Lamina Al 2 of 2
311  CM2_2_2IORTMaterialIORT = aluminumNist;
312 
313  // Monitor Chamber Cylinder
314  CCMIORTMaterialIORT = PMMANist;
315 
316  // Superior Final Part Monitor Chambers
317  PFS1IORTMaterialIORT = PMMANist;
318 
319  // Superior Final Part Monitor Chambers
320  PFS2IORTMaterialIORT = PMMANist;
321 
322  // Superior Final Part Monitor Chambers
323  PFS3IORTMaterialIORT = PMMANist;
324 
325  // Superior Final Part Monitor Chambers Material
326  FTIORTMaterialIORT = titanioNist;
327 
328  // Vacuum Source
329  VSIORTMaterialIORT = galacticNist;
330 
331 }
332 
334 void Collimator100BeamLine::ConstructCollimator100BeamLine()
335 {
336  // -----------------------------
337  // Treatment room - World volume
338  //------------------------------
339  // Treatment room sizes
340  const G4double worldX = 400.0 *cm;
341  const G4double worldY = 400.0 *cm;
342  const G4double worldZ = 400.0 *cm;
343  G4bool isotopes = false;
344 
345  G4Material* airNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_AIR", isotopes);
346  G4Box* treatmentRoom = new G4Box("TreatmentRoom",worldX,worldY,worldZ);
347  G4LogicalVolume* logicTreatmentRoom = new G4LogicalVolume(treatmentRoom,
348  airNist,
349  "logicTreatmentRoom",
350  0,0,0);
351  physicalTreatmentRoom = new G4PVPlacement(0,
352  G4ThreeVector(),
353  "physicalTreatmentRoom",
354  logicTreatmentRoom,
355  0,false,0);
356 
357 
358  // The treatment room is invisible in the Visualisation
359  logicTreatmentRoom -> SetVisAttributes (G4VisAttributes::Invisible);
360 
361  // Components of the Collimator Beam Line
362 
369 
370 }
371 
372 
374 {
375  // ---------------------------------------------------------------//
376  // Vacuum Source //
377  // ---------------------------------------------------------------//
378 
379 
380  G4double phi1 = 90. *deg;
381 
382 
383  G4RotationMatrix rm1;
384  rm1.rotateY(phi1);
385 
386  const G4double outRadiusVSIORT = 44.75 *mm;
387  const G4double innRadiusVSIORT = 0.*mm;
388  const G4double hightVSIORT = 1. *mm;
389  const G4double startAngleVSIORT = 0.*deg;
390  const G4double spanningAngleVSIORT = 360.*deg;
391  const G4double XPositionVSIORT = -1062.797 *mm;
392 
393  solidVSIORT = new G4Tubs("VSIORT", innRadiusVSIORT,
394  outRadiusVSIORT,
395  hightVSIORT,
396  startAngleVSIORT,
397  spanningAngleVSIORT);
398 
399  G4LogicalVolume* logVSIORT = new G4LogicalVolume(solidVSIORT,
400  VSIORTMaterialIORT, "VSIORT", 0, 0, 0);
401 
402  physiVSIORT = new G4PVPlacement(G4Transform3D(rm1, G4ThreeVector((XPositionVSIORT),0.,0.)),
403  "VSIORT", logicVSIORT, physicalTreatmentRoom, false, 0);
404  logVSIORT -> SetVisAttributes(green);
405 }
406 
408 {
409 // ---------------------------------------------------------------//
410  // Titanium Window //
411  // ---------------------------------------------------------------//
412 
413  G4double phi2 = 90. *deg;
414 
415 
416  G4RotationMatrix rm2;
417  rm2.rotateY(phi2);
418 
419 
420  const G4double outRadiusFTIORT = 44.75 *mm;
421  const G4double innRadiusFTIORT = 8.5 *mm;
422  const G4double hightFTIORT = 0.006 *mm;
423  const G4double startAngleFTIORT = 0.*deg;
424  const G4double spanningAngleFTIORT = 360.*deg;
425  const G4double XPositionFTIORT = -1061.791 *mm;
426 
427 
428  solidFTIORT = new G4Tubs("FTIORT", innRadiusFTIORT,
429  outRadiusFTIORT,
430  hightFTIORT,
431  startAngleFTIORT,
432  spanningAngleFTIORT);
433 
434  G4LogicalVolume* logFTIORT = new G4LogicalVolume(solidFTIORT,
435  FTIORTMaterialIORT, "FTIORT", 0, 0, 0);
436 
437  physiFTIORT = new G4PVPlacement(G4Transform3D(rm2, G4ThreeVector((XPositionFTIORT),0.,0.)),
438  "FTIORT", logFTIORT, physicalTreatmentRoom, false, 0);
439 
440  logFTIORT -> SetVisAttributes(yellow);
441 }
442 
444 {
445 
446  G4double phi3 = 90. *deg;
447 
448  // Matrix definition for a 90 deg rotation. Also used for other volumes
450  rm3.rotateY(phi3);
452 
453  // Monitor Chambers System
454 
456 
457 
458  // ---------------------------------------------------------------//
459  // Superior Final Part Monitor Chambers 3 //
460  // ---------------------------------------------------------------//
461 
462  const G4double outRadiusPFS3IORT = 44.75 *mm;
463  const G4double innRadiusPFS3IORT = 17.5 *mm;
464  const G4double hightPFS3IORT = 3.03 *mm;
465  const G4double startAnglePFS3IORT = 0.*deg;
466  const G4double spanningAnglePFS3IORT = 360.*deg;
467  const G4double XPositionPFS3IORT = -1048.755 *mm;
468 
469 
470  solidPFS3IORT = new G4Tubs("PFS3IORT", innRadiusPFS3IORT,
471  outRadiusPFS3IORT,
472  hightPFS3IORT,
473  startAnglePFS3IORT,
474  spanningAnglePFS3IORT);
475 
476  G4LogicalVolume* logPFS3IORT = new G4LogicalVolume(solidPFS3IORT,
477  PFS3IORTMaterialIORT, "PFS3IORT", 0, 0, 0);
478 
479  physiPFS3IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionPFS3IORT),0.,0.)),
480  "PFS3IORT", logPFS3IORT, physicalTreatmentRoom, false, 0);
481 
482  logPFS3IORT -> SetVisAttributes(white);
483 
484 
485  // ---------------------------------------------------------------//
486  // Superior Final Part Monitor Chambers 2 //
487  // ---------------------------------------------------------------//
488 
489  const G4double outRadiusPFS2IORT = 44.75 *mm;
490  const G4double innRadiusPFS2IORT = 10. *mm;
491  const G4double hightPFS2IORT = 1.47 *mm;
492  const G4double startAnglePFS2IORT = 0.*deg;
493  const G4double spanningAnglePFS2IORT = 360.*deg;
494  const G4double XPositionPFS2IORT = -1044.255 *mm;
495 
496 
497  solidPFS2IORT = new G4Tubs("PFS2IORT", innRadiusPFS2IORT,
498  outRadiusPFS2IORT,
499  hightPFS2IORT,
500  startAnglePFS2IORT,
501  spanningAnglePFS2IORT);
502 
503  G4LogicalVolume* logPFS2IORT = new G4LogicalVolume(solidPFS2IORT,
504  PFS2IORTMaterialIORT, "PFS2IORT", 0, 0, 0);
505 
506  physiPFS2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionPFS2IORT),0.,0.)),
507  "PFS2IORT", logPFS2IORT, physicalTreatmentRoom, false, 0);
508 
509  logPFS2IORT -> SetVisAttributes(green);
510 
511  // ---------------------------------------------------------------//
512  // Superior Final Part Monitor Chambers 1 //
513  // ---------------------------------------------------------------//
514 
515  const G4double outRadiusPFS1IORT = 35. *mm;
516  const G4double innRadiusPFS1IORT = 10. *mm;
517  const G4double hightPFS1IORT = 0.88 *mm;
518  const G4double startAnglePFS1IORT = 0.*deg;
519  const G4double spanningAnglePFS1IORT = 360.*deg;
520  const G4double XPositionPFS1IORT = -1041.905 *mm;
521 
522 
523  solidPFS1IORT = new G4Tubs("PFS1IORT", innRadiusPFS1IORT,
524  outRadiusPFS1IORT,
525  hightPFS1IORT,
526  startAnglePFS1IORT,
527  spanningAnglePFS1IORT);
528 
529  G4LogicalVolume* logPFS1IORT = new G4LogicalVolume(solidPFS1IORT,
530  PFS1IORTMaterialIORT, "PFS1IORT", 0, 0, 0);
531 
532  physiPFS1IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionPFS1IORT),0.,0.)),
533  "PFS1IORT", logPFS1IORT, physicalTreatmentRoom, false, 0);
534 
535  logPFS1IORT -> SetVisAttributes(green);
536 
537  // ------------------------------------------------//
538  // Monitor Chambers Cylinder //
539  // ------------------------------------------------//
540 
541  const G4double outRadiusCCMIORT = 35. *mm;
542  const G4double innRadiusCCMIORT = 10. *mm;
543  const G4double hightCCMIORT = 4.0125 *mm;
544  const G4double startAngleCCMIORT = 0.*deg;
545  const G4double spanningAngleCCMIORT = 360.*deg;
546  const G4double XPositionCCMIORT = -1037.0125 *mm;
547 
548 
549  solidCCMIORT = new G4Tubs("CCMIORT", innRadiusCCMIORT,
550  outRadiusCCMIORT,
551  hightCCMIORT,
552  startAngleCCMIORT,
553  spanningAngleCCMIORT);
554 
555  G4LogicalVolume* logCCMIORT = new G4LogicalVolume(solidCCMIORT,
556  CCMIORTMaterialIORT, "CCMIORT", 0, 0, 0);
557 
558  physiCCMIORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCCMIORT),0.,0.)),
559  "CCMIORT", logCCMIORT, physicalTreatmentRoom, false, 0);
560 
561  logCCMIORT -> SetVisAttributes(green);
562 
563 
564  // ------------------------------------------------//
565  // Second Monitor Chamber Lamina Al 2 of 2 //
566  // ------------------------------------------------//
567 
568  const G4double outRadiusCM2_2_2IORT = 20. *mm;
569  const G4double innRadiusCM2_2_2IORT = 0. *mm;
570  const G4double hightCM2_2_2IORT = 0.025 *mm;
571  const G4double startAngleCM2_2_2IORT = 0.*deg;
572  const G4double spanningAngleCM2_2_2IORT = 360.*deg;
573  const G4double XPositionCM2_2_2IORT = -1041. *mm;
574 
575 
576  solidCM2_2_2IORT = new G4Tubs("CM2_2_2IORT", innRadiusCM2_2_2IORT,
577  outRadiusCM2_2_2IORT,
578  hightCM2_2_2IORT,
579  startAngleCM2_2_2IORT,
580  spanningAngleCM2_2_2IORT);
581 
582  G4LogicalVolume* logCM2_2_2IORT = new G4LogicalVolume(solidCM2_2_2IORT,
583  CM2_2_2IORTMaterialIORT, "CM2_2_2IORT", 0, 0, 0);
584 
585  physiCM2_2_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM2_2_2IORT),0.,0.)),
586  "CM2_2_2ORT", logCM2_2_2IORT, physicalTreatmentRoom, false, 0);
587 
588  logCM2_2_2IORT -> SetVisAttributes(green);
589 
590 
591 // ------------------------------------------------//
592  // Second Monitor Chamber Lamina Al 1 of 2 //
593  // ------------------------------------------------//
594 
595  const G4double outRadiusCM2_1_2IORT = 20. *mm;
596  const G4double innRadiusCM2_1_2IORT = 0. *mm;
597  const G4double hightCM2_1_2IORT = 0.025 *mm;
598  const G4double startAngleCM2_1_2IORT = 0.*deg;
599  const G4double spanningAngleCM2_1_2IORT = 360.*deg;
600  const G4double XPositionCM2_1_2IORT = -1039. *mm;
601 
602 
603  solidCM2_1_2IORT = new G4Tubs("CM2_1_2IORT", innRadiusCM2_1_2IORT,
604  outRadiusCM2_1_2IORT,
605  hightCM2_1_2IORT,
606  startAngleCM2_1_2IORT,
607  spanningAngleCM2_1_2IORT);
608 
609  G4LogicalVolume* logCM2_1_2IORT = new G4LogicalVolume(solidCM2_1_2IORT,
610  CM2_1_2IORTMaterialIORT, "CM2_1_2IORT", 0, 0, 0);
611 
612  physiCM2_1_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM2_1_2IORT),0.,0.)),
613  "CM2_1_2ORT", logCM2_1_2IORT, physicalTreatmentRoom, false, 0);
614 
615  logCM2_1_2IORT -> SetVisAttributes(yellow);
616 
617  // ------------------------------------------------//
618  // First Monitor Chamber Lamina Al 2 of 2 //
619  // ------------------------------------------------//
620 
621  const G4double outRadiusCM1_2_2IORT = 20. *mm;
622  const G4double innRadiusCM1_2_2IORT = 0. *mm;
623  const G4double hightCM1_2_2IORT = 0.025 *mm;
624  const G4double startAngleCM1_2_2IORT = 0.*deg;
625  const G4double spanningAngleCM1_2_2IORT = 360.*deg;
626  const G4double XPositionCM1_2_2IORT = -1037. *mm;
627 
628 
629  solidCM1_2_2IORT = new G4Tubs("CM1_2_2IORT", innRadiusCM1_2_2IORT,
630  outRadiusCM1_2_2IORT,
631  hightCM1_2_2IORT,
632  startAngleCM1_2_2IORT,
633  spanningAngleCM1_2_2IORT);
634 
635  G4LogicalVolume* logCM1_2_2IORT = new G4LogicalVolume(solidCM1_2_2IORT,
636  CM1_2_2IORTMaterialIORT, "CM1_2_2IORT", 0, 0, 0);
637 
638  physiCM1_2_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM1_2_2IORT),0.,0.)),
639  "CM1_2_2ORT", logCM1_2_2IORT, physicalTreatmentRoom, false, 0);
640 
641 
642  logCM1_2_2IORT -> SetVisAttributes(yellow);
643 
644  // ------------------------------------------------//
645  // First Monitor Chamber Lamina Al 1 of 2 //
646  // ------------------------------------------------//
647 
648  const G4double outRadiusCM1_1_2IORT = 20. *mm;
649  const G4double innRadiusCM1_1_2IORT = 0. *mm;
650  const G4double hightCM1_1_2IORT = 0.025 *mm;
651  const G4double startAngleCM1_1_2IORT = 0.*deg;
652  const G4double spanningAngleCM1_1_2IORT = 360.*deg;
653  const G4double XPositionCM1_1_2IORT = -1035. *mm;
654 
655 
656 
657  solidCM1_1_2IORT = new G4Tubs("CM1_1_2IORT", innRadiusCM1_1_2IORT,
658  outRadiusCM1_1_2IORT,
659  hightCM1_1_2IORT,
660  startAngleCM1_1_2IORT,
661  spanningAngleCM1_1_2IORT);
662 
663  G4LogicalVolume* logCM1_1_2IORT = new G4LogicalVolume(solidCM1_1_2IORT,
664  CM1_1_2IORTMaterialIORT, "CM1_1_2IORT", 0, 0, 0);
665 
666  physiCM1_1_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM1_1_2IORT),0.,0.)),
667  "CM1_1_2ORT", logCM1_1_2IORT, physicalTreatmentRoom, false, 0);
668  logCM1_1_2IORT -> SetVisAttributes(yellow);
669 }
670 
672 {
673 
674  G4double phi4 = 90. *deg;
675 
676 
677  G4RotationMatrix rm4;
678  rm4.rotateY(phi4);
679 
681 
682  // IORT BEAM LINE BLOCKS
683 
685 
686  // ------------------------------------------------//
687  // Block 4 //
688  // ------------------------------------------------//
689 
690  const G4double outRadiusBlocco20mmIORT = 36.5 *mm;
691  const G4double innRadiusBlocco20mmIORT = 10. *mm;
692  const G4double hightBlocco20mmIORT = 3. *mm;
693  const G4double startAngleBlocco20mmIORT = 0.*deg;
694  const G4double spanningAngleBlocco20mmIORT = 360.*deg;
695  const G4double XPositionBlocco20mmIORT = -1030. *mm;
696 
697 
698  solidBlocco20mmIORT = new G4Tubs("Blocco20mmIORT", innRadiusBlocco20mmIORT,
699  outRadiusBlocco20mmIORT,
700  hightBlocco20mmIORT,
701  startAngleBlocco20mmIORT,
702  spanningAngleBlocco20mmIORT);
703 
704  G4LogicalVolume* logBlocco20mmIORT = new G4LogicalVolume(solidBlocco20mmIORT,
705  Blocco20mmIORTMaterialIORT, "Blocco20mmIORT", 0, 0, 0);
706 
707  physiBlocco20mmIORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco20mmIORT),0.,0.)),
708  "Blocco20mmORT", logBlocco20mmIORT, physicalTreatmentRoom, false, 0);
709 
710 
711  logBlocco20mmIORT -> SetVisAttributes(green);
712 
713 
714  // -----------------------//
715  // Block 3 //
716  // -----------------------//
717 
718  const G4double outRadiusBlocco3IORT = 36.5 *mm;
719  const G4double innRadiusBlocco3IORT = 15. *mm;
720  const G4double hightBlocco3IORT = 3.5 *mm;
721  const G4double startAngleBlocco3IORT = 0.*deg;
722  const G4double spanningAngleBlocco3IORT = 360.*deg;
723  const G4double XPositionBlocco3IORT = -1023.5 *mm;
724 
725 
726  solidBlocco3IORT = new G4Tubs("Blocco3IORT", innRadiusBlocco3IORT,
727  outRadiusBlocco3IORT,
728  hightBlocco3IORT,
729  startAngleBlocco3IORT,
730  spanningAngleBlocco3IORT);
731 
732  G4LogicalVolume* logBlocco3IORT = new G4LogicalVolume(solidBlocco3IORT,
733  Blocco3IORTMaterialIORT, "Blocco3IORT", 0, 0, 0);
734 
735  physiBlocco3IORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco3IORT),0.,0.)),
736  "Blocco3ORT", logBlocco3IORT, physicalTreatmentRoom, false, 0);
737 
738 
739  logBlocco3IORT -> SetVisAttributes(yellow);
740 
741  // -----------------------//
742  // Block 2 //
743  // -----------------------//
744 
745  const G4double outRadiusBlocco2IORT = 41.5 *mm;
746  const G4double innRadiusBlocco2IORT = 15. *mm;
747  const G4double hightBlocco2IORT = 8. *mm;
748  const G4double startAngleBlocco2IORT = 0.*deg;
749  const G4double spanningAngleBlocco2IORT = 360.*deg;
750  const G4double XPositionBlocco2IORT = -1012. *mm;
751 
752 
753  solidBlocco2IORT = new G4Tubs("Blocco2IORT", innRadiusBlocco2IORT,
754  outRadiusBlocco2IORT,
755  hightBlocco2IORT,
756  startAngleBlocco2IORT,
757  spanningAngleBlocco2IORT);
758 
759  G4LogicalVolume* logBlocco2IORT = new G4LogicalVolume(solidBlocco2IORT,
760  Blocco2IORTMaterialIORT, "Blocco2IORT", 0, 0, 0);
761 
762  physiBlocco2IORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco2IORT),0.,0.)),
763  "Blocco2IORT", logBlocco2IORT, physicalTreatmentRoom, false, 0);
764 
765 
766  logBlocco2IORT -> SetVisAttributes(red);
767 
768  // ----------------------- //
769  // Block 1 //
770  // ----------------------- //
771 
772  const G4double outRadiusBlocco1IORT = 52.0 *mm;
773  const G4double innRadiusBlocco1IORT = 15. *mm;
774  const G4double hightBlocco1IORT = 8.5 *mm;
775  const G4double startAngleBlocco1IORT = 0.*deg;
776  const G4double spanningAngleBlocco1IORT = 360.*deg;
777  const G4double XPositionBlocco1IORT = -995.5*mm;
778 
779 
780  solidBlocco1IORT = new G4Tubs("Blocco1IORT", innRadiusBlocco1IORT,
781  outRadiusBlocco1IORT,
782  hightBlocco1IORT,
783  startAngleBlocco1IORT,
784  spanningAngleBlocco1IORT);
785 
786  G4LogicalVolume* logBlocco1IORT = new G4LogicalVolume(solidBlocco1IORT,
787  Blocco1IORTMaterialIORT, "Blocco1IORT", 0, 0, 0);
788 
789  physiBlocco1IORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco1IORT),0.,0.)),
790  "Blocco1IORT", logBlocco1IORT, physicalTreatmentRoom, false, 0);
791 
792 
793  logBlocco1IORT -> SetVisAttributes(white);
794 
795 }
796 
798 {
799 
800 
801  G4double phi5 = 90. *deg;
802 
803 
804  G4RotationMatrix rm5;
805  rm5.rotateY(phi5);
806 // --------------------------------- //
807  // Junction 5 FINAL COLLIMATOR IORT //
808  // --------------------------------- //
809 
810  const G4double outRadiusGiunz5FinalCollIORT = 48.25 *mm;
811  const G4double innRadiusGiunz5FinalCollIORT = 13.75 *mm;
812  const G4double hightGiunz5FinalCollIORT = 3.5 *mm;
813  const G4double startAngleGiunz5FinalCollIORT = 0.*deg;
814  const G4double spanningAngleGiunz5FinalCollIORT = 360.*deg;
815  const G4double Giunz5FinalCollXPositionIORT = -983.5 *mm;
816 
817 
818 
819  solidGiunz5FinalCollIORT = new G4Tubs("Giunz5FinalCollIORT", innRadiusGiunz5FinalCollIORT,
820  outRadiusGiunz5FinalCollIORT,
821  hightGiunz5FinalCollIORT,
822  startAngleGiunz5FinalCollIORT,
823  spanningAngleGiunz5FinalCollIORT);
824 
825  G4LogicalVolume* logGiunz5FinalCollIORT = new G4LogicalVolume(solidGiunz5FinalCollIORT,
826  Giunz5FinalCollMaterialIORT, "Giunz5FinalCollIORT", 0, 0, 0);
827 
828  physiGiunz5FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz5FinalCollXPositionIORT),0.,0.)),
829  "Giunz5FinalCollIORT", logGiunz5FinalCollIORT, physicalTreatmentRoom, false, 0);
830 
831  logGiunz5FinalCollIORT -> SetVisAttributes(yellow);
832 
833 // --------------------------------- //
834  // Junction 4 FINAL COLLIMATOR IORT //
835  // --------------------------------- //
836 
837  const G4double outRadiusGiunz4FinalCollIORT = 42. *mm;
838  const G4double innRadiusGiunz4FinalCollIORT = 13.75 *mm;
839  const G4double hightGiunz4FinalCollIORT = 8.5 *mm;
840  const G4double startAngleGiunz4FinalCollIORT = 0.*deg;
841  const G4double spanningAngleGiunz4FinalCollIORT = 360.*deg;
842  const G4double Giunz4FinalCollXPositionIORT = -971.5 *mm;
843 
844 
845 
846  solidGiunz4FinalCollIORT = new G4Tubs("Giunz4FinalCollIORT", innRadiusGiunz4FinalCollIORT,
847  outRadiusGiunz4FinalCollIORT,
848  hightGiunz4FinalCollIORT,
849  startAngleGiunz4FinalCollIORT,
850  spanningAngleGiunz4FinalCollIORT);
851 
852  G4LogicalVolume* logGiunz4FinalCollIORT = new G4LogicalVolume(solidGiunz4FinalCollIORT,
853  Giunz4FinalCollMaterialIORT, "Giunz4FinalCollIORT", 0, 0, 0);
854 
855  physiGiunz4FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz4FinalCollXPositionIORT),0.,0.)),
856  "Giunz4FinalCollIORT", logGiunz4FinalCollIORT, physicalTreatmentRoom, false, 0);
857 
858  logGiunz4FinalCollIORT -> SetVisAttributes(blue);
859 
860 
861 
862  // --------------------------------- //
863  // Junction 3 FINAL COLLIMATOR IORT //
864  // --------------------------------- //
865 
866  const G4double outRadiusGiunz3FinalCollIORT = 42. *mm;
867  const G4double innRadiusGiunz3FinalCollIORT = 0. *mm;
868  const G4double hightGiunz3FinalCollIORT = 4.25 *mm;
869  const G4double startAngleGiunz3FinalCollIORT = 0.*deg;
870  const G4double spanningAngleGiunz3FinalCollIORT = 360.*deg;
871  const G4double Giunz3FinalCollXPositionIORT = -958.75 *mm;
872 
873 
874  solidGiunz3FinalCollIORT = new G4Tubs("Giunz3FinalCollIORT", innRadiusGiunz3FinalCollIORT,
875  outRadiusGiunz3FinalCollIORT,
876  hightGiunz3FinalCollIORT,
877  startAngleGiunz3FinalCollIORT,
878  spanningAngleGiunz3FinalCollIORT);
879 
880  G4LogicalVolume* logicsolidGiunz3FinalCollIORT = new G4LogicalVolume(solidGiunz3FinalCollIORT,
881  Giunz3FinalCollMaterialIORT, "Giunz3FinalCollIORT", 0, 0, 0);
882 
883  physiGiunz3FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz3FinalCollXPositionIORT),0.,0.)),
884  "Giunz3FinalCollIORT", logicsolidGiunz3FinalCollIORT, physicalTreatmentRoom, false, 0);
885 
886  logicsolidGiunz3FinalCollIORT -> SetVisAttributes(yellow);
887  // logicsolidGiunz3FinalCollIORT -> SetVisAttributes (G4VisAttributes::Invisible);
888 
889 
890 
891  // --------------------------------- //
892  // Junction 3 FINAL COLLIMATOR IORT internal //
893  // --------------------------------- //
894 
895 
896 
897  solidGiunz3FinalCollIntIORT = new G4Cons("Giunz3FinalCollIntIORT",0.*mm,13.75*mm,0.*mm,22.25*mm,4.25*mm,0.*deg,360.*deg);
898 
899  G4LogicalVolume* logicsolidGiunz3FinalCollIntIORT = new G4LogicalVolume(solidGiunz3FinalCollIntIORT,
900  Giunz3FinalCollMaterialIntIORT, "Giunz3FinalCollIntIORT", 0, 0, 0);
901 
902  physiGiunz3FinalCollIntIORT = new G4PVPlacement(0, G4ThreeVector(0.,0.,0.),"Giunz3FinalCollIntIORT", logicsolidGiunz3FinalCollIntIORT,physiGiunz3FinalCollIORT, false, 0);
903 
904  logicsolidGiunz3FinalCollIntIORT -> SetVisAttributes(yellow);
905 
906 
907 // --------------------------------- //
908  // Junction 2 FINAL COLLIMATOR IORT //
909  // --------------------------------- //
910 
911  const G4double outRadiusGiunz2FinalCollIORT = 42. *mm;
912  const G4double innRadiusGiunz2FinalCollIORT = 22.25 *mm;
913  const G4double hightGiunz2FinalCollIORT = 5.75 *mm;
914  const G4double startAngleGiunz2FinalCollIORT = 0.*deg;
915  const G4double spanningAngleGiunz2FinalCollIORT = 360.*deg;
916  const G4double Giunz2FinalCollXPositionIORT = -948.75 *mm;
917 
918 
919 
920  solidGiunz2FinalCollIORT = new G4Tubs("Giunz2FinalCollIORT", innRadiusGiunz2FinalCollIORT,
921  outRadiusGiunz2FinalCollIORT,
922  hightGiunz2FinalCollIORT,
923  startAngleGiunz2FinalCollIORT,
924  spanningAngleGiunz2FinalCollIORT);
925 
926  G4LogicalVolume* logGiunz2FinalCollIORT = new G4LogicalVolume(solidGiunz2FinalCollIORT,
927  Giunz2FinalCollMaterialIORT, "Giunz2FinalCollIORT", 0, 0, 0);
928 
929  physiGiunz2FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz2FinalCollXPositionIORT),0.,0.)),
930  "Giunz2FinalCollIORT", logGiunz2FinalCollIORT, physicalTreatmentRoom, false, 0);
931 
932  logGiunz2FinalCollIORT -> SetVisAttributes(red);
933 
934 // --------------------------------- //
935  // Junction 1 FINAL COLLIMATOR IORT //
936  // --------------------------------- //
937 
938  const G4double outRadiusGiunz1FinalCollIORT = 65. *mm;
939  const G4double innRadiusGiunz1FinalCollIORT = 22.25 *mm;
940  const G4double hightGiunz1FinalCollIORT = 10. *mm;
941  const G4double startAngleGiunz1FinalCollIORT = 0.*deg;
942  const G4double spanningAngleGiunz1FinalCollIORT = 360.*deg;
943  const G4double Giunz1FinalCollXPositionIORT = -933.*mm;
944 
945 
946 
947  solidGiunz1FinalCollIORT = new G4Tubs("Giunz1FinalCollIORT", innRadiusGiunz1FinalCollIORT,
948  outRadiusGiunz1FinalCollIORT,
949  hightGiunz1FinalCollIORT,
950  startAngleGiunz1FinalCollIORT,
951  spanningAngleGiunz1FinalCollIORT);
952 
953  G4LogicalVolume* logGiunz1FinalCollIORT = new G4LogicalVolume(solidGiunz1FinalCollIORT,
954  Giunz1FinalCollMaterialIORT, "Giunz1FinalCollIORT", 0, 0, 0);
955 
956  physiGiunz1FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz1FinalCollXPositionIORT),0.,0.)),
957  "Giunz1FinalCollIORT", logGiunz1FinalCollIORT, physicalTreatmentRoom, false, 0);
958 
959  logGiunz1FinalCollIORT -> SetVisAttributes(gray);
960 
961 }
962 
964 {
965 // -----------------------//
966  // FINAL COLLIMATOR IORT //
967  //------------------------//
968 
969  // const G4double outRadiusFinalCollimatorIORT = 45. *mm;
970  // const G4double innRadiusFinalCollimatorIORT = 40. *mm;
971  const G4double hightFinalCollimatorIORT = 434. *mm;
972  const G4double startAngleFinalCollimatorIORT = 0.*deg;
973  const G4double spanningAngleFinalCollimatorIORT = 360.*deg;
974  const G4double finalCollimatorXPositionIORT = -489.*mm;
975 
976 
977 
978 
979  G4double phi6 = 90. *deg;
980 
981 
983  rm6.rotateY(phi6);
984 
985 
986  solidFinalCollimatorIORT = new G4Tubs("FinalCollimatorIORT", innerRadiusFinalCollimatorIORT,
987  OuterRadiusFinalCollimatorIORT,
988  hightFinalCollimatorIORT,
989  startAngleFinalCollimatorIORT,
990  spanningAngleFinalCollimatorIORT);
991 
992  G4LogicalVolume* logFinalCollimatorIORT = new G4LogicalVolume(solidFinalCollimatorIORT,
993  finalCollimatorMaterialIORT, "FinalCollimatorIORT", 0, 0, 0);
994 
995  physiFinalCollimatorIORT = new G4PVPlacement(G4Transform3D(rm6, G4ThreeVector((finalCollimatorXPositionIORT),0.,0.)),
996  "FinalCollimatorIORT", logFinalCollimatorIORT, physicalTreatmentRoom, false, 0);
997 
998  // logFinalCollimatorIORT -> SetVisAttributes(G4VisAttributes::Invisible);
999  logFinalCollimatorIORT -> SetVisAttributes(darkGreen);
1000 
1001 }
1002 
1006 
1007 
1009 {
1010  solidFinalCollimatorIORT -> SetInnerRadius(value);
1011  G4RunManager::GetRunManager() -> GeometryHasBeenModified();
1012  G4cout<<"Inner Radius of the final collimator IORT is (mm):"
1013  << solidFinalCollimatorIORT -> GetInnerRadius()/mm
1014  << G4endl;
1015 }
1016 
1018 
1020 {
1021  solidFinalCollimatorIORT -> SetOuterRadius(value);
1022  G4RunManager::GetRunManager() -> GeometryHasBeenModified();
1023  G4cout<<"Outer Radius of the final collimator IORT is (mm):"
1024  << solidFinalCollimatorIORT -> GetOuterRadius()/mm
1025  << G4endl;
1026 }
1027 
1029 
1030 
1031