Geant4  10.03
XrayFluoMercuryDetectorConstruction.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: XrayFluoMercuryDetectorConstruction.hh
28 // GEANT4 tag $Name:XrayFluo-V05-02-06
29 //
30 // Author: Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
31 //
32 // History:
33 // -----------
34 //
35 // 08 Sep 2003 Alfonso Mantero created
36 //
37 // -------------------------------------------------------------------
38 
39 #ifndef XrayFluoMercuryDetectorConstruction_hh
40 #define XrayFluoMercuryDetectorConstruction_hh 1
41 
42 #include "globals.hh"
44 #include "G4RotationMatrix.hh"
45 #include "G4Cache.hh"
48 #include "XrayFluoSD.hh"
49 
50 class G4Box;
51 class G4Tubs;
52 class G4Sphere;
53 class G4LogicalVolume;
54 class G4VPhysicalVolume;
55 class G4Material;
58 
59 //class XrayFluoSD;
60 //class XrayFluoVDetectorType;
61 
62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
63 
65 {
66 public:
67 
68 
70 
71 public:
72 
74 
75  void ConstructSDandField();
76 
77  void UpdateGeometry();
78 
79 
80  void SetMercuryMaterial(G4String newMaterial);
81 
82  void SetDetectorType(G4String type);
83 
85 
86  inline void SetOribitHeight(G4double size)
87  {distDe = size;};
88  inline void SetLatitude(G4double lat)
89  {ThetaHPGe = 180.* CLHEP::deg - lat;};
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* GetMercury() const {return physiMercury;};
118 
119  const G4VPhysicalVolume* GetphysiPixel() const {return physiPixel;};
120  const G4VPhysicalVolume* GetOhmicPos() const {return physiOhmicPos;};
121  const G4VPhysicalVolume* GetOhmicNeg() const {return physiOhmicNeg;};
122 
123  const G4VPhysicalVolume* GetOptic() const {return physiOptic;};
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  G4Sphere* solidMercury; //pointer to the solid Mercury
152  G4LogicalVolume* logicMercury; //pointer to the logical Mercury
153  G4VPhysicalVolume* physiMercury; //pointer to the physical Mercury
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 
180 
181  //materials management
183 
189  // G4Material* Dia3Material;
191 
192  //apparate parameters
193 
196 
199 
202 
211 
213 
216 
218 
220 
224 
225 
227 
229 
232 
233 
235 
236  G4Cache<XrayFluoSD*> HPGeSD; //pointer to the sensitive detector
237 
238 public:
239 
242 
243  G4double GetMercuryDia() const {return mercuryDia;};
244  G4double GetSunDia() const {return sunDia;};
245 
246  //Inclinaton of the orbit respect Mercury respect the equator (latitude)
247 
248  G4double GetOrbitInclination() const {return 180 * CLHEP::deg - ThetaHPGe;};
249  G4double GetOrbitDistance() const {return distDe;};
251 
252 
253 
254 private:
255 
256  void DefineDefaultMaterials();
258 
259  //calculates some quantities used to construct geometry
261 
262 };
263 
264 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
265 
267 {
268  // Compute derived parameters of the apparate
269 
271 
273 
276 
278 
279  G4cout << "DeviceSizeX(cm): "<< DeviceSizeX/CLHEP::cm <<G4endl;
280  G4cout << "DeviceSizeY(cm): "<< DeviceSizeY/CLHEP::cm << G4endl;
281 
282  //*********************************************************************
283  //** Astronomical distances reduce by a factor 10^-7 due to G4 Bug **
284  //*********************************************************************
285 
287  WorldSizeXY = (2 * distDe) + 2000 * CLHEP::km ;
288  //WorldSizeZ = WorldSizeXY;
289 }
290 
291 #endif
static constexpr double km
Definition: G4SIunits.hh:133
CLHEP::HepRotation G4RotationMatrix
Definition: G4Box.hh:64
Definition: G4Tubs.hh:85
int G4int
Definition: G4Types.hh:78
static XrayFluoMercuryDetectorConstruction * GetInstance()
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
static constexpr double cm
Definition: G4SIunits.hh:119
XrayFluoMercuryDetectorMessenger * detectorMessenger
T max(const T t1, const T t2)
brief Return the largest of the two arguments
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
static constexpr double deg
Definition: G4SIunits.hh:152
static XrayFluoMercuryDetectorConstruction * instance