CaptDriftRegionBuilder.hh
Go to the documentation of this file.
1 #ifndef CaptDriftRegionBuilder_hh_Seen
2 #define CaptDriftRegionBuilder_hh_Seen
3 
4 #include "EDepSimBuilder.hh"
5 
6 class G4LogicalVolume;
7 
8 /// Construct the drift region of the TPC. The wire planes are located at the
9 /// top of the drift region, with the first wire for each plane located at the
10 /// most negative X coordinate. The U plane runs from negative Y to positive
11 /// Y. The V plane runs from positive Y to negative Y. The planes are
12 /// oriented from top to bottom X, U, V (in otherwords, the first plane seen
13 /// by the electrons is the V plane). The X plane is the collection plane.
15 public:
17  : EDepSim::Builder(name,parent) {Init();};
18  virtual ~CaptDriftRegionBuilder();
19 
20  /// Construct and return a G4 volume for the object. This is a pure
21  /// virtual function, which means it must be implemented by the inheriting
22  /// classes. This returns an unplaced logical volume which faces along
23  /// the Z axis.
24  virtual G4LogicalVolume *GetPiece(void);
25 
26  /// Get the total height of the drift region.
27  double GetHeight();
28 
29  /// Set the radius of the largest cylinder that can be contained in the
30  /// drift region.
31  /// @{
32  void SetApothem(double v) {fApothem = v;}
33  double GetApothem() {return fApothem;}
34  /// @}
35 
36  /// Set the radius of the smallest cylinder that contains the drift
37  /// region. This is the maximum local Y dimension and is the apothem
38  /// divided by the cosine of 30 degrees.
39  /// @{
40  void SetRadius(double v) {fApothem = v*0.866025403784;}
41  double GetRadius() const {return fApothem/0.866025403784;}
42  /// @}
43 
44  /// Set the length of the drift region from the cathode to the first wire
45  /// plane. (i.e. the grid plane).
46  /// @{
47  void SetDriftLength(double v) {fDriftLength = v;}
48  double GetDriftLength() {return fDriftLength;}
49  /// @}
50 
51  /// Set the spacing between the wire planes.
52  void SetWirePlaneSpacing(double v) {fWirePlaneSpacing = v;}
54  /// @}
55 
56  /// Return the offset of the intended origin of the volume relative to the
57  /// center of the logical volume. To get the intended origin at the right
58  /// location (say originPosition), the logical volume should be positioned
59  /// at originPosition-GetOffset(). For the drift region, the intended
60  /// origin is at the "center" of the bottom of the wire planes is at the
61  /// global origin.
62  G4ThreeVector GetOffset();
63 
64  /// Get the offset of the X plane from the top of the drift region.
65  double GetXPlaneOffset();
66 
67  /// Get the offset of the X plane from the top of the drift region.
68  double GetVPlaneOffset();
69 
70  /// Get the offset of the X plane from the top of the drift region.
71  double GetUPlaneOffset();
72 
73  /// Get the offset of the grid from the top of the drift region.
74  double GetGridPlaneOffset();
75 
76  /// Get the offset of the ground from the top of the drift region. The
77  /// distance between the grid and the ground defines the drift distance
78  /// for the electrons.
79  double GetGroundPlaneOffset();
80 
81 private:
82  void Init(void);
83 
84  /// The radius of the circle that can fit inside.
85  double fApothem;
86 
87  /// The distance from the cathode to the first wire plane.
88  double fDriftLength;
89 
90  /// The distance between the wire planes.
92 
93 };
94 #endif
static QCString name
Definition: declinfo.cpp:673
double GetHeight()
Get the total height of the drift region.
double GetGridPlaneOffset()
Get the offset of the grid from the top of the drift region.
double fWirePlaneSpacing
The distance between the wire planes.
double GetXPlaneOffset()
Get the offset of the X plane from the top of the drift region.
CaptDriftRegionBuilder(G4String name, EDepSim::Builder *parent)
void SetWirePlaneSpacing(double v)
Set the spacing between the wire planes.
double GetVPlaneOffset()
Get the offset of the X plane from the top of the drift region.
Construct a module from components.
Definition: TG4HitSegment.h:10
Builder(G4String n, EDepSim::UserDetectorConstruction *c)
virtual G4LogicalVolume * GetPiece(void)
double GetUPlaneOffset()
Get the offset of the X plane from the top of the drift region.
double fDriftLength
The distance from the cathode to the first wire plane.
double fApothem
The radius of the circle that can fit inside.
def parent(G, child, parent_type)
Definition: graph.py:67