ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
XrayFluoPlaneDetectorConstruction.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file XrayFluoPlaneDetectorConstruction.hh
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 //
28 // Author: Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
29 //
30 // History:
31 // -----------
32 //
33 // 29 Aug 2003 Alfonso Mantero created
34 //
35 // -------------------------------------------------------------------
36 
37 #ifndef XrayFluoPlaneDetectorConstruction_hh
38 #define XrayFluoPlaneDetectorConstruction_hh 1
39 
40 #include "globals.hh"
41 #include "G4RotationMatrix.hh"
43 #include "G4Cache.hh"
44 
47 #include "XrayFluoSD.hh"
48 
49 class G4Box;
50 class G4Sphere;
51 class G4LogicalVolume;
52 class G4VPhysicalVolume;
53 class G4Material;
56 
57 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
58 
60 {
61 public:
62 
63 
65 
66 public:
67 
69 
70  void ConstructSDandField();
71 
72  void UpdateGeometry();
73 
74 
75  void SetPlaneMaterial(G4String newMaterial);
76 
77  void SetDetectorType(G4String type);
78 
80 
81  inline void SetPlaneGranularity(G4bool granularity)
82  {planeGranularity = granularity;};
83 
84  inline void SetGrainDia(G4double size)
85  {grainDia = size;};
86 
87  void DeleteGrainObjects();
88 
89 public:
90 
92 
94 
95 
96  G4double GetWorldSizeZ() const {return WorldSizeZ;};
97  G4double GetWorldSizeXY() const {return WorldSizeXY;};
98 
104 
105  G4int GetNbOfPixels() const {return NbOfPixels;}; //mandatory for XrayFluoSD
108 
111 
114 
115  const G4VPhysicalVolume* GetphysiWorld() const {return physiWorld;};
116  const G4VPhysicalVolume* GetHPGe() const {return physiHPGe;};
117  const G4VPhysicalVolume* GetPlane() const {return physiPlane;};
118  // const G4VPhysicalVolume* GetDia1() {return physiDia1;};
119  // const G4VPhysicalVolume* GetDia3() {return physiDia3;};
120 
121  const G4VPhysicalVolume* GetphysiPixel() const {return physiPixel;};
122  const G4VPhysicalVolume* GetOhmicPos() const {return physiOhmicPos;};
123  const G4VPhysicalVolume* GetOhmicNeg() const {return physiOhmicNeg;};
124 
125 private:
126 
128 
130 
132 
134 
138 
139  G4Box* solidWorld; //pointer to the solid World
140  G4LogicalVolume* logicWorld; //pointer to the logical World
141  G4VPhysicalVolume* physiWorld; //pointer to the physical World
142 
143  G4Box* solidHPGe; //pointer to the solid Sensor
144  G4LogicalVolume* logicHPGe; //pointer to the logical Sensor
145  G4VPhysicalVolume* physiHPGe; //pointer to the physical Sensor
146 
147  G4Box* solidScreen; //pointer to the solid Screen
148  G4LogicalVolume* logicScreen; //pointer to the logical Screen
149  G4VPhysicalVolume* physiScreen; //pointer to the physical Screen
150 
151  G4Box* solidPlane; //pointer to the solid Plane
152  G4LogicalVolume* logicPlane; //pointer to the logical Plane
153  G4VPhysicalVolume* physiPlane; //pointer to the physical Plane
154 
155  // G4Tubs* solidDia1; //pointer to the solid Diaphragm
156  // G4LogicalVolume* logicDia1; //pointer to the logical Diaphragm
157  // G4VPhysicalVolume* physiDia1; //pointer to the physical Diaphragm
158 
159  // G4Tubs* solidDia3; //pointer to the solid Diaphragm
160  // G4LogicalVolume* logicDia3; //pointer to the logical Diaphragm
161  // G4VPhysicalVolume* physiDia3; //pointer to the physical Diaphragm
162 
166 
170 
174 
178 
179  //materials management
181 
187  // G4Material* Dia1Material;
188  // G4Material* Dia3Material;
190 
191  //apparate parameters
192 
195 
198 
207 
211  // G4double Dia1Thickness;
212  // G4double Dia1SizeXY;
213  // G4double Dia3Thickness;
214  // G4double Dia3SizeXY;
215  // G4double DiaInnerSize;
216  // G4double Dia3InnerSize;
217 
218 
219 public:
220 
223  // G4Material* GetDia1Material() {return Dia1Material;};
224  // G4Material* GetDia3Material() {return Dia3Material;};
225 
228 
229 // G4double GetDia1Thickness() {return Dia1Thickness;};
230 // G4double GetDia1SizeXY() {return Dia1SizeXY;};
231 
232 // G4double GetDia3Thickness() {return Dia3Thickness;};
233 // G4double GetDia3SizeXY() {return Dia3SizeXY;};
234 
235 
236 private:
237 
238 
240 
243 
244  // G4double DistDia;
245  // G4double Dia3Dist;
247  // G4double PhiDia1;
248  // G4double PhiDia3;
249  // G4double AlphaDia1;
250  // G4double AlphaDia3;
251 
252 
254  // G4RotationMatrix zRotPhiDia1;
255  // G4RotationMatrix zRotPhiDia3;
258 
259 
261 
262  G4Cache<XrayFluoSD*> HPGeSD; //pointer to the sensitive detector
263 
264 private:
265 
266  void DefineDefaultMaterials();
268 
269  //calculates some quantities used to construct geometry
271 
272 };
273 
274 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
275 
277 {
278  // Compute derived parameters of the apparate
279 
281 
282  G4cout << "DeviceThickness(cm): "<< DeviceThickness/CLHEP::cm << G4endl;
283 
286 
288 
289  G4cout << "DeviceSizeX(cm): "<< DeviceSizeX/CLHEP::cm <<G4endl;
290  G4cout << "DeviceSizeY(cm): "<< DeviceSizeY/CLHEP::cm << G4endl;
291 
293  WorldSizeXY = (2 * (planeSizeXY))+ 5*CLHEP::m;
294 
295 }
296 
297 #endif