Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Collimator50BeamLine.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 "Collimator50BeamLine.hh"
58 
59 
61  physicalTreatmentRoom(0),iortDetectorConstruction(0),
62 
63 
64 
65  solidFinalCollimatorIORT(0),
66  logicFinalCollimatorIORT(0),
67  physiFinalCollimatorIORT(0),
68 
69  solidGiunz1FinalCollIORT(0),
70  logicGiunz1FinalCollIORT(0),
71  physiGiunz1FinalCollIORT(0),
72 
73  solidGiunz2FinalCollIORT(0),
74  logicGiunz2FinalCollIORT(0),
75  physiGiunz2FinalCollIORT(0),
76 
77  solidGiunz3FinalCollIORT(0),
78  logicGiunz3FinalCollIORT(0),
79  physiGiunz3FinalCollIORT(0),
80 
81  solidGiunz3FinalCollIntIORT(0),
82  logicGiunz3FinalCollIntIORT(0),
83  physiGiunz3FinalCollIntIORT(0),
84 
85  solidGiunz4FinalCollIORT(0),
86  logicGiunz4FinalCollIORT(0),
87  physiGiunz4FinalCollIORT(0),
88 
89  solidGiunz5FinalCollIORT(0),
90  logicGiunz5FinalCollIORT(0),
91  physiGiunz5FinalCollIORT(0),
92 
93  solidBlocco1IORT(0),
94  logicBlocco1IORT(0),
95  physiBlocco1IORT(0),
96 
97  solidBlocco2IORT(0),
98  logicBlocco2IORT(0),
99  physiBlocco2IORT(0),
100 
101  solidBlocco3IORT(0),
102  logicBlocco3IORT(0),
103  physiBlocco3IORT(0),
104 
105  solidBlocco20mmIORT(0),
106  logicBlocco20mmIORT(0),
107  physiBlocco20mmIORT(0),
108 
109  solidCM1_1_2IORT(0),
110  logicCM1_1_2IORT(0),
111  physiCM1_1_2IORT(0),
112 
113  solidCM1_2_2IORT(0),
114  logicCM1_2_2IORT(0),
115  physiCM1_2_2IORT(0),
116 
117  solidCM2_1_2IORT(0),
118  logicCM2_1_2IORT(0),
119  physiCM2_1_2IORT(0),
120 
121  solidCM2_2_2IORT(0),
122  logicCM2_2_2IORT(0),
123  physiCM2_2_2IORT(0),
124 
125  solidCCMIORT(0),
126  logicCCMIORT(0),
127  physiCCMIORT(0),
128 
129  solidPFS1IORT(0),
130  logicPFS1IORT(0),
131  physiPFS1IORT(0),
132 
133  solidPFS2IORT(0),
134  logicPFS2IORT(0),
135  physiPFS2IORT(0),
136 
137  solidPFS3IORT(0),
138  logicPFS3IORT(0),
139  physiPFS3IORT(0),
140 
141  solidFTIORT(0),
142  logicFTIORT(0),
143  physiFTIORT(0)
144 
145 
146 {
147  // Messenger to change parameters of the collimator50BeamLine geometry
148  collimatorMessenger = new Collimator50BeamLineMessenger(this);
149 
150 }
153 {
154  delete collimatorMessenger;
155  delete iortDetectorConstruction;
156 }
157 
159 
160 
162 {
163  // Sets default geometry and materials
164  SetDefaultDimensions();
165 
166  // Construct the whole Collimator Beam Line
167  ConstructCollimator50BeamLine();
168 
169  // IORTDetectorConstruction builds ONLY the phantom and the detector with its associated ROGeometry
170  iortDetectorConstruction = new IORTDetectorConstruction(physicalTreatmentRoom);
171 
172  return physicalTreatmentRoom;
173 }
174 
175 // In the following method the DEFAULTS used in the geometry of
176 // collimator beam line are provided
177 // HERE THE USER CAN CHANGE THE GEOMETRY CHARACTERISTICS OF BEAM
178 // LINE ELEMENTS, ALTERNATIVELY HE/SHE CAN USE THE MACRO FILE (IF A
179 // MESSENGER IS PROVIDED)
180 //
181 // DEFAULT MATERIAL ARE ALSO PROVIDED
182 // and COLOURS ARE ALSO DEFINED
183 // ----------------------------------------------------------
185 void Collimator50BeamLine::SetDefaultDimensions()
186 {
187 
188  // Set of coulors that can be used
189  white = new G4VisAttributes( G4Colour());
190  white -> SetVisibility(true);
191  //white -> SetForceSolid(true);
192 
193  blue = new G4VisAttributes(G4Colour(0. ,0. ,1.));
194  blue -> SetVisibility(true);
195  //blue -> SetForceSolid(true);
196 
197  gray = new G4VisAttributes( G4Colour(0.5, 0.5, 0.5 ));
198  gray-> SetVisibility(true);
199  //gray-> SetForceSolid(true);
200 
201  red = new G4VisAttributes(G4Colour(1. ,0. ,0.));
202  red-> SetVisibility(true);
203  //red-> SetForceSolid(true);
204 
205  yellow = new G4VisAttributes(G4Colour(1., 1., 0. ));
206  yellow-> SetVisibility(true);
207  //yellow-> SetForceSolid(true);
208 
209  green = new G4VisAttributes( G4Colour(25/255. , 255/255. , 25/255. ));
210  green -> SetVisibility(true);
211  //green -> SetForceSolid(true);
212 
213  darkGreen = new G4VisAttributes( G4Colour(0/255. , 100/255. , 0/255. ));
214  darkGreen -> SetVisibility(true);
215  //darkGreen -> SetForceSolid(true);
216 
217  darkOrange3 = new G4VisAttributes( G4Colour(205/255. , 102/255. , 000/255. ));
218  darkOrange3 -> SetVisibility(true);
219  //darkOrange3 -> SetForceSolid(true);
220 
221  skyBlue = new G4VisAttributes( G4Colour(135/255. , 206/255. , 235/255. ));
222  skyBlue -> SetVisibility(true);
223  //skyBlue -> SetForceSolid(true);
224 
225 
226 
227  // Geometry FINAL COLLIMATOR DEFAULTS
228 
229  G4double defaultOuterRadiusFinalCollimatorIORT = 30. *mm;
230  OuterRadiusFinalCollimatorIORT = defaultOuterRadiusFinalCollimatorIORT;
231 
232  G4double defaultinnerRadiusFinalCollimatorIORT = 25. *mm;
233  innerRadiusFinalCollimatorIORT = defaultinnerRadiusFinalCollimatorIORT;
234 
235  // DEFAULT DEFINITION OF THE MATERIALS
236  // All elements and compound definition follows the NIST database
237 
238  // ELEMENTS
239  G4bool isotopes = false;
240  G4Material* aluminumNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_Al", isotopes);
241  //G4Material* tantalumNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_Ta", isotopes);
242  //G4Material* copperNistAsMaterial = G4NistManager::Instance()->FindOrBuildMaterial("G4_Cu", isotopes);
245 
246  // COMPOUND
247  G4Material* airNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_AIR", isotopes);
248  //G4Material* kaptonNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_KAPTON", isotopes);
249  G4Material* galacticNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_Galactic", isotopes);
250  G4Material* PMMANist = G4NistManager::Instance()->FindOrBuildMaterial("G4_PLEXIGLASS", isotopes);
251  //G4Material* mylarNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_MYLAR", isotopes);
252  G4Material* titanioNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_Ti", isotopes);
253 
254 
255  G4double d; // Density
256  G4int nComponents;// Number of components
257  G4double fractionmass; // Fraction in mass of an element in a material
258 
259  d = 8.40*g/cm3; // brass
260  nComponents = 2;
261  G4Material* brass = new G4Material("Brass", d, nComponents);
262  brass -> AddElement(zincNist, fractionmass = 30 *perCent);
263  brass -> AddElement(copperNist, fractionmass = 70 *perCent);
264 
265 
266  // MATERIAL ASSIGNMENT
267 
268 
269  // Material of the FINAL COLLIMATOR IORT
270  finalCollimatorMaterialIORT = PMMANist;
271 
272  // Junction 1 FINAL COLLIMATOR IORT
273  Giunz1FinalCollMaterialIORT = PMMANist;
274 
275  // Junction 2 FINAL COLLIMATOR IORT
276  Giunz2FinalCollMaterialIORT = PMMANist;
277 
278  // Junction 3 FINAL COLLIMATOR IORT
279  Giunz3FinalCollMaterialIORT = PMMANist;
280 
281  // Junction 3 FINAL COLLIMATOR Int IORT
282  Giunz3FinalCollMaterialIntIORT = airNist;
283 
284  // Junction 4 FINAL COLLIMATOR IORT
285  Giunz4FinalCollMaterialIORT = PMMANist;
286 
287  // Junction 5 FINAL COLLIMATOR IORT
288  Giunz5FinalCollMaterialIORT = PMMANist;
289 
290  // Block 1 Diameter 30 mm
291  Blocco1IORTMaterialIORT = PMMANist;
292 
293  // Block 2 Diameter 30 mm
294  Blocco2IORTMaterialIORT = PMMANist;
295 
296  // Block 3 Diameter 30 mm
297  Blocco3IORTMaterialIORT = PMMANist;
298 
299  // Block Diameter 20 mm
300  Blocco20mmIORTMaterialIORT = PMMANist;
301 
302  // First Monitor Chamber Lamina Al 1 of 2
303  CM1_1_2IORTMaterialIORT = aluminumNist;
304 
305  // First Monitor Chamber Lamina Al 2 of 2
306  CM1_2_2IORTMaterialIORT = aluminumNist;
307 
308  // Second Monitor Chamber Lamina Al 1 of 2
309  CM2_1_2IORTMaterialIORT = aluminumNist;
310 
311  // Second Monitor Chamber Lamina Al 2 of 2
312  CM2_2_2IORTMaterialIORT = aluminumNist;
313 
314  // Monitor Chamber Cylinder
315  CCMIORTMaterialIORT = PMMANist;
316 
317  // Superior Final Part Monitor Chambers
318  PFS1IORTMaterialIORT = PMMANist;
319 
320  // Superior Final Part Monitor Chambers
321  PFS2IORTMaterialIORT = PMMANist;
322 
323  // Superior Final Part Monitor Chambers
324  PFS3IORTMaterialIORT = PMMANist;
325 
326  // Superior Final Part Monitor Chambers Material
327  FTIORTMaterialIORT = titanioNist;
328 
329  // Vacuum Source
330  VSIORTMaterialIORT = galacticNist;
331 
332 }
333 
335 void Collimator50BeamLine::ConstructCollimator50BeamLine()
336 {
337  // -----------------------------
338  // Treatment room - World volume
339  //------------------------------
340  // Treatment room sizes
341  const G4double worldX = 400.0 *cm;
342  const G4double worldY = 400.0 *cm;
343  const G4double worldZ = 400.0 *cm;
344  G4bool isotopes = false;
345 
346  G4Material* airNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_AIR", isotopes);
347  G4Box* treatmentRoom = new G4Box("TreatmentRoom",worldX,worldY,worldZ);
348  G4LogicalVolume* logicTreatmentRoom = new G4LogicalVolume(treatmentRoom,
349  airNist,
350  "logicTreatmentRoom",
351  0,0,0);
352  physicalTreatmentRoom = new G4PVPlacement(0,
353  G4ThreeVector(),
354  "physicalTreatmentRoom",
355  logicTreatmentRoom,
356  0,false,0);
357 
358 
359  // The treatment room is invisible in the Visualisation
360  logicTreatmentRoom -> SetVisAttributes (G4VisAttributes::Invisible);
361 
362  // Components of the Collimator Beam Line
363 
370 
371 }
372 
373 
375 {
376  // ---------------------------------------------------------------//
377  // Vacuum Source //
378  // ---------------------------------------------------------------//
379 
380 
381  G4double phi1 = 90. *deg;
382 
383 
384  G4RotationMatrix rm1;
385  rm1.rotateY(phi1);
386 
387  const G4double outRadiusVSIORT = 44.75 *mm;
388  const G4double innRadiusVSIORT = 0.*mm;
389  const G4double hightVSIORT = 1. *mm;
390  const G4double startAngleVSIORT = 0.*deg;
391  const G4double spanningAngleVSIORT = 360.*deg;
392  const G4double XPositionVSIORT = -862.797 *mm;
393 
394  solidVSIORT = new G4Tubs("VSIORT", innRadiusVSIORT,
395  outRadiusVSIORT,
396  hightVSIORT,
397  startAngleVSIORT,
398  spanningAngleVSIORT);
399 
400  G4LogicalVolume* logVSIORT = new G4LogicalVolume(solidVSIORT,
401  VSIORTMaterialIORT, "VSIORT", 0, 0, 0);
402 
403  physiVSIORT = new G4PVPlacement(G4Transform3D(rm1, G4ThreeVector((XPositionVSIORT),0.,0.)),
404  "VSIORT", logVSIORT, physicalTreatmentRoom, false, 0);
405 
406  logVSIORT -> SetVisAttributes(green);
407 
408 }
409 
411 {
412 // ---------------------------------------------------------------//
413  // Titanium Window //
414  // ---------------------------------------------------------------//
415 
416  G4double phi2 = 90. *deg;
417 
418 
419  G4RotationMatrix rm2;
420  rm2.rotateY(phi2);
421 
422 
423  const G4double outRadiusFTIORT = 44.75 *mm;
424  const G4double innRadiusFTIORT = 8.5 *mm;
425  const G4double hightFTIORT = 0.006 *mm;
426  const G4double startAngleFTIORT = 0.*deg;
427  const G4double spanningAngleFTIORT = 360.*deg;
428  const G4double XPositionFTIORT = -861.791 *mm;
429 
430  solidFTIORT = new G4Tubs("FTIORT", innRadiusFTIORT,
431  outRadiusFTIORT,
432  hightFTIORT,
433  startAngleFTIORT,
434  spanningAngleFTIORT);
435 
436  G4LogicalVolume* logFTIORT = new G4LogicalVolume(solidFTIORT,
437  FTIORTMaterialIORT, "FTIORT", 0, 0, 0);
438 
439  physiFTIORT = new G4PVPlacement(G4Transform3D(rm2, G4ThreeVector((XPositionFTIORT),0.,0.)),
440  "FTIORT", logFTIORT, physicalTreatmentRoom, false, 0);
441 
442  logFTIORT -> SetVisAttributes(yellow);
443 }
444 
446 {
447 
448  G4double phi3 = 90. *deg;
449 
450 
452  rm3.rotateY(phi3);
454 
455  // Monitor Chambers System
456 
458 
459 
460  // ---------------------------------------------------------------//
461  // Superior Final Part Monitor Chambers 3 //
462  // ---------------------------------------------------------------//
463 
464  const G4double outRadiusPFS3IORT = 44.75 *mm;
465  const G4double innRadiusPFS3IORT = 17.5 *mm;
466  const G4double hightPFS3IORT = 3.03 *mm;
467  const G4double startAnglePFS3IORT = 0.*deg;
468  const G4double spanningAnglePFS3IORT = 360.*deg;
469  const G4double XPositionPFS3IORT = -848.755 *mm;
470 
471  solidPFS3IORT = new G4Tubs("PFS3IORT", innRadiusPFS3IORT,
472  outRadiusPFS3IORT,
473  hightPFS3IORT,
474  startAnglePFS3IORT,
475  spanningAnglePFS3IORT);
476 
477  G4LogicalVolume* logPFS3IORT = new G4LogicalVolume(solidPFS3IORT,
478  PFS3IORTMaterialIORT, "PFS3IORT", 0, 0, 0);
479 
480  physiPFS3IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionPFS3IORT),0.,0.)),
481  "PFS3IORT", logPFS3IORT, physicalTreatmentRoom, false, 0);
482 
483  logPFS3IORT -> SetVisAttributes(white);
484 
485 
486  // ---------------------------------------------------------------//
487  // Superior Final Part Monitor Chambers 2 //
488  // ---------------------------------------------------------------//
489 
490  const G4double outRadiusPFS2IORT = 44.75 *mm;
491  const G4double innRadiusPFS2IORT = 10. *mm;
492  const G4double hightPFS2IORT = 1.47 *mm;
493  const G4double startAnglePFS2IORT = 0.*deg;
494  const G4double spanningAnglePFS2IORT = 360.*deg;
495  const G4double XPositionPFS2IORT = -844.255 *mm;
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 = -841.905 *mm;
521 
522  solidPFS1IORT = new G4Tubs("PFS1IORT", innRadiusPFS1IORT,
523  outRadiusPFS1IORT,
524  hightPFS1IORT,
525  startAnglePFS1IORT,
526  spanningAnglePFS1IORT);
527 
528  G4LogicalVolume* logPFS1IORT = new G4LogicalVolume(solidPFS1IORT,
529  PFS1IORTMaterialIORT, "PFS1IORT", 0, 0, 0);
530 
531  physiPFS1IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionPFS1IORT),0.,0.)),
532  "PFS1IORT", logPFS1IORT, physicalTreatmentRoom, false, 0);
533 
534  logPFS1IORT -> SetVisAttributes(green);
535 
536  // ------------------------------------------------//
537  // Monitor Chambers Cylinder //
538  // ------------------------------------------------//
539 
540  const G4double outRadiusCCMIORT = 35. *mm;
541  const G4double innRadiusCCMIORT = 10. *mm;
542  const G4double hightCCMIORT = 4.0125 *mm;
543  const G4double startAngleCCMIORT = 0.*deg;
544  const G4double spanningAngleCCMIORT = 360.*deg;
545  const G4double XPositionCCMIORT = -837.0125 *mm;
546 
547  solidCCMIORT = new G4Tubs("CCMIORT", innRadiusCCMIORT,
548  outRadiusCCMIORT,
549  hightCCMIORT,
550  startAngleCCMIORT,
551  spanningAngleCCMIORT);
552 
553  G4LogicalVolume* logCCMIORT = new G4LogicalVolume(solidCCMIORT,
554  CCMIORTMaterialIORT, "CCMIORT", 0, 0, 0);
555 
556  physiCCMIORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCCMIORT),0.,0.)),
557  "CCMIORT", logCCMIORT, physicalTreatmentRoom, false, 0);
558 
559  logCCMIORT -> SetVisAttributes(green);
560 
561 
562  // ------------------------------------------------//
563  // Second Monitor Chamber Lamina Al 2 of 2 //
564  // ------------------------------------------------//
565 
566  const G4double outRadiusCM2_2_2IORT = 20. *mm;
567  const G4double innRadiusCM2_2_2IORT = 0. *mm;
568  const G4double hightCM2_2_2IORT = 0.025 *mm;
569  const G4double startAngleCM2_2_2IORT = 0.*deg;
570  const G4double spanningAngleCM2_2_2IORT = 360.*deg;
571  const G4double XPositionCM2_2_2IORT = -841. *mm;
572 
573  solidCM2_2_2IORT = new G4Tubs("CM2_2_2IORT", innRadiusCM2_2_2IORT,
574  outRadiusCM2_2_2IORT,
575  hightCM2_2_2IORT,
576  startAngleCM2_2_2IORT,
577  spanningAngleCM2_2_2IORT);
578 
579  G4LogicalVolume* logCM2_2_2IORT = new G4LogicalVolume(solidCM2_2_2IORT,
580  CM2_2_2IORTMaterialIORT, "CM2_2_2IORT", 0, 0, 0);
581 
582  physiCM2_2_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM2_2_2IORT),0.,0.)),
583  "CM2_2_2ORT", logCM2_2_2IORT, physicalTreatmentRoom, false, 0);
584 
585  logCM2_2_2IORT -> SetVisAttributes(green);
586 
587 
588 // ------------------------------------------------//
589  // Second Monitor Chamber Lamina Al 1 of 2 //
590  // ------------------------------------------------//
591 
592  const G4double outRadiusCM2_1_2IORT = 20. *mm;
593  const G4double innRadiusCM2_1_2IORT = 0. *mm;
594  const G4double hightCM2_1_2IORT = 0.025 *mm;
595  const G4double startAngleCM2_1_2IORT = 0.*deg;
596  const G4double spanningAngleCM2_1_2IORT = 360.*deg;
597  const G4double XPositionCM2_1_2IORT = -839. *mm;
598 
599  solidCM2_1_2IORT = new G4Tubs("CM2_1_2IORT", innRadiusCM2_1_2IORT,
600  outRadiusCM2_1_2IORT,
601  hightCM2_1_2IORT,
602  startAngleCM2_1_2IORT,
603  spanningAngleCM2_1_2IORT);
604 
605  G4LogicalVolume* logCM2_1_2IORT = new G4LogicalVolume(solidCM2_1_2IORT,
606  CM2_1_2IORTMaterialIORT, "CM2_1_2IORT", 0, 0, 0);
607 
608  physiCM2_1_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM2_1_2IORT),0.,0.)),
609  "CM2_1_2ORT", logCM2_1_2IORT, physicalTreatmentRoom, false, 0);
610 
611  logCM2_1_2IORT -> SetVisAttributes(yellow);
612 
613  // ------------------------------------------------//
614  // First Monitor Chamber Lamina Al 2 of 2 //
615  // ------------------------------------------------//
616 
617  const G4double outRadiusCM1_2_2IORT = 20. *mm;
618  const G4double innRadiusCM1_2_2IORT = 0. *mm;
619  const G4double hightCM1_2_2IORT = 0.025 *mm;
620  const G4double startAngleCM1_2_2IORT = 0.*deg;
621  const G4double spanningAngleCM1_2_2IORT = 360.*deg;
622  const G4double XPositionCM1_2_2IORT = -837. *mm;
623 
624  solidCM1_2_2IORT = new G4Tubs("CM1_2_2IORT", innRadiusCM1_2_2IORT,
625  outRadiusCM1_2_2IORT,
626  hightCM1_2_2IORT,
627  startAngleCM1_2_2IORT,
628  spanningAngleCM1_2_2IORT);
629 
630  G4LogicalVolume* logCM1_2_2IORT = new G4LogicalVolume(solidCM1_2_2IORT,
631  CM1_2_2IORTMaterialIORT, "CM1_2_2IORT", 0, 0, 0);
632 
633  physiCM1_2_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM1_2_2IORT),0.,0.)),
634  "CM1_2_2ORT", logCM1_2_2IORT, physicalTreatmentRoom, false, 0);
635 
636  logCM1_2_2IORT -> SetVisAttributes(yellow);
637 
638  // ------------------------------------------------//
639  // First Monitor Chamber Lamina Al 1 of 2 //
640  // ------------------------------------------------//
641 
642  const G4double outRadiusCM1_1_2IORT = 20. *mm;
643  const G4double innRadiusCM1_1_2IORT = 0. *mm;
644  const G4double hightCM1_1_2IORT = 0.025 *mm;
645  const G4double startAngleCM1_1_2IORT = 0.*deg;
646  const G4double spanningAngleCM1_1_2IORT = 360.*deg;
647  const G4double XPositionCM1_1_2IORT = -835. *mm;
648 
649  solidCM1_1_2IORT = new G4Tubs("CM1_1_2IORT", innRadiusCM1_1_2IORT,
650  outRadiusCM1_1_2IORT,
651  hightCM1_1_2IORT,
652  startAngleCM1_1_2IORT,
653  spanningAngleCM1_1_2IORT);
654 
655  G4LogicalVolume* logCM1_1_2IORT = new G4LogicalVolume(solidCM1_1_2IORT,
656  CM1_1_2IORTMaterialIORT, "CM1_1_2IORT", 0, 0, 0);
657 
658  physiCM1_1_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM1_1_2IORT),0.,0.)),
659  "CM1_1_2ORT", logCM1_1_2IORT, physicalTreatmentRoom, false, 0);
660 
661  logCM1_1_2IORT -> SetVisAttributes(yellow);
662 }
663 
665 {
666 
667  G4double phi4 = 90. *deg;
668 
669 
670  G4RotationMatrix rm4;
671  rm4.rotateY(phi4);
672 
674 
675  // IORT BEAM LINE BLOCKS
676 
678 
679  // ------------------------------------------------//
680  // Block 4 //
681  // ------------------------------------------------//
682 
683  const G4double outRadiusBlocco20mmIORT = 36.5 *mm;
684  const G4double innRadiusBlocco20mmIORT = 10. *mm;
685  const G4double hightBlocco20mmIORT = 3. *mm;
686  const G4double startAngleBlocco20mmIORT = 0.*deg;
687  const G4double spanningAngleBlocco20mmIORT = 360.*deg;
688  const G4double XPositionBlocco20mmIORT = -830. *mm;
689 
690 
691  solidBlocco20mmIORT = new G4Tubs("Blocco20mmIORT", innRadiusBlocco20mmIORT,
692  outRadiusBlocco20mmIORT,
693  hightBlocco20mmIORT,
694  startAngleBlocco20mmIORT,
695  spanningAngleBlocco20mmIORT);
696 
697  G4LogicalVolume* logBlocco20mmIORT = new G4LogicalVolume(solidBlocco20mmIORT,
698  Blocco20mmIORTMaterialIORT, "Blocco20mmIORT", 0, 0, 0);
699 
700  physiBlocco20mmIORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco20mmIORT),0.,0.)),
701  "Blocco20mmORT", logBlocco20mmIORT, physicalTreatmentRoom, false, 0);
702 
703  logBlocco20mmIORT -> SetVisAttributes(green);
704 
705 
706  // -----------------------//
707  // Block 3 //
708  // -----------------------//
709 
710  const G4double outRadiusBlocco3IORT = 36.5 *mm;
711  const G4double innRadiusBlocco3IORT = 15. *mm;
712  const G4double hightBlocco3IORT = 3.5 *mm;
713  const G4double startAngleBlocco3IORT = 0.*deg;
714  const G4double spanningAngleBlocco3IORT = 360.*deg;
715  const G4double XPositionBlocco3IORT = -823.5 *mm;
716 
717  solidBlocco3IORT = new G4Tubs("Blocco3IORT", innRadiusBlocco3IORT,
718  outRadiusBlocco3IORT,
719  hightBlocco3IORT,
720  startAngleBlocco3IORT,
721  spanningAngleBlocco3IORT);
722 
723  G4LogicalVolume* logBlocco3IORT = new G4LogicalVolume(solidBlocco3IORT,
724  Blocco3IORTMaterialIORT, "Blocco3IORT", 0, 0, 0);
725 
726  physiBlocco3IORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco3IORT),0.,0.)),
727  "Blocco3ORT", logBlocco3IORT, physicalTreatmentRoom, false, 0);
728 
729  logBlocco3IORT -> SetVisAttributes(yellow);
730 
731  // -----------------------//
732  // Block 2 //
733  // -----------------------//
734 
735  const G4double outRadiusBlocco2IORT = 41.5 *mm;
736  const G4double innRadiusBlocco2IORT = 15. *mm;
737  const G4double hightBlocco2IORT = 8. *mm;
738  const G4double startAngleBlocco2IORT = 0.*deg;
739  const G4double spanningAngleBlocco2IORT = 360.*deg;
740  const G4double XPositionBlocco2IORT = -812. *mm;
741 
742  solidBlocco2IORT = new G4Tubs("Blocco2IORT", innRadiusBlocco2IORT,
743  outRadiusBlocco2IORT,
744  hightBlocco2IORT,
745  startAngleBlocco2IORT,
746  spanningAngleBlocco2IORT);
747 
748  G4LogicalVolume* logBlocco2IORT = new G4LogicalVolume(solidBlocco2IORT,
749  Blocco2IORTMaterialIORT, "Blocco2IORT", 0, 0, 0);
750 
751  physiBlocco2IORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco2IORT),0.,0.)),
752  "Blocco2IORT", logBlocco2IORT, physicalTreatmentRoom, false, 0);
753 
754  logBlocco2IORT -> SetVisAttributes(red);
755 
756  // ----------------------- //
757  // Block 1 //
758  // ----------------------- //
759 
760  const G4double outRadiusBlocco1IORT = 52.0 *mm;
761  const G4double innRadiusBlocco1IORT = 15. *mm;
762  const G4double hightBlocco1IORT = 8.5 *mm;
763  const G4double startAngleBlocco1IORT = 0.*deg;
764  const G4double spanningAngleBlocco1IORT = 360.*deg;
765  const G4double XPositionBlocco1IORT = -795.5*mm;
766 
767  solidBlocco1IORT = new G4Tubs("Blocco1IORT", innRadiusBlocco1IORT,
768  outRadiusBlocco1IORT,
769  hightBlocco1IORT,
770  startAngleBlocco1IORT,
771  spanningAngleBlocco1IORT);
772 
773  G4LogicalVolume* logBlocco1IORT = new G4LogicalVolume(solidBlocco1IORT,
774  Blocco1IORTMaterialIORT, "Blocco1IORT", 0, 0, 0);
775 
776  physiBlocco1IORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco1IORT),0.,0.)),
777  "Blocco1IORT", logBlocco1IORT, physicalTreatmentRoom, false, 0);
778 
779  logBlocco1IORT -> SetVisAttributes(white);
780 
781 }
782 
784 {
785 
786 
787  G4double phi5 = 90. *deg;
788 
789 
790  G4RotationMatrix rm5;
791  rm5.rotateY(phi5);
792 // --------------------------------- //
793  // Junction 5 FINAL COLLIMATOR IORT //
794  // --------------------------------- //
795 
796  const G4double outRadiusGiunz5FinalCollIORT = 48.25 *mm;
797  const G4double innRadiusGiunz5FinalCollIORT = 13.75 *mm;
798  const G4double hightGiunz5FinalCollIORT = 3.5 *mm;
799  const G4double startAngleGiunz5FinalCollIORT = 0.*deg;
800  const G4double spanningAngleGiunz5FinalCollIORT = 360.*deg;
801  const G4double Giunz5FinalCollXPositionIORT = -783.5 *mm;
802 
803  solidGiunz5FinalCollIORT = new G4Tubs("Giunz5FinalCollIORT", innRadiusGiunz5FinalCollIORT,
804  outRadiusGiunz5FinalCollIORT,
805  hightGiunz5FinalCollIORT,
806  startAngleGiunz5FinalCollIORT,
807  spanningAngleGiunz5FinalCollIORT);
808 
809  G4LogicalVolume* logGiunz5FinalCollIORT = new G4LogicalVolume(solidGiunz5FinalCollIORT,
810  Giunz5FinalCollMaterialIORT, "Giunz5FinalCollIORT", 0, 0, 0);
811 
812  physiGiunz5FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz5FinalCollXPositionIORT),0.,0.)),
813  "Giunz5FinalCollIORT", logGiunz5FinalCollIORT, physicalTreatmentRoom, false, 0);
814 
815  logGiunz5FinalCollIORT -> SetVisAttributes(yellow);
816 
817 // --------------------------------- //
818  // Junction 4 FINAL COLLIMATOR IORT //
819  // --------------------------------- //
820 
821  const G4double outRadiusGiunz4FinalCollIORT = 42. *mm;
822  const G4double innRadiusGiunz4FinalCollIORT = 13.75 *mm;
823  const G4double hightGiunz4FinalCollIORT = 8.5 *mm;
824  const G4double startAngleGiunz4FinalCollIORT = 0.*deg;
825  const G4double spanningAngleGiunz4FinalCollIORT = 360.*deg;
826  const G4double Giunz4FinalCollXPositionIORT = -771.5 *mm;
827 
828  solidGiunz4FinalCollIORT = new G4Tubs("Giunz4FinalCollIORT", innRadiusGiunz4FinalCollIORT,
829  outRadiusGiunz4FinalCollIORT,
830  hightGiunz4FinalCollIORT,
831  startAngleGiunz4FinalCollIORT,
832  spanningAngleGiunz4FinalCollIORT);
833 
834  G4LogicalVolume* logGiunz4FinalCollIORT = new G4LogicalVolume(solidGiunz4FinalCollIORT,
835  Giunz4FinalCollMaterialIORT, "Giunz4FinalCollIORT", 0, 0, 0);
836 
837  physiGiunz4FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz4FinalCollXPositionIORT),0.,0.)),
838  "Giunz4FinalCollIORT", logGiunz4FinalCollIORT, physicalTreatmentRoom, false, 0);
839 
840  logGiunz4FinalCollIORT -> SetVisAttributes(blue);
841 
842 
843 
844  // --------------------------------- //
845  // Junction 3 FINAL COLLIMATOR IORT //
846  // --------------------------------- //
847 
848  const G4double outRadiusGiunz3FinalCollIORT = 42. *mm;
849  const G4double innRadiusGiunz3FinalCollIORT = 0. *mm;
850  const G4double hightGiunz3FinalCollIORT = 4.25 *mm;
851  const G4double startAngleGiunz3FinalCollIORT = 0.*deg;
852  const G4double spanningAngleGiunz3FinalCollIORT = 360.*deg;
853  const G4double Giunz3FinalCollXPositionIORT = -758.75 *mm;
854 
855  solidGiunz3FinalCollIORT = new G4Tubs("Giunz3FinalCollIORT", innRadiusGiunz3FinalCollIORT,
856  outRadiusGiunz3FinalCollIORT,
857  hightGiunz3FinalCollIORT,
858  startAngleGiunz3FinalCollIORT,
859  spanningAngleGiunz3FinalCollIORT);
860 
861  G4LogicalVolume* logicsolidGiunz3FinalCollIORT = new G4LogicalVolume(solidGiunz3FinalCollIORT,
862  Giunz3FinalCollMaterialIORT, "Giunz3FinalCollIORT", 0, 0, 0);
863 
864  physiGiunz3FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz3FinalCollXPositionIORT),0.,0.)),
865  "Giunz3FinalCollIORT", logicsolidGiunz3FinalCollIORT, physicalTreatmentRoom, false, 0);
866 
867  logicsolidGiunz3FinalCollIORT -> SetVisAttributes(yellow);
868  // logicsolidGiunz3FinalCollIORT -> SetVisAttributes (G4VisAttributes::Invisible);
869 
870 
871 
872  // --------------------------------- //
873  // Junction 3 FINAL COLLIMATOR IORT internal //
874  // --------------------------------- //
875 
876 
877 
878  solidGiunz3FinalCollIntIORT = new G4Cons("Giunz3FinalCollIntIORT",0.*mm,13.75*mm,0.*mm,20.0*mm,4.25*mm,0.*deg,360.*deg);
879 
880  G4LogicalVolume* logicsolidGiunz3FinalCollIntIORT = new G4LogicalVolume(solidGiunz3FinalCollIntIORT,
881  Giunz3FinalCollMaterialIntIORT, "Giunz3FinalCollIntIORT", 0, 0, 0);
882 
883  physiGiunz3FinalCollIntIORT = new G4PVPlacement(0, G4ThreeVector(0.,0.,0.),"Giunz3FinalCollIntIORT", logicsolidGiunz3FinalCollIntIORT,physiGiunz3FinalCollIORT, false, 0);
884 
885  logicsolidGiunz3FinalCollIntIORT -> SetVisAttributes(yellow);
886 }
887 
889 {
890 // -----------------------//
891  // FINAL COLLIMATOR IORT //
892  //------------------------//
893 
894  // const G4double outRadiusFinalCollimatorIORT = 35. *mm;
895  // const G4double innRadiusFinalCollimatorIORT = 30. *mm;
896  const G4double hightFinalCollimatorIORT = 349.75 *mm;
897  const G4double startAngleFinalCollimatorIORT = 0.*deg;
898  const G4double spanningAngleFinalCollimatorIORT = 360.*deg;
899  const G4double finalCollimatorXPositionIORT = -404.75 *mm;
900 
901  G4double phi6 = 90. *deg;
902 
903 
905  rm6.rotateY(phi6);
906 
907 
908  solidFinalCollimatorIORT = new G4Tubs("FinalCollimatorIORT", innerRadiusFinalCollimatorIORT,
909  OuterRadiusFinalCollimatorIORT,
910  hightFinalCollimatorIORT,
911  startAngleFinalCollimatorIORT,
912  spanningAngleFinalCollimatorIORT);
913 
914  G4LogicalVolume* logFinalCollimatorIORT = new G4LogicalVolume(solidFinalCollimatorIORT,
915  finalCollimatorMaterialIORT, "FinalCollimatorIORT", 0, 0, 0);
916 
917  physiFinalCollimatorIORT = new G4PVPlacement(G4Transform3D(rm6, G4ThreeVector((finalCollimatorXPositionIORT),0.,0.)),
918  "FinalCollimatorIORT", logFinalCollimatorIORT, physicalTreatmentRoom, false, 0);
919 
920  // logFinalCollimatorIORT -> SetVisAttributes(G4VisAttributes::Invisible);
921  logFinalCollimatorIORT -> SetVisAttributes(gray);
922 }
923 
927 
928 
930 {
931  solidFinalCollimatorIORT -> SetInnerRadius(value);
932  G4RunManager::GetRunManager() -> GeometryHasBeenModified();
933  G4cout<<"Inner Radius of the final collimator IORT is (mm):"
934  << solidFinalCollimatorIORT -> GetInnerRadius()/mm
935  << G4endl;
936 }
937 
939 
941 {
942  solidFinalCollimatorIORT -> SetOuterRadius(value);
943  G4RunManager::GetRunManager() -> GeometryHasBeenModified();
944  G4cout<<"Outer Radius of the final collimator IORT is (mm):"
945  << solidFinalCollimatorIORT -> GetOuterRadius()/mm
946  << G4endl;
947 }
948 
949 
951 
952 
953