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.5.p1)


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