ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
XrayFluoDetectorConstruction.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file XrayFluoDetectorConstruction.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: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
29 //
30 // History:
31 // -----------
32 // 28 Nov 2001 Elena Guardincerri Created
33 // Nov 2002 Alfonso Mantero materials added, Material selection implementation
34 // 16 Jul 2003 Alfonso Mantero Detector type selection added + minor fixes
35 // 21 Aug 2003 Alfonso Mantero Material Management moved to XrayFluoMaterials
36 //
37 // -------------------------------------------------------------------
38 
39 #ifndef XrayFluoDetectorConstruction_hh
40 #define XrayFluoDetectorConstruction_hh 1
41 
42 #include "globals.hh"
43 #include "G4RotationMatrix.hh"
45 #include "G4Navigator.hh"
46 #include "G4Cache.hh"
47 
50 #include "XrayFluoSD.hh"
51 #include "XrayFluoGeometry.hh"
52 
53 class G4Box;
54 class G4Tubs;
55 class G4Sphere;
56 class G4LogicalVolume;
57 class G4VPhysicalVolume;
58 class G4Material;
61 
62 //class XrayFluoSD;
63 //class XrayFluoVDetectorType;
64 
65 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
66 
68 {
69 public:
70 
71 
73 
74 public:
75 
77 
78  void ConstructSDandField();
79 
80  void UpdateGeometry();
81 
83 
84  void SetSampleMaterial(G4String newMaterial);
85 
86  void SetDetectorType(G4String type);
87 
89 
90  inline void SetSampleGranularity(G4bool granularity)
91  {sampleGranularity = granularity;};
92 
93  inline void PhaseSpaceOn()
94  {phaseSpaceFlag = true;};
95 
96  inline void PhaseSpaceOff()
97  {phaseSpaceFlag = false;};
98 
99  inline G4bool GetPhaseSpaceFlag() const
100  {return phaseSpaceFlag;};
101 
102  inline void SetGrainDia(G4double size)
103  {grainDia = size;};
104 
105  void DeleteGrainObjects();
106 
107 public:
108 
109  void PrintApparateParameters();
110 
112 
113 
114  G4double GetWorldSizeZ() const {return WorldSizeZ;};
116 
122 
123  G4int GetNbOfPixels() const {return NbOfPixels;};
126 
129 
132 
135 
136  const G4VPhysicalVolume* GetphysiWorld() const {return physiWorld;};
137  const G4VPhysicalVolume* GetHPGe() const {return physiHPGe;};
138  const G4VPhysicalVolume* GetSample() const {return physiSample;};
139  const G4VPhysicalVolume* GetDia1() const {return physiDia1;};
140  const G4VPhysicalVolume* GetDia3() const {return physiDia3;};
141 
142  const G4VPhysicalVolume* GetphysiPixel() const {return physiPixel;};
143  const G4VPhysicalVolume* GetOhmicPos() const {return physiOhmicPos;};
144  const G4VPhysicalVolume* GetOhmicNeg() const {return physiOhmicNeg;};
145  const G4VPhysicalVolume* GetWindow () const {return physiWindow ;};
146 private:
147 
149 
151 
153 
155 
158 
162 
163  G4Box* solidWorld; //pointer to the solid World
164  G4LogicalVolume* logicWorld; //pointer to the logical World
165  G4VPhysicalVolume* physiWorld; //pointer to the physical World
166 
167  G4Box* solidHPGe; //pointer to the solid Sensor
168  G4LogicalVolume* logicHPGe; //pointer to the logical Sensor
169  G4VPhysicalVolume* physiHPGe; //pointer to the physical Sensor
170 
171  G4Box* solidSample; //pointer to the solid Sample
172  G4LogicalVolume* logicSample; //pointer to the logical Sample
173  G4VPhysicalVolume* physiSample; //pointer to the physical Sample
174 
175  G4Tubs* solidDia1; //pointer to the solid Diaphragm
176  G4LogicalVolume* logicDia1; //pointer to the logical Diaphragm
177  G4VPhysicalVolume* physiDia1; //pointer to the physical Diaphragm
178 
179  G4Tubs* solidDia3; //pointer to the solid Diaphragm
180  G4LogicalVolume* logicDia3; //pointer to the logical Diaphragm
181  G4VPhysicalVolume* physiDia3; //pointer to the physical Diaphragm
182 
186 
187  G4Box* solidWindow; // added
190 
194 
198 
202 
203 
204  //materials management
206 
215 
216 
217  //apparate parameters
218 
220 
222 
224 
231 
232 
233 
236 
237 public:
238 
243 
244 
246 
247 private:
248 
258  // G4double DistSi;
259 public:
260 
261 
264 
266  G4double GetDia1SizeXY() const {return Dia1SizeXY;};
267 
269  G4double GetDia3SizeXY() const {return Dia3SizeXY;};
270 
271 
272 private:
273 
274 
278 
287 
288 
294 
295 
296  XrayFluoDetectorMessenger* detectorMessenger; //pointer to the Messenger
297 
298  G4Cache<XrayFluoSD*> HPGeSD; //pointer to the sensitive detector
299 
301 
302 
303 private:
304 
305  void DefineDefaultMaterials();
307 
308  //calculates some quantities used to construct geometry
310 
311 };
312 
313 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
314 
316 {
317  // Compute derived parameters of the apparate
318 
319  if (phaseSpaceFlag) {
320 
321  WorldSizeZ = 10 *CLHEP::m;
322  WorldSizeXY = 10 *CLHEP::m;
323 
324  }
325  else {
326 
328 
329  G4cout << "DeviceThickness(cm): "<< DeviceThickness/CLHEP::cm << G4endl;
330 
333 
334  G4cout << "DeviceSizeX(cm): "<< DeviceSizeX/CLHEP::cm <<G4endl;
335  G4cout << "DeviceSizeY(cm): "<< DeviceSizeY/CLHEP::cm << G4endl;
336 
338  WorldSizeXY = 2 * (DistDe +1.4142 *Dia1SizeXY)+5*CLHEP::m;
339 
340  }
341 }
342 
343 #endif