/home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/geo/include/RAT/HemisphereEncapsulation.hh Source File

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/geo/include/RAT/HemisphereEncapsulation.hh Source File
Ratpac-two
HemisphereEncapsulation.hh
1 // This is the encapsulation model that is used for BUTTON.
2 // The 96 Hamamatsu r7081pe PMTs are encapsulated by two acryilic domes that are held together with metal flanges.
3 // Created by Lewis Sexton (Sheffield) and Adam Tarrant (Liverpool)
4 
5 #ifndef __RAT_HemisphereEncapsulation__
6 #define __RAT_HemisphereEncapsulation__
7 
8 #include <G4Box.hh>
9 #include <G4GenericPolycone.hh>
10 #include <G4LogicalVolume.hh>
11 #include <G4Material.hh>
12 #include <G4OpticalSurface.hh>
13 #include <G4PVPlacement.hh>
14 #include <G4Paraboloid.hh>
15 #include <G4Sphere.hh>
16 #include <G4SubtractionSolid.hh>
17 #include <G4UnionSolid.hh>
18 #include <G4VSensitiveDetector.hh>
19 #include <G4VSolid.hh>
20 #include <G4VisAttributes.hh>
21 #include <RAT/DB.hh>
22 #include <RAT/Factory.hh>
23 #include <RAT/GLG4TorusStack.hh>
24 #include <RAT/PMTEncapsulation.hh>
25 #include <string>
26 #include <vector>
27 namespace RAT {
28 
30  int useMetalFlange;
31  int useGel;
32  int useSilicaBag;
33  int useCable;
34 
35  // encapsulation object dimensions
36  double envelope_radius;
37  double encap_radius;
38  double encap_thickness;
39  double flange_rmax;
40  double dome_flange_thickness;
41  double metal_flange_thickness;
42  double optical_gel_sub_height;
43  std::vector<double> metal_flange_dimensions;
44  std::vector<double> silica_bag_dimensions;
45  std::vector<double> silica_bag_position;
46  std::vector<double> cable_dimensions;
47  std::vector<double> cable_position;
48 
49  // PMT Body
50  std::vector<double> zEdge; // n+1
51  std::vector<double> rhoEdge; // n+1
52  std::vector<double> zOrigin; // n
53  G4ThreeVector pmtposvec;
54  std::vector<double> posvec;
55 
56  G4Material *exterior_material;
57  G4Material *inner_encapsulation_material;
58  G4Material *front_encapsulation_material;
59  G4Material *rear_encapsulation_material;
60  G4Material *metal_flange_material;
61  G4Material *silica_bag_material;
62  G4Material *cable_material;
63  G4Material *optical_gel_material;
64 
65  G4OpticalSurface *inner_encapsulation_surface;
66  G4OpticalSurface *front_encapsulation_surface;
67  G4OpticalSurface *rear_encapsulation_surface;
68  G4OpticalSurface *metal_flange_surface;
69  G4OpticalSurface *cable_surface;
70  G4OpticalSurface *silica_bag_surface;
71  G4OpticalSurface *optical_gel_surface;
72 };
73 
75  public:
76  HemisphereEncapsulation(DBLinkPtr encaptable, DBLinkPtr pmttable, G4LogicalVolume *mother);
77  virtual ~HemisphereEncapsulation() {}
78 
79  virtual G4LogicalVolume *BuildVolume(const std::string &prefix);
80  virtual G4VSolid *BuildSolid(const std::string &prefix);
81  virtual G4PVPlacement *PlaceEncap(G4RotationMatrix *pmtrot, G4ThreeVector pmtpos, const std::string &name,
82  G4LogicalVolume *logi_pmt, G4VPhysicalVolume *mother_phys, bool booleanSolid,
83  int copyNo);
84 
85  protected:
86  G4VSolid *NewEnvelopeSolid(const std::string &name);
87  G4VSolid *NewEncapsulationSolid(const std::string &name);
88  G4VSolid *optical_gel_height_subtraction(const std::string &_name);
89  G4VSolid *optical_gel_pmt_subtraction(const std::string &_name, GLG4TorusStack *body);
90 
91  // phyiscal volumes
92  G4PVPlacement *inner_encapsulation_phys;
93  G4PVPlacement *optical_gel_encapsulation_phys;
94  G4PVPlacement *front_encapsulation_phys;
95  G4PVPlacement *rear_encapsulation_phys;
96  G4PVPlacement *front_metal_encapsulaion_flange_phys;
97  G4PVPlacement *rear_metal_encapsulation_flange_phys;
98  G4PVPlacement *silica_bag_encapsulation_phys;
99  G4PVPlacement *cable_encapsulation_phys;
100 
102 };
103 
104 } // namespace RAT
105 
106 #endif
Definition: GLG4TorusStack.hh:62
Definition: HemisphereEncapsulation.hh:74
Definition: PMTEncapsulation.hh:13
Definition: CCCrossSecMessenger.hh:29
Definition: HemisphereEncapsulation.hh:29