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


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