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] [ 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/extended/eventgenerator/exgps/src/GeometryConstruction.cc (Version 11.3.0) and /examples/extended/eventgenerator/exgps/src/GeometryConstruction.cc (Version 9.2.p4)


  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 //                                                
 27 /// \file eventgenerator/exgps/src/GeometryCon    
 28 /// \brief Implementation of the GeometryConst    
 29 //                                                
 30 //....oooOO0OOooo........oooOO0OOooo........oo    
 31 //....oooOO0OOooo........oooOO0OOooo........oo    
 32                                                   
 33 #include "GeometryConstruction.hh"                
 34                                                   
 35 #include "G4Box.hh"                               
 36 #include "G4Colour.hh"                            
 37 #include "G4Element.hh"                           
 38 #include "G4LogicalVolume.hh"                     
 39 #include "G4Material.hh"                          
 40 #include "G4PVPlacement.hh"                       
 41 #include "G4PhysicalConstants.hh"                 
 42 #include "G4Sphere.hh"                            
 43 #include "G4SystemOfUnits.hh"                     
 44 #include "G4ThreeVector.hh"                       
 45 #include "G4VisAttributes.hh"                     
 46                                                   
 47 //....oooOO0OOooo........oooOO0OOooo........oo    
 48                                                   
 49 GeometryConstruction::GeometryConstruction()      
 50   : G4VUserDetectorConstruction(), fUniverse_p    
 51 {                                                 
 52   ;                                               
 53 }                                                 
 54                                                   
 55 //....oooOO0OOooo........oooOO0OOooo........oo    
 56                                                   
 57 GeometryConstruction::~GeometryConstruction()     
 58 {                                                 
 59   ;                                               
 60 }                                                 
 61                                                   
 62 //....oooOO0OOooo........oooOO0OOooo........oo    
 63                                                   
 64 G4VPhysicalVolume* GeometryConstruction::Const    
 65 {                                                 
 66   //                                              
 67   //                                              
 68   // Define materials.                            
 69   //                                              
 70   G4double a, z, density, pressure, temperatur    
 71   G4String name, symbol;                          
 72                                                   
 73   density = universe_mean_density;  // from Ph    
 74   pressure = 3.e-18 * pascal;                     
 75   temperature = 2.73 * kelvin;                    
 76   G4Material* Vacuum =                            
 77     new G4Material("Vacuum", 1., 1.01 * g / mo    
 78   a = 26.98154 * g / mole;                        
 79   density = 2.70 * g / cm3;                       
 80   G4Material* Aluminium = new G4Material(name     
 81                                                   
 82   a = 28.0855 * g / mole;                         
 83   G4Element* elSi = new G4Element(name = "sili    
 84                                                   
 85   a = 16.00 * g / mole;                           
 86   G4Element* elO = new G4Element(name = "Oxyge    
 87                                                   
 88   density = 2.65 * g / cm3;                       
 89   G4Material* SiliconDioxide = new G4Material(    
 90   SiliconDioxide->AddElement(elSi, 1);            
 91   SiliconDioxide->AddElement(elO, 2);             
 92   //                                              
 93   // Define size of world and volumes in it.      
 94   //                                              
 95   G4double world_r = 18 * cm;                     
 96                                                   
 97   G4double box_x = 10 * cm;                       
 98   G4double box_y = 10 * cm;                       
 99   G4double box_z = 10 * cm;                       
100                                                   
101   G4double sphere_r = 5 * cm;                     
102                                                   
103   // Define bodies, logical volumes and physic    
104   // First define the experimental hall.          
105   //                                              
106   G4Sphere* universe_s = new G4Sphere("univers    
107   G4LogicalVolume* universe_log = new G4Logica    
108   //                                              
109   fUniverse_phys = new G4PVPlacement(0, G4Thre    
110                                                   
111   // define an aluminium box                      
112   //                                              
113   G4Box* Al_box = new G4Box("Al_b", box_x, box    
114   G4LogicalVolume* Al_log = new G4LogicalVolum    
115   //                                              
116   fAl_phys =                                      
117     new G4PVPlacement(0, G4ThreeVector(0., 0.,    
118                                                   
119   // Define an inner sphere.                      
120   //                                              
121   G4Sphere* aSphere_sph = new G4Sphere("aSpher    
122   G4LogicalVolume* aSphere_log =                  
123     new G4LogicalVolume(aSphere_sph, SiliconDi    
124   //                                              
125   fSphere_phys =                                  
126     new G4PVPlacement(0, G4ThreeVector(0., 0.,    
127                                                   
128   //--------- Visualization attributes -------    
129   universe_log->SetVisAttributes(G4VisAttribut    
130   G4VisAttributes* aVisAtt = new G4VisAttribut    
131   Al_log->SetVisAttributes(aVisAtt);              
132   G4VisAttributes* bVisAtt = new G4VisAttribut    
133   aSphere_log->SetVisAttributes(bVisAtt);         
134                                                   
135   return fUniverse_phys;                          
136 }                                                 
137                                                   
138 //....oooOO0OOooo........oooOO0OOooo........oo    
139