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 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/xray_fluorescence/include/XrayFluoMercuryDetectorConstruction.hh (Version 11.3.0) and /examples/advanced/xray_fluorescence/include/XrayFluoMercuryDetectorConstruction.hh (Version 4.1)


  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 //                                                
 28 // Author: Alfonso Mantero (Alfonso.Mantero@ge    
 29 //                                                
 30 // History:                                       
 31 // -----------                                    
 32 //                                                
 33 //  08 Sep 2003  Alfonso Mantero created          
 34 //                                                
 35 // -------------------------------------------    
 36                                                   
 37 #ifndef XrayFluoMercuryDetectorConstruction_hh    
 38 #define XrayFluoMercuryDetectorConstruction_hh    
 39                                                   
 40 #include "globals.hh"                             
 41 #include "G4VUserDetectorConstruction.hh"         
 42 #include "G4RotationMatrix.hh"                    
 43 #include "G4Cache.hh"                             
 44 #include "XrayFluoSiLiDetectorType.hh"            
 45 #include "XrayFluoHPGeDetectorType.hh"            
 46 #include "XrayFluoSD.hh"                          
 47                                                   
 48 class G4Box;                                      
 49 class G4Tubs;                                     
 50 class G4Sphere;                                   
 51 class G4LogicalVolume;                            
 52 class G4VPhysicalVolume;                          
 53 class G4Material;                                 
 54 class XrayFluoMercuryDetectorMessenger;           
 55 class XrayFluoNistMaterials;                      
 56                                                   
 57 //class XrayFluoSD;                               
 58 //class XrayFluoVDetectorType;                    
 59                                                   
 60 //....oooOO0OOooo........oooOO0OOooo........oo    
 61                                                   
 62 class XrayFluoMercuryDetectorConstruction : pu    
 63 {                                                 
 64 public:                                           
 65                                                   
 66                                                   
 67   ~XrayFluoMercuryDetectorConstruction();         
 68                                                   
 69 public:                                           
 70                                                   
 71   G4VPhysicalVolume* Construct();                 
 72                                                   
 73   void ConstructSDandField();                     
 74                                                   
 75   void UpdateGeometry();                          
 76                                                   
 77                                                   
 78   void SetMercuryMaterial(G4String newMaterial    
 79                                                   
 80   void SetDetectorType(G4String type);            
 81                                                   
 82   static XrayFluoMercuryDetectorConstruction*     
 83                                                   
 84   inline void SetOribitHeight(G4double size)      
 85   {distDe = size;};                               
 86   inline void SetLatitude(G4double lat)           
 87   {ThetaHPGe = 180.* CLHEP::deg - lat;};          
 88                                                   
 89   void PrintApparateParameters();                 
 90                                                   
 91   XrayFluoVDetectorType* GetDetectorType() con    
 92                                                   
 93                                                   
 94   G4double GetWorldSizeZ() const     {return W    
 95   G4double GetWorldSizeXY() const         {ret    
 96                                                   
 97   G4double GetDeviceThickness() const     {ret    
 98   G4double GetDeviceSizeX() const         {ret    
 99   G4double GetDeviceSizeY() const         {ret    
100   G4double GetPixelSizeXY() const         {ret    
101   G4double GetContactSizeXY() const         {r    
102                                                   
103   G4int GetNbOfPixels() const  {return NbOfPix    
104   G4int GetNbOfPixelRows() const    {return Nb    
105   G4int GetNbOfPixelColumns() const        {re    
106                                                   
107   G4Material* GetOhmicPosMaterial() const  {re    
108   G4double    GetOhmicPosThickness() const {re    
109                                                   
110   G4Material* GetOhmicNegMaterial() const  {re    
111   G4double    GetOhmicNegThickness() const {re    
112                                                   
113   const G4VPhysicalVolume* GetphysiWorld() con    
114   const G4VPhysicalVolume* GetHPGe() const        
115   const G4VPhysicalVolume* GetMercury() const     
116                                                   
117   const G4VPhysicalVolume* GetphysiPixel() con    
118   const G4VPhysicalVolume* GetOhmicPos() const    
119   const G4VPhysicalVolume* GetOhmicNeg() const    
120                                                   
121   const G4VPhysicalVolume* GetOptic() const       
122                                                   
123 private:                                          
124                                                   
125   XrayFluoMercuryDetectorConstruction();          
126                                                   
127   static XrayFluoMercuryDetectorConstruction*     
128                                                   
129   XrayFluoVDetectorType* detectorType;            
130                                                   
131   G4bool mercuryGranularity;                      
132                                                   
133   G4double           DeviceSizeX;                 
134   G4double           DeviceSizeY;                 
135   G4double           DeviceThickness;             
136                                                   
137   G4Box*             solidWorld;    //pointer     
138   G4LogicalVolume*   logicWorld;    //pointer     
139   G4VPhysicalVolume* physiWorld;    //pointer     
140                                                   
141   G4Box*             solidHPGe; //pointer to t    
142   G4LogicalVolume*   logicHPGe; //pointer to t    
143   G4VPhysicalVolume* physiHPGe; //pointer to t    
144                                                   
145   G4Box*             solidScreen; //pointer to    
146   G4LogicalVolume*   logicScreen; //pointer to    
147   G4VPhysicalVolume* physiScreen; //pointer to    
148                                                   
149   G4Sphere*             solidMercury;    //poi    
150   G4LogicalVolume*   logicMercury;    //pointe    
151   G4VPhysicalVolume* physiMercury;    //pointe    
152                                                   
153   //  G4Tubs*             solidDia1; //pointer    
154   //  G4LogicalVolume*   logicDia1; //pointer     
155   //  G4VPhysicalVolume* physiDia1; //pointer     
156                                                   
157   //  G4Tubs*             solidDia3; //pointer    
158   //  G4LogicalVolume*   logicDia3; //pointer     
159   //  G4VPhysicalVolume* physiDia3; //pointer     
160                                                   
161   G4Box*             solidOhmicPos;               
162   G4LogicalVolume*   logicOhmicPos;               
163   G4VPhysicalVolume* physiOhmicPos;               
164                                                   
165   G4Box*             solidOhmicNeg;               
166   G4LogicalVolume*   logicOhmicNeg;               
167   G4VPhysicalVolume* physiOhmicNeg;               
168                                                   
169   G4Box*             solidPixel;                  
170   G4LogicalVolume*   logicPixel;                  
171   G4VPhysicalVolume* physiPixel;                  
172                                                   
173   G4Tubs*            solidOptic;                  
174   G4LogicalVolume*   logicOptic;                  
175   G4VPhysicalVolume* physiOptic;                  
176                                                   
177   G4LogicalVolume*   logicGrain;                  
178                                                   
179   //materials management                          
180   XrayFluoNistMaterials* materials;               
181                                                   
182   G4Material*          screenMaterial;            
183   G4Material*        OhmicPosMaterial;            
184   G4Material*        OhmicNegMaterial;            
185   G4Material*           pixelMaterial;            
186   G4Material*         mercuryMaterial;            
187   //  G4Material*        Dia3Material;            
188   G4Material*         defaultMaterial;            
189                                                   
190   //apparate parameters                           
191                                                   
192   G4double           OhmicPosThickness;           
193   G4double           OhmicNegThickness;           
194                                                   
195   G4double           opticDia;                    
196   G4double           opticThickness;              
197                                                   
198   G4double           screenSizeXY;                
199   G4double           screenThickness;             
200                                                   
201   G4int              PixelCopyNb;                 
202   G4int              grainCopyNb;                 
203   G4int              NbOfPixels;                  
204   G4int              NbOfPixelRows;               
205   G4int              NbOfPixelColumns;            
206   G4double           PixelThickness;              
207   G4double           PixelSizeXY;                 
208   G4double           ContactSizeXY;               
209                                                   
210   G4double           opticAperture;               
211                                                   
212   G4double           mercuryDia;                  
213   G4double           sunDia;                      
214                                                   
215   G4double           mercurySunDistance;          
216                                                   
217   G4double           ThetaHPGe;                   
218                                                   
219   G4double           distDe;                      
220   G4double           distScreen;                  
221   G4double           distOptic;                   
222                                                   
223                                                   
224   G4double           PhiHPGe;                     
225                                                   
226   G4RotationMatrix   zRotPhiHPGe;                 
227                                                   
228   G4double           WorldSizeXY;                 
229   G4double           WorldSizeZ;                  
230                                                   
231                                                   
232   XrayFluoMercuryDetectorMessenger* detectorMe    
233                                                   
234   G4Cache<XrayFluoSD*> HPGeSD;  //pointer to t    
235                                                   
236 public:                                           
237                                                   
238   G4Material* GetMercuryMaterial() const {retu    
239   G4Material* GetPixelMaterial() const  {retur    
240                                                   
241   G4double GetMercuryDia()  const       {retur    
242   G4double GetSunDia() const {return sunDia;};    
243                                                   
244   //Inclinaton of the orbit respect Mercury re    
245                                                   
246   G4double GetOrbitInclination() const  {retur    
247   G4double GetOrbitDistance() const     {retur    
248   G4double GetOpticAperture() const {return op    
249                                                   
250                                                   
251                                                   
252 private:                                          
253                                                   
254   void DefineDefaultMaterials();                  
255   G4VPhysicalVolume* ConstructApparate();         
256                                                   
257   //calculates some quantities used to constru    
258   void ComputeApparateParameters();               
259                                                   
260 };                                                
261                                                   
262 //....oooOO0OOooo........oooOO0OOooo........oo    
263                                                   
264 inline void XrayFluoMercuryDetectorConstructio    
265 {                                                 
266   // Compute derived parameters of the apparat    
267                                                   
268   DeviceThickness = PixelThickness+OhmicNegThi    
269                                                   
270   ///G4cout << "DeviceThickness(cm): "<< Devic    
271                                                   
272   DeviceSizeY =(NbOfPixelRows * std::max(Conta    
273   DeviceSizeX =(NbOfPixelColumns * std::max(Co    
274                                                   
275   screenSizeXY = opticDia;                        
276                                                   
277   G4cout << "DeviceSizeX(cm): "<< DeviceSizeX/    
278   G4cout << "DeviceSizeY(cm): "<< DeviceSizeY/    
279                                                   
280   //******************************************    
281   //**  Astronomical distances reduce by a fac    
282   //******************************************    
283                                                   
284   WorldSizeZ = 2 * mercurySunDistance ;           
285   WorldSizeXY = (2 * distDe) + 2000 * CLHEP::k    
286   //WorldSizeZ = WorldSizeXY;                     
287 }                                                 
288                                                   
289 #endif                                            
290