Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/advanced/iort_therapy/src/Collimator80BeamLine.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/Collimator80BeamLine.cc (Version 11.3.0) and /examples/advanced/iort_therapy/src/Collimator80BeamLine.cc (Version 9.6.p4)


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