CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
MucGeoStrip.h
Go to the documentation of this file.
1//$id$
2//
3//$log$
4
5/*
6 * 2003/08/30 Zhengyun You Peking University
7 *
8 * 2004/09/09 Zhengyun You Peking University
9 * transplanted to Gaudi framework
10 */
11
12#ifndef MUC_GEO_STRIP_H
13#define MUC_GEO_STRIP_H
14
15#include <CLHEP/Vector/ThreeVector.h>
16#include <CLHEP/Geometry/Point3D.h>
17#include <CLHEP/Geometry/Plane3D.h>
18#include "TGeoNode.h"
19#include "TGeoMatrix.h"
20#include "TGeoPhysicalNode.h"
21
22#ifndef ENABLE_BACKWARDS_COMPATIBILITY
24#endif
25#ifndef ENABLE_BACKWARDS_COMPATIBILITY
27#endif
28
30
31using namespace std;
32using namespace CLHEP;
33
34/**
35 * Class MucGeoStrip describes a single strip in a gap of the muon chamber
36 *
37 * @author Zhengyun You \URL{mailto:[email protected]}
38 */
39
41{
42 public:
43
44 /// Default constructor.
45 MucGeoStrip( const int strip, MucGeoGap* const pGap);
46
47 /// Desctructor.
49
50 /// Get the softID.
51 //MucSoftID GetSoftID() const { return m_StripID; }
52 /// Get Part No.
53 int Part() { return m_pGap->Part(); }
54
55 /// Get Seg No.
56 int Seg() { return m_pGap->Seg(); }
57
58 /// Get Gap No.
59 int Gap() { return m_pGap->Gap(); }
60
61 /// Get Strip No.
62 int Strip() { return m_Strip; }
63
64 /// Get the pointer to the gap that contains the strip.
65 MucGeoGap *GetGap() const { return m_pGap; }
66
67 /// Get the pointer to the adjacent strip on the -X or -Y side of this one.
68 MucGeoStrip *GetLeftNeighbor() const { return m_pLeftNeighbor; }
69
70 /// Get the pointer to the adjacent strip on the +X or +Y side of this one.
71 MucGeoStrip *GetRightNeighbor() const { return m_pRightNeighbor; }
72
73 /// Get position of low-X edge in the gap coordinate system.
74 float GetXmin() const { return m_Xmin; }
75
76 /// Get position of high-X edge in the gap coordinate system.
77 float GetXmax() const { return m_Xmax; }
78
79 /// Get position of low-Y edge in the gap coordinate system.
80 float GetYmin() const { return m_Ymin; }
81
82 /// Get position of high-Y edge in the gap coordinate system.
83 float GetYmax() const { return m_Ymax; }
84
85 /// Get position of low-Z edge in the gap coordinate system.
86 float GetZmin() const { return m_Zmin; }
87
88 /// Get position of high-Z edge in the gap coordinate system.
89 float GetZmax() const { return m_Zmax; }
90
91 /// Get center position of this strip (in the gap coordinate system).
92 void GetCenterPos(float &x, float &y, float &z) const;
93
94 /// Get uncertainty in the position of this strip (in the gap coordinate system).
95 void GetCenterSigma(float& sx, float& sy, float& sz);
96
97 /// Get the strip hit status.
98 bool GetHitStatus() const { return m_HitStatus; }
99
100 /// Set the edge, center and sigma of the strip (in the gap coordinate system).
101 void SetStrip(const float x1, const float x2,
102 const float y1, const float y2,
103 const float xSize,
104 const float ySize,
105 const float zSize);
106
107 /// Set strip from ROOT.
108 void SetStrip(TGeoPhysicalNode *stripPhysicalNode);
109
110 /// Set pointer to the adjacent strip on the -X or -Y side of this one.
111 // (0 if no neighbor in this gap).
113
114 /// Set pointer to the adjacent strip on the +X or +Y side of this one.
115 // (0 if no neighbor in this gap).
117
118 /// Set the strip hit status.
119 void SetHitStatus(const bool hit) { m_HitStatus = hit; }
120
121 /// Is the point within the boundaries of this strip?
122 bool IsInStrip(const float x, const float y, const float z) const;
123
124 /// Does the line cross this strip?
125 bool CrossGasChamber(const HepPoint3D linePoint, const Hep3Vector lineDir) const;
126
127 private:
128
129 float m_Xmin; // Position of low-X edge in the gap coordinate system.
130 float m_Xmax; // Position of high-X edge in the gap coordinate system.
131 float m_Ymin; // Position of low-Y edge in the gap coordinate system.
132 float m_Ymax; // Position of high-Y edge in the gap coordinate system.
133 float m_Zmin; // Position of low-Z edge in the gap coordinate system.
134 float m_Zmax; // Position of high-Z edge in the gap coordinate system.
135
136 float m_dzFarFrontGas; // Z distance from low edge of front gas chamber to strip center.
137 float m_dzNearFrontGas; // Z distance from high edge of front gas chamber to strip center.
138 float m_dzNearBackGas; // Z distance from low edge of back gas chamber to strip center.
139 float m_dzFarBackGas; // Z distance from high edge of back gas chamber to strip center.
140
141 //MucSoftID m_StripID; // SoftID of this strip.
142 int m_Strip; // Strip no of this strip in gap.
143 MucGeoGap *m_pGap; // Pointer to the gap containing this strip.
144 MucGeoStrip *m_pLeftNeighbor; // Pointer to the left neighbor strip.
145 MucGeoStrip *m_pRightNeighbor; // Pointer to the right neighbor strip.
146
147 HepPoint3D m_CenterPos; // Position of center (panel coordinate system)
148 HepPoint3D m_CenterSigma; // Uncertainty in center position (panel coords)
149 bool m_HitStatus; // If = true, the strip get a hit.
150
151 int m_padID; //which pad is expected to be intersected in. only useful for expected hit.
152
153};
154
155#endif /* MUC_GEO_STRIP_H */
HepGeom::Point3D< double > HepPoint3D
Definition MucGeoStrip.h:23
HepGeom::Vector3D< double > HepVector3D
Definition MucGeoStrip.h:26
int Seg() const
Get seg identifier (0-7).
Definition MucGeoGap.h:101
int Gap() const
Get gap identifier (0-8).
Definition MucGeoGap.h:104
int Part() const
Get part identifier (0,2 for cap, 1 for barrel).
Definition MucGeoGap.h:98
float GetYmin() const
Get position of low-Y edge in the gap coordinate system.
Definition MucGeoStrip.h:80
void SetLeftNeighbor(MucGeoStrip *p)
Set pointer to the adjacent strip on the -X or -Y side of this one.
void SetHitStatus(const bool hit)
Set the strip hit status.
bool GetHitStatus() const
Get the strip hit status.
Definition MucGeoStrip.h:98
int Gap()
Get Gap No.
Definition MucGeoStrip.h:59
float GetZmax() const
Get position of high-Z edge in the gap coordinate system.
Definition MucGeoStrip.h:89
MucGeoStrip(const int strip, MucGeoGap *const pGap)
Default constructor.
float GetXmax() const
Get position of high-X edge in the gap coordinate system.
Definition MucGeoStrip.h:77
float GetXmin() const
Get position of low-X edge in the gap coordinate system.
Definition MucGeoStrip.h:74
bool CrossGasChamber(const HepPoint3D linePoint, const Hep3Vector lineDir) const
Does the line cross this strip?
float GetZmin() const
Get position of low-Z edge in the gap coordinate system.
Definition MucGeoStrip.h:86
int Strip()
Get Strip No.
Definition MucGeoStrip.h:62
void SetRightNeighbor(MucGeoStrip *p)
Set pointer to the adjacent strip on the +X or +Y side of this one.
MucGeoStrip * GetLeftNeighbor() const
Get the pointer to the adjacent strip on the -X or -Y side of this one.
Definition MucGeoStrip.h:68
float GetYmax() const
Get position of high-Y edge in the gap coordinate system.
Definition MucGeoStrip.h:83
MucGeoGap * GetGap() const
Get the pointer to the gap that contains the strip.
Definition MucGeoStrip.h:65
MucGeoStrip * GetRightNeighbor() const
Get the pointer to the adjacent strip on the +X or +Y side of this one.
Definition MucGeoStrip.h:71
void GetCenterPos(float &x, float &y, float &z) const
Get center position of this strip (in the gap coordinate system).
void GetCenterSigma(float &sx, float &sy, float &sz)
Get uncertainty in the position of this strip (in the gap coordinate system).
int Seg()
Get Seg No.
Definition MucGeoStrip.h:56
~MucGeoStrip()
Desctructor.
bool IsInStrip(const float x, const float y, const float z) const
Is the point within the boundaries of this strip?
int Part()
Get the softID.
Definition MucGeoStrip.h:53
void SetStrip(const float x1, const float x2, const float y1, const float y2, const float xSize, const float ySize, const float zSize)
Set the edge, center and sigma of the strip (in the gap coordinate system).