CaptWirePlaneBuilder.hh
Go to the documentation of this file.
1 #ifndef CaptWirePlaneBuilder_hh_Seen
2 #define CaptWirePlaneBuilder_hh_Seen
3 
4 #include "EDepSimBuilder.hh"
5 
6 class G4LogicalVolume;
7 
8 /// Construct an unrotated wire plane. In the local coordinate system, the
9 /// wires are oriented along the Y axis, and the wire number increases from
10 /// negative X to positive X. The electric field points along the Z axis, or
11 /// in other words, into the drift region, and electrons drift from positive Z
12 /// toward the planes (i.e. in the negative Z direction).
13 ///
14 /// The wires are not "tubes", but are boxes that represent the area overwhich
15 /// the wire will measure charge. The name of the wire planes is significant
16 /// since captevent will assigned a geometry identifier based on the name
17 /// "XPlane", "UPlane", "VPlane". There can only be one with each name.
18 ///
20 public:
22  : EDepSim::Builder(name,parent) {Init();};
23  virtual ~CaptWirePlaneBuilder();
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 the total height (thickness) of the drift region.
32  /// @{
33  void SetHeight(double v) {fHeight = v;}
34  double GetHeight() const {return fHeight;}
35  /// @}
36 
37  /// Set the radius of the largest cylinder that can be contained in the
38  /// hexagonal wire plane. This is the maximum local X dimension.
39  /// @{
40  void SetApothem(double v) {fApothem = v;}
41  double GetApothem() const {return fApothem;}
42  /// @}
43 
44  /// Set the radius of the smallest cylinder that contains the hexagonal
45  /// wire plane. This is the maximum local Y dimension and is the apothem
46  /// divided by the cosine of 30 degrees.
47  /// @{
48  void SetRadius(double v) {fApothem = v*0.866025403784;}
49  double GetRadius() const {return fApothem/0.866025403784;}
50  /// @}
51 
52  /// Get or set the distance between wires.
53  /// @{
54  void SetSpacing(double v) {fSpacing = v;}
55  double GetSpacing() const {return fSpacing;}
56  /// @}
57 
58  /// Get or set the maximum number of wires. The default number of wires
59  /// is calculated based on the apothem and the wire spacing, but can be
60  /// limited by SetMaxWireCount().
61  /// @{
62  void SetMaxWireCount(int v) {fMaxWireCount = v;}
63  int GetMaxWireCount() const {return fMaxWireCount;}
64  /// @}
65 
66 private:
67  void Init(void);
68 
69  /// The radius of the circle that can fit inside the wire plane
70  double fApothem;
71 
72  /// The thickness of the wire plane.
73  double fHeight;
74 
75  /// The wire to wire spacing.
76  double fSpacing;
77 
78  /// The maximum number of wires in the plane.
80 };
81 #endif
static QCString name
Definition: declinfo.cpp:673
double fHeight
The thickness of the wire plane.
virtual G4LogicalVolume * GetPiece(void)
Construct a module from components.
Definition: TG4HitSegment.h:10
Builder(G4String n, EDepSim::UserDetectorConstruction *c)
double fApothem
The radius of the circle that can fit inside the wire plane.
CaptWirePlaneBuilder(G4String name, EDepSim::Builder *parent)
int fMaxWireCount
The maximum number of wires in the plane.
double fSpacing
The wire to wire spacing.
def parent(G, child, parent_type)
Definition: graph.py:67