Geant4  10.02.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 "globals.hh"
45 #include "G4RotationMatrix.hh"
47 #include "G4Navigator.hh"
48 #include "G4Cache.hh"
49 
52 #include "XrayFluoSD.hh"
53 #include "XrayFluoGeometry.hh"
54 
55 class G4Box;
56 class G4Tubs;
57 class G4Sphere;
58 class G4LogicalVolume;
59 class G4VPhysicalVolume;
60 class G4Material;
63 
64 //class XrayFluoSD;
65 //class XrayFluoVDetectorType;
66 
67 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
68 
70 {
71 public:
72 
73 
75 
76 public:
77 
79 
80  void ConstructSDandField();
81 
82  void UpdateGeometry();
83 
85 
86  void SetSampleMaterial(G4String newMaterial);
87 
88  void SetDetectorType(G4String type);
89 
91 
92  inline void SetSampleGranularity(G4bool granularity)
93  {sampleGranularity = granularity;};
94 
95  inline void PhaseSpaceOn()
96  {phaseSpaceFlag = true;};
97 
98  inline void PhaseSpaceOff()
99  {phaseSpaceFlag = false;};
100 
101  inline G4bool GetPhaseSpaceFlag() const
102  {return phaseSpaceFlag;};
103 
104  inline void SetGrainDia(G4double size)
105  {grainDia = size;};
106 
107  void DeleteGrainObjects();
108 
109 public:
110 
111  void PrintApparateParameters();
112 
114 
115 
116  G4double GetWorldSizeZ() const {return WorldSizeZ;};
118 
124 
125  G4int GetNbOfPixels() const {return NbOfPixels;};
128 
131 
134 
137 
138  const G4VPhysicalVolume* GetphysiWorld() const {return physiWorld;};
139  const G4VPhysicalVolume* GetHPGe() const {return physiHPGe;};
140  const G4VPhysicalVolume* GetSample() const {return physiSample;};
141  const G4VPhysicalVolume* GetDia1() const {return physiDia1;};
142  const G4VPhysicalVolume* GetDia3() const {return physiDia3;};
143 
144  const G4VPhysicalVolume* GetphysiPixel() const {return physiPixel;};
145  const G4VPhysicalVolume* GetOhmicPos() const {return physiOhmicPos;};
146  const G4VPhysicalVolume* GetOhmicNeg() const {return physiOhmicNeg;};
147  const G4VPhysicalVolume* GetWindow () const {return physiWindow ;};
148 private:
149 
151 
153 
155 
157 
160 
164 
165  G4Box* solidWorld; //pointer to the solid World
166  G4LogicalVolume* logicWorld; //pointer to the logical World
167  G4VPhysicalVolume* physiWorld; //pointer to the physical World
168 
169  G4Box* solidHPGe; //pointer to the solid Sensor
170  G4LogicalVolume* logicHPGe; //pointer to the logical Sensor
171  G4VPhysicalVolume* physiHPGe; //pointer to the physical Sensor
172 
173  G4Box* solidSample; //pointer to the solid Sample
174  G4LogicalVolume* logicSample; //pointer to the logical Sample
175  G4VPhysicalVolume* physiSample; //pointer to the physical Sample
176 
177  G4Tubs* solidDia1; //pointer to the solid Diaphragm
178  G4LogicalVolume* logicDia1; //pointer to the logical Diaphragm
179  G4VPhysicalVolume* physiDia1; //pointer to the physical Diaphragm
180 
181  G4Tubs* solidDia3; //pointer to the solid Diaphragm
182  G4LogicalVolume* logicDia3; //pointer to the logical Diaphragm
183  G4VPhysicalVolume* physiDia3; //pointer to the physical Diaphragm
184 
188 
189  G4Box* solidWindow; // added
192 
196 
200 
204 
205 
206  //materials management
208 
217 
218 
219  //apparate parameters
220 
222 
224 
226 
233 
234 
235 
238 
239 public:
240 
245 
246 
248 
249 private:
250 
260  // G4double DistSi;
261 public:
262 
263 
266 
268  G4double GetDia1SizeXY() const {return Dia1SizeXY;};
269 
271  G4double GetDia3SizeXY() const {return Dia3SizeXY;};
272 
273 
274 private:
275 
276 
280 
289 
290 
296 
297 
298  XrayFluoDetectorMessenger* detectorMessenger; //pointer to the Messenger
299 
300  G4Cache<XrayFluoSD*> HPGeSD; //pointer to the sensitive detector
301 
303 
304 
305 private:
306 
307  void DefineDefaultMaterials();
309 
310  //calculates some quantities used to construct geometry
312 
313 };
314 
315 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
316 
318 {
319  // Compute derived parameters of the apparate
320 
321  if (phaseSpaceFlag) {
322 
323  WorldSizeZ = 10 *CLHEP::m;
324  WorldSizeXY = 10 *CLHEP::m;
325 
326  }
327  else {
328 
330 
331  G4cout << "DeviceThickness(cm): "<< DeviceThickness/CLHEP::cm << G4endl;
332 
335 
336  G4cout << "DeviceSizeX(cm): "<< DeviceSizeX/CLHEP::cm <<G4endl;
337  G4cout << "DeviceSizeY(cm): "<< DeviceSizeY/CLHEP::cm << G4endl;
338 
340  WorldSizeXY = 2 * (DistDe +1.4142 *Dia1SizeXY)+5*CLHEP::m;
341 
342  }
343 }
344 
345 #endif
static const double cm
Definition: G4SIunits.hh:118
const G4VPhysicalVolume * GetOhmicPos() const
XrayFluoDetectorMessenger * detectorMessenger
CLHEP::Hep3Vector G4ThreeVector
const G4VPhysicalVolume * GetHPGe() const
CLHEP::HepRotation G4RotationMatrix
Definition: G4Box.hh:64
Definition: G4Tubs.hh:85
const G4VPhysicalVolume * GetOhmicNeg() const
int G4int
Definition: G4Types.hh:78
static XrayFluoDetectorConstruction * GetInstance()
const G4VPhysicalVolume * GetWindow() const
XrayFluoVDetectorType * GetDetectorType() const
void SetSampleMaterial(G4String newMaterial)
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
const G4VPhysicalVolume * GetDia1() const
const G4VPhysicalVolume * GetSample() const
const G4VPhysicalVolume * GetphysiPixel() const
const G4VPhysicalVolume * GetphysiWorld() const
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:128
double G4double
Definition: G4Types.hh:76
const G4VPhysicalVolume * GetDia3() const
void SetSampleGranularity(G4bool granularity)