Geant4  10.00.p02
XrayFluoDetectorConstruction.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: XrayFluoDetectorConstruction.hh
28 // GEANT4 tag $Name: xray_fluo-V03-02-00
29 //
30 // Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
31 //
32 // History:
33 // -----------
34 // 28 Nov 2001 Elena Guardincerri Created
35 // Nov 2002 Alfonso Mantero materials added, Material selection implementation
36 // 16 Jul 2003 Alfonso Mantero Detector type selection added + minor fixes
37 // 21 Aug 2003 Alfonso Mantero Material Management moved to XrayFluoMaterials
38 //
39 // -------------------------------------------------------------------
40 
41 #ifndef XrayFluoDetectorConstruction_hh
42 #define XrayFluoDetectorConstruction_hh 1
43 
44 #include <CLHEP/Units/SystemOfUnits.h>
45 
46 #include "globals.hh"
47 #include "G4RotationMatrix.hh"
49 #include "G4Navigator.hh"
50 
53 #include "XrayFluoSD.hh"
54 #include "XrayFluoGeometry.hh"
55 
56 class G4Box;
57 class G4Tubs;
58 class G4Sphere;
59 class G4LogicalVolume;
60 class G4VPhysicalVolume;
61 class G4Material;
64 
65 //class XrayFluoSD;
66 //class XrayFluoVDetectorType;
67 
68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
69 
71 {
72 public:
73 
74 
76 
77 public:
78 
80 
81  void UpdateGeometry();
82 
84 
85  void SetSampleMaterial(G4String newMaterial);
86 
87  void SetDetectorType(G4String type);
88 
90 
91  inline void SetSampleGranularity(G4bool granularity)
92  {sampleGranularity = granularity;};
93 
94  inline void PhaseSpaceOn()
95  {phaseSpaceFlag = true;};
96 
97  inline void PhaseSpaceOff()
98  {phaseSpaceFlag = false;};
99 
101  {return phaseSpaceFlag;};
102 
103  inline void SetGrainDia(G4double size)
104  {grainDia = size;};
105 
106  void DeleteGrainObjects();
107 
108 public:
109 
110  void PrintApparateParameters();
111 
113 
114 
117 
123 
127 
130 
133 
136 
138  const G4VPhysicalVolume* GetHPGe() {return physiHPGe;};
140  const G4VPhysicalVolume* GetDia1() {return physiDia1;};
141  const G4VPhysicalVolume* GetDia3() {return physiDia3;};
142 
147 private:
148 
150 
152 
154 
156 
159 
163 
164  G4Box* solidWorld; //pointer to the solid World
165  G4LogicalVolume* logicWorld; //pointer to the logical World
166  G4VPhysicalVolume* physiWorld; //pointer to the physical World
167 
168  G4Box* solidHPGe; //pointer to the solid Sensor
169  G4LogicalVolume* logicHPGe; //pointer to the logical Sensor
170  G4VPhysicalVolume* physiHPGe; //pointer to the physical Sensor
171 
172  G4Box* solidSample; //pointer to the solid Sample
173  G4LogicalVolume* logicSample; //pointer to the logical Sample
174  G4VPhysicalVolume* physiSample; //pointer to the physical Sample
175 
176  G4Tubs* solidDia1; //pointer to the solid Diaphragm
177  G4LogicalVolume* logicDia1; //pointer to the logical Diaphragm
178  G4VPhysicalVolume* physiDia1; //pointer to the physical Diaphragm
179 
180  G4Tubs* solidDia3; //pointer to the solid Diaphragm
181  G4LogicalVolume* logicDia3; //pointer to the logical Diaphragm
182  G4VPhysicalVolume* physiDia3; //pointer to the physical Diaphragm
183 
187 
188  G4Box* solidWindow; // added
191 
195 
199 
203 
204 
205  //materials management
207 
216 
217 
218  //apparate parameters
219 
221 
223 
225 
232 
233 
234 
237 
238 public:
239 
244 
245  // GetSampleIlluminatedFacecoord();
246  // GetSampleShadowedFaceCoord();
247  // GetSampleXplusFaceCoord();
248  // GetSampleXminusFaceCoord();
249  // GetSampleYplusFaceCoord();
250  // GetSampleYminusFaceCoord();
251 
253 
254 private:
255 
265  // G4double DistSi;
266 public:
267 
268 
271 
274 
277 
278 
279 private:
280 
281 
285 
294 
295 
301 
302 
303  XrayFluoDetectorMessenger* detectorMessenger; //pointer to the Messenger
304 
305  XrayFluoSD* HPGeSD; //pointer to the sensitive detector
306 
308 
309 
310 private:
311 
312  void DefineDefaultMaterials();
314 
315  //calculates some quantities used to construct geometry
317 
318 };
319 
320 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
321 
323 {
324  // Compute derived parameters of the apparate
325 
326  if (phaseSpaceFlag) {
327 
328  WorldSizeZ = 10 *CLHEP::m;
329  WorldSizeXY = 10 *CLHEP::m;
330 
331  }
332  else {
333 
335 
336  G4cout << "DeviceThickness(cm): "<< DeviceThickness/CLHEP::cm << G4endl;
337 
340 
341  G4cout << "DeviceSizeX(cm): "<< DeviceSizeX/CLHEP::cm <<G4endl;
342  G4cout << "DeviceSizeY(cm): "<< DeviceSizeY/CLHEP::cm << G4endl;
343 
345  WorldSizeXY = 2 * (DistDe +1.4142 *Dia1SizeXY)+5*CLHEP::m;
346 
347  }
348 }
349 
350 #endif
static const double cm
Definition: G4SIunits.hh:106
const G4VPhysicalVolume * GetphysiPixel()
XrayFluoDetectorMessenger * detectorMessenger
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepRotation G4RotationMatrix
Definition: G4Box.hh:64
Definition: G4Tubs.hh:85
int G4int
Definition: G4Types.hh:78
static XrayFluoDetectorConstruction * GetInstance()
const G4VPhysicalVolume * GetOhmicPos()
void SetSampleMaterial(G4String newMaterial)
G4GLOB_DLL std::ostream G4cout
const G4VPhysicalVolume * GetphysiWorld()
bool G4bool
Definition: G4Types.hh:79
const G4VPhysicalVolume * GetOhmicNeg()
T max(const T t1, const T t2)
brief Return the largest of the two arguments
static XrayFluoDetectorConstruction * instance
#define G4endl
Definition: G4ios.hh:61
static const double m
Definition: G4SIunits.hh:110
double G4double
Definition: G4Types.hh:76
void SetSampleGranularity(G4bool granularity)