26 m_CenterPos(0.0,0.0,0.0),
27 m_CenterSigma(0.0,0.0,0.0)
36 m_pRightNeighbor = 0L;
55 sx = m_CenterSigma.x();
56 sy = m_CenterSigma.y();
57 sz = m_CenterSigma.z();
64 const float y1,
const float y2,
84 m_CenterPos.setX(0.5*(m_Xmin + m_Xmax));
85 m_CenterPos.setY(0.5*(m_Ymin + m_Ymax));
86 m_CenterPos.setZ(0.0);
88 m_CenterSigma.setX(un*xSize);
89 m_CenterSigma.setY(un*ySize);
90 m_CenterSigma.setZ(un*zSize);
99 TGeoBBox *stripBox = (TGeoBBox*)stripPhysicalNode->GetShape();
101 double xSize = 2.0 * stripBox->GetDX();
102 double ySize = 2.0 * stripBox->GetDY();
103 double zSize = 2.0 * stripBox->GetDZ();
110 double eTrans[3], *pTrans;
113 double eLocal[3], *pLocal;
115 for (
int i = 0; i < 3; i++) pLocal[i] = 0.0;
116 stripPhysicalNode->GetNode()->LocalToMaster(pLocal, pTrans);
118 m_CenterPos.setX( pTrans[0] );
119 m_CenterPos.setY( pTrans[1] );
120 m_CenterPos.setZ( pTrans[2] );
122 m_Xmin = pTrans[0] - 0.5 * xSize;
123 m_Xmax = pTrans[0] + 0.5 * xSize;
124 m_Ymin = pTrans[1] - 0.5 * ySize;
125 m_Ymax = pTrans[1] + 0.5 * ySize;
126 m_Zmin = pTrans[2] - 0.5 * zSize;
127 m_Zmax = pTrans[2] + 0.5 * zSize;
129 m_CenterSigma.setX(un*xSize);
130 m_CenterSigma.setY(un*ySize);
131 m_CenterSigma.setZ(un*zSize);
150 m_pRightNeighbor = p;
159 return ( (
x > m_Xmin) && (
x < m_Xmax)
160 && (
y > m_Ymin) && (
y < m_Ymax)
161 && (z >= m_dzFarFrontGas)
162 && (z <= m_dzFarBackGas) );
168 const Hep3Vector lineDir)
const
177 HepPoint3D p0Xmin(m_Xmin, m_Ymin, m_dzFarFrontGas);
178 HepPoint3D p1Xmin(m_Xmin, m_Ymax, m_dzFarFrontGas);
179 HepPoint3D p2Xmin(m_Xmin, m_Ymin, m_dzFarBackGas);
181 stripSide[0] = plane0;
184 HepPoint3D p0Xmax(m_Xmax, m_Ymin, m_dzFarFrontGas);
185 HepPoint3D p1Xmax(m_Xmax, m_Ymax, m_dzFarFrontGas);
186 HepPoint3D p2Xmax(m_Xmax, m_Ymin, m_dzFarBackGas);
188 stripSide[1] = plane1;
191 HepPoint3D p0Ymin(m_Xmin, m_Ymin, m_dzFarFrontGas);
192 HepPoint3D p1Ymin(m_Xmax, m_Ymin, m_dzFarFrontGas);
193 HepPoint3D p2Ymin(m_Xmin, m_Ymin, m_dzFarBackGas);
195 stripSide[2] = plane2;
198 HepPoint3D p0Ymax(m_Xmin, m_Ymax, m_dzFarFrontGas);
199 HepPoint3D p1Ymax(m_Xmax, m_Ymax, m_dzFarFrontGas);
200 HepPoint3D p2Ymax(m_Xmin, m_Ymax, m_dzFarBackGas);
202 stripSide[3] = plane3;
205 HepPoint3D p0Zmin(m_Xmin, m_Ymin, m_dzFarFrontGas);
206 HepPoint3D p1Zmin(m_Xmax, m_Ymin, m_dzFarFrontGas);
207 HepPoint3D p2Zmin(m_Xmin, m_Ymax, m_dzFarFrontGas);
209 stripSide[4] = plane4;
212 HepPoint3D p0Zmax(m_Xmin, m_Ymin, m_dzFarBackGas);
213 HepPoint3D p1Zmax(m_Xmax, m_Ymin, m_dzFarBackGas);
214 HepPoint3D p2Zmax(m_Xmin, m_Ymax, m_dzFarBackGas);
216 stripSide[5] = plane5;
223 int numIntersections = 0;
225 bool intersectFlag = 0;
228 for (
int sideID = 0; sideID<6; sideID++)
235 ( gCross.x() >= m_Xmin - 1) &&
236 ( gCross.x() <= m_Xmax + 1) &&
237 ( gCross.y() >= m_Ymin - 1) &&
238 ( gCross.y() <= m_Ymax + 1) &&
239 ( ( gCross.z() >= m_dzFarFrontGas && gCross.z() <= m_dzNearFrontGas ) ||
240 ( gCross.z() >= m_dzNearBackGas && gCross.z() <= m_dzFarBackGas) ) ) {
250 if( numIntersections > 2 ) {
256 if( numIntersections > 0 )
return true;
HepGeom::Plane3D< double > HepPlane3D
float GetdzNearFrontGas() const
Get m_dzNearFrontGas;.
float GetdzFarFrontGas() const
Get m_dzFarFrontGas;.
float GetdzNearBackGas() const
Get m_dzNearBackGas;.
float GetdzFarBackGas() const
Get m_dzFarFrontGas;.
void SetLeftNeighbor(MucGeoStrip *p)
Set pointer to the adjacent strip on the -X or -Y side of this one.
MucGeoStrip(const int strip, MucGeoGap *const pGap)
Default constructor.
bool CrossGasChamber(const HepPoint3D linePoint, const Hep3Vector lineDir) const
Does the line cross this strip?
void SetRightNeighbor(MucGeoStrip *p)
Set pointer to the adjacent strip on the +X or +Y side of this one.
MucGeoGap * GetGap() const
Get the pointer to the gap that contains the strip.
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).
~MucGeoStrip()
Desctructor.
bool IsInStrip(const float x, const float y, const float z) const
Is the point within the boundaries of this strip?
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).
bool GetIntersectionLinePlane(const HepPoint3D pLine, const Hep3Vector vectLine, const HepPlane3D plane, HepPoint3D &cross)
Get intersection of a line and a plane.