Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Collimator40BeamLine.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 "Collimator40BeamLine.hh"
58 
60  physicalTreatmentRoom(0),iortDetectorConstruction(0),
61 
62 
63 
64  solidFinalCollimatorIORT(0),
65  logicFinalCollimatorIORT(0),
66  physiFinalCollimatorIORT(0),
67 
68  solidGiunz1FinalCollIORT(0),
69  logicGiunz1FinalCollIORT(0),
70  physiGiunz1FinalCollIORT(0),
71 
72  solidGiunz2FinalCollIORT(0),
73  logicGiunz2FinalCollIORT(0),
74  physiGiunz2FinalCollIORT(0),
75 
76  solidGiunz3FinalCollIORT(0),
77  logicGiunz3FinalCollIORT(0),
78  physiGiunz3FinalCollIORT(0),
79 
80  solidGiunz3FinalCollIntIORT(0),
81  logicGiunz3FinalCollIntIORT(0),
82  physiGiunz3FinalCollIntIORT(0),
83 
84  solidGiunz4FinalCollIORT(0),
85  logicGiunz4FinalCollIORT(0),
86  physiGiunz4FinalCollIORT(0),
87 
88  solidGiunz5FinalCollIORT(0),
89  logicGiunz5FinalCollIORT(0),
90  physiGiunz5FinalCollIORT(0),
91 
92  solidBlocco1IORT(0),
93  logicBlocco1IORT(0),
94  physiBlocco1IORT(0),
95 
96  solidBlocco2IORT(0),
97  logicBlocco2IORT(0),
98  physiBlocco2IORT(0),
99 
100  solidBlocco3IORT(0),
101  logicBlocco3IORT(0),
102  physiBlocco3IORT(0),
103 
104  solidBlocco20mmIORT(0),
105  logicBlocco20mmIORT(0),
106  physiBlocco20mmIORT(0),
107 
108  solidCM1_1_2IORT(0),
109  logicCM1_1_2IORT(0),
110  physiCM1_1_2IORT(0),
111 
112  solidCM1_2_2IORT(0),
113  logicCM1_2_2IORT(0),
114  physiCM1_2_2IORT(0),
115 
116  solidCM2_1_2IORT(0),
117  logicCM2_1_2IORT(0),
118  physiCM2_1_2IORT(0),
119 
120  solidCM2_2_2IORT(0),
121  logicCM2_2_2IORT(0),
122  physiCM2_2_2IORT(0),
123 
124  solidCCMIORT(0),
125  logicCCMIORT(0),
126  physiCCMIORT(0),
127 
128  solidPFS1IORT(0),
129  logicPFS1IORT(0),
130  physiPFS1IORT(0),
131 
132  solidPFS2IORT(0),
133  logicPFS2IORT(0),
134  physiPFS2IORT(0),
135 
136  solidPFS3IORT(0),
137  logicPFS3IORT(0),
138  physiPFS3IORT(0),
139 
140  solidFTIORT(0),
141  logicFTIORT(0),
142  physiFTIORT(0)
143 
144 
145 {
146  // Messenger to change parameters of the collimator40BeamLine geometry
147  collimatorMessenger = new Collimator40BeamLineMessenger(this);
148 
149 }
152 {
153  delete collimatorMessenger;
154  delete iortDetectorConstruction;
155 }
156 
158 
159 
161 {
162  // Sets default geometry and materials
163  SetDefaultDimensions();
164 
165  // Construct the whole Collimator Beam Line
166  ConstructCollimator40BeamLine();
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 Collimator40BeamLine::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 = 25. *mm;
229  OuterRadiusFinalCollimatorIORT = defaultOuterRadiusFinalCollimatorIORT;
230 
231  G4double defaultinnerRadiusFinalCollimatorIORT = 20. *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  G4double d; // Density
254  G4int nComponents;// Number of components
255  G4double fractionmass; // Fraction in mass of an element in a material
256 
257  d = 8.40*g/cm3; // brass
258  nComponents = 2;
259  G4Material* brass = new G4Material("Brass", d, nComponents);
260  brass -> AddElement(zincNist, fractionmass = 30 *perCent);
261  brass -> AddElement(copperNist, fractionmass = 70 *perCent);
262 
263 
264  // MATERIAL ASSIGNMENT
265 
266 
267  // Material of the FINAL COLLIMATOR IORT
268  finalCollimatorMaterialIORT = PMMANist;
269 
270  // Junction 1 FINAL COLLIMATOR IORT
271  Giunz1FinalCollMaterialIORT = PMMANist;
272 
273  // Junction 2 FINAL COLLIMATOR IORT
274  Giunz2FinalCollMaterialIORT = PMMANist;
275 
276  // Junction 3 FINAL COLLIMATOR IORT
277  Giunz3FinalCollMaterialIORT = PMMANist;
278 
279  // Junction 3 FINAL COLLIMATOR Int IORT
280  Giunz3FinalCollMaterialIntIORT = airNist;
281 
282  // Junction 4 FINAL COLLIMATOR IORT
283  Giunz4FinalCollMaterialIORT = PMMANist;
284 
285  // Junction 5 FINAL COLLIMATOR IORT
286  Giunz5FinalCollMaterialIORT = PMMANist;
287 
288  // Block 1 Diameter 30 mm
289  Blocco1IORTMaterialIORT = PMMANist;
290 
291  // Block 2 Diameter 30 mm
292  Blocco2IORTMaterialIORT = PMMANist;
293 
294  // Block 3 Diameter 30 mm
295  Blocco3IORTMaterialIORT = PMMANist;
296 
297  // Block Diameter 20 mm
298  Blocco20mmIORTMaterialIORT = PMMANist;
299 
300  // First Monitor Chamber Lamina Al 1 of 2
301  CM1_1_2IORTMaterialIORT = aluminumNist;
302 
303  // First Monitor Chamber Lamina Al 2 of 2
304  CM1_2_2IORTMaterialIORT = aluminumNist;
305 
306  // Second Monitor Chamber Lamina Al 1 of 2
307  CM2_1_2IORTMaterialIORT = aluminumNist;
308 
309  // Second Monitor Chamber Lamina Al 2 of 2
310  CM2_2_2IORTMaterialIORT = aluminumNist;
311 
312  // Monitor Chamber Cylinder
313  CCMIORTMaterialIORT = PMMANist;
314 
315  // Superior Final Part Monitor Chambers
316  PFS1IORTMaterialIORT = PMMANist;
317 
318  // Superior Final Part Monitor Chambers
319  PFS2IORTMaterialIORT = PMMANist;
320 
321  // Superior Final Part Monitor Chambers
322  PFS3IORTMaterialIORT = PMMANist;
323 
324  // Superior Final Part Monitor Chambers Material
325  FTIORTMaterialIORT = titanioNist;
326 
327  // Vacuum Source
328  VSIORTMaterialIORT = galacticNist;
329 }
330 
332 void Collimator40BeamLine::ConstructCollimator40BeamLine()
333 {
334  // -----------------------------
335  // Treatment room - World volume
336  //------------------------------
337  // Treatment room sizes
338  const G4double worldX = 400.0 *cm;
339  const G4double worldY = 400.0 *cm;
340  const G4double worldZ = 400.0 *cm;
341  G4bool isotopes = false;
342 
343  G4Material* airNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_AIR", isotopes);
344  G4Box* treatmentRoom = new G4Box("TreatmentRoom",worldX,worldY,worldZ);
345  G4LogicalVolume* logicTreatmentRoom = new G4LogicalVolume(treatmentRoom,
346  airNist,
347  "logicTreatmentRoom",
348  0,0,0);
349  physicalTreatmentRoom = new G4PVPlacement(0,
350  G4ThreeVector(),
351  "physicalTreatmentRoom",
352  logicTreatmentRoom,
353  0,false,0);
354 
355 
356  // The treatment room is invisible in the Visualisation
357  logicTreatmentRoom -> SetVisAttributes (G4VisAttributes::Invisible);
358 
359  // Components of the Collimator Beam Line
360 
367 
368 }
369 
370 
372 {
373  // ---------------------------------------------------------------//
374  // Vacuum Source //
375  // ---------------------------------------------------------------//
376 
377 
378  G4double phi1 = 90. *deg;
379 
380 
381  G4RotationMatrix rm1;
382  rm1.rotateY(phi1);
383 
384  const G4double outRadiusVSIORT = 44.75 *mm;
385  const G4double innRadiusVSIORT = 0.*mm;
386  const G4double hightVSIORT = 1. *mm;
387  const G4double startAngleVSIORT = 0.*deg;
388  const G4double spanningAngleVSIORT = 360.*deg;
389  const G4double XPositionVSIORT = -862.797 *mm;
390 
391  solidVSIORT = new G4Tubs("VSIORT", innRadiusVSIORT,
392  outRadiusVSIORT,
393  hightVSIORT,
394  startAngleVSIORT,
395  spanningAngleVSIORT);
396 
397  G4LogicalVolume* logVSIORT = new G4LogicalVolume(solidVSIORT,
398  VSIORTMaterialIORT, "VSIORT", 0, 0, 0);
399 
400  physiVSIORT = new G4PVPlacement(G4Transform3D(rm1, G4ThreeVector((XPositionVSIORT),0.,0.)),
401  "VSIORT", logVSIORT, physicalTreatmentRoom, false, 0);
402 
403  logVSIORT -> SetVisAttributes(green);
404 
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  const G4double outRadiusFTIORT = 44.75 *mm;
420  const G4double innRadiusFTIORT = 8.5 *mm;
421  const G4double hightFTIORT = 0.006 *mm;
422  const G4double startAngleFTIORT = 0.*deg;
423  const G4double spanningAngleFTIORT = 360.*deg;
424  const G4double XPositionFTIORT = -861.791 *mm;
425 
426  solidFTIORT = new G4Tubs("FTIORT", innRadiusFTIORT,
427  outRadiusFTIORT,
428  hightFTIORT,
429  startAngleFTIORT,
430  spanningAngleFTIORT);
431 
432  G4LogicalVolume* logFTIORT = new G4LogicalVolume(solidFTIORT,
433  FTIORTMaterialIORT, "FTIORT", 0, 0, 0);
434 
435  physiFTIORT = new G4PVPlacement(G4Transform3D(rm2, G4ThreeVector((XPositionFTIORT),0.,0.)),
436  "FTIORT", logFTIORT, physicalTreatmentRoom, false, 0);
437 
438  logFTIORT -> SetVisAttributes(yellow);
439 }
440 
442 {
443 
444  G4double phi3 = 90. *deg;
445 
446 
448  rm3.rotateY(phi3);
449 
451 
452  // Monitor Chamber System
453 
455 
456 
457  // ---------------------------------------------------------------//
458  // Superior Final Part Monitor Chambers 3 //
459  // ---------------------------------------------------------------//
460 
461  const G4double outRadiusPFS3IORT = 44.75 *mm;
462  const G4double innRadiusPFS3IORT = 17.5 *mm;
463  const G4double hightPFS3IORT = 3.03 *mm;
464  const G4double startAnglePFS3IORT = 0.*deg;
465  const G4double spanningAnglePFS3IORT = 360.*deg;
466  const G4double XPositionPFS3IORT = -848.755 *mm;
467 
468  solidPFS3IORT = new G4Tubs("PFS3IORT", innRadiusPFS3IORT,
469  outRadiusPFS3IORT,
470  hightPFS3IORT,
471  startAnglePFS3IORT,
472  spanningAnglePFS3IORT);
473 
474  G4LogicalVolume* logPFS3IORT = new G4LogicalVolume(solidPFS3IORT,
475  PFS3IORTMaterialIORT, "PFS3IORT", 0, 0, 0);
476 
477  physiPFS3IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionPFS3IORT),0.,0.)),
478  "PFS3IORT", logPFS3IORT, physicalTreatmentRoom, false, 0);
479 
480  logPFS3IORT -> SetVisAttributes(white);
481 
482 
483  // ---------------------------------------------------------------//
484  // Superior Final Part Monitor Chambers 2 //
485  // ---------------------------------------------------------------//
486 
487  const G4double outRadiusPFS2IORT = 44.75 *mm;
488  const G4double innRadiusPFS2IORT = 10. *mm;
489  const G4double hightPFS2IORT = 1.47 *mm;
490  const G4double startAnglePFS2IORT = 0.*deg;
491  const G4double spanningAnglePFS2IORT = 360.*deg;
492  const G4double XPositionPFS2IORT = -844.255 *mm;
493 
494 
495  solidPFS2IORT = new G4Tubs("PFS2IORT", innRadiusPFS2IORT,
496  outRadiusPFS2IORT,
497  hightPFS2IORT,
498  startAnglePFS2IORT,
499  spanningAnglePFS2IORT);
500 
501  G4LogicalVolume* logPFS2IORT = new G4LogicalVolume(solidPFS2IORT,
502  PFS2IORTMaterialIORT, "PFS2IORT", 0, 0, 0);
503 
504  physiPFS2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionPFS2IORT),0.,0.)),
505  "PFS2IORT", logPFS2IORT, physicalTreatmentRoom, false, 0);
506 
507  logPFS2IORT -> SetVisAttributes(green);
508 
509  // ---------------------------------------------------------------//
510  // Superior Final Part Monitor Chambers 1 //
511  // ---------------------------------------------------------------//
512 
513  const G4double outRadiusPFS1IORT = 35. *mm;
514  const G4double innRadiusPFS1IORT = 10. *mm;
515  const G4double hightPFS1IORT = 0.88 *mm;
516  const G4double startAnglePFS1IORT = 0.*deg;
517  const G4double spanningAnglePFS1IORT = 360.*deg;
518  const G4double XPositionPFS1IORT = -841.905 *mm;
519 
520 
521  solidPFS1IORT = new G4Tubs("PFS1IORT", innRadiusPFS1IORT,
522  outRadiusPFS1IORT,
523  hightPFS1IORT,
524  startAnglePFS1IORT,
525  spanningAnglePFS1IORT);
526 
527  G4LogicalVolume* logPFS1IORT = new G4LogicalVolume(solidPFS1IORT,
528  PFS1IORTMaterialIORT, "PFS1IORT", 0, 0, 0);
529 
530  physiPFS1IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionPFS1IORT),0.,0.)),
531  "PFS1IORT", logPFS1IORT, physicalTreatmentRoom, false, 0);
532 
533  logPFS1IORT -> SetVisAttributes(green);
534 
535  // ------------------------------------------------//
536  // Monitor Chambers Cylinder //
537  // ------------------------------------------------//
538 
539  const G4double outRadiusCCMIORT = 35. *mm;
540  const G4double innRadiusCCMIORT = 10. *mm;
541  const G4double hightCCMIORT = 4.0125 *mm;
542  const G4double startAngleCCMIORT = 0.*deg;
543  const G4double spanningAngleCCMIORT = 360.*deg;
544  const G4double XPositionCCMIORT = -837.0125 *mm;
545 
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 
574  solidCM2_2_2IORT = new G4Tubs("CM2_2_2IORT", innRadiusCM2_2_2IORT,
575  outRadiusCM2_2_2IORT,
576  hightCM2_2_2IORT,
577  startAngleCM2_2_2IORT,
578  spanningAngleCM2_2_2IORT);
579 
580  G4LogicalVolume* logCM2_2_2IORT = new G4LogicalVolume(solidCM2_2_2IORT,
581  CM2_2_2IORTMaterialIORT, "CM2_2_2IORT", 0, 0, 0);
582 
583  physiCM2_2_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM2_2_2IORT),0.,0.)),
584  "CM2_2_2ORT", logCM2_2_2IORT, physicalTreatmentRoom, false, 0);
585 
586  logCM2_2_2IORT -> SetVisAttributes(green);
587 
588 
589 // ------------------------------------------------//
590  // Second Monitor Chamber Lamina Al 1 of 2 //
591  // ------------------------------------------------//
592 
593  const G4double outRadiusCM2_1_2IORT = 20. *mm;
594  const G4double innRadiusCM2_1_2IORT = 0. *mm;
595  const G4double hightCM2_1_2IORT = 0.025 *mm;
596  const G4double startAngleCM2_1_2IORT = 0.*deg;
597  const G4double spanningAngleCM2_1_2IORT = 360.*deg;
598  const G4double XPositionCM2_1_2IORT = -839. *mm;
599 
600 
601  solidCM2_1_2IORT = new G4Tubs("CM2_1_2IORT", innRadiusCM2_1_2IORT,
602  outRadiusCM2_1_2IORT,
603  hightCM2_1_2IORT,
604  startAngleCM2_1_2IORT,
605  spanningAngleCM2_1_2IORT);
606 
607  G4LogicalVolume* logCM2_1_2IORT = new G4LogicalVolume(solidCM2_1_2IORT,
608  CM2_1_2IORTMaterialIORT, "CM2_1_2IORT", 0, 0, 0);
609 
610  physiCM2_1_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM2_1_2IORT),0.,0.)),
611  "CM2_1_2ORT", logCM2_1_2IORT, physicalTreatmentRoom, false, 0);
612 
613  logCM2_1_2IORT -> SetVisAttributes(yellow);
614 
615  // ------------------------------------------------//
616  // First Monitor Chamber Lamina Al 2 of 2 //
617  // ------------------------------------------------//
618 
619  const G4double outRadiusCM1_2_2IORT = 20. *mm;
620  const G4double innRadiusCM1_2_2IORT = 0. *mm;
621  const G4double hightCM1_2_2IORT = 0.025 *mm;
622  const G4double startAngleCM1_2_2IORT = 0.*deg;
623  const G4double spanningAngleCM1_2_2IORT = 360.*deg;
624  const G4double XPositionCM1_2_2IORT = -837. *mm;
625 
626  solidCM1_2_2IORT = new G4Tubs("CM1_2_2IORT", innRadiusCM1_2_2IORT,
627  outRadiusCM1_2_2IORT,
628  hightCM1_2_2IORT,
629  startAngleCM1_2_2IORT,
630  spanningAngleCM1_2_2IORT);
631 
632  G4LogicalVolume* logCM1_2_2IORT = new G4LogicalVolume(solidCM1_2_2IORT,
633  CM1_2_2IORTMaterialIORT, "CM1_2_2IORT", 0, 0, 0);
634 
635  physiCM1_2_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM1_2_2IORT),0.,0.)),
636  "CM1_2_2ORT", logCM1_2_2IORT, physicalTreatmentRoom, false, 0);
637 
638  logCM1_2_2IORT -> SetVisAttributes(yellow);
639 
640  // ------------------------------------------------//
641  // First Monitor Chamber Lamina Al 1 of 2 //
642  // ------------------------------------------------//
643 
644  const G4double outRadiusCM1_1_2IORT = 20. *mm;
645  const G4double innRadiusCM1_1_2IORT = 0. *mm;
646  const G4double hightCM1_1_2IORT = 0.025 *mm;
647  const G4double startAngleCM1_1_2IORT = 0.*deg;
648  const G4double spanningAngleCM1_1_2IORT = 360.*deg;
649  const G4double XPositionCM1_1_2IORT = -835. *mm;
650 
651 
652 
653  solidCM1_1_2IORT = new G4Tubs("CM1_1_2IORT", innRadiusCM1_1_2IORT,
654  outRadiusCM1_1_2IORT,
655  hightCM1_1_2IORT,
656  startAngleCM1_1_2IORT,
657  spanningAngleCM1_1_2IORT);
658 
659  G4LogicalVolume* logCM1_1_2IORT = new G4LogicalVolume(solidCM1_1_2IORT,
660  CM1_1_2IORTMaterialIORT, "CM1_1_2IORT", 0, 0, 0);
661 
662  physiCM1_1_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM1_1_2IORT),0.,0.)),
663  "CM1_1_2ORT", logCM1_1_2IORT, physicalTreatmentRoom, false, 0);
664 
665  logCM1_1_2IORT -> SetVisAttributes(yellow);
666 }
667 
669 {
670 
671  G4double phi4 = 90. *deg;
672 
673 
674  G4RotationMatrix rm4;
675  rm4.rotateY(phi4);
676 
678 
679  // IORT BEAM LINE BLOCKS
680 
682 
683  // ------------------------------------------------//
684  // Block 4 //
685  // ------------------------------------------------//
686 
687  const G4double outRadiusBlocco20mmIORT = 36.5 *mm;
688  const G4double innRadiusBlocco20mmIORT = 10. *mm;
689  const G4double hightBlocco20mmIORT = 3. *mm;
690  const G4double startAngleBlocco20mmIORT = 0.*deg;
691  const G4double spanningAngleBlocco20mmIORT = 360.*deg;
692  const G4double XPositionBlocco20mmIORT = -830. *mm;
693 
694 
695  solidBlocco20mmIORT = new G4Tubs("Blocco20mmIORT", innRadiusBlocco20mmIORT,
696  outRadiusBlocco20mmIORT,
697  hightBlocco20mmIORT,
698  startAngleBlocco20mmIORT,
699  spanningAngleBlocco20mmIORT);
700 
701  G4LogicalVolume* logBlocco20mmIORT = new G4LogicalVolume(solidBlocco20mmIORT,
702  Blocco20mmIORTMaterialIORT, "Blocco20mmIORT", 0, 0, 0);
703 
704  physiBlocco20mmIORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco20mmIORT),0.,0.)),
705  "Blocco20mmORT", logBlocco20mmIORT, physicalTreatmentRoom, false, 0);
706 
707  logBlocco20mmIORT -> SetVisAttributes(green);
708 
709 
710  // -----------------------//
711  // Block 3 //
712  // -----------------------//
713 
714  const G4double outRadiusBlocco3IORT = 36.5 *mm;
715  const G4double innRadiusBlocco3IORT = 15. *mm;
716  const G4double hightBlocco3IORT = 3.5 *mm;
717  const G4double startAngleBlocco3IORT = 0.*deg;
718  const G4double spanningAngleBlocco3IORT = 360.*deg;
719  const G4double XPositionBlocco3IORT = -823.5 *mm;
720 
721 
722  solidBlocco3IORT = new G4Tubs("Blocco3IORT", innRadiusBlocco3IORT,
723  outRadiusBlocco3IORT,
724  hightBlocco3IORT,
725  startAngleBlocco3IORT,
726  spanningAngleBlocco3IORT);
727 
728  G4LogicalVolume* logBlocco3IORT = new G4LogicalVolume(solidBlocco3IORT,
729  Blocco3IORTMaterialIORT, "Blocco3IORT", 0, 0, 0);
730 
731  physiBlocco3IORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco3IORT),0.,0.)),
732  "Blocco3ORT", logBlocco3IORT, physicalTreatmentRoom, false, 0);
733 
734  logBlocco3IORT -> SetVisAttributes(yellow);
735 
736  // -----------------------//
737  // Block 2 //
738  // -----------------------//
739 
740  const G4double outRadiusBlocco2IORT = 41.5 *mm;
741  const G4double innRadiusBlocco2IORT = 15. *mm;
742  const G4double hightBlocco2IORT = 8. *mm;
743  const G4double startAngleBlocco2IORT = 0.*deg;
744  const G4double spanningAngleBlocco2IORT = 360.*deg;
745  const G4double XPositionBlocco2IORT = -812. *mm;
746 
747 
748  solidBlocco2IORT = new G4Tubs("Blocco2IORT", innRadiusBlocco2IORT,
749  outRadiusBlocco2IORT,
750  hightBlocco2IORT,
751  startAngleBlocco2IORT,
752  spanningAngleBlocco2IORT);
753 
754  G4LogicalVolume* logBlocco2IORT = new G4LogicalVolume(solidBlocco2IORT,
755  Blocco2IORTMaterialIORT, "Blocco2IORT", 0, 0, 0);
756 
757  physiBlocco2IORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco2IORT),0.,0.)),
758  "Blocco2IORT", logBlocco2IORT, physicalTreatmentRoom, false, 0);
759 
760  logBlocco2IORT -> SetVisAttributes(red);
761 
762  // ----------------------- //
763  // Block 1 //
764  // ----------------------- //
765 
766  const G4double outRadiusBlocco1IORT = 52.0 *mm;
767  const G4double innRadiusBlocco1IORT = 15. *mm;
768  const G4double hightBlocco1IORT = 8.5 *mm;
769  const G4double startAngleBlocco1IORT = 0.*deg;
770  const G4double spanningAngleBlocco1IORT = 360.*deg;
771  const G4double XPositionBlocco1IORT = -795.5*mm;
772 
773 
774  solidBlocco1IORT = new G4Tubs("Blocco1IORT", innRadiusBlocco1IORT,
775  outRadiusBlocco1IORT,
776  hightBlocco1IORT,
777  startAngleBlocco1IORT,
778  spanningAngleBlocco1IORT);
779 
780  G4LogicalVolume* logBlocco1IORT = new G4LogicalVolume(solidBlocco1IORT,
781  Blocco1IORTMaterialIORT, "Blocco1IORT", 0, 0, 0);
782 
783  physiBlocco1IORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco1IORT),0.,0.)),
784  "Blocco1IORT", logBlocco1IORT, physicalTreatmentRoom, false, 0);
785 
786  logBlocco1IORT -> SetVisAttributes(white);
787 }
788 
790 {
791 
792 
793  G4double phi5 = 90. *deg;
794 
795 
796  G4RotationMatrix rm5;
797  rm5.rotateY(phi5);
798 // --------------------------------- //
799  // Junction 5 FINAL COLLIMATOR IORT //
800  // --------------------------------- //
801 
802  const G4double outRadiusGiunz5FinalCollIORT = 48.25 *mm;
803  const G4double innRadiusGiunz5FinalCollIORT = 13.75 *mm;
804  const G4double hightGiunz5FinalCollIORT = 3.5 *mm;
805  const G4double startAngleGiunz5FinalCollIORT = 0.*deg;
806  const G4double spanningAngleGiunz5FinalCollIORT = 360.*deg;
807  const G4double Giunz5FinalCollXPositionIORT = -783.5 *mm;
808 
809  solidGiunz5FinalCollIORT = new G4Tubs("Giunz5FinalCollIORT", innRadiusGiunz5FinalCollIORT,
810  outRadiusGiunz5FinalCollIORT,
811  hightGiunz5FinalCollIORT,
812  startAngleGiunz5FinalCollIORT,
813  spanningAngleGiunz5FinalCollIORT);
814 
815  G4LogicalVolume* logGiunz5FinalCollIORT = new G4LogicalVolume(solidGiunz5FinalCollIORT,
816  Giunz5FinalCollMaterialIORT, "Giunz5FinalCollIORT", 0, 0, 0);
817 
818  physiGiunz5FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz5FinalCollXPositionIORT),0.,0.)),
819  "Giunz5FinalCollIORT", logGiunz5FinalCollIORT, physicalTreatmentRoom, false, 0);
820 
821  logGiunz5FinalCollIORT -> SetVisAttributes(yellow);
822 
823 // --------------------------------- //
824  // Junction 4 FINAL COLLIMATOR IORT //
825  // --------------------------------- //
826 
827  const G4double outRadiusGiunz4FinalCollIORT = 42. *mm;
828  const G4double innRadiusGiunz4FinalCollIORT = 13.75 *mm;
829  const G4double hightGiunz4FinalCollIORT = 8.5 *mm;
830  const G4double startAngleGiunz4FinalCollIORT = 0.*deg;
831  const G4double spanningAngleGiunz4FinalCollIORT = 360.*deg;
832  const G4double Giunz4FinalCollXPositionIORT = -771.5 *mm;
833 
834 
835 
836  solidGiunz4FinalCollIORT = new G4Tubs("Giunz4FinalCollIORT", innRadiusGiunz4FinalCollIORT,
837  outRadiusGiunz4FinalCollIORT,
838  hightGiunz4FinalCollIORT,
839  startAngleGiunz4FinalCollIORT,
840  spanningAngleGiunz4FinalCollIORT);
841 
842  G4LogicalVolume* logGiunz4FinalCollIORT = new G4LogicalVolume(solidGiunz4FinalCollIORT,
843  Giunz4FinalCollMaterialIORT, "Giunz4FinalCollIORT", 0, 0, 0);
844 
845  physiGiunz4FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz4FinalCollXPositionIORT),0.,0.)),
846  "Giunz4FinalCollIORT", logGiunz4FinalCollIORT, physicalTreatmentRoom, false, 0);
847 
848  logGiunz4FinalCollIORT -> SetVisAttributes(blue);
849 
850 
851 
852  // --------------------------------- //
853  // Junction 3 FINAL COLLIMATOR IORT //
854  // --------------------------------- //
855 
856  const G4double outRadiusGiunz3FinalCollIORT = 42. *mm;
857  const G4double innRadiusGiunz3FinalCollIORT = 0. *mm;
858  const G4double hightGiunz3FinalCollIORT = 4.25 *mm;
859  const G4double startAngleGiunz3FinalCollIORT = 0.*deg;
860  const G4double spanningAngleGiunz3FinalCollIORT = 360.*deg;
861  const G4double Giunz3FinalCollXPositionIORT = -758.75 *mm;
862 
863 
864  solidGiunz3FinalCollIORT = new G4Tubs("Giunz3FinalCollIORT", innRadiusGiunz3FinalCollIORT,
865  outRadiusGiunz3FinalCollIORT,
866  hightGiunz3FinalCollIORT,
867  startAngleGiunz3FinalCollIORT,
868  spanningAngleGiunz3FinalCollIORT);
869 
870  G4LogicalVolume* logicsolidGiunz3FinalCollIORT = new G4LogicalVolume(solidGiunz3FinalCollIORT,
871  Giunz3FinalCollMaterialIORT, "Giunz3FinalCollIORT", 0, 0, 0);
872 
873  physiGiunz3FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz3FinalCollXPositionIORT),0.,0.)),
874  "Giunz3FinalCollIORT", logicsolidGiunz3FinalCollIORT, physicalTreatmentRoom, false, 0);
875 
876  logicsolidGiunz3FinalCollIORT -> SetVisAttributes(yellow);
877  // logicsolidGiunz3FinalCollIORT -> SetVisAttributes (G4VisAttributes::Invisible);
878 
879 
880 
881  // --------------------------------- //
882  // Junction 3 FINAL COLLIMATOR IORT internal //
883  // --------------------------------- //
884 
885 
886 
887  solidGiunz3FinalCollIntIORT = new G4Cons("Giunz3FinalCollIntIORT",0.*mm,13.75*mm,0.*mm,20.0*mm,4.25*mm,0.*deg,360.*deg);
888 
889  G4LogicalVolume* logicsolidGiunz3FinalCollIntIORT = new G4LogicalVolume(solidGiunz3FinalCollIntIORT,
890  Giunz3FinalCollMaterialIntIORT, "Giunz3FinalCollIntIORT", 0, 0, 0);
891 
892  physiGiunz3FinalCollIntIORT = new G4PVPlacement(0, G4ThreeVector(0.,0.,0.),"Giunz3FinalCollIntIORT", logicsolidGiunz3FinalCollIntIORT,physiGiunz3FinalCollIORT, false, 0);
893 
894  logicsolidGiunz3FinalCollIntIORT -> SetVisAttributes(yellow);
895 }
896 
898 {
899 // -----------------------//
900  // FINAL COLLIMATOR IORT //
901  //------------------------//
902 
903  // const G4double outRadiusFinalCollimatorIORT = 35. *mm;
904  // const G4double innRadiusFinalCollimatorIORT = 30. *mm;
905  const G4double hightFinalCollimatorIORT = 349.75 *mm;
906  const G4double startAngleFinalCollimatorIORT = 0.*deg;
907  const G4double spanningAngleFinalCollimatorIORT = 360.*deg;
908  const G4double finalCollimatorXPositionIORT = -404.75 *mm;
909 
910  G4double phi6 = 90. *deg;
911 
912 
914  rm6.rotateY(phi6);
915 
916 
917  solidFinalCollimatorIORT = new G4Tubs("FinalCollimatorIORT", innerRadiusFinalCollimatorIORT,
918  OuterRadiusFinalCollimatorIORT,
919  hightFinalCollimatorIORT,
920  startAngleFinalCollimatorIORT,
921  spanningAngleFinalCollimatorIORT);
922 
923  G4LogicalVolume* logFinalCollimatorIORT = new G4LogicalVolume(solidFinalCollimatorIORT,
924  finalCollimatorMaterialIORT, "FinalCollimatorIORT", 0, 0, 0);
925 
926  physiFinalCollimatorIORT = new G4PVPlacement(G4Transform3D(rm6, G4ThreeVector((finalCollimatorXPositionIORT),0.,0.)),
927  "FinalCollimatorIORT", logFinalCollimatorIORT, physicalTreatmentRoom, false, 0);
928 
929  // logFinalCollimatorIORT -> SetVisAttributes(G4VisAttributes::Invisible);
930  logFinalCollimatorIORT -> SetVisAttributes(green);
931 
932 }
933 
937 
938 
940 {
941  solidFinalCollimatorIORT -> SetInnerRadius(value);
942  G4RunManager::GetRunManager() -> GeometryHasBeenModified();
943  G4cout<<"Inner Radius of the final collimator IORT is (mm):"
944  << solidFinalCollimatorIORT -> GetInnerRadius()/mm
945  << G4endl;
946 }
947 
949 
951 {
952  solidFinalCollimatorIORT -> SetOuterRadius(value);
953  G4RunManager::GetRunManager() -> GeometryHasBeenModified();
954  G4cout<<"Outer Radius of the final collimator IORT is (mm):"
955  << solidFinalCollimatorIORT -> GetOuterRadius()/mm
956  << G4endl;
957 }
958 
960 
961 
962