CaptCryostatBuilder.hh
Go to the documentation of this file.
1 #ifndef CaptCryostatBuilder_hh_Seen
2 #define CaptCryostatBuilder_hh_Seen
3 
4 #include "EDepSimBuilder.hh"
5 class G4LogicalVolume;
6 
7 #include <string>
8 
9 /// Construct the cryostat. This builds the vessel, as well as the argon gas
10 /// and liquid inside. This builds the vessel directly and fills it with
11 /// argon gas. The liquid argon is build by a separate constructor which will
12 /// contain the TPC.
13 ///
14 /// \bug The current class is an extremely simplistic model. I think the
15 /// cryostat is multi-walled, but I don't have the design documents right now.
16 /// The invariants for this class are the inner diameter and inner heights
17 /// which define the cold volume. The outer diameter and height should be
18 /// calculated.
20 public:
22  : EDepSim::Builder(name,parent) {Init();};
23  virtual ~CaptCryostatBuilder();
24 
25  /// Construct and return a G4 volume for the object. This is a pure
26  /// virtual function, which means it must be implemented by the inheriting
27  /// classes. This returns an unplaced logical volume which faces along
28  /// the Z axis.
29  virtual G4LogicalVolume *GetPiece(void);
30 
31  /// Get (or set) the distance from the flange to the top of the liquid
32  /// argon.
33  /// @{
34  double GetArgonDepth() const {return fArgonDepth;}
35  void SetArgonDepth(double v) {fArgonDepth = v;}
36  /// @}
37 
38  /// Get (or set) the distance from the flange to the TPC center.
39  /// @{
40  double GetTPCDepth() const {return fTPCDepth;}
41  void SetTPCDepth(double v) {fTPCDepth = v;}
42  /// @}
43 
44  /// Get (or set) the type of vessel that should be built.
45  /// @{
48  /// @}
49 
50  /// Return the offset of the intended origin of the volume relative to the
51  /// center of the logical volume. To get the origin at the right location
52  /// (say originPosition), the logical volume should be positioned at
53  /// originPosition-GetOffset(). The origin of the cryostat is chosen so
54  /// that it's at the center of flange (the top of the "bucket" flange"
55  /// defines the Z origin of the cryostat). The bottom of the wire plane
56  /// assembly is at the origin (a decision will be made in the future as to
57  /// whether this is the bottom of the grid, or the bottom of the V plane.
58  /// This means that the wires for the V plane are at a (very) small
59  /// positive z coordinate.
60  G4ThreeVector GetOffset();
61 
62  /// The position of the TPC origin (center of the grid plane defining the
63  /// drift region) relative to the center of the Cryostat flange. The TPC
64  /// origin should be arranged so that it will be at center of the global
65  /// coordinate system.
66  G4ThreeVector GetTPCOffset();
67 
68 private:
69  void Init(void);
70 
71  /// The volume for the ullage. This is set when the cryostat vessel is
72  /// constructed and fills the gas part of the inner void. It can be
73  /// passed to daughter volumes to define the shape of the ullage.
74  G4LogicalVolume* fUllageVolume;
75 
76  /// The volume for the liquid argon. This is set when the cryostat vessel
77  /// is constructed and fills the liquid part of the inner void. It can be
78  /// passed to the daughter volumes to define the shape of the liquid.
79  G4LogicalVolume* fLiquidVolume;
80 
81  /// The name of the vessel to be built (currently CAPTAIN or mCAPTAIN).
83 
84  /// The distance from the top of the flange to the liquid argon.
85  double fArgonDepth;
86 
87  /// The distance from the top of the flange to the TPC.
88  double fTPCDepth;
89 
90  class Point {
91  public:
92  Point(double z, double i, double o): fZ(z), fInner(i), fOuter(o) {}
93  double fZ;
94  double fInner;
95  double fOuter;
96  };
97  typedef std::vector<Point> Shape;
98 
99  /// The inner vessel polycone points.
101  /// The outer vessel polycone points.
103  /// The vessel envelop.
105 
106  /// Fill the vessel definition with values for CAPTAIN
107  void DefineCAPTAINVessel();
108 
109  /// Fill the vessel definition with values for miniCAPTAIN
111 
112 };
113 #endif
114 
static QCString name
Definition: declinfo.cpp:673
Point(double z, double i, double o)
CaptCryostatBuilder(G4String name, EDepSim::Builder *parent)
void DefineMiniCAPTAINVessel()
Fill the vessel definition with values for miniCAPTAIN.
std::string string
Definition: nybbler.cc:12
G4LogicalVolume * fUllageVolume
Shape fInnerVessel
The inner vessel polycone points.
void SetArgonDepth(double v)
std::string fVesselType
The name of the vessel to be built (currently CAPTAIN or mCAPTAIN).
double GetTPCDepth() const
Construct a module from components.
Definition: TG4HitSegment.h:10
Builder(G4String n, EDepSim::UserDetectorConstruction *c)
double fTPCDepth
The distance from the top of the flange to the TPC.
void SetTPCDepth(double v)
void DefineCAPTAINVessel()
Fill the vessel definition with values for CAPTAIN.
G4ThreeVector GetTPCOffset()
Shape fOuterVessel
The outer vessel polycone points.
double fArgonDepth
The distance from the top of the flange to the liquid argon.
std::string GetVesselType() const
std::vector< Point > Shape
Shape fVesselEnvelope
The vessel envelop.
double GetArgonDepth() const
G4ThreeVector GetOffset()
virtual G4LogicalVolume * GetPiece(void)
void SetVesselType(std::string v)
def parent(G, child, parent_type)
Definition: graph.py:67
G4LogicalVolume * fLiquidVolume