Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/advanced/iort_therapy/src/Collimator70BeamLine.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/advanced/iort_therapy/src/Collimator70BeamLine.cc (Version 11.3.0) and /examples/advanced/iort_therapy/src/Collimator70BeamLine.cc (Version 9.5.p2)


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