Geant4 Cross Reference

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


** Warning: Cannot open xref database.

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