Geant4  10.02
XrayFluoPlaneDetectorConstruction.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:
29 //
30 // Author: Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
31 //
32 // History:
33 // -----------
34 //
35 // 29 Aug 2003 Alfonso Mantero created
36 //
37 // -------------------------------------------------------------------
38 
39 #ifndef XrayFluoPlaneDetectorConstruction_hh
40 #define XrayFluoPlaneDetectorConstruction_hh 1
41 
42 #include "globals.hh"
43 #include "G4RotationMatrix.hh"
45 #include "G4Cache.hh"
46 
49 #include "XrayFluoSD.hh"
50 
51 class G4Box;
52 class G4Sphere;
53 class G4LogicalVolume;
54 class G4VPhysicalVolume;
55 class G4Material;
58 
59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
60 
62 {
63 public:
64 
65 
67 
68 public:
69 
71 
72  void ConstructSDandField();
73 
74  void UpdateGeometry();
75 
76 
77  void SetPlaneMaterial(G4String newMaterial);
78 
79  void SetDetectorType(G4String type);
80 
82 
83  inline void SetPlaneGranularity(G4bool granularity)
84  {planeGranularity = granularity;};
85 
86  inline void SetGrainDia(G4double size)
87  {grainDia = size;};
88 
89  void DeleteGrainObjects();
90 
91 public:
92 
94 
96 
97 
98  G4double GetWorldSizeZ() const {return WorldSizeZ;};
99  G4double GetWorldSizeXY() const {return WorldSizeXY;};
100 
106 
107  G4int GetNbOfPixels() const {return NbOfPixels;}; //mandatory for XrayFluoSD
110 
113 
116 
117  const G4VPhysicalVolume* GetphysiWorld() const {return physiWorld;};
118  const G4VPhysicalVolume* GetHPGe() const {return physiHPGe;};
119  const G4VPhysicalVolume* GetPlane() const {return physiPlane;};
120  // const G4VPhysicalVolume* GetDia1() {return physiDia1;};
121  // const G4VPhysicalVolume* GetDia3() {return physiDia3;};
122 
123  const G4VPhysicalVolume* GetphysiPixel() const {return physiPixel;};
124  const G4VPhysicalVolume* GetOhmicPos() const {return physiOhmicPos;};
125  const G4VPhysicalVolume* GetOhmicNeg() const {return physiOhmicNeg;};
126 
127 private:
128 
130 
132 
134 
136 
140 
141  G4Box* solidWorld; //pointer to the solid World
142  G4LogicalVolume* logicWorld; //pointer to the logical World
143  G4VPhysicalVolume* physiWorld; //pointer to the physical World
144 
145  G4Box* solidHPGe; //pointer to the solid Sensor
146  G4LogicalVolume* logicHPGe; //pointer to the logical Sensor
147  G4VPhysicalVolume* physiHPGe; //pointer to the physical Sensor
148 
149  G4Box* solidScreen; //pointer to the solid Screen
150  G4LogicalVolume* logicScreen; //pointer to the logical Screen
151  G4VPhysicalVolume* physiScreen; //pointer to the physical Screen
152 
153  G4Box* solidPlane; //pointer to the solid Plane
154  G4LogicalVolume* logicPlane; //pointer to the logical Plane
155  G4VPhysicalVolume* physiPlane; //pointer to the physical Plane
156 
157  // G4Tubs* solidDia1; //pointer to the solid Diaphragm
158  // G4LogicalVolume* logicDia1; //pointer to the logical Diaphragm
159  // G4VPhysicalVolume* physiDia1; //pointer to the physical Diaphragm
160 
161  // G4Tubs* solidDia3; //pointer to the solid Diaphragm
162  // G4LogicalVolume* logicDia3; //pointer to the logical Diaphragm
163  // G4VPhysicalVolume* physiDia3; //pointer to the physical Diaphragm
164 
168 
172 
176 
180 
181  //materials management
183 
189  // G4Material* Dia1Material;
190  // G4Material* Dia3Material;
192 
193  //apparate parameters
194 
197 
200 
209 
213  // G4double Dia1Thickness;
214  // G4double Dia1SizeXY;
215  // G4double Dia3Thickness;
216  // G4double Dia3SizeXY;
217  // G4double DiaInnerSize;
218  // G4double Dia3InnerSize;
219 
220 
221 public:
222 
225  // G4Material* GetDia1Material() {return Dia1Material;};
226  // G4Material* GetDia3Material() {return Dia3Material;};
227 
230 
231 // G4double GetDia1Thickness() {return Dia1Thickness;};
232 // G4double GetDia1SizeXY() {return Dia1SizeXY;};
233 
234 // G4double GetDia3Thickness() {return Dia3Thickness;};
235 // G4double GetDia3SizeXY() {return Dia3SizeXY;};
236 
237 
238 private:
239 
240 
242 
245 
246  // G4double DistDia;
247  // G4double Dia3Dist;
249  // G4double PhiDia1;
250  // G4double PhiDia3;
251  // G4double AlphaDia1;
252  // G4double AlphaDia3;
253 
254 
256  // G4RotationMatrix zRotPhiDia1;
257  // G4RotationMatrix zRotPhiDia3;
260 
261 
263 
264  G4Cache<XrayFluoSD*> HPGeSD; //pointer to the sensitive detector
265 
266 private:
267 
268  void DefineDefaultMaterials();
270 
271  //calculates some quantities used to construct geometry
273 
274 };
275 
276 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
277 
279 {
280  // Compute derived parameters of the apparate
281 
283 
284  G4cout << "DeviceThickness(cm): "<< DeviceThickness/CLHEP::cm << G4endl;
285 
288 
290 
291  G4cout << "DeviceSizeX(cm): "<< DeviceSizeX/CLHEP::cm <<G4endl;
292  G4cout << "DeviceSizeY(cm): "<< DeviceSizeY/CLHEP::cm << G4endl;
293 
295  WorldSizeXY = (2 * (planeSizeXY))+ 5*CLHEP::m;
296 
297 }
298 
299 #endif
static const double cm
Definition: G4SIunits.hh:118
CLHEP::HepRotation G4RotationMatrix
Definition: G4Box.hh:64
XrayFluoVDetectorType * GetDetectorType() const
const G4VPhysicalVolume * GetOhmicNeg() const
int G4int
Definition: G4Types.hh:78
static XrayFluoPlaneDetectorConstruction * GetInstance()
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
XrayFluoPlaneDetectorMessenger * detectorMessenger
static XrayFluoPlaneDetectorConstruction * instance
T max(const T t1, const T t2)
brief Return the largest of the two arguments
const G4VPhysicalVolume * GetphysiPixel() const
#define G4endl
Definition: G4ios.hh:61
static const double m
Definition: G4SIunits.hh:128
const G4VPhysicalVolume * GetOhmicPos() const
const G4VPhysicalVolume * GetphysiWorld() const
double G4double
Definition: G4Types.hh:76