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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/electromagnetic/TestEm10/src/DetectorALICE06.cc (Version 11.3.0) and /examples/extended/electromagnetic/TestEm10/src/DetectorALICE06.cc (Version 4.0)


  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 /// \file electromagnetic/TestEm10/src/Detecto    
 27 /// \brief Implementation of the DetectorALICE    
 28 //                                                
 29 //                                                
 30 //                                                
 31 //                                                
 32                                                   
 33 #include "DetectorALICE06.hh"                     
 34                                                   
 35 #include "Materials.hh"                           
 36 #include "SensitiveDetector.hh"                   
 37                                                   
 38 #include "G4Box.hh"                               
 39 #include "G4FieldManager.hh"                      
 40 #include "G4LogicalVolume.hh"                     
 41 #include "G4Material.hh"                          
 42 #include "G4PVPlacement.hh"                       
 43 #include "G4Region.hh"                            
 44 #include "G4SDManager.hh"                         
 45 #include "G4SystemOfUnits.hh"                     
 46 #include "G4TransportationManager.hh"             
 47 #include "G4UniformMagField.hh"                   
 48 #include "G4UnitsTable.hh"                        
 49 #include "G4ios.hh"                               
 50                                                   
 51 #include <cmath>                                  
 52                                                   
 53 //....oooOO0OOooo........oooOO0OOooo........oo    
 54                                                   
 55 DetectorALICE06::DetectorALICE06() : fRadiator    
 56                                                   
 57 //....oooOO0OOooo........oooOO0OOooo........oo    
 58                                                   
 59 DetectorALICE06::~DetectorALICE06()               
 60 {                                                 
 61   // delete fRadiatorDescription;                 
 62   // the description is deleted in detector co    
 63 }                                                 
 64                                                   
 65 //....oooOO0OOooo........oooOO0OOooo........oo    
 66                                                   
 67 G4VPhysicalVolume* DetectorALICE06::Construct(    
 68 {                                                 
 69   // Geometry parameters                          
 70   //                                              
 71                                                   
 72   G4cout << "DetectorALICE06 setup" << G4endl;    
 73                                                   
 74   G4double worldSizeZ = 600. * cm;                
 75   G4double worldSizeR = 22. * cm;                 
 76                                                   
 77   // Radiator and detector parameters             
 78                                                   
 79   G4double radThickness = 0.020 * mm;             
 80   G4double gasGap = 0.500 * mm;                   
 81   G4double foilGasRatio = radThickness / (radT    
 82   G4int foilNumber = 120;                         
 83                                                   
 84   G4double absorberThickness = 37 * mm;           
 85   G4double absorberRadius = 100. * mm;            
 86                                                   
 87   G4double electrodeThick = 100.0 * micrometer    
 88   G4double pipeLength = 160.0 * cm;               
 89   G4double mylarThick = 20.0 * micrometer;        
 90   G4double detGap = 0.01 * mm;                    
 91                                                   
 92   G4double startZ = 100.0 * mm;                   
 93                                                   
 94   // Materials                                    
 95   //                                              
 96                                                   
 97   // Change to create materials using NIST        
 98   G4Material* air = Materials::GetInstance()->    
 99   G4Material* ch2 = Materials::GetInstance()->    
100   G4Material* xe15CO2 = Materials::GetInstance    
101                                                   
102   G4double foilDensity = ch2->GetDensity();       
103   G4double gasDensity = air->GetDensity();        
104   G4double totDensity = foilDensity * foilGasR    
105                                                   
106   G4double fractionFoil = foilDensity * foilGa    
107   G4double fractionGas = 1.0 - fractionFoil;      
108   G4Material* radiatorMat = new G4Material("ra    
109   radiatorMat->AddMaterial(ch2, fractionFoil);    
110   radiatorMat->AddMaterial(air, fractionGas);     
111                                                   
112   // Radiator description                         
113   fRadiatorDescription = new RadiatorDescripti    
114   fRadiatorDescription->fFoilMaterial = ch2;      
115   fRadiatorDescription->fGasMaterial = air;  /    
116   fRadiatorDescription->fFoilThickness = radTh    
117   fRadiatorDescription->fGasThickness = gasGap    
118   fRadiatorDescription->fFoilNumber = foilNumb    
119                                                   
120   G4Material* worldMaterial = air;  // CO2;       
121   G4Material* absorberMaterial = xe15CO2;         
122                                                   
123   // Volumes                                      
124   //                                              
125                                                   
126   G4VSolid* solidWorld = new G4Box("World", wo    
127                                                   
128   G4LogicalVolume* logicWorld = new G4LogicalV    
129                                                   
130   G4VPhysicalVolume* physicsWorld =               
131     new G4PVPlacement(0, G4ThreeVector(), "Wor    
132                                                   
133   // TR radiator envelope                         
134                                                   
135   G4double radThick = foilNumber * (radThickne    
136   G4double radZ = startZ + 0.5 * radThick;        
137                                                   
138   G4VSolid* solidRadiator =                       
139     new G4Box("Radiator", 1.1 * absorberRadius    
140                                                   
141   G4LogicalVolume* logicRadiator = new G4Logic    
142                                                   
143   new G4PVPlacement(0, G4ThreeVector(0, 0, rad    
144                     0);                           
145                                                   
146   fRadiatorDescription->fLogicalVolume = logic    
147                                                   
148   // Create region for radiator                   
149                                                   
150   G4Region* radRegion = new G4Region("XTRradia    
151   radRegion->AddRootLogicalVolume(logicRadiato    
152                                                   
153   // Drift Electrode on both sides of Radiator    
154   // (not placed)                                 
155                                                   
156   G4double zElectrode1 = radZ - radThick / 2.     
157   G4double zElectrode2 = radZ + radThick / 2.     
158                                                   
159   G4cout << "zElectrode1 = " << zElectrode1 /     
160   G4cout << "zElectrode2 = " << zElectrode2 /     
161   G4cout << "fElectrodeThick = " << electrodeT    
162                                                   
163   // Helium Pipe                                  
164   // (not placed)                                 
165                                                   
166   // Distance between pipe and radiator / abso    
167   G4double pipeDist = 1. * cm;                    
168   G4double zPipe = zElectrode2 + electrodeThic    
169                                                   
170   G4cout << "zPipe = " << zPipe / mm << " mm"     
171   G4cout << "pipeLength = " << pipeLength / mm    
172                                                   
173   // Mylar Foil on both sides of helium pipe      
174   // (not placed)                                 
175                                                   
176   G4double zMylar1 = zPipe - pipeLength / 2. -    
177   G4double zMylar2 = zPipe + pipeLength / 2. +    
178                                                   
179   G4cout << "zMylar1 = " << zMylar1 / mm << "     
180   G4cout << "zMylar2 = " << zMylar2 / mm << "     
181   G4cout << "fMylarThick = " << mylarThick / m    
182                                                   
183   // Mylar Foil on Chamber                        
184   // (not placed)                                 
185                                                   
186   G4double zMylar = zElectrode2 + electrodeThi    
187   zMylar += (pipeLength + pipeDist);              
188                                                   
189   G4cout << "zMylar = " << zMylar / mm << " mm    
190   G4cout << "mylarThick = " << mylarThick / mm    
191                                                   
192   // Absorber                                     
193                                                   
194   G4double absorberZ = zMylar + mylarThick + a    
195                                                   
196   G4VSolid* solidAbsorber = new G4Box("Absorbe    
197                                                   
198   G4LogicalVolume* logicAbsorber = new G4Logic    
199                                                   
200   new G4PVPlacement(0, G4ThreeVector(0., 0., a    
201                     false, 0);                    
202                                                   
203   G4Region* regGasDet = new G4Region("XTRdEdxD    
204   regGasDet->AddRootLogicalVolume(logicAbsorbe    
205                                                   
206   // Sensitive Detectors: Absorber                
207                                                   
208   SensitiveDetector* sd = new SensitiveDetecto    
209   G4SDManager::GetSDMpointer()->AddNewDetector    
210   logicAbsorber->SetSensitiveDetector(sd);        
211                                                   
212   // Print geometry parameters                    
213                                                   
214   G4cout << "\n The  WORLD   is made of " << w    
215          << worldMaterial->GetName();             
216   G4cout << ", the transverse size (R) of the     
217   G4cout << " The ABSORBER is made of " << abs    
218          << absorberMaterial->GetName();          
219   G4cout << ", the transverse size (R) is " <<    
220   G4cout << " Z position of the (middle of the    
221                                                   
222   G4cout << "radZ = " << radZ / mm << " mm" <<    
223   G4cout << "startZ = " << startZ / mm << " mm    
224                                                   
225   G4cout << "fRadThick = " << radThick / mm <<    
226   G4cout << "fFoilNumber = " << foilNumber <<     
227   G4cout << "fRadiatorMat = " << radiatorMat->    
228   G4cout << "WorldMaterial = " << worldMateria    
229   G4cout << G4endl;                               
230                                                   
231   return physicsWorld;                            
232 }                                                 
233                                                   
234 //....oooOO0OOooo........oooOO0OOooo........oo    
235