98 TGeoBBox *stripBox = (TGeoBBox*)stripPhysicalNode->GetShape();
100 double xSize = 2.0 * stripBox->GetDX();
101 double ySize = 2.0 * stripBox->GetDY();
102 double zSize = 2.0 * stripBox->GetDZ();
109 double eTrans[3], *pTrans;
112 double eLocal[3], *pLocal;
114 for (
int i = 0; i < 3; i++) pLocal[i] = 0.0;
115 stripPhysicalNode->GetNode()->LocalToMaster(pLocal, pTrans);
117 m_CenterPos.setX( pTrans[0] );
118 m_CenterPos.setY( pTrans[1] );
119 m_CenterPos.setZ( pTrans[2] );
121 m_Xmin = pTrans[0] - 0.5 * xSize;
122 m_Xmax = pTrans[0] + 0.5 * xSize;
123 m_Ymin = pTrans[1] - 0.5 * ySize;
124 m_Ymax = pTrans[1] + 0.5 * ySize;
125 m_Zmin = pTrans[2] - 0.5 * zSize;
126 m_Zmax = pTrans[2] + 0.5 * zSize;
128 m_CenterSigma.setX(un*xSize);
129 m_CenterSigma.setY(un*ySize);
130 m_CenterSigma.setZ(un*zSize);
167 const Hep3Vector lineDir)
const
176 HepPoint3D p0Xmin(m_Xmin, m_Ymin, m_dzFarFrontGas);
177 HepPoint3D p1Xmin(m_Xmin, m_Ymax, m_dzFarFrontGas);
178 HepPoint3D p2Xmin(m_Xmin, m_Ymin, m_dzFarBackGas);
180 stripSide[0] = plane0;
183 HepPoint3D p0Xmax(m_Xmax, m_Ymin, m_dzFarFrontGas);
184 HepPoint3D p1Xmax(m_Xmax, m_Ymax, m_dzFarFrontGas);
185 HepPoint3D p2Xmax(m_Xmax, m_Ymin, m_dzFarBackGas);
187 stripSide[1] = plane1;
190 HepPoint3D p0Ymin(m_Xmin, m_Ymin, m_dzFarFrontGas);
191 HepPoint3D p1Ymin(m_Xmax, m_Ymin, m_dzFarFrontGas);
192 HepPoint3D p2Ymin(m_Xmin, m_Ymin, m_dzFarBackGas);
194 stripSide[2] = plane2;
197 HepPoint3D p0Ymax(m_Xmin, m_Ymax, m_dzFarFrontGas);
198 HepPoint3D p1Ymax(m_Xmax, m_Ymax, m_dzFarFrontGas);
199 HepPoint3D p2Ymax(m_Xmin, m_Ymax, m_dzFarBackGas);
201 stripSide[3] = plane3;
204 HepPoint3D p0Zmin(m_Xmin, m_Ymin, m_dzFarFrontGas);
205 HepPoint3D p1Zmin(m_Xmax, m_Ymin, m_dzFarFrontGas);
206 HepPoint3D p2Zmin(m_Xmin, m_Ymax, m_dzFarFrontGas);
208 stripSide[4] = plane4;
211 HepPoint3D p0Zmax(m_Xmin, m_Ymin, m_dzFarBackGas);
212 HepPoint3D p1Zmax(m_Xmax, m_Ymin, m_dzFarBackGas);
213 HepPoint3D p2Zmax(m_Xmin, m_Ymax, m_dzFarBackGas);
215 stripSide[5] = plane5;
222 int numIntersections = 0;
224 bool intersectFlag = 0;
227 for (
int sideID = 0; sideID<6; sideID++)
234 ( gCross.x() >= m_Xmin - 1) &&
235 ( gCross.x() <= m_Xmax + 1) &&
236 ( gCross.y() >= m_Ymin - 1) &&
237 ( gCross.y() <= m_Ymax + 1) &&
238 ( ( gCross.z() >= m_dzFarFrontGas && gCross.z() <= m_dzNearFrontGas ) ||
239 ( gCross.z() >= m_dzNearBackGas && gCross.z() <= m_dzFarBackGas) ) ) {
249 if( numIntersections > 2 ) {
255 if( numIntersections > 0 )
return true;
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).