Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Collimator70BeamLine.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 "Collimator70BeamLine.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 collimator70BeamLine geometry
147  collimatorMessenger = new Collimator70BeamLineMessenger(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  ConstructCollimator70BeamLine();
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 Collimator70BeamLine::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  // Geometry FINAL COLLIMATOR DEFAULTS
227 
228  G4double defaultOuterRadiusFinalCollimatorIORT = 40. *mm;
229  OuterRadiusFinalCollimatorIORT = defaultOuterRadiusFinalCollimatorIORT;
230 
231  G4double defaultinnerRadiusFinalCollimatorIORT = 35. *mm;
232  innerRadiusFinalCollimatorIORT = defaultinnerRadiusFinalCollimatorIORT;
233 
234  // DEFAULT DEFINITION OF THE MATERIALS
235  // All elements and compound definition follows the NIST database
236 
237  // ELEMENTS
238  G4bool isotopes = false;
239  G4Material* aluminumNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_Al", isotopes);
240  //G4Material* tantalumNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_Ta", isotopes);
241  //G4Material* copperNistAsMaterial = G4NistManager::Instance()->FindOrBuildMaterial("G4_Cu", isotopes);
244 
245  // COMPOUND
246  G4Material* airNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_AIR", isotopes);
247  //G4Material* kaptonNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_KAPTON", isotopes);
248  G4Material* galacticNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_Galactic", isotopes);
249  G4Material* PMMANist = G4NistManager::Instance()->FindOrBuildMaterial("G4_PLEXIGLASS", isotopes);
250  //G4Material* mylarNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_MYLAR", isotopes);
251  G4Material* titanioNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_Ti", isotopes);
252 
253 
254  G4double d; // Density
255  G4int nComponents;// Number of components
256  G4double fractionmass; // Fraction in mass of an element in a material
257 
258  d = 8.40*g/cm3; // brass
259  nComponents = 2;
260  G4Material* brass = new G4Material("Brass", d, nComponents);
261  brass -> AddElement(zincNist, fractionmass = 30 *perCent);
262  brass -> AddElement(copperNist, fractionmass = 70 *perCent);
263 
264 
265  // MATERIAL ASSIGNMENT
266 
267 
268  // Material of the FINAL COLLIMATOR IORT
269  finalCollimatorMaterialIORT = PMMANist;
270 
271  // Junction 1 FINAL COLLIMATOR IORT
272  Giunz1FinalCollMaterialIORT = PMMANist;
273 
274  // Junction 2 FINAL COLLIMATOR IORT
275  Giunz2FinalCollMaterialIORT = PMMANist;
276 
277  // Junction 3 FINAL COLLIMATOR IORT
278  Giunz3FinalCollMaterialIORT = PMMANist;
279 
280  // Junction 3 FINAL COLLIMATOR Int IORT
281  Giunz3FinalCollMaterialIntIORT = airNist;
282 
283  // Junction 4 FINAL COLLIMATOR IORT
284  Giunz4FinalCollMaterialIORT = PMMANist;
285 
286  // Junction 5 FINAL COLLIMATOR IORT
287  Giunz5FinalCollMaterialIORT = PMMANist;
288 
289  // Block 1 Diameter 30 mm
290  Blocco1IORTMaterialIORT = PMMANist;
291 
292  // Block 2 Diameter 30 mm
293  Blocco2IORTMaterialIORT = PMMANist;
294 
295  // Block 3 Diameter 30 mm
296  Blocco3IORTMaterialIORT = PMMANist;
297 
298  // Block Diameter 20 mm
299  Blocco20mmIORTMaterialIORT = PMMANist;
300 
301  // First Monitor Chamber Lamina Al 1 of 2
302  CM1_1_2IORTMaterialIORT = aluminumNist;
303 
304  // First Monitor Chamber Lamina Al 2 of 2
305  CM1_2_2IORTMaterialIORT = aluminumNist;
306 
307  // Second Monitor Chamber Lamina Al 1 of 2
308  CM2_1_2IORTMaterialIORT = aluminumNist;
309 
310  // Second Monitor Chamber Lamina Al 2 of 2
311  CM2_2_2IORTMaterialIORT = aluminumNist;
312 
313  // Monitor Chamber Cylinder
314  CCMIORTMaterialIORT = PMMANist;
315 
316  // Superior Final Part Monitor Chambers
317  PFS1IORTMaterialIORT = PMMANist;
318 
319  // Superior Final Part Monitor Chambers
320  PFS2IORTMaterialIORT = PMMANist;
321 
322  // Superior Final Part Monitor Chambers
323  PFS3IORTMaterialIORT = PMMANist;
324 
325  // Superior Final Part Monitor Chambers Material
326  FTIORTMaterialIORT = titanioNist;
327 
328  // Vacuum Source
329  VSIORTMaterialIORT = galacticNist;
330 
331 }
332 
334 void Collimator70BeamLine::ConstructCollimator70BeamLine()
335 {
336  // -----------------------------
337  // Treatment room - World volume
338  //------------------------------
339  // Treatment room sizes
340  const G4double worldX = 400.0 *cm;
341  const G4double worldY = 400.0 *cm;
342  const G4double worldZ = 400.0 *cm;
343  G4bool isotopes = false;
344 
345  G4Material* airNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_AIR", isotopes);
346  G4Box* treatmentRoom = new G4Box("TreatmentRoom",worldX,worldY,worldZ);
347  G4LogicalVolume* logicTreatmentRoom = new G4LogicalVolume(treatmentRoom,
348  airNist,
349  "logicTreatmentRoom",
350  0,0,0);
351  physicalTreatmentRoom = new G4PVPlacement(0,
352  G4ThreeVector(),
353  "physicalTreatmentRoom",
354  logicTreatmentRoom,
355  0,false,0);
356 
357 
358  // The treatment room is invisible in the Visualisation
359  logicTreatmentRoom -> SetVisAttributes (G4VisAttributes::Invisible);
360 
361  // Components of the Collimator Beam Line
362 
369 
370 }
371 
372 
374 {
375  // ---------------------------------------------------------------//
376  // Vacuum Source //
377  // ---------------------------------------------------------------//
378 
379 
380  G4double phi1 = 90. *deg;
381 
382 
383  G4RotationMatrix rm1;
384  rm1.rotateY(phi1);
385 
386  const G4double outRadiusVSIORT = 44.75 *mm;
387  const G4double innRadiusVSIORT = 0.*mm;
388  const G4double hightVSIORT = 1. *mm;
389  const G4double startAngleVSIORT = 0.*deg;
390  const G4double spanningAngleVSIORT = 360.*deg;
391  const G4double XPositionVSIORT = -862.797 *mm;
392 
393  solidVSIORT = new G4Tubs("VSIORT", innRadiusVSIORT,
394  outRadiusVSIORT,
395  hightVSIORT,
396  startAngleVSIORT,
397  spanningAngleVSIORT);
398 
399  G4LogicalVolume* logVSIORT = new G4LogicalVolume(solidVSIORT,
400  VSIORTMaterialIORT, "VSIORT", 0, 0, 0);
401 
402  physiVSIORT = new G4PVPlacement(G4Transform3D(rm1, G4ThreeVector((XPositionVSIORT),0.,0.)),
403  "VSIORT", logVSIORT, physicalTreatmentRoom, false, 0);
404 
405  logVSIORT -> SetVisAttributes(green);
406 }
407 
409 {
410 // ---------------------------------------------------------------//
411  // Titanium Window //
412  // ---------------------------------------------------------------//
413 
414  G4double phi2 = 90. *deg;
415 
416 
417  G4RotationMatrix rm2;
418  rm2.rotateY(phi2);
419 
420 
421  const G4double outRadiusFTIORT = 44.75 *mm;
422  const G4double innRadiusFTIORT = 8.5 *mm;
423  const G4double hightFTIORT = 0.006 *mm;
424  const G4double startAngleFTIORT = 0.*deg;
425  const G4double spanningAngleFTIORT = 360.*deg;
426  const G4double XPositionFTIORT = -861.791 *mm;
427 
428  solidFTIORT = new G4Tubs("FTIORT", innRadiusFTIORT,
429  outRadiusFTIORT,
430  hightFTIORT,
431  startAngleFTIORT,
432  spanningAngleFTIORT);
433 
434  G4LogicalVolume* logFTIORT = new G4LogicalVolume(solidFTIORT,
435  FTIORTMaterialIORT, "FTIORT", 0, 0, 0);
436 
437  physiFTIORT = new G4PVPlacement(G4Transform3D(rm2, G4ThreeVector((XPositionFTIORT),0.,0.)),
438  "FTIORT", logFTIORT, physicalTreatmentRoom, false, 0);
439 
440  logFTIORT -> SetVisAttributes(yellow);
441 }
442 
444 {
445 
446  G4double phi3 = 90. *deg;
447 
448  // Matrix definition for a 90 deg rotation. Also used for other volumes
450  rm3.rotateY(phi3);
452 
453  // Monitor Chambers System
454 
456 
457 
458  // ---------------------------------------------------------------//
459  // Superior Final Part Monitor Chambers 3 //
460  // ---------------------------------------------------------------//
461 
462  const G4double outRadiusPFS3IORT = 44.75 *mm;
463  const G4double innRadiusPFS3IORT = 17.5 *mm;
464  const G4double hightPFS3IORT = 3.03 *mm;
465  const G4double startAnglePFS3IORT = 0.*deg;
466  const G4double spanningAnglePFS3IORT = 360.*deg;
467  const G4double XPositionPFS3IORT = -848.755 *mm;
468 
469  solidPFS3IORT = new G4Tubs("PFS3IORT", innRadiusPFS3IORT,
470  outRadiusPFS3IORT,
471  hightPFS3IORT,
472  startAnglePFS3IORT,
473  spanningAnglePFS3IORT);
474 
475  G4LogicalVolume* logPFS3IORT = new G4LogicalVolume(solidPFS3IORT,
476  PFS3IORTMaterialIORT, "PFS3IORT", 0, 0, 0);
477 
478  physiPFS3IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionPFS3IORT),0.,0.)),
479  "PFS3IORT", logPFS3IORT, physicalTreatmentRoom, false, 0);
480 
481  logPFS3IORT -> SetVisAttributes(white);
482 
483 
484  // ---------------------------------------------------------------//
485  // Superior Final Part Monitor Chambers 2 //
486  // ---------------------------------------------------------------//
487 
488  const G4double outRadiusPFS2IORT = 44.75 *mm;
489  const G4double innRadiusPFS2IORT = 10. *mm;
490  const G4double hightPFS2IORT = 1.47 *mm;
491  const G4double startAnglePFS2IORT = 0.*deg;
492  const G4double spanningAnglePFS2IORT = 360.*deg;
493  const G4double XPositionPFS2IORT = -844.255 *mm;
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  solidPFS1IORT = new G4Tubs("PFS1IORT", innRadiusPFS1IORT,
521  outRadiusPFS1IORT,
522  hightPFS1IORT,
523  startAnglePFS1IORT,
524  spanningAnglePFS1IORT);
525 
526  G4LogicalVolume* logPFS1IORT = new G4LogicalVolume(solidPFS1IORT,
527  PFS1IORTMaterialIORT, "PFS1IORT", 0, 0, 0);
528 
529  physiPFS1IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionPFS1IORT),0.,0.)),
530  "PFS1IORT", logPFS1IORT, physicalTreatmentRoom, false, 0);
531 
532  logPFS1IORT -> SetVisAttributes(green);
533 
534  // ------------------------------------------------//
535  // Monitor Chambers Cylinder //
536  // ------------------------------------------------//
537 
538  const G4double outRadiusCCMIORT = 35. *mm;
539  const G4double innRadiusCCMIORT = 10. *mm;
540  const G4double hightCCMIORT = 4.0125 *mm;
541  const G4double startAngleCCMIORT = 0.*deg;
542  const G4double spanningAngleCCMIORT = 360.*deg;
543  const G4double XPositionCCMIORT = -837.0125 *mm;
544 
545  solidCCMIORT = new G4Tubs("CCMIORT", innRadiusCCMIORT,
546  outRadiusCCMIORT,
547  hightCCMIORT,
548  startAngleCCMIORT,
549  spanningAngleCCMIORT);
550 
551  G4LogicalVolume* logCCMIORT = new G4LogicalVolume(solidCCMIORT,
552  CCMIORTMaterialIORT, "CCMIORT", 0, 0, 0);
553 
554  physiCCMIORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCCMIORT),0.,0.)),
555  "CCMIORT", logCCMIORT, physicalTreatmentRoom, false, 0);
556 
557  logCCMIORT -> SetVisAttributes(green);
558 
559 
560  // ------------------------------------------------//
561  // Second Monitor Chamber Lamina Al 2 of 2 //
562  // ------------------------------------------------//
563 
564  const G4double outRadiusCM2_2_2IORT = 20. *mm;
565  const G4double innRadiusCM2_2_2IORT = 0. *mm;
566  const G4double hightCM2_2_2IORT = 0.025 *mm;
567  const G4double startAngleCM2_2_2IORT = 0.*deg;
568  const G4double spanningAngleCM2_2_2IORT = 360.*deg;
569  const G4double XPositionCM2_2_2IORT = -841. *mm;
570 
571  solidCM2_2_2IORT = new G4Tubs("CM2_2_2IORT", innRadiusCM2_2_2IORT,
572  outRadiusCM2_2_2IORT,
573  hightCM2_2_2IORT,
574  startAngleCM2_2_2IORT,
575  spanningAngleCM2_2_2IORT);
576 
577  G4LogicalVolume* logCM2_2_2IORT = new G4LogicalVolume(solidCM2_2_2IORT,
578  CM2_2_2IORTMaterialIORT, "CM2_2_2IORT", 0, 0, 0);
579 
580  physiCM2_2_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM2_2_2IORT),0.,0.)),
581  "CM2_2_2ORT", logCM2_2_2IORT, physicalTreatmentRoom, false, 0);
582 
583  logCM2_2_2IORT -> SetVisAttributes(green);
584 
585 
586 // ------------------------------------------------//
587  // Second Monitor Chamber Lamina Al 1 of 2 //
588  // ------------------------------------------------//
589 
590  const G4double outRadiusCM2_1_2IORT = 20. *mm;
591  const G4double innRadiusCM2_1_2IORT = 0. *mm;
592  const G4double hightCM2_1_2IORT = 0.025 *mm;
593  const G4double startAngleCM2_1_2IORT = 0.*deg;
594  const G4double spanningAngleCM2_1_2IORT = 360.*deg;
595  const G4double XPositionCM2_1_2IORT = -839. *mm;
596 
597  solidCM2_1_2IORT = new G4Tubs("CM2_1_2IORT", innRadiusCM2_1_2IORT,
598  outRadiusCM2_1_2IORT,
599  hightCM2_1_2IORT,
600  startAngleCM2_1_2IORT,
601  spanningAngleCM2_1_2IORT);
602 
603  G4LogicalVolume* logCM2_1_2IORT = new G4LogicalVolume(solidCM2_1_2IORT,
604  CM2_1_2IORTMaterialIORT, "CM2_1_2IORT", 0, 0, 0);
605 
606  physiCM2_1_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM2_1_2IORT),0.,0.)),
607  "CM2_1_2ORT", logCM2_1_2IORT, physicalTreatmentRoom, false, 0);
608 
609  logCM2_1_2IORT -> SetVisAttributes(yellow);
610 
611  // ------------------------------------------------//
612  // First Monitor Chamber Lamina Al 2 of 2 //
613  // ------------------------------------------------//
614 
615  const G4double outRadiusCM1_2_2IORT = 20. *mm;
616  const G4double innRadiusCM1_2_2IORT = 0. *mm;
617  const G4double hightCM1_2_2IORT = 0.025 *mm;
618  const G4double startAngleCM1_2_2IORT = 0.*deg;
619  const G4double spanningAngleCM1_2_2IORT = 360.*deg;
620  const G4double XPositionCM1_2_2IORT = -837. *mm;
621 
622  solidCM1_2_2IORT = new G4Tubs("CM1_2_2IORT", innRadiusCM1_2_2IORT,
623  outRadiusCM1_2_2IORT,
624  hightCM1_2_2IORT,
625  startAngleCM1_2_2IORT,
626  spanningAngleCM1_2_2IORT);
627 
628  G4LogicalVolume* logCM1_2_2IORT = new G4LogicalVolume(solidCM1_2_2IORT,
629  CM1_2_2IORTMaterialIORT, "CM1_2_2IORT", 0, 0, 0);
630 
631  physiCM1_2_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM1_2_2IORT),0.,0.)),
632  "CM1_2_2ORT", logCM1_2_2IORT, physicalTreatmentRoom, false, 0);
633 
634  logCM1_2_2IORT -> SetVisAttributes(yellow);
635 
636  // ------------------------------------------------//
637  // First Monitor Chamber Lamina Al 1 of 2 //
638  // ------------------------------------------------//
639 
640  const G4double outRadiusCM1_1_2IORT = 20. *mm;
641  const G4double innRadiusCM1_1_2IORT = 0. *mm;
642  const G4double hightCM1_1_2IORT = 0.025 *mm;
643  const G4double startAngleCM1_1_2IORT = 0.*deg;
644  const G4double spanningAngleCM1_1_2IORT = 360.*deg;
645  const G4double XPositionCM1_1_2IORT = -835. *mm;
646 
647  solidCM1_1_2IORT = new G4Tubs("CM1_1_2IORT", innRadiusCM1_1_2IORT,
648  outRadiusCM1_1_2IORT,
649  hightCM1_1_2IORT,
650  startAngleCM1_1_2IORT,
651  spanningAngleCM1_1_2IORT);
652 
653  G4LogicalVolume* logCM1_1_2IORT = new G4LogicalVolume(solidCM1_1_2IORT,
654  CM1_1_2IORTMaterialIORT, "CM1_1_2IORT", 0, 0, 0);
655 
656  physiCM1_1_2IORT = new G4PVPlacement(G4Transform3D(rm3, G4ThreeVector((XPositionCM1_1_2IORT),0.,0.)),
657  "CM1_1_2ORT", logCM1_1_2IORT, physicalTreatmentRoom, false, 0);
658 
659  logCM1_1_2IORT -> SetVisAttributes(yellow);
660 }
661 
663 {
664 
665  G4double phi4 = 90. *deg;
666 
667 
668  G4RotationMatrix rm4;
669  rm4.rotateY(phi4);
670 
672 
673  // IORT BEAM LINE BLOCKS
674 
676 
677  // ------------------------------------------------//
678  // Block 4 //
679  // ------------------------------------------------//
680 
681  const G4double outRadiusBlocco20mmIORT = 36.5 *mm;
682  const G4double innRadiusBlocco20mmIORT = 10. *mm;
683  const G4double hightBlocco20mmIORT = 3. *mm;
684  const G4double startAngleBlocco20mmIORT = 0.*deg;
685  const G4double spanningAngleBlocco20mmIORT = 360.*deg;
686  const G4double XPositionBlocco20mmIORT = -830. *mm;
687 
688  solidBlocco20mmIORT = new G4Tubs("Blocco20mmIORT", innRadiusBlocco20mmIORT,
689  outRadiusBlocco20mmIORT,
690  hightBlocco20mmIORT,
691  startAngleBlocco20mmIORT,
692  spanningAngleBlocco20mmIORT);
693 
694  G4LogicalVolume* logBlocco20mmIORT = new G4LogicalVolume(solidBlocco20mmIORT,
695  Blocco20mmIORTMaterialIORT, "Blocco20mmIORT", 0, 0, 0);
696 
697  physiBlocco20mmIORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco20mmIORT),0.,0.)),
698  "Blocco20mmORT", logBlocco20mmIORT, physicalTreatmentRoom, false, 0);
699 
700  logBlocco20mmIORT -> SetVisAttributes(green);
701 
702 
703  // -----------------------//
704  // Block 3 //
705  // -----------------------//
706 
707  const G4double outRadiusBlocco3IORT = 36.5 *mm;
708  const G4double innRadiusBlocco3IORT = 15. *mm;
709  const G4double hightBlocco3IORT = 3.5 *mm;
710  const G4double startAngleBlocco3IORT = 0.*deg;
711  const G4double spanningAngleBlocco3IORT = 360.*deg;
712  const G4double XPositionBlocco3IORT = -823.5 *mm;
713 
714  solidBlocco3IORT = new G4Tubs("Blocco3IORT", innRadiusBlocco3IORT,
715  outRadiusBlocco3IORT,
716  hightBlocco3IORT,
717  startAngleBlocco3IORT,
718  spanningAngleBlocco3IORT);
719 
720  G4LogicalVolume* logBlocco3IORT = new G4LogicalVolume(solidBlocco3IORT,
721  Blocco3IORTMaterialIORT, "Blocco3IORT", 0, 0, 0);
722 
723  physiBlocco3IORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco3IORT),0.,0.)),
724  "Blocco3ORT", logBlocco3IORT, physicalTreatmentRoom, false, 0);
725 
726  logBlocco3IORT -> SetVisAttributes(yellow);
727 
728  // -----------------------//
729  // Block 2 //
730  // -----------------------//
731 
732  const G4double outRadiusBlocco2IORT = 41.5 *mm;
733  const G4double innRadiusBlocco2IORT = 15. *mm;
734  const G4double hightBlocco2IORT = 8. *mm;
735  const G4double startAngleBlocco2IORT = 0.*deg;
736  const G4double spanningAngleBlocco2IORT = 360.*deg;
737  const G4double XPositionBlocco2IORT = -812. *mm;
738 
739  solidBlocco2IORT = new G4Tubs("Blocco2IORT", innRadiusBlocco2IORT,
740  outRadiusBlocco2IORT,
741  hightBlocco2IORT,
742  startAngleBlocco2IORT,
743  spanningAngleBlocco2IORT);
744 
745  G4LogicalVolume* logBlocco2IORT = new G4LogicalVolume(solidBlocco2IORT,
746  Blocco2IORTMaterialIORT, "Blocco2IORT", 0, 0, 0);
747 
748  physiBlocco2IORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco2IORT),0.,0.)),
749  "Blocco2IORT", logBlocco2IORT, physicalTreatmentRoom, false, 0);
750 
751  logBlocco2IORT -> SetVisAttributes(red);
752 
753  // ----------------------- //
754  // Block 1 //
755  // ----------------------- //
756 
757  const G4double outRadiusBlocco1IORT = 52.0 *mm;
758  const G4double innRadiusBlocco1IORT = 15. *mm;
759  const G4double hightBlocco1IORT = 8.5 *mm;
760  const G4double startAngleBlocco1IORT = 0.*deg;
761  const G4double spanningAngleBlocco1IORT = 360.*deg;
762  const G4double XPositionBlocco1IORT = -795.5*mm;
763 
764  solidBlocco1IORT = new G4Tubs("Blocco1IORT", innRadiusBlocco1IORT,
765  outRadiusBlocco1IORT,
766  hightBlocco1IORT,
767  startAngleBlocco1IORT,
768  spanningAngleBlocco1IORT);
769 
770  G4LogicalVolume* logBlocco1IORT = new G4LogicalVolume(solidBlocco1IORT,
771  Blocco1IORTMaterialIORT, "Blocco1IORT", 0, 0, 0);
772 
773  physiBlocco1IORT = new G4PVPlacement(G4Transform3D(rm4, G4ThreeVector((XPositionBlocco1IORT),0.,0.)),
774  "Blocco1IORT", logBlocco1IORT, physicalTreatmentRoom, false, 0);
775 
776  logBlocco1IORT -> SetVisAttributes(white);
777 }
778 
780 {
781 
782 
783  G4double phi5 = 90. *deg;
784 
785 
786  G4RotationMatrix rm5;
787  rm5.rotateY(phi5);
788 // --------------------------------- //
789  // Junction 5 FINAL COLLIMATOR IORT //
790  // --------------------------------- //
791 
792  const G4double outRadiusGiunz5FinalCollIORT = 48.25 *mm;
793  const G4double innRadiusGiunz5FinalCollIORT = 13.75 *mm;
794  const G4double hightGiunz5FinalCollIORT = 3.5 *mm;
795  const G4double startAngleGiunz5FinalCollIORT = 0.*deg;
796  const G4double spanningAngleGiunz5FinalCollIORT = 360.*deg;
797  const G4double Giunz5FinalCollXPositionIORT = -783.5 *mm;
798 
799  solidGiunz5FinalCollIORT = new G4Tubs("Giunz5FinalCollIORT", innRadiusGiunz5FinalCollIORT,
800  outRadiusGiunz5FinalCollIORT,
801  hightGiunz5FinalCollIORT,
802  startAngleGiunz5FinalCollIORT,
803  spanningAngleGiunz5FinalCollIORT);
804 
805  G4LogicalVolume* logGiunz5FinalCollIORT = new G4LogicalVolume(solidGiunz5FinalCollIORT,
806  Giunz5FinalCollMaterialIORT, "Giunz5FinalCollIORT", 0, 0, 0);
807 
808  physiGiunz5FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz5FinalCollXPositionIORT),0.,0.)),
809  "Giunz5FinalCollIORT", logGiunz5FinalCollIORT, physicalTreatmentRoom, false, 0);
810 
811  logGiunz5FinalCollIORT -> SetVisAttributes(yellow);
812 
813 // --------------------------------- //
814  // Junction 4 FINAL COLLIMATOR IORT //
815  // --------------------------------- //
816 
817  const G4double outRadiusGiunz4FinalCollIORT = 42. *mm;
818  const G4double innRadiusGiunz4FinalCollIORT = 13.75 *mm;
819  const G4double hightGiunz4FinalCollIORT = 8.5 *mm;
820  const G4double startAngleGiunz4FinalCollIORT = 0.*deg;
821  const G4double spanningAngleGiunz4FinalCollIORT = 360.*deg;
822  const G4double Giunz4FinalCollXPositionIORT = -771.5 *mm;
823 
824  solidGiunz4FinalCollIORT = new G4Tubs("Giunz4FinalCollIORT", innRadiusGiunz4FinalCollIORT,
825  outRadiusGiunz4FinalCollIORT,
826  hightGiunz4FinalCollIORT,
827  startAngleGiunz4FinalCollIORT,
828  spanningAngleGiunz4FinalCollIORT);
829 
830  G4LogicalVolume* logGiunz4FinalCollIORT = new G4LogicalVolume(solidGiunz4FinalCollIORT,
831  Giunz4FinalCollMaterialIORT, "Giunz4FinalCollIORT", 0, 0, 0);
832 
833  physiGiunz4FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz4FinalCollXPositionIORT),0.,0.)),
834  "Giunz4FinalCollIORT", logGiunz4FinalCollIORT, physicalTreatmentRoom, false, 0);
835 
836  logGiunz4FinalCollIORT -> SetVisAttributes(blue);
837 
838 
839 
840  // --------------------------------- //
841  // Junction 3 FINAL COLLIMATOR IORT //
842  // --------------------------------- //
843 
844  const G4double outRadiusGiunz3FinalCollIORT = 42. *mm;
845  const G4double innRadiusGiunz3FinalCollIORT = 0. *mm;
846  const G4double hightGiunz3FinalCollIORT = 4.25 *mm;
847  const G4double startAngleGiunz3FinalCollIORT = 0.*deg;
848  const G4double spanningAngleGiunz3FinalCollIORT = 360.*deg;
849  const G4double Giunz3FinalCollXPositionIORT = -758.75 *mm;
850 
851  solidGiunz3FinalCollIORT = new G4Tubs("Giunz3FinalCollIORT", innRadiusGiunz3FinalCollIORT,
852  outRadiusGiunz3FinalCollIORT,
853  hightGiunz3FinalCollIORT,
854  startAngleGiunz3FinalCollIORT,
855  spanningAngleGiunz3FinalCollIORT);
856 
857  G4LogicalVolume* logicsolidGiunz3FinalCollIORT = new G4LogicalVolume(solidGiunz3FinalCollIORT,
858  Giunz3FinalCollMaterialIORT, "Giunz3FinalCollIORT", 0, 0, 0);
859 
860  physiGiunz3FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz3FinalCollXPositionIORT),0.,0.)),
861  "Giunz3FinalCollIORT", logicsolidGiunz3FinalCollIORT, physicalTreatmentRoom, false, 0);
862 
863  logicsolidGiunz3FinalCollIORT -> SetVisAttributes(yellow);
864  // logicsolidGiunz3FinalCollIORT -> SetVisAttributes (G4VisAttributes::Invisible);
865 
866 
867 
868  // --------------------------------- //
869  // Junction 3 FINAL COLLIMATOR IORT internal //
870  // --------------------------------- //
871 
872 
873 
874  solidGiunz3FinalCollIntIORT = new G4Cons("Giunz3FinalCollIntIORT",0.*mm,13.75*mm,0.*mm,22.25*mm,4.25*mm,0.*deg,360.*deg);
875 
876  G4LogicalVolume* logicsolidGiunz3FinalCollIntIORT = new G4LogicalVolume(solidGiunz3FinalCollIntIORT,
877  Giunz3FinalCollMaterialIntIORT, "Giunz3FinalCollIntIORT", 0, 0, 0);
878 
879  physiGiunz3FinalCollIntIORT = new G4PVPlacement(0, G4ThreeVector(0.,0.,0.),"Giunz3FinalCollIntIORT", logicsolidGiunz3FinalCollIntIORT,physiGiunz3FinalCollIORT, false, 0);
880 
881  logicsolidGiunz3FinalCollIntIORT -> SetVisAttributes(yellow);
882 
883 
884 // --------------------------------- //
885  // Junction 2 FINAL COLLIMATOR IORT //
886  // --------------------------------- //
887 
888  const G4double outRadiusGiunz2FinalCollIORT = 42. *mm;
889  const G4double innRadiusGiunz2FinalCollIORT = 22.25 *mm;
890  const G4double hightGiunz2FinalCollIORT = 5.75 *mm;
891  const G4double startAngleGiunz2FinalCollIORT = 0.*deg;
892  const G4double spanningAngleGiunz2FinalCollIORT = 360.*deg;
893  const G4double Giunz2FinalCollXPositionIORT = -748.75 *mm;
894 
895  solidGiunz2FinalCollIORT = new G4Tubs("Giunz2FinalCollIORT", innRadiusGiunz2FinalCollIORT,
896  outRadiusGiunz2FinalCollIORT,
897  hightGiunz2FinalCollIORT,
898  startAngleGiunz2FinalCollIORT,
899  spanningAngleGiunz2FinalCollIORT);
900 
901  G4LogicalVolume* logGiunz2FinalCollIORT = new G4LogicalVolume(solidGiunz2FinalCollIORT,
902  Giunz2FinalCollMaterialIORT, "Giunz2FinalCollIORT", 0, 0, 0);
903 
904  physiGiunz2FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz2FinalCollXPositionIORT),0.,0.)),
905  "Giunz2FinalCollIORT", logGiunz2FinalCollIORT, physicalTreatmentRoom, false, 0);
906 
907  logGiunz2FinalCollIORT -> SetVisAttributes(red);
908 
909 // --------------------------------- //
910  // Junction 1 FINAL COLLIMATOR IORT //
911  // --------------------------------- //
912 
913  const G4double outRadiusGiunz1FinalCollIORT = 50. *mm;
914  const G4double innRadiusGiunz1FinalCollIORT = 22.25 *mm;
915  const G4double hightGiunz1FinalCollIORT = 10. *mm;
916  const G4double startAngleGiunz1FinalCollIORT = 0.*deg;
917  const G4double spanningAngleGiunz1FinalCollIORT = 360.*deg;
918  const G4double Giunz1FinalCollXPositionIORT = -733.*mm;
919 
920  solidGiunz1FinalCollIORT = new G4Tubs("Giunz1FinalCollIORT", innRadiusGiunz1FinalCollIORT,
921  outRadiusGiunz1FinalCollIORT,
922  hightGiunz1FinalCollIORT,
923  startAngleGiunz1FinalCollIORT,
924  spanningAngleGiunz1FinalCollIORT);
925 
926  G4LogicalVolume* logGiunz1FinalCollIORT = new G4LogicalVolume(solidGiunz1FinalCollIORT,
927  Giunz1FinalCollMaterialIORT, "Giunz1FinalCollIORT", 0, 0, 0);
928 
929  physiGiunz1FinalCollIORT = new G4PVPlacement(G4Transform3D(rm5, G4ThreeVector((Giunz1FinalCollXPositionIORT),0.,0.)),
930  "Giunz1FinalCollIORT", logGiunz1FinalCollIORT, physicalTreatmentRoom, false, 0);
931 
932  logGiunz1FinalCollIORT -> SetVisAttributes(gray);
933 
934 }
935 
937 {
938 // -----------------------//
939  // FINAL COLLIMATOR IORT //
940  //------------------------//
941 
942  // const G4double outRadiusFinalCollimatorIORT = 40. *mm;
943  // const G4double innRadiusFinalCollimatorIORT = 35. *mm;
944  const G4double hightFinalCollimatorIORT = 334. *mm;
945  const G4double startAngleFinalCollimatorIORT = 0.*deg;
946  const G4double spanningAngleFinalCollimatorIORT = 360.*deg;
947  const G4double finalCollimatorXPositionIORT = -389.*mm;
948 
949 
950 
951 
952  G4double phi6 = 90. *deg;
953 
954 
956  rm6.rotateY(phi6);
957 
958 
959  solidFinalCollimatorIORT = new G4Tubs("FinalCollimatorIORT", innerRadiusFinalCollimatorIORT,
960  OuterRadiusFinalCollimatorIORT,
961  hightFinalCollimatorIORT,
962  startAngleFinalCollimatorIORT,
963  spanningAngleFinalCollimatorIORT);
964 
965  G4LogicalVolume* logFinalCollimatorIORT = new G4LogicalVolume(solidFinalCollimatorIORT,
966  finalCollimatorMaterialIORT, "FinalCollimatorIORT", 0, 0, 0);
967 
968  physiFinalCollimatorIORT = new G4PVPlacement(G4Transform3D(rm6, G4ThreeVector((finalCollimatorXPositionIORT),0.,0.)),
969  "FinalCollimatorIORT", logFinalCollimatorIORT, physicalTreatmentRoom, false, 0);
970 
971  // logFinalCollimatorIORT -> SetVisAttributes(G4VisAttributes::Invisible);
972  logFinalCollimatorIORT -> SetVisAttributes(darkOrange3);
973 }
974 
978 
979 
981 {
982  solidFinalCollimatorIORT -> SetInnerRadius(value);
983  G4RunManager::GetRunManager() -> GeometryHasBeenModified();
984  G4cout<<"Inner Radius of the final collimator IORT is (mm):"
985  << solidFinalCollimatorIORT -> GetInnerRadius()/mm
986  << G4endl;
987 }
988 
990 
992 {
993  solidFinalCollimatorIORT -> SetOuterRadius(value);
994  G4RunManager::GetRunManager() -> GeometryHasBeenModified();
995  G4cout<<"Outer Radius of the final collimator IORT is (mm):"
996  << solidFinalCollimatorIORT -> GetOuterRadius()/mm
997  << G4endl;
998 }
999 
1001 
1002 
1003