Geant4 Cross Reference

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


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