Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Collimator60BeamLine.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 "Collimator60BeamLine.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 collimator60BeamLine geometry
147  collimatorMessenger = new Collimator60BeamLineMessenger(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  ConstructCollimator60BeamLine();
167 
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 Collimator60BeamLine::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 = 35. *mm;
230  OuterRadiusFinalCollimatorIORT = defaultOuterRadiusFinalCollimatorIORT;
231 
232  G4double defaultinnerRadiusFinalCollimatorIORT = 30. *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 Collimator60BeamLine::ConstructCollimator60BeamLine()
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  const G4double outRadiusFTIORT = 44.75 *mm;
423  const G4double innRadiusFTIORT = 8.5 *mm;
424  const G4double hightFTIORT = 0.006 *mm;
425  const G4double startAngleFTIORT = 0.*deg;
426  const G4double spanningAngleFTIORT = 360.*deg;
427  const G4double XPositionFTIORT = -861.791 *mm;
428 
429  solidFTIORT = new G4Tubs("FTIORT", innRadiusFTIORT,
430  outRadiusFTIORT,
431  hightFTIORT,
432  startAngleFTIORT,
433  spanningAngleFTIORT);
434 
435  G4LogicalVolume* logFTIORT = new G4LogicalVolume(solidFTIORT,
436  FTIORTMaterialIORT, "FTIORT", 0, 0, 0);
437 
438  physiFTIORT = new G4PVPlacement(G4Transform3D(rm2, G4ThreeVector((XPositionFTIORT),0.,0.)),
439  "FTIORT", logFTIORT, physicalTreatmentRoom, false, 0);
440 
441  logFTIORT -> SetVisAttributes(yellow);
442 }
443 
445 {
446 
447  G4double phi3 = 90. *deg;
448 
449  // Matrix definition for a 90 deg rotation. Also used for other volumes
451  rm3.rotateY(phi3);
453 
454  // Monitor Chambers System
455 
457 
458 
459  // ---------------------------------------------------------------//
460  // Superior Final Part Monitor Chambers 3 //
461  // ---------------------------------------------------------------//
462 
463  const G4double outRadiusPFS3IORT = 44.75 *mm;
464  const G4double innRadiusPFS3IORT = 17.5 *mm;
465  const G4double hightPFS3IORT = 3.03 *mm;
466  const G4double startAnglePFS3IORT = 0.*deg;
467  const G4double spanningAnglePFS3IORT = 360.*deg;
468  const G4double XPositionPFS3IORT = -848.755 *mm;
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 = -844.255 *mm;
495 
496  solidPFS2IORT = new G4Tubs("PFS2IORT", innRadiusPFS2IORT,
497  outRadiusPFS2IORT,
498  hightPFS2IORT,
499  startAnglePFS2IORT,
500  spanningAnglePFS2IORT);
501 
502  G4LogicalVolume* logPFS2IORT = new G4LogicalVolume(solidPFS2IORT,
503  PFS2IORTMaterialIORT, "PFS2IORT", 0, 0, 0);
504 
505  physiPFS2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionPFS2IORT),0.,0.)),
506  "PFS2IORT", logPFS2IORT, physicalTreatmentRoom, false, 0);
507 
508  logPFS2IORT -> SetVisAttributes(green);
509 
510  // ---------------------------------------------------------------//
511  // Superior Final Part Monitor Chambers 1 //
512  // ---------------------------------------------------------------//
513 
514  const G4double outRadiusPFS1IORT = 35. *mm;
515  const G4double innRadiusPFS1IORT = 10. *mm;
516  const G4double hightPFS1IORT = 0.88 *mm;
517  const G4double startAnglePFS1IORT = 0.*deg;
518  const G4double spanningAnglePFS1IORT = 360.*deg;
519  const G4double XPositionPFS1IORT = -841.905 *mm;
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  solidCCMIORT = new G4Tubs("CCMIORT", innRadiusCCMIORT,
547  outRadiusCCMIORT,
548  hightCCMIORT,
549  startAngleCCMIORT,
550  spanningAngleCCMIORT);
551 
552  G4LogicalVolume* logCCMIORT = new G4LogicalVolume(solidCCMIORT,
553  CCMIORTMaterialIORT, "CCMIORT", 0, 0, 0);
554 
555  physiCCMIORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCCMIORT),0.,0.)),
556  "CCMIORT", logCCMIORT, physicalTreatmentRoom, false, 0);
557 
558  logCCMIORT -> SetVisAttributes(green);
559 
560 
561  // ------------------------------------------------//
562  // Second Monitor Chamber Lamina Al 2 of 2 //
563  // ------------------------------------------------//
564 
565  const G4double outRadiusCM2_2_2IORT = 20. *mm;
566  const G4double innRadiusCM2_2_2IORT = 0. *mm;
567  const G4double hightCM2_2_2IORT = 0.025 *mm;
568  const G4double startAngleCM2_2_2IORT = 0.*deg;
569  const G4double spanningAngleCM2_2_2IORT = 360.*deg;
570  const G4double XPositionCM2_2_2IORT = -841. *mm;
571 
572  solidCM2_2_2IORT = new G4Tubs("CM2_2_2IORT", innRadiusCM2_2_2IORT,
573  outRadiusCM2_2_2IORT,
574  hightCM2_2_2IORT,
575  startAngleCM2_2_2IORT,
576  spanningAngleCM2_2_2IORT);
577 
578  G4LogicalVolume* logCM2_2_2IORT = new G4LogicalVolume(solidCM2_2_2IORT,
579  CM2_2_2IORTMaterialIORT, "CM2_2_2IORT", 0, 0, 0);
580 
581  physiCM2_2_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM2_2_2IORT),0.,0.)),
582  "CM2_2_2ORT", logCM2_2_2IORT, physicalTreatmentRoom, false, 0);
583 
584  logCM2_2_2IORT -> SetVisAttributes(green);
585 
586 
587 // ------------------------------------------------//
588  // Second Monitor Chamber Lamina Al 1 of 2 //
589  // ------------------------------------------------//
590 
591  const G4double outRadiusCM2_1_2IORT = 20. *mm;
592  const G4double innRadiusCM2_1_2IORT = 0. *mm;
593  const G4double hightCM2_1_2IORT = 0.025 *mm;
594  const G4double startAngleCM2_1_2IORT = 0.*deg;
595  const G4double spanningAngleCM2_1_2IORT = 360.*deg;
596  const G4double XPositionCM2_1_2IORT = -839. *mm;
597 
598  solidCM2_1_2IORT = new G4Tubs("CM2_1_2IORT", innRadiusCM2_1_2IORT,
599  outRadiusCM2_1_2IORT,
600  hightCM2_1_2IORT,
601  startAngleCM2_1_2IORT,
602  spanningAngleCM2_1_2IORT);
603 
604  G4LogicalVolume* logCM2_1_2IORT = new G4LogicalVolume(solidCM2_1_2IORT,
605  CM2_1_2IORTMaterialIORT, "CM2_1_2IORT", 0, 0, 0);
606 
607  physiCM2_1_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM2_1_2IORT),0.,0.)),
608  "CM2_1_2ORT", logCM2_1_2IORT, physicalTreatmentRoom, false, 0);
609 
610  logCM2_1_2IORT -> SetVisAttributes(yellow);
611 
612  // ------------------------------------------------//
613  // First Monitor Chamber Lamina Al 2 of 2 //
614  // ------------------------------------------------//
615 
616  const G4double outRadiusCM1_2_2IORT = 20. *mm;
617  const G4double innRadiusCM1_2_2IORT = 0. *mm;
618  const G4double hightCM1_2_2IORT = 0.025 *mm;
619  const G4double startAngleCM1_2_2IORT = 0.*deg;
620  const G4double spanningAngleCM1_2_2IORT = 360.*deg;
621  const G4double XPositionCM1_2_2IORT = -837. *mm;
622 
623  solidCM1_2_2IORT = new G4Tubs("CM1_2_2IORT", innRadiusCM1_2_2IORT,
624  outRadiusCM1_2_2IORT,
625  hightCM1_2_2IORT,
626  startAngleCM1_2_2IORT,
627  spanningAngleCM1_2_2IORT);
628 
629  G4LogicalVolume* logCM1_2_2IORT = new G4LogicalVolume(solidCM1_2_2IORT,
630  CM1_2_2IORTMaterialIORT, "CM1_2_2IORT", 0, 0, 0);
631 
632  physiCM1_2_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM1_2_2IORT),0.,0.)),
633  "CM1_2_2ORT", logCM1_2_2IORT, physicalTreatmentRoom, false, 0);
634 
635  logCM1_2_2IORT -> SetVisAttributes(yellow);
636 
637  // ------------------------------------------------//
638  // First Monitor Chamber Lamina Al 1 of 2 //
639  // ------------------------------------------------//
640 
641  const G4double outRadiusCM1_1_2IORT = 20. *mm;
642  const G4double innRadiusCM1_1_2IORT = 0. *mm;
643  const G4double hightCM1_1_2IORT = 0.025 *mm;
644  const G4double startAngleCM1_1_2IORT = 0.*deg;
645  const G4double spanningAngleCM1_1_2IORT = 360.*deg;
646  const G4double XPositionCM1_1_2IORT = -835. *mm;
647 
648  solidCM1_1_2IORT = new G4Tubs("CM1_1_2IORT", innRadiusCM1_1_2IORT,
649  outRadiusCM1_1_2IORT,
650  hightCM1_1_2IORT,
651  startAngleCM1_1_2IORT,
652  spanningAngleCM1_1_2IORT);
653 
654  G4LogicalVolume* logCM1_1_2IORT = new G4LogicalVolume(solidCM1_1_2IORT,
655  CM1_1_2IORTMaterialIORT, "CM1_1_2IORT", 0, 0, 0);
656 
657  physiCM1_1_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM1_1_2IORT),0.,0.)),
658  "CM1_1_2ORT", logCM1_1_2IORT, physicalTreatmentRoom, false, 0);
659 
660  logCM1_1_2IORT -> SetVisAttributes(yellow);
661 }
662 
664 {
665 
666  G4double phi4 = 90. *deg;
667 
668 
669  G4RotationMatrix rm4;
670  rm4.rotateY(phi4);
671 
673 
674  // IORT BEAM LINE BLOCKS
675 
677 
678  // ------------------------------------------------//
679  // Block 4 //
680  // ------------------------------------------------//
681 
682  const G4double outRadiusBlocco20mmIORT = 36.5 *mm;
683  const G4double innRadiusBlocco20mmIORT = 10. *mm;
684  const G4double hightBlocco20mmIORT = 3. *mm;
685  const G4double startAngleBlocco20mmIORT = 0.*deg;
686  const G4double spanningAngleBlocco20mmIORT = 360.*deg;
687  const G4double XPositionBlocco20mmIORT = -830. *mm;
688 
689  solidBlocco20mmIORT = new G4Tubs("Blocco20mmIORT", innRadiusBlocco20mmIORT,
690  outRadiusBlocco20mmIORT,
691  hightBlocco20mmIORT,
692  startAngleBlocco20mmIORT,
693  spanningAngleBlocco20mmIORT);
694 
695  G4LogicalVolume* logBlocco20mmIORT = new G4LogicalVolume(solidBlocco20mmIORT,
696  Blocco20mmIORTMaterialIORT, "Blocco20mmIORT", 0, 0, 0);
697 
698  physiBlocco20mmIORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco20mmIORT),0.,0.)),
699  "Blocco20mmORT", logBlocco20mmIORT, physicalTreatmentRoom, false, 0);
700 
701  logBlocco20mmIORT -> SetVisAttributes(green);
702 
703 
704  // -----------------------//
705  // Block 3 //
706  // -----------------------//
707 
708  const G4double outRadiusBlocco3IORT = 36.5 *mm;
709  const G4double innRadiusBlocco3IORT = 15. *mm;
710  const G4double hightBlocco3IORT = 3.5 *mm;
711  const G4double startAngleBlocco3IORT = 0.*deg;
712  const G4double spanningAngleBlocco3IORT = 360.*deg;
713  const G4double XPositionBlocco3IORT = -823.5 *mm;
714 
715 
716  solidBlocco3IORT = new G4Tubs("Blocco3IORT", innRadiusBlocco3IORT,
717  outRadiusBlocco3IORT,
718  hightBlocco3IORT,
719  startAngleBlocco3IORT,
720  spanningAngleBlocco3IORT);
721 
722  G4LogicalVolume* logBlocco3IORT = new G4LogicalVolume(solidBlocco3IORT,
723  Blocco3IORTMaterialIORT, "Blocco3IORT", 0, 0, 0);
724 
725  physiBlocco3IORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco3IORT),0.,0.)),
726  "Blocco3ORT", logBlocco3IORT, physicalTreatmentRoom, false, 0);
727 
728  logBlocco3IORT -> SetVisAttributes(yellow);
729 
730  // -----------------------//
731  // Block 2 //
732  // -----------------------//
733 
734  const G4double outRadiusBlocco2IORT = 41.5 *mm;
735  const G4double innRadiusBlocco2IORT = 15. *mm;
736  const G4double hightBlocco2IORT = 8. *mm;
737  const G4double startAngleBlocco2IORT = 0.*deg;
738  const G4double spanningAngleBlocco2IORT = 360.*deg;
739  const G4double XPositionBlocco2IORT = -812. *mm;
740 
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 
783 {
784 
785 
786  G4double phi5 = 90. *deg;
787 
788 
789  G4RotationMatrix rm5;
790  rm5.rotateY(phi5);
791 
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 
856  solidGiunz3FinalCollIORT = new G4Tubs("Giunz3FinalCollIORT", innRadiusGiunz3FinalCollIORT,
857  outRadiusGiunz3FinalCollIORT,
858  hightGiunz3FinalCollIORT,
859  startAngleGiunz3FinalCollIORT,
860  spanningAngleGiunz3FinalCollIORT);
861 
862  G4LogicalVolume* logicsolidGiunz3FinalCollIORT = new G4LogicalVolume(solidGiunz3FinalCollIORT,
863  Giunz3FinalCollMaterialIORT, "Giunz3FinalCollIORT", 0, 0, 0);
864 
865  physiGiunz3FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz3FinalCollXPositionIORT),0.,0.)),
866  "Giunz3FinalCollIORT", logicsolidGiunz3FinalCollIORT, physicalTreatmentRoom, false, 0);
867 
868  logicsolidGiunz3FinalCollIORT -> SetVisAttributes(yellow);
869  // logicsolidGiunz3FinalCollIORT -> SetVisAttributes (G4VisAttributes::Invisible);
870 
871 
872 
873  // --------------------------------- //
874  // Junction 3 FINAL COLLIMATOR IORT internal //
875  // --------------------------------- //
876 
877 
878 
879  solidGiunz3FinalCollIntIORT = new G4Cons("Giunz3FinalCollIntIORT",0.*mm,13.75*mm,0.*mm,22.25*mm,4.25*mm,0.*deg,360.*deg);
880 
881  G4LogicalVolume* logicsolidGiunz3FinalCollIntIORT = new G4LogicalVolume(solidGiunz3FinalCollIntIORT,
882  Giunz3FinalCollMaterialIntIORT, "Giunz3FinalCollIntIORT", 0, 0, 0);
883 
884  physiGiunz3FinalCollIntIORT = new G4PVPlacement(0, G4ThreeVector(0.,0.,0.),"Giunz3FinalCollIntIORT", logicsolidGiunz3FinalCollIntIORT,physiGiunz3FinalCollIORT, false, 0);
885 
886  logicsolidGiunz3FinalCollIntIORT -> SetVisAttributes(yellow);
887 
888 
889 // --------------------------------- //
890  // Junction 2 FINAL COLLIMATOR IORT //
891  // --------------------------------- //
892 
893  const G4double outRadiusGiunz2FinalCollIORT = 42. *mm;
894  const G4double innRadiusGiunz2FinalCollIORT = 22.25 *mm;
895  const G4double hightGiunz2FinalCollIORT = 5.75 *mm;
896  const G4double startAngleGiunz2FinalCollIORT = 0.*deg;
897  const G4double spanningAngleGiunz2FinalCollIORT = 360.*deg;
898  const G4double Giunz2FinalCollXPositionIORT = -748.75 *mm;
899 
900  solidGiunz2FinalCollIORT = new G4Tubs("Giunz2FinalCollIORT", innRadiusGiunz2FinalCollIORT,
901  outRadiusGiunz2FinalCollIORT,
902  hightGiunz2FinalCollIORT,
903  startAngleGiunz2FinalCollIORT,
904  spanningAngleGiunz2FinalCollIORT);
905 
906  G4LogicalVolume* logGiunz2FinalCollIORT = new G4LogicalVolume(solidGiunz2FinalCollIORT,
907  Giunz2FinalCollMaterialIORT, "Giunz2FinalCollIORT", 0, 0, 0);
908 
909  physiGiunz2FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz2FinalCollXPositionIORT),0.,0.)),
910  "Giunz2FinalCollIORT", logGiunz2FinalCollIORT, physicalTreatmentRoom, false, 0);
911 
912  logGiunz2FinalCollIORT -> SetVisAttributes(red);
913 
914 // --------------------------------- //
915  // Junction 1 FINAL COLLIMATOR IORT //
916  // --------------------------------- //
917 
918  const G4double outRadiusGiunz1FinalCollIORT = 45. *mm;
919  const G4double innRadiusGiunz1FinalCollIORT = 22.25 *mm;
920  const G4double hightGiunz1FinalCollIORT = 10. *mm;
921  const G4double startAngleGiunz1FinalCollIORT = 0.*deg;
922  const G4double spanningAngleGiunz1FinalCollIORT = 360.*deg;
923  const G4double Giunz1FinalCollXPositionIORT = -733.*mm;
924 
925  solidGiunz1FinalCollIORT = new G4Tubs("Giunz1FinalCollIORT", innRadiusGiunz1FinalCollIORT,
926  outRadiusGiunz1FinalCollIORT,
927  hightGiunz1FinalCollIORT,
928  startAngleGiunz1FinalCollIORT,
929  spanningAngleGiunz1FinalCollIORT);
930 
931  G4LogicalVolume* logGiunz1FinalCollIORT = new G4LogicalVolume(solidGiunz1FinalCollIORT,
932  Giunz1FinalCollMaterialIORT, "Giunz1FinalCollIORT", 0, 0, 0);
933 
934  physiGiunz1FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz1FinalCollXPositionIORT),0.,0.)),
935  "Giunz1FinalCollIORT", logGiunz1FinalCollIORT, physicalTreatmentRoom, false, 0);
936 
937  logGiunz1FinalCollIORT -> SetVisAttributes(gray);
938 }
939 
941 {
942 // -----------------------//
943  // FINAL COLLIMATOR IORT //
944  //------------------------//
945 
946  // const G4double OuterRadiusFinalCollimatorIORT = 35. *mm;
947  // const G4double innerRadiusFinalCollimatorIORT = 30. *mm;
948  const G4double hightFinalCollimatorIORT = 334. *mm;
949  const G4double startAngleFinalCollimatorIORT = 0.*deg;
950  const G4double spanningAngleFinalCollimatorIORT = 360.*deg;
951  const G4double finalCollimatorXPositionIORT = -389.*mm;
952 
953 
954 
955 
956  G4double phi6 = 90. *deg;
957 
958 
960  rm6.rotateY(phi6);
961 
962 
963  solidFinalCollimatorIORT = new G4Tubs("FinalCollimatorIORT", innerRadiusFinalCollimatorIORT,
964  OuterRadiusFinalCollimatorIORT,
965  hightFinalCollimatorIORT,
966  startAngleFinalCollimatorIORT,
967  spanningAngleFinalCollimatorIORT);
968 
969  G4LogicalVolume* logFinalCollimatorIORT = new G4LogicalVolume(solidFinalCollimatorIORT,
970  finalCollimatorMaterialIORT, "FinalCollimatorIORT", 0, 0, 0);
971 
972  physiFinalCollimatorIORT = new G4PVPlacement(G4Transform3D(rm6, G4ThreeVector((finalCollimatorXPositionIORT),0.,0.)),
973  "FinalCollimatorIORT", logFinalCollimatorIORT, physicalTreatmentRoom, false, 0);
974 
975  // logFinalCollimatorIORT -> SetVisAttributes(G4VisAttributes::Invisible);
976  logFinalCollimatorIORT -> SetVisAttributes(blue);
977 }
978 
982 
983 
985 {
986  solidFinalCollimatorIORT -> SetInnerRadius(value);
987  G4RunManager::GetRunManager() -> GeometryHasBeenModified();
988  G4cout<<"Inner Radius of the final collimator IORT is (mm):"
989  << solidFinalCollimatorIORT -> GetInnerRadius()/mm
990  << G4endl;
991 }
992 
994 
996 {
997  solidFinalCollimatorIORT -> SetOuterRadius(value);
998  G4RunManager::GetRunManager() -> GeometryHasBeenModified();
999  G4cout<<"Outer Radius of the final collimator IORT is (mm):"
1000  << solidFinalCollimatorIORT -> GetOuterRadius()/mm
1001  << G4endl;
1002 }
1003 
1004 
1006 
1007 
1008