#include <MucGeoStrip.h>
Public Member Functions | |
bool | CrossGasChamber (const HepPoint3D linePoint, const Hep3Vector lineDir) const |
Does the line cross this strip? | |
bool | CrossGasChamber (const HepPoint3D linePoint, const Hep3Vector lineDir) const |
Does the line cross this strip? | |
int | Gap () |
Get Gap No. | |
int | Gap () |
Get Gap No. | |
void | GetCenterPos (float &x, float &y, float &z) const |
Get center position of this strip (in the gap coordinate system). | |
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). | |
void | GetCenterSigma (float &sx, float &sy, float &sz) |
Get uncertainty in the position of this strip (in the gap coordinate system). | |
MucGeoGap * | GetGap () const |
Get the pointer to the gap that contains the strip. | |
MucGeoGap * | GetGap () const |
Get the pointer to the gap that contains the strip. | |
bool | GetHitStatus () const |
Get the strip hit status. | |
bool | GetHitStatus () const |
Get the strip hit status. | |
MucGeoStrip * | GetLeftNeighbor () const |
Get the 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. | |
MucGeoStrip * | GetRightNeighbor () const |
Get the pointer to the adjacent strip on the +X or +Y side of this one. | |
MucGeoStrip * | GetRightNeighbor () const |
Get the pointer to the adjacent strip on the +X or +Y side of this one. | |
float | GetXmax () const |
Get position of high-X edge in the gap coordinate system. | |
float | GetXmax () const |
Get position of high-X edge in the gap coordinate system. | |
float | GetXmin () const |
Get position of low-X edge in the gap coordinate system. | |
float | GetXmin () const |
Get position of low-X edge in the gap coordinate system. | |
float | GetYmax () const |
Get position of high-Y edge in the gap coordinate system. | |
float | GetYmax () const |
Get position of high-Y edge in the gap coordinate system. | |
float | GetYmin () const |
Get position of low-Y edge in the gap coordinate system. | |
float | GetYmin () const |
Get position of low-Y edge in the gap coordinate system. | |
float | GetZmax () const |
Get position of high-Z edge in the gap coordinate system. | |
float | GetZmax () const |
Get position of high-Z edge in the gap coordinate system. | |
float | GetZmin () const |
Get position of low-Z edge in the gap coordinate system. | |
float | GetZmin () const |
Get position of low-Z edge in the gap coordinate system. | |
bool | IsInStrip (const float x, const float y, const float z) const |
Is the point within the boundaries of this strip? | |
bool | IsInStrip (const float x, const float y, const float z) const |
Is the point within the boundaries of this strip? | |
MucGeoStrip (const int strip, MucGeoGap *const pGap) | |
Default constructor. | |
MucGeoStrip (const int strip, MucGeoGap *const pGap) | |
Default constructor. | |
int | Part () |
Get Part No. | |
int | Part () |
Get Part No. | |
int | Seg () |
Get Seg No. | |
int | Seg () |
Get Seg No. | |
void | SetHitStatus (const bool hit) |
Set the strip hit status. | |
void | SetHitStatus (const bool hit) |
Set the strip hit status. | |
void | SetLeftNeighbor (MucGeoStrip *p) |
Set pointer to the adjacent strip on the -X or -Y side of this one. | |
void | SetLeftNeighbor (MucGeoStrip *p) |
Set pointer to the adjacent strip on the -X or -Y side of this one. | |
void | SetRightNeighbor (MucGeoStrip *p) |
Set pointer to the adjacent strip on the +X or +Y side of this one. | |
void | SetRightNeighbor (MucGeoStrip *p) |
Set pointer to the adjacent strip on the +X or +Y side of this one. | |
void | SetStrip (TGeoPhysicalNode *stripPhysicalNode) |
Set strip from ROOT. | |
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). | |
void | SetStrip (TGeoPhysicalNode *stripPhysicalNode) |
Set strip from ROOT. | |
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). | |
int | Strip () |
Get Strip No. | |
int | Strip () |
Get Strip No. | |
~MucGeoStrip () | |
Desctructor. | |
~MucGeoStrip () | |
Desctructor. | |
Private Attributes | |
HepPoint3D | m_CenterPos |
HepPoint3D | m_CenterSigma |
float | m_dzFarBackGas |
float | m_dzFarFrontGas |
float | m_dzNearBackGas |
float | m_dzNearFrontGas |
bool | m_HitStatus |
int | m_padID |
MucGeoGap * | m_pGap |
MucGeoGap * | m_pGap |
MucGeoStrip * | m_pLeftNeighbor |
MucGeoStrip * | m_pLeftNeighbor |
MucGeoStrip * | m_pRightNeighbor |
MucGeoStrip * | m_pRightNeighbor |
int | m_Strip |
float | m_Xmax |
float | m_Xmin |
float | m_Ymax |
float | m_Ymin |
float | m_Zmax |
float | m_Zmin |
|
Default constructor.
00021 : m_Strip(strip), 00022 m_pGap(pGap), 00023 m_pLeftNeighbor(0L), 00024 m_pRightNeighbor(0L), 00025 m_CenterPos(0.0,0.0,0.0), 00026 m_CenterSigma(0.0,0.0,0.0) 00027 { 00028 // Constructor (dummy strip position and sizes). 00029 }
|
|
Desctructor.
00032 { 00033 // Destructor. 00034 m_pLeftNeighbor = 0L; 00035 m_pRightNeighbor = 0L; 00036 m_pGap = 0L; 00037 }
|
|
Default constructor.
|
|
Desctructor.
|
|
Does the line cross this strip?
|
|
Does the line cross this strip?
00168 { 00169 // Does the line cross this strip? 00170 00171 // We need to define the 6 planes then loop over to check for intersection. 00172 // All are defined in the gap coordinate. 00173 HepPlane3D stripSide[6]; 00174 00175 // Xmin. 00176 HepPoint3D p0Xmin(m_Xmin, m_Ymin, m_dzFarFrontGas); 00177 HepPoint3D p1Xmin(m_Xmin, m_Ymax, m_dzFarFrontGas); 00178 HepPoint3D p2Xmin(m_Xmin, m_Ymin, m_dzFarBackGas); 00179 HepPlane3D plane0(p0Xmin, p1Xmin, p2Xmin); 00180 stripSide[0] = plane0; 00181 00182 // Xmax. 00183 HepPoint3D p0Xmax(m_Xmax, m_Ymin, m_dzFarFrontGas); 00184 HepPoint3D p1Xmax(m_Xmax, m_Ymax, m_dzFarFrontGas); 00185 HepPoint3D p2Xmax(m_Xmax, m_Ymin, m_dzFarBackGas); 00186 HepPlane3D plane1(p0Xmax, p1Xmax, p2Xmax); 00187 stripSide[1] = plane1; 00188 00189 // Ymin. 00190 HepPoint3D p0Ymin(m_Xmin, m_Ymin, m_dzFarFrontGas); 00191 HepPoint3D p1Ymin(m_Xmax, m_Ymin, m_dzFarFrontGas); 00192 HepPoint3D p2Ymin(m_Xmin, m_Ymin, m_dzFarBackGas); 00193 HepPlane3D plane2(p0Ymin, p1Ymin, p2Ymin); 00194 stripSide[2] = plane2; 00195 00196 // Ymax. 00197 HepPoint3D p0Ymax(m_Xmin, m_Ymax, m_dzFarFrontGas); 00198 HepPoint3D p1Ymax(m_Xmax, m_Ymax, m_dzFarFrontGas); 00199 HepPoint3D p2Ymax(m_Xmin, m_Ymax, m_dzFarBackGas); 00200 HepPlane3D plane3(p0Ymax, p1Ymax, p2Ymax); 00201 stripSide[3] = plane3; 00202 00203 // Zmin. 00204 HepPoint3D p0Zmin(m_Xmin, m_Ymin, m_dzFarFrontGas); 00205 HepPoint3D p1Zmin(m_Xmax, m_Ymin, m_dzFarFrontGas); 00206 HepPoint3D p2Zmin(m_Xmin, m_Ymax, m_dzFarFrontGas); 00207 HepPlane3D plane4(p0Zmin, p1Zmin, p2Zmin); 00208 stripSide[4] = plane4; 00209 00210 // Zmax. 00211 HepPoint3D p0Zmax(m_Xmin, m_Ymin, m_dzFarBackGas); 00212 HepPoint3D p1Zmax(m_Xmax, m_Ymin, m_dzFarBackGas); 00213 HepPoint3D p2Zmax(m_Xmin, m_Ymax, m_dzFarBackGas); 00214 HepPlane3D plane5(p0Zmax, p1Zmax, p2Zmax); 00215 stripSide[5] = plane5; 00216 00217 //cout << m_Xmin << " " << m_Xmax << endl 00218 // << m_Ymin << " " << m_Ymax << endl 00219 // << m_dzFarFrontGas << " " << m_dzFarBackGas << endl; 00220 00221 //If particle intersects this strip there should only be two crossings. 00222 int numIntersections = 0; 00223 MucGeometron geometron; 00224 bool intersectFlag = 0; 00225 HepPoint3D gCross(0,0,0); 00226 00227 for (int sideID = 0; sideID<6; sideID++) 00228 { 00229 intersectFlag = geometron.GetIntersectionLinePlane(linePoint, 00230 lineDir, 00231 stripSide[sideID], 00232 gCross); 00233 if( intersectFlag && 00234 ( gCross.x() >= m_Xmin - 1) && // expend strip size, to avoid gap between two strip 00235 ( gCross.x() <= m_Xmax + 1) && 00236 ( gCross.y() >= m_Ymin - 1) && 00237 ( gCross.y() <= m_Ymax + 1) && 00238 ( ( gCross.z() >= m_dzFarFrontGas && gCross.z() <= m_dzNearFrontGas ) || 00239 ( gCross.z() >= m_dzNearBackGas && gCross.z() <= m_dzFarBackGas) ) ) { 00240 numIntersections++; 00241 //cout << m_StripID.GetStrip() << gCross << endl; 00242 } 00243 } 00244 00245 //if( numIntersections == 1 ) { 00246 // cout<<"MucGeoStrip::IntersectStrip(): Warning only one intersection. Should be two!" << endl; 00247 //} 00248 00249 if( numIntersections > 2 ) { 00250 // cout<<"MucGeoStrip::CrossGasChamber(): Warning too many intersections " 00251 // << numIntersections 00252 // << endl; 00253 } 00254 00255 if( numIntersections > 0 ) return true; 00256 00257 return false; 00258 }
|
|
Get Gap No.
|
|
Get Gap No.
|
|
Get center position of this strip (in the gap coordinate system).
|
|
Get center position of this strip (in the gap coordinate system).
00041 { 00042 // Get center position of this strip (in the gap coordinate system). 00043 x = m_CenterPos.x(); 00044 y = m_CenterPos.y(); 00045 z = m_CenterPos.z(); 00046 00047 return; 00048 }
|
|
Get uncertainty in the position of this strip (in the gap coordinate system).
|
|
Get uncertainty in the position of this strip (in the gap coordinate system).
00052 { 00053 // Get uncertainty in the position of this strip (in the gap coordinate system). 00054 sx = m_CenterSigma.x(); 00055 sy = m_CenterSigma.y(); 00056 sz = m_CenterSigma.z(); 00057 00058 return; 00059 }
|
|
Get the pointer to the gap that contains the strip.
00065 { return m_pGap; }
|
|
Get the pointer to the gap that contains the strip.
00065 { return m_pGap; }
|
|
Get the strip hit status.
00098 { return m_HitStatus; }
|
|
Get the strip hit status.
00098 { return m_HitStatus; }
|
|
Get the pointer to the adjacent strip on the -X or -Y side of this one.
00068 { return m_pLeftNeighbor; }
|
|
Get the pointer to the adjacent strip on the -X or -Y side of this one.
00068 { return m_pLeftNeighbor; }
|
|
Get the pointer to the adjacent strip on the +X or +Y side of this one.
00071 { return m_pRightNeighbor; }
|
|
Get the pointer to the adjacent strip on the +X or +Y side of this one.
00071 { return m_pRightNeighbor; }
|
|
Get position of high-X edge in the gap coordinate system.
00077 { return m_Xmax; }
|
|
Get position of high-X edge in the gap coordinate system.
00077 { return m_Xmax; }
|
|
Get position of low-X edge in the gap coordinate system.
00074 { return m_Xmin; }
|
|
Get position of low-X edge in the gap coordinate system.
00074 { return m_Xmin; }
|
|
Get position of high-Y edge in the gap coordinate system.
00083 { return m_Ymax; }
|
|
Get position of high-Y edge in the gap coordinate system.
00083 { return m_Ymax; }
|
|
Get position of low-Y edge in the gap coordinate system.
00080 { return m_Ymin; }
|
|
Get position of low-Y edge in the gap coordinate system.
00080 { return m_Ymin; }
|
|
Get position of high-Z edge in the gap coordinate system.
00089 { return m_Zmax; }
|
|
Get position of high-Z edge in the gap coordinate system.
00089 { return m_Zmax; }
|
|
Get position of low-Z edge in the gap coordinate system.
00086 { return m_Zmin; }
|
|
Get position of low-Z edge in the gap coordinate system.
00086 { return m_Zmin; }
|
|
Is the point within the boundaries of this strip?
|
|
Is the point within the boundaries of this strip?
00156 { 00157 // Is the point within the boundaries of this strip? 00158 return ( (x > m_Xmin) && (x < m_Xmax) 00159 && (y > m_Ymin) && (y < m_Ymax) 00160 && (z >= m_dzFarFrontGas) 00161 && (z <= m_dzFarBackGas) ); 00162 }
|
|
Get Part No.
|
|
Get Part No.
|
|
Get Seg No.
|
|
Get Seg No.
|
|
Set the strip hit status.
00119 { m_HitStatus = hit; }
|
|
Set the strip hit status.
00119 { m_HitStatus = hit; }
|
|
Set pointer to the adjacent strip on the -X or -Y side of this one.
|
|
Set pointer to the adjacent strip on the -X or -Y side of this one. Set pointer to the adjacent strip on the -X or -Y side of this one. 00136 { 00138 // (0 if no neighbor in this gap). 00139 if (p) 00140 m_pLeftNeighbor = p; 00141 }
|
|
Set pointer to the adjacent strip on the +X or +Y side of this one.
|
|
Set pointer to the adjacent strip on the +X or +Y side of this one. Set pointer to the adjacent strip on the +X or +Y side of this one. 00145 { 00147 // (0 if no neighbor in this gap). 00148 if (p) 00149 m_pRightNeighbor = p; 00150 }
|
|
Set strip from ROOT.
|
|
Set the edge, center and sigma of the strip (in the gap coordinate system).
|
|
Set strip from ROOT.
00094 { 00095 // Set the edge, center and sigma of the strip (in the gap coordinate system). 00096 double un = 1.0; // Uncertainty. 00097 00098 TGeoBBox *stripBox = (TGeoBBox*)stripPhysicalNode->GetShape(); 00099 00100 double xSize = 2.0 * stripBox->GetDX(); 00101 double ySize = 2.0 * stripBox->GetDY(); 00102 double zSize = 2.0 * stripBox->GetDZ(); 00103 00104 m_dzFarFrontGas = GetGap()->GetdzFarFrontGas(); 00105 m_dzNearFrontGas = GetGap()->GetdzNearFrontGas(); 00106 m_dzNearBackGas = GetGap()->GetdzNearBackGas(); 00107 m_dzFarBackGas = GetGap()->GetdzFarBackGas(); 00108 00109 double eTrans[3], *pTrans; 00110 pTrans = eTrans; 00111 //int level = stripPhysicalNode->GetLevel(); 00112 double eLocal[3], *pLocal; 00113 pLocal = eLocal; 00114 for (int i = 0; i < 3; i++) pLocal[i] = 0.0; 00115 stripPhysicalNode->GetNode()->LocalToMaster(pLocal, pTrans); 00116 00117 m_CenterPos.setX( pTrans[0] ); 00118 m_CenterPos.setY( pTrans[1] ); 00119 m_CenterPos.setZ( pTrans[2] ); 00120 00121 m_Xmin = pTrans[0] - 0.5 * xSize; 00122 m_Xmax = pTrans[0] + 0.5 * xSize; 00123 m_Ymin = pTrans[1] - 0.5 * ySize; 00124 m_Ymax = pTrans[1] + 0.5 * ySize; 00125 m_Zmin = pTrans[2] - 0.5 * zSize; 00126 m_Zmax = pTrans[2] + 0.5 * zSize; 00127 00128 m_CenterSigma.setX(un*xSize); 00129 m_CenterSigma.setY(un*ySize); 00130 m_CenterSigma.setZ(un*zSize); 00131 //cout << m_CenterPos << endl; 00132 }
|
|
Set the edge, center and sigma of the strip (in the gap coordinate system).
00067 { 00068 // Set the edge, center and sigma of the strip (in the gap coordinate system). 00069 double un = 1.0; // Uncertainty. 00070 00071 m_Xmin = x1; 00072 m_Xmax = x2; 00073 m_Ymin = y1; 00074 m_Ymax = y2; 00075 m_Zmin = -0.5*zSize; 00076 m_Zmax = 0.5*zSize; 00077 00078 m_dzFarFrontGas = GetGap()->GetdzFarFrontGas(); 00079 m_dzNearFrontGas = GetGap()->GetdzNearFrontGas(); 00080 m_dzNearBackGas = GetGap()->GetdzNearBackGas(); 00081 m_dzFarBackGas = GetGap()->GetdzFarBackGas(); 00082 00083 m_CenterPos.setX(0.5*(m_Xmin + m_Xmax)); 00084 m_CenterPos.setY(0.5*(m_Ymin + m_Ymax)); 00085 m_CenterPos.setZ(0.0); 00086 00087 m_CenterSigma.setX(un*xSize); 00088 m_CenterSigma.setY(un*ySize); 00089 m_CenterSigma.setZ(un*zSize); 00090 }
|
|
Get Strip No.
00062 { return m_Strip; }
|
|
Get Strip No.
00062 { return m_Strip; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|