ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
XrayFluoMercuryDetectorConstruction.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file XrayFluoMercuryDetectorConstruction.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 // 08 Sep 2003 Alfonso Mantero created
34 //
35 // -------------------------------------------------------------------
36 
37 #ifndef XrayFluoMercuryDetectorConstruction_hh
38 #define XrayFluoMercuryDetectorConstruction_hh 1
39 
40 #include "globals.hh"
42 #include "G4RotationMatrix.hh"
43 #include "G4Cache.hh"
46 #include "XrayFluoSD.hh"
47 
48 class G4Box;
49 class G4Tubs;
50 class G4Sphere;
51 class G4LogicalVolume;
52 class G4VPhysicalVolume;
53 class G4Material;
56 
57 //class XrayFluoSD;
58 //class XrayFluoVDetectorType;
59 
60 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
61 
63 {
64 public:
65 
66 
68 
69 public:
70 
72 
73  void ConstructSDandField();
74 
75  void UpdateGeometry();
76 
77 
78  void SetMercuryMaterial(G4String newMaterial);
79 
80  void SetDetectorType(G4String type);
81 
83 
84  inline void SetOribitHeight(G4double size)
85  {distDe = size;};
86  inline void SetLatitude(G4double lat)
87  {ThetaHPGe = 180.* CLHEP::deg - lat;};
88 
90 
92 
93 
94  G4double GetWorldSizeZ() const {return WorldSizeZ;};
95  G4double GetWorldSizeXY() const {return WorldSizeXY;};
96 
98  G4double GetDeviceSizeX() const {return DeviceSizeX;};
99  G4double GetDeviceSizeY() const {return DeviceSizeY;};
102 
103  G4int GetNbOfPixels() const {return NbOfPixels;}; //mandatory for XrayFluoSD
106 
109 
112 
113  const G4VPhysicalVolume* GetphysiWorld() const {return physiWorld;};
114  const G4VPhysicalVolume* GetHPGe() const {return physiHPGe;};
115  const G4VPhysicalVolume* GetMercury() const {return physiMercury;};
116 
117  const G4VPhysicalVolume* GetphysiPixel() const {return physiPixel;};
118  const G4VPhysicalVolume* GetOhmicPos() const {return physiOhmicPos;};
119  const G4VPhysicalVolume* GetOhmicNeg() const {return physiOhmicNeg;};
120 
121  const G4VPhysicalVolume* GetOptic() const {return physiOptic;};
122 
123 private:
124 
126 
128 
130 
132 
136 
137  G4Box* solidWorld; //pointer to the solid World
138  G4LogicalVolume* logicWorld; //pointer to the logical World
139  G4VPhysicalVolume* physiWorld; //pointer to the physical World
140 
141  G4Box* solidHPGe; //pointer to the solid Sensor
142  G4LogicalVolume* logicHPGe; //pointer to the logical Sensor
143  G4VPhysicalVolume* physiHPGe; //pointer to the physical Sensor
144 
145  G4Box* solidScreen; //pointer to the solid Screen
146  G4LogicalVolume* logicScreen; //pointer to the logical Screen
147  G4VPhysicalVolume* physiScreen; //pointer to the physical Screen
148 
149  G4Sphere* solidMercury; //pointer to the solid Mercury
150  G4LogicalVolume* logicMercury; //pointer to the logical Mercury
151  G4VPhysicalVolume* physiMercury; //pointer to the physical Mercury
152 
153  // G4Tubs* solidDia1; //pointer to the solid Diaphragm
154  // G4LogicalVolume* logicDia1; //pointer to the logical Diaphragm
155  // G4VPhysicalVolume* physiDia1; //pointer to the physical Diaphragm
156 
157  // G4Tubs* solidDia3; //pointer to the solid Diaphragm
158  // G4LogicalVolume* logicDia3; //pointer to the logical Diaphragm
159  // G4VPhysicalVolume* physiDia3; //pointer to the physical Diaphragm
160 
164 
168 
172 
176 
178 
179  //materials management
181 
187  // G4Material* Dia3Material;
189 
190  //apparate parameters
191 
194 
197 
200 
209 
211 
214 
216 
218 
222 
223 
225 
227 
230 
231 
233 
234  G4Cache<XrayFluoSD*> HPGeSD; //pointer to the sensitive detector
235 
236 public:
237 
240 
241  G4double GetMercuryDia() const {return mercuryDia;};
242  G4double GetSunDia() const {return sunDia;};
243 
244  //Inclinaton of the orbit respect Mercury respect the equator (latitude)
245 
246  G4double GetOrbitInclination() const {return 180 * CLHEP::deg - ThetaHPGe;};
247  G4double GetOrbitDistance() const {return distDe;};
249 
250 
251 
252 private:
253 
254  void DefineDefaultMaterials();
256 
257  //calculates some quantities used to construct geometry
259 
260 };
261 
262 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
263 
265 {
266  // Compute derived parameters of the apparate
267 
269 
271 
274 
276 
277  G4cout << "DeviceSizeX(cm): "<< DeviceSizeX/CLHEP::cm <<G4endl;
278  G4cout << "DeviceSizeY(cm): "<< DeviceSizeY/CLHEP::cm << G4endl;
279 
280  //*********************************************************************
281  //** Astronomical distances reduce by a factor 10^-7 due to G4 Bug **
282  //*********************************************************************
283 
285  WorldSizeXY = (2 * distDe) + 2000 * CLHEP::km ;
286  //WorldSizeZ = WorldSizeXY;
287 }
288 
289 #endif