Deprecated/UpgradeASCIITests/G4TankSimulatorASCII/G4TankConstruction.h
Go to the documentation of this file.
1 #ifndef _G4TankSimulatorASCII_G4TankConstruction_h_
2 #define _G4TankSimulatorASCII_G4TankConstruction_h_
3 
4 #include "G4TankSimulator.h"
5 #include "G4ASCIIAction.h"
6 #include "G4TankPMTAction.h"
7 #include "G4TankPMT.h"
8 
9 #include <utl/Point.h>
10 #include <utl/TabulatedFunction.h>
11 
12 // Geant 4 header files
13 #include <G4VUserDetectorConstruction.hh>
14 #include <G4Box.hh>
15 #include <G4Colour.hh>
16 #include <G4Element.hh>
17 #include <G4ElementTable.hh>
18 #include <G4LogicalBorderSurface.hh>
19 #include <G4LogicalVolume.hh>
20 #include <G4Material.hh>
21 #include <G4MaterialTable.hh>
22 #include <G4PVPlacement.hh>
23 #include <G4SDManager.hh>
24 #include <G4Sphere.hh>
25 #include <G4ThreeVector.hh>
26 #include <G4Tubs.hh>
27 #include <G4VisAttributes.hh>
28 #include <G4GeometryManager.hh>
29 #include <G4PhysicalVolumeStore.hh>
30 #include <G4LogicalVolumeStore.hh>
31 #include <G4SolidStore.hh>
32 #include <G4RunManager.hh>
33 #include <CLHEP/Units/SystemOfUnits.h>
34 #include <G4SubtractionSolid.hh>
35 
37 #include <G4Ellipsoid.hh>
38 
39 namespace G4TankSimulatorASCII {
40 
41  class G4TankConstruction : public G4VUserDetectorConstruction {
42 
43  public:
44 
47 
48  G4VPhysicalVolume* Construct(void);
49  void GetDataForThisTank(void);
50 
51  private:
52 
53  friend class G4TankFastCerenkov;
54  void SetRequiredParameters(void);
55  void SetDetectorParameters(void);
56  void SetXMLParameters(void);
57  void CreateElements(void);
58  void CreateMaterials(void);
59  void CleanupFreestore(void);
60  G4VPhysicalVolume *CreateTank(void);
61 
62  void CreateAir(void);
63  void CreateWater(void);
64  void CreateVacuum(void);
65  void CreatePyrex(void);
66  void CreatePyrex1(void);
67  void CreateLucite(void);
68  void CreateInterface(void);
69  void CreateHDPE(void);
70  void CreateLiner(void);
71  void CreateAluminium(void);
72  void CreateDirt(void);
73  void CreatePrimitives(void);
74  void CreateHall(void);
75  void AssembleTank(void);
76 
78 
79 
80  G4Element *elN, *elO, *elAl, *elFe, *elH, *elSi, *elB, *elNa, *elC;
81  G4Material *Air, *Water, *Vacuum, *SiO2, *B2O2, *Na2O, *Pyrex, *Pyrex1, *CH3;
82  G4Material *CH2, *C, *CO2, *Lucite, *Interface, *HDPE, *Al, *Dirt;
83 
84  G4MaterialPropertiesTable *airMPT, *waterMPT, *pmtfaceMPT, *pmtfaceMPT1, *pmtdomeMPT;
85  G4MaterialPropertiesTable *interfaceMPT, *linerMPT;
86  G4MaterialPropertiesTable *linerOpticalMPT;
87  G4OpticalSurface *OpLinerSurface;
88  G4LogicalBorderSurface *topsurface, *bottomsurface, *sidesurface;
89 
90  G4Box *expHall_box;
95 
96  G4SubtractionSolid *pmt_solid, *pmt_solid1, *interface_solid, *dome_solid;
97 
98  G4LogicalVolume *expHall_log, *tank_log, *top_log, *bottom_log, *side_log;
99  G4LogicalVolume *inner_log, *inner1_log, *inner2_log, *inner3_log;
101  G4LogicalVolume *pmt1_log1, *pmt2_log1, *pmt3_log1;
102  G4LogicalVolume *interface3_log, *dome1_log, *dome2_log, *dome3_log;
103  G4LogicalVolume *ground_log;
104  G4LogicalVolume *solarPanel_log, *elecBox_log;
105 
106  G4VPhysicalVolume *expHall_phys, *tank_phys, *top_phys, *bottom_phys;
107  G4VPhysicalVolume *side_phys, *inner1_phys, *inner2_phys, *inner3_phys;
108  G4VPhysicalVolume *pmt1_phys, *pmt2_phys, *pmt3_phys, *interface1_phys;
109  G4VPhysicalVolume *pmt1_phys1, *pmt2_phys1, *pmt3_phys1;
111  G4VPhysicalVolume *dome2_phys, *dome3_phys, *ground_phys;
112  G4VPhysicalVolume *solarPanel_phys, *elecBox_phys;
113 
114  static double fFaceRadius;
115  static double fFaceRadiusz;
116  static double fFaceActiveRadius;
117 
119 
120  static double fTankRadius;
121  static double fTankHalfHeight;
122  static double fTankThickness;
124 
126 
127  static double fPmtRmin, fPmtRmax;
130  static double fDomeRmin, fDomeRmax;
131  static double fMinPhi, fMaxPhi;
132  static double fMinTheta, fMaxTheta;
133  static double fPmtRzmin;
134  static double fPmtRzmax;
135  static double fInterfaceRzmin;
136  static double fInterfaceRzmax;
137  static double fDomeRzmin;
138  static double fDomeRzmax;
139 
140  static double alpha;
141  static double fHeightz;
142 
147  static double fSIGMA_ALPHA;
155 
156  // Solar panel setup
157  //------------------
158 
159  static double fSolarPanelLength;
160  static double fSolarPanelWidth;
161  static double fSolarPanelThickness;
162 
164  static double fSolarPanelTiltAngle;
165 
166 
167  // electronics box setup
168  // ---------------------
169 
170  static double fElecBoxLength;
171  static double fElecBoxWidth;
172  static double fElecBoxThickness;
173 
174  static double fElecBoxX, fElecBoxY, fElecBoxZ;
175  static double fElecBoxTiltAngle;
176 
177 
178  // PMT setup
179  //----------
180  /*
181  The "PMT setup" consists of the dome,
182  a thin interface layer, and the face.
183  The pmt domes are hemispherical
184  shells with the same surface area as the
185  the actual domes.
186  The pmt "faces" are hemispherical domes
187  that have the same active area as the
188  photocathodes.
189  The origin of the following
190  coordinates is the center of the
191  tank -> (0.0, 0.0, 60.0) cm
192  Why? Because in order to have the
193  optical properties of the dome, etc.
194  work correctly, the volumes must
195  be defined and placed in the tank volume
196  (as opposed to the experimental hall volume)
197  Since the dome, interface, and face are
198  defined as hemispherical shells placed in
199  one another, they have they same
200  x-y-z coordinates.
201  */
202 
203  // PMT Optical properties
204 
205  /*
206  Tyvek Refractive Index on liner surface vs. momentum
207  (NOTE: refractive index is set to zero for the
208  following reason. The only surfaces that work
209  with the unified model are ground and
210  groundbackpainted (others are limited to either
211  purely specular or Lambertian reflection.) Both
212  ground and groundbackpainted necessarily calculate
213  transmissin coefficients based on index of refraction
214  of the next material. For groundbackpainted, you
215  are allowd to define a 'thin' layer of dielectric
216  between the ground surface and the painted one.
217  If this is defined to be zero, then all the photons
218  undergo total internal reflection from the ground
219  surface and the unfied model is used. Note that
220  this is a kludge, and the author of this code
221  needs to be contacted to discuss providing some
222  additional flexibility in the optical model.
223  */
224 
225 
226 
227  // ASCII setup
228  //----------
229  G4Material *theIron, *Polystyrene, *Plastic;
230  void CreatePolystyrene(void);
231  void CreateIron(void);
232  void CreatePlastic(void);
233 
236  unsigned int fScinConfig;
238 
242 
244  G4LogicalVolume *enclosure_log, *scin_log , *shield_log;
245  G4VPhysicalVolume *enclosure_phys, *scin_phys, *shield_phys[3];
246 
247  };
248 
249 }
250 #endif
Point object.
Definition: Point.h:32
Class to hold collection (x,y) points and provide interpolation between them.

, generated on Tue Sep 26 2023.