#include <MucGeoGap.h>
Public Member Functions | |
MucGeoStrip * | AddStrip (const int strip) |
Add a strip to the gap. | |
MucGeoStrip * | AddStrip (const int strip) |
Add a strip to the gap. | |
HepPoint3D | CompareIntersection (const int whichhalf, const HepPoint3D gCross1, const HepPoint3D gCross2, const float a, const float b, const float c) const |
HepPoint3D | CompareIntersection (const int whichhalf, const HepPoint3D gCross1, const HepPoint3D gCross2, const float a, const float b, const float c) const |
int | Gap () const |
Get gap identifier (0-8). | |
int | Gap () const |
Get gap identifier (0-8). | |
HepPoint3D | GetCenter () const |
Get gap center position in global coordinate. | |
HepPoint3D | GetCenter () const |
Get gap center position in global coordinate. | |
float | GetdzFarBackGas () const |
Get m_dzFarFrontGas;. | |
float | GetdzFarBackGas () const |
Get m_dzFarFrontGas;. | |
float | GetdzFarFrontGas () const |
Get m_dzFarFrontGas;. | |
float | GetdzFarFrontGas () const |
Get m_dzFarFrontGas;. | |
float | GetdzNearBackGas () const |
Get m_dzNearBackGas;. | |
float | GetdzNearBackGas () const |
Get m_dzNearBackGas;. | |
float | GetdzNearFrontGas () const |
Get m_dzNearFrontGas;. | |
float | GetdzNearFrontGas () const |
Get m_dzNearFrontGas;. | |
bool | GetHitStatus () const |
Get whether this gap is hit. | |
bool | GetHitStatus () const |
Get whether this gap is hit. | |
float | GetIronThickness () const |
float | GetIronThickness () const |
void | GetRotationMatrix (float &thetaX, float &phiX, float &thetaY, float &phiY, float &thetaZ, float &phiZ) const |
Get the rotation angles (in degrees) of the gap in global coordinate. | |
void | GetRotationMatrix (float &thetaX, float &phiX, float &thetaY, float &phiY, float &thetaZ, float &phiZ) const |
Get the rotation angles (in degrees) of the gap in global coordinate. | |
void | GetSize (float &xSize, float &ySize, float &zSize) const |
Get size of this gap. | |
void | GetSize (float &xSize, float &ySize, float &zSize) const |
Get size of this gap. | |
MucGeoStrip * | GetStrip (const int strip) const |
Point to a strip within this gap. | |
MucGeoStrip * | GetStrip (const int strip) const |
Point to a strip within this gap. | |
int | GetStripNum () const |
Get number of strips in this gap. | |
int | GetStripNum () const |
Get number of strips in this gap. | |
int | GuessStrip (const float x, const float y, const float z) const |
int | GuessStrip (const float x, const float y, const float z) const |
bool | IsInGap (const float x, const float y, const float z) const |
Check if the point (given in gap coordinate) is within the gap boundary. | |
bool | IsInGap (const float x, const float y, const float z) const |
Check if the point (given in gap coordinate) is within the gap boundary. | |
MucGeoGap (const MucGeoGap &orig) | |
Copy constructor. | |
MucGeoGap (const int part, const int seg, const int gap, const int orient, const int stripNum, const TGeoPhysicalNode *gapPhyscialNode, const float ironThickness) | |
ROOT constructor. | |
MucGeoGap (const int part, const int seg, const int gap, const int orient, const int stripNum, const float xSize, const float ySize, const float zSize, const float xTarget1Global, const float yTarget1Global, const float zTarget1Global, const float xTarget2Global, const float yTarget2Global, const float zTarget2Global, const float xTarget3Global, const float yTarget3Global, const float zTarget3Global, const float dzHighEdge, const float dzFarFrontGas, const float dzNearFrontGas, const float dzNearBackGas, const float dzFarBackGas, const float dxTarget1ToFiducial, const float dyTarget1ToFiducial, const float dxFiducialToCenter, const float dyFiducialToCenter) | |
Real constructor (construct strips externally). | |
MucGeoGap () | |
Default constructor. | |
MucGeoGap (const MucGeoGap &orig) | |
Copy constructor. | |
MucGeoGap (const int part, const int seg, const int gap, const int orient, const int stripNum, const TGeoPhysicalNode *gapPhyscialNode, const float ironThickness) | |
ROOT constructor. | |
MucGeoGap (const int part, const int seg, const int gap, const int orient, const int stripNum, const float xSize, const float ySize, const float zSize, const float xTarget1Global, const float yTarget1Global, const float zTarget1Global, const float xTarget2Global, const float yTarget2Global, const float zTarget2Global, const float xTarget3Global, const float yTarget3Global, const float zTarget3Global, const float dzHighEdge, const float dzFarFrontGas, const float dzNearFrontGas, const float dzNearBackGas, const float dzFarBackGas, const float dxTarget1ToFiducial, const float dyTarget1ToFiducial, const float dxFiducialToCenter, const float dyFiducialToCenter) | |
Real constructor (construct strips externally). | |
MucGeoGap () | |
Default constructor. | |
MucGeoGap & | operator= (const MucGeoGap &orig) |
Assignment constructor. | |
MucGeoGap & | operator= (const MucGeoGap &orig) |
Assignment constructor. | |
int | Orient () const |
int | Orient () const |
int | Part () const |
Get part identifier (0,2 for cap, 1 for barrel). | |
int | Part () const |
Get part identifier (0,2 for cap, 1 for barrel). | |
HepPoint3D | ProjectToGap (const HepPoint3D gPoint, const float vy, const float y0, const float a, const float b, const float c, const int whichhalf, HepPoint3D &cross1, HepPoint3D &cross2) const |
Given parabola, and a line, find the intersection with the gap in the global. | |
HepPoint3D | ProjectToGap (const HepPoint3D gPoint, const Hep3Vector gVect) const |
Given a line, find the intersection with the gap in the global. | |
HepPoint3D | ProjectToGap (const HepPoint3D gPoint, const float vy, const float y0, const float a, const float b, const float c, const int whichhalf, HepPoint3D &cross1, HepPoint3D &cross2) const |
Given parabola, and a line, find the intersection with the gap in the global. | |
HepPoint3D | ProjectToGap (const HepPoint3D gPoint, const Hep3Vector gVect) const |
Given a line, find the intersection with the gap in the global. | |
HepPoint3D | ProjectToGapQuadLocal (const int part, const int orient, const float a, const float b, const float c, const int whichhalf, HepPoint3D &cross1, HepPoint3D &cross2) const |
HepPoint3D | ProjectToGapQuadLocal (const int part, const int orient, const float a, const float b, const float c, const int whichhalf, HepPoint3D &cross1, HepPoint3D &cross2) const |
void | ProjectToGapSurface (const HepPoint3D gPoint, const float vy, const float y0, const float a, const float b, const float c, const int whichhalf, HepPoint3D &cross1, HepPoint3D &cross2) const |
Given parabola, and a line, find the intersection with two surface of the gap in the global. | |
void | ProjectToGapSurface (const HepPoint3D gPoint, const Hep3Vector gVect, HepPoint3D &cross1, HepPoint3D &cross2) const |
Given a line, find the intersection with two surface of the gap in the global. | |
void | ProjectToGapSurface (const HepPoint3D gPoint, const float vy, const float y0, const float a, const float b, const float c, const int whichhalf, HepPoint3D &cross1, HepPoint3D &cross2) const |
Given parabola, and a line, find the intersection with two surface of the gap in the global. | |
void | ProjectToGapSurface (const HepPoint3D gPoint, const Hep3Vector gVect, HepPoint3D &cross1, HepPoint3D &cross2) const |
Given a line, find the intersection with two surface of the gap in the global. | |
HepPoint3D | ProjectToGapWithSigma (const HepPoint3D gPoint, const Hep3Vector gVect, const HepPoint3D gPointSigma, const Hep3Vector gVectSigma, HepPoint3D &gCross, HepPoint3D &gCrossSigma) const |
HepPoint3D | ProjectToGapWithSigma (const HepPoint3D gPoint, const Hep3Vector gVect, const HepPoint3D gPointSigma, const Hep3Vector gVectSigma, HepPoint3D &gCross, HepPoint3D &gCrossSigma) const |
Hep3Vector | RotateToGap (const Hep3Vector gVect) const |
Rotate a vector from global coordinate to gap coordinate. | |
Hep3Vector | RotateToGap (const Hep3Vector gVect) const |
Rotate a vector from global coordinate to gap coordinate. | |
Hep3Vector | RotateToGlobal (const Hep3Vector pVect) const |
Rotate a vector from gap coordinate to global coordinate. | |
Hep3Vector | RotateToGlobal (const Hep3Vector pVect) const |
Rotate a vector from gap coordinate to global coordinate. | |
int | Seg () const |
Get seg identifier (0-7). | |
int | Seg () const |
Get seg identifier (0-7). | |
void | SetHitStatus (const bool hit) |
Tell whether or not this gap registered a signal in this event. | |
void | SetHitStatus (const bool hit) |
Tell whether or not this gap registered a signal in this event. | |
HepPoint3D | TransformToGap (const HepPoint3D gPoint) const |
Transform a point from global coordinate to gap coordinate. | |
HepPoint3D | TransformToGap (const HepPoint3D gPoint) const |
Transform a point from global coordinate to gap coordinate. | |
HepPoint3D | TransformToGlobal (const HepPoint3D pPoint) const |
Transform a point from gap coordinate to global coordinate. | |
HepPoint3D | TransformToGlobal (const HepPoint3D pPoint) const |
Transform a point from gap coordinate to global coordinate. | |
~MucGeoGap () | |
Desctructor. | |
~MucGeoGap () | |
Desctructor. | |
Private Attributes | |
HepPoint3D | m_Center |
float | m_dzFarBackGas |
float | m_dzFarFrontGas |
float | m_dzHighEdge |
float | m_dzNearBackGas |
float | m_dzNearFrontGas |
int | m_Gap |
bool | m_HitStatus |
float | m_IronThickness |
int | m_Orient |
int | m_Part |
TGeoPhysicalNode * | m_PhyNode |
TGeoPhysicalNode * | m_PhyNode |
vector< MucGeoStrip * > | m_pMucGeoStrip |
vector< MucGeoStrip * > | m_pMucGeoStrip |
HepRotation | m_Rotation |
HepRotation | m_RotationT |
int | m_Seg |
int | m_StripNum |
HepPoint3D | m_SurfaceInner |
HepPoint3D | m_SurfaceOuter |
Hep3Vector | m_Translation |
float | m_XSize |
float | m_YSize |
float | m_ZSize |
|
Default constructor.
00025 : m_Part(-1), 00026 m_Seg(-1), 00027 m_Gap(-1), 00028 m_StripNum(-1), 00029 m_XSize(-1.0), 00030 m_YSize(-1.0), 00031 m_ZSize(-1.0) 00032 { 00033 // Default constructor. 00034 }
|
|
Real constructor (construct strips externally).
00062 : m_Part(part), 00063 m_Seg(seg), 00064 m_Gap(gap), 00065 m_StripNum(stripNum), 00066 m_Orient(orient), 00067 m_XSize(xSize), 00068 m_YSize(ySize), 00069 m_ZSize(zSize), 00070 m_dzHighEdge(dzHighEdge), 00071 m_dzFarFrontGas(dzFarFrontGas), 00072 m_dzNearFrontGas(dzNearFrontGas), 00073 m_dzNearBackGas(dzNearBackGas), 00074 m_dzFarBackGas(dzFarBackGas), 00075 m_pMucGeoStrip(MucID::getStripNum(part, seg, gap)) 00076 { 00077 // Real constructor (construct strips externally). 00078 00079 // v1Global, v2Global, v3Global are position vectors of the three survey targets in the 00080 // Bes global coordinate system. 00081 //cout << m_dzHighEdge << " " << m_dzFarFrontGas << " " << m_dzNearFrontGas << " " << dzNearBackGas << " " << dzFarBackGas << endl; 00082 Hep3Vector v1Global(xTarget1Global, yTarget1Global, zTarget1Global); 00083 Hep3Vector v2Global(xTarget2Global, yTarget2Global, zTarget2Global); 00084 Hep3Vector v3Global(xTarget3Global, yTarget3Global, zTarget3Global); 00085 00086 Hep3Vector v2To1Global = v1Global - v2Global; 00087 Hep3Vector v3To1Global = v1Global - v3Global; 00088 00089 // v1Gap is the position vector of target1 in the gap coordinate system. 00090 Hep3Vector v1Gap(dxTarget1ToFiducial + dxFiducialToCenter, 00091 dyTarget1ToFiducial + dyFiducialToCenter, 00092 0.0); 00093 00094 // Make rotaiton and translation matrix. 00095 Hep3Vector newX(1,0,0), newY(0,1,0), newZ(0,0,1); 00096 HepRotation rotateGap(newX, newY, newZ); 00097 00098 if(part == 1) { 00099 newX = v2To1Global; 00100 newX.setMag(1.0); 00101 newY = v3To1Global; 00102 newY.setMag(1.0); 00103 newZ = newX.cross(newY); 00104 } 00105 if(part != 1) { 00106 newY = -1.0*v2To1Global; 00107 newY.setMag(1.0); 00108 newZ = v3To1Global.cross(newY); 00109 newZ.setMag(1.0); 00110 newX = newY.cross(newZ); 00111 } 00112 00113 HepRotation rotateGlobal(newX, newY, newZ); 00114 HepRotation rotateGapToGlobal(rotateGlobal * rotateGap); 00115 00116 Hep3Vector translateGapToGlobal(v1Global - rotateGapToGlobal * v1Gap); 00117 00118 m_Rotation = rotateGapToGlobal; 00119 m_Translation = translateGapToGlobal; 00120 m_Center = m_Translation; 00121 00122 //cout << " Rotation : " << endl << m_Rotation.xx() << " " << m_Rotation.xy() << " " << m_Rotation.xz() << endl << m_Rotation.yx() << " " << m_Rotation.yy() << " " << m_Rotation.yz() << endl << m_Rotation.zx() << " " << m_Rotation.zy() << " " << m_Rotation.zz() << endl; 00123 //cout << " Center : " << m_Center << endl; 00124 00125 HepMatrix rM(3,3), rMT(3,3); 00126 for(int i=0; i<3; i++){ 00127 for(int j=0; j<3; j++){ 00128 rM[i][j] = m_Rotation(i,j); 00129 } 00130 } 00131 rMT = rM.T(); 00132 00133 Hep3Vector newXT(rMT(1,1),rMT(2,1),rMT(3,1)); 00134 Hep3Vector newYT(rMT(1,2),rMT(2,2),rMT(3,2)); 00135 Hep3Vector newZT(rMT(1,3),rMT(2,3),rMT(3,3)); 00136 HepRotation rotateGlobalToGap(newXT,newYT,newZT); 00137 00138 m_RotationT = rotateGlobalToGap; 00139 }
|
|
ROOT constructor.
00149 : m_Part(part), 00150 m_Seg(seg), 00151 m_Gap(gap), 00152 m_StripNum(stripNum), 00153 m_Orient(orient), 00154 m_pMucGeoStrip(MucID::getStripNum(part, seg, gap)), 00155 m_IronThickness(ironThickness) 00156 00157 { 00158 TGeoBBox *gapBox = (TGeoBBox*)gapPhysicalNode->GetShape(); 00159 00160 m_XSize = gapBox->GetDX() * 2.0; 00161 m_YSize = gapBox->GetDY() * 2.0; 00162 m_ZSize = gapBox->GetDZ() * 2.0; 00163 00164 m_dzHighEdge = 20.0; 00165 m_dzFarFrontGas = -4.5; 00166 m_dzNearFrontGas = -2.5; 00167 m_dzNearBackGas = 2.5; 00168 m_dzFarBackGas = 4.5; 00169 00170 double eRot[9], *pRot; 00171 pRot = eRot; 00172 pRot = gapPhysicalNode->GetMatrix()->GetRotationMatrix(); 00173 00174 //cout << "part " << part << " seg " << seg << " gap " << gap << endl; 00175 //cout << pRot[0] << " " << pRot[1] << " " << pRot[2] << endl 00176 // << pRot[3] << " " << pRot[4] << " " << pRot[5] << endl 00177 // << pRot[6] << " " << pRot[7] << " " << pRot[8] << endl; 00178 Hep3Vector rotX(pRot[0], pRot[3], pRot[6]); 00179 Hep3Vector rotY(pRot[1], pRot[4], pRot[7]); 00180 Hep3Vector rotZ(pRot[2], pRot[5], pRot[8]); 00181 HepRotation rotateGapToGlobal(rotX, rotY, rotZ); 00182 m_Rotation = rotateGapToGlobal; 00183 00184 Hep3Vector rotTX(pRot[0], pRot[1], pRot[2]); 00185 Hep3Vector rotTY(pRot[3], pRot[4], pRot[5]); 00186 Hep3Vector rotTZ(pRot[6], pRot[7], pRot[8]); 00187 HepRotation rotateGlobalToGap(rotTX, rotTY, rotTZ); 00188 m_RotationT = rotateGlobalToGap; 00189 00190 double eTrans[3], *pTrans; 00191 pTrans = eTrans; 00192 pTrans = gapPhysicalNode->GetMatrix()->GetTranslation(); 00193 00194 Hep3Vector translateGapToGlobal(pTrans[0], pTrans[1], pTrans[2]); 00195 m_Translation = translateGapToGlobal; 00196 m_Center = m_Translation; 00197 00198 00199 double eTrans_gap[3], *pTrans_gap; //pTran is for box now!!! 00200 pTrans_gap = eTrans_gap; 00201 pTrans_gap = gapPhysicalNode->GetMatrix(2)->GetTranslation(); 00202 //std::cout <<"gap position: "<<pTrans_gap[0]<< " " << pTrans_gap[1] << " " << pTrans_gap[2] << std::endl; 00203 00204 Hep3Vector GapSurface1, GapSurface2; 00205 Hep3Vector GapCenter(pTrans_gap[0], pTrans_gap[1], pTrans_gap[2]); 00206 GapSurface1 = GapCenter - rotZ * 20; //Gap thickness/2= 20 00207 GapSurface2 = GapCenter + rotZ * 20; //Gap thickness/2= 20 00208 00209 m_SurfaceInner = GapSurface1; 00210 m_SurfaceOuter = GapSurface2; 00211 if(GapSurface1.mag()>GapSurface2.mag())//keep Inner be the little one 00212 { 00213 m_SurfaceInner = GapSurface2; 00214 m_SurfaceOuter = GapSurface1; 00215 } 00216 00217 // std::cout <<"sur1 position: "<<GapSurface1[0]<<" "<<GapSurface1[1]<<" "<<GapSurface1[2]<<std::endl; 00218 // std::cout <<"sur2 position: "<<GapSurface2[0]<<" "<<GapSurface2[1]<<" "<<GapSurface2[2]<<std::endl; 00219 // std::cout <<"box position: "<< pTrans[0] << " " << pTrans[1] << " " << pTrans[2] << std::endl; 00220 }
|
|
Copy constructor.
00258 : m_Part(orig.m_Part), 00259 m_Seg(m_Seg), 00260 m_Gap(m_Gap), 00261 m_StripNum(orig.m_StripNum), 00262 m_Orient(orig.m_Orient), 00263 m_HitStatus(orig.m_HitStatus), 00264 m_XSize(orig.m_XSize), 00265 m_YSize(orig.m_YSize), 00266 m_ZSize(orig.m_ZSize), 00267 m_dzHighEdge(orig.m_dzHighEdge), 00268 m_dzFarFrontGas(orig.m_dzFarFrontGas), 00269 m_dzNearFrontGas(orig.m_dzNearFrontGas), 00270 m_dzNearBackGas(orig.m_dzNearBackGas), 00271 m_dzFarBackGas(orig.m_dzFarBackGas), 00272 m_Center(orig.m_Center), 00273 m_Rotation(orig.m_Rotation), 00274 m_RotationT(orig.m_RotationT), 00275 m_Translation(orig.m_Translation), 00276 m_IronThickness(orig.m_IronThickness) 00277 { 00278 // Copy constructor. 00279 m_pMucGeoStrip = orig.m_pMucGeoStrip; 00280 }
|
|
Desctructor.
00283 { 00284 // Destructor. 00285 MucGeoStrip* pStrip = 0; 00286 while(m_pMucGeoStrip.size() > 0){ 00287 pStrip = m_pMucGeoStrip.back(); 00288 delete pStrip; 00289 m_pMucGeoStrip.pop_back(); 00290 } 00291 }
|
|
Default constructor.
|
|
Real constructor (construct strips externally).
|
|
ROOT constructor.
|
|
Copy constructor.
|
|
Desctructor.
|
|
Add a strip to the gap.
|
|
Add a strip to the gap.
00646 { 00647 // Add a strip to the gap. 00648 MucGeoStrip *pStrip; 00649 MucGeoStrip *neighbor; 00650 00651 if( strip >= int(m_pMucGeoStrip.size()) ) { 00652 cout << " MucGeoGap::AddStrip strip number " 00653 << strip << " outside of expected range " 00654 << m_pMucGeoStrip.size() 00655 << endl; 00656 return 0; 00657 } 00658 00659 if( (strip + 1) > m_StripNum ) m_StripNum = strip + 1; 00660 00661 if(m_pMucGeoStrip[strip]) { 00662 // The strip object has already been created; don't create a new one. 00663 return m_pMucGeoStrip[strip]; 00664 } 00665 00666 pStrip = new MucGeoStrip(strip, this); 00667 00668 m_pMucGeoStrip[strip] = pStrip; 00669 pStrip->SetLeftNeighbor(0L); 00670 pStrip->SetRightNeighbor(0L); 00671 00672 // Make this strip and the previous one neighbors. 00673 if ( strip > 0 ) { 00674 neighbor = m_pMucGeoStrip[strip-1]; 00675 if(neighbor) { 00676 neighbor->SetRightNeighbor(pStrip); 00677 pStrip->SetLeftNeighbor(neighbor); 00678 } 00679 } 00680 00681 return pStrip; 00682 }
|
|
|
|
00562 { 00563 bool found = false; 00564 bool found1 = false; 00565 bool found2 = false; 00566 int good = 0; 00567 00568 HepPoint3D localCross = TransformToGap(gCross1); 00569 if ( IsInGap(localCross.x(), 00570 localCross.y(), 00571 0.0) ) { 00572 good = 1; 00573 found1 = true; 00574 } 00575 00576 localCross = TransformToGap(gCross2); 00577 if ( IsInGap(localCross.x(), 00578 localCross.y(), 00579 0.0) ) { 00580 good = 2; 00581 found2 = true; 00582 } 00583 if(found1&&found2) { 00584 float center = b/(-2*a); 00585 if(whichhalf==2){ 00586 if(gCross1.x()>center) good = 1; 00587 if(gCross2.x()>center) good = 2; 00588 } 00589 if(whichhalf==1){ 00590 if(gCross1.x()<center) good = 1; 00591 if(gCross2.x()<center) good = 2; 00592 } 00593 } 00594 00595 if(good == 1) return gCross1; 00596 else if(good == 2) return gCross2; 00597 else { 00598 HepPoint3D Empty(-9999,-9999,-9999); 00599 cout<<"in MucGeoGap:: both intersection position are bad!!!"<<endl; return Empty; 00600 } 00601 00602 }
|
|
Get gap identifier (0-8).
00104 { return m_Gap; }
|
|
Get gap identifier (0-8).
00104 { return m_Gap; }
|
|
Get gap center position in global coordinate.
00137 { return m_Center; }
|
|
Get gap center position in global coordinate.
00137 { return m_Center; }
|
|
Get m_dzFarFrontGas;.
00128 { return m_dzFarBackGas; }
|
|
Get m_dzFarFrontGas;.
00128 { return m_dzFarBackGas; }
|
|
Get m_dzFarFrontGas;.
00122 { return m_dzFarFrontGas; }
|
|
Get m_dzFarFrontGas;.
00122 { return m_dzFarFrontGas; }
|
|
Get m_dzNearBackGas;.
00131 { return m_dzNearBackGas; }
|
|
Get m_dzNearBackGas;.
00131 { return m_dzNearBackGas; }
|
|
Get m_dzNearFrontGas;.
00125 { return m_dzNearFrontGas; }
|
|
Get m_dzNearFrontGas;.
00125 { return m_dzNearFrontGas; }
|
|
Get whether this gap is hit.
00119 { return m_HitStatus; }
|
|
Get whether this gap is hit.
00119 { return m_HitStatus; }
|
|
00116 { return m_IronThickness; }
|
|
00116 { return m_IronThickness; }
|
|
Get the rotation angles (in degrees) of the gap in global coordinate.
|
|
Get the rotation angles (in degrees) of the gap in global coordinate.
00324 { 00325 // Get the rotation angles (in degrees) of the gap in the global coordinate system. 00326 Hep3Vector x(m_Rotation.colX()); 00327 Hep3Vector y(m_Rotation.colY()); 00328 Hep3Vector z(m_Rotation.colZ()); 00329 00330 thetaX = kRad * x.theta(); 00331 phiX = kRad * x.phi(); 00332 thetaY = kRad * y.theta(); 00333 phiY = kRad * y.phi(); 00334 thetaZ = kRad * z.theta(); 00335 phiZ = kRad * z.phi(); 00336 00337 // cout << "Gap rotation matrix : " << endl 00338 // << "X: theta = " << thetaX << " phi = " << phiX << endl 00339 // << "Y: theta = " << thetaY << " phi = " << phiY << endl 00340 // << "Z: theta = " << thetaZ << " phi = " << phiZ << endl; 00341 00342 return; 00343 }
|
|
Get size of this gap.
|
|
Get size of this gap.
00311 { 00312 // Get size of this gap. 00313 xSize = m_XSize; 00314 ySize = m_YSize; 00315 zSize = m_ZSize; 00316 00317 return; 00318 }
|
|
Point to a strip within this gap.
|
|
Point to a strip within this gap.
00295 { 00296 // Point to a strip within this gap. 00297 if ( strip < 0 || strip >= int(m_pMucGeoStrip.size()) ) { 00298 std::cout << "Error: MucGeoGap::GetStrip() strip " << strip << " exceed strip range" << endl; 00299 return 0; 00300 } 00301 if ( !m_pMucGeoStrip[strip] ) { 00302 std::cout << "Error: MucGeoGap::GetStrip() strip " << strip << " not found" << endl; 00303 return 0; 00304 } 00305 00306 return m_pMucGeoStrip[strip]; 00307 }
|
|
Get number of strips in this gap.
00114 { return m_StripNum; }
|
|
Get number of strips in this gap.
00114 { return m_StripNum; }
|
|
Given a position (gap coordinate), guess the approximate strip containing the position, as there are intervals between the strips. |
|
Given a position (gap coordinate), guess the approximate strip containing the position, as there are intervals between the strips. 00349 { 00350 // Given a position (gap coordinate), find the approximate strip containing the position, as there are intervals between the strips. 00351 float x0, y0, z0; // XYZ position of the strip NO min. 00352 float xn, yn, zn; // XYZ position of the strip NO max. 00353 float dx; // Approximate width of a strip and a interval. 00354 int n, iGuess; 00355 00356 n = m_StripNum - 1; 00357 00358 GetStrip(0)->GetCenterPos(x0, y0, z0); 00359 GetStrip(n)->GetCenterPos(xn, yn, zn); 00360 00361 //cout << n << endl; 00362 //cout << "x0 " << x0 << " xn " << xn << " x " << x << endl; 00363 //cout << "y0 " << y0 << " yn " << yn << " y " << y << endl; 00364 //cout << "orient " << m_Orient << endl; 00365 00366 if(m_Orient == 0){ 00367 dx = (yn-y0)/n; 00368 iGuess = int ((y-y0)/dx+0.5); 00369 return iGuess; 00370 } 00371 else{ 00372 dx = (xn-x0)/n; 00373 iGuess = int ((x-x0)/dx+0.5); 00374 return iGuess; 00375 } 00376 }
|
|
Check if the point (given in gap coordinate) is within the gap boundary.
|
|
Check if the point (given in gap coordinate) is within the gap boundary.
00637 { 00638 // Check if the point (given in gap coordinate) is within the gap boundary. 00639 return ( ( x > -0.5*m_XSize - kGapEdge ) && ( x < 0.5*m_XSize + kGapEdge ) && 00640 ( y > -0.5*m_YSize - kGapEdge ) && ( y < 0.5*m_YSize + kGapEdge ) && 00641 ( z > ( m_dzHighEdge - m_ZSize ) ) && ( z < m_dzHighEdge ) ); 00642 }
|
|
Assignment constructor.
|
|
Assignment constructor.
00224 { 00225 // Assignment operator. 00226 if (this != &orig) { // Watch out for self-assignment! 00227 m_Part = orig.m_Part; 00228 m_Seg = orig.m_Seg; 00229 m_Gap = orig.m_Gap; 00230 m_StripNum = orig.m_StripNum; 00231 m_Orient = orig.m_Orient; 00232 m_HitStatus = orig.m_HitStatus; 00233 00234 m_XSize = orig.m_XSize; 00235 m_YSize = orig.m_YSize; 00236 m_ZSize = orig.m_ZSize; 00237 00238 m_dzHighEdge = orig.m_dzHighEdge; 00239 m_dzFarFrontGas = orig.m_dzFarFrontGas; 00240 m_dzNearFrontGas = orig.m_dzNearFrontGas; 00241 m_dzNearBackGas = orig.m_dzNearBackGas; 00242 m_dzFarBackGas = orig.m_dzFarBackGas; 00243 00244 00245 m_Center = orig.m_Center; 00246 m_Rotation = orig.m_Rotation; 00247 m_RotationT = orig.m_RotationT; 00248 m_Translation = orig.m_Translation; 00249 00250 m_IronThickness = orig.m_IronThickness; 00251 00252 m_pMucGeoStrip = orig.m_pMucGeoStrip; 00253 } 00254 return *this; 00255 }
|
|
Get orientation of strips in this gap ( 0 for strips parrel to x axis, 1 for strips parrel to y axis. in gap coordinate). 00108 { return m_Orient; }
|
|
Get orientation of strips in this gap ( 0 for strips parrel to x axis, 1 for strips parrel to y axis. in gap coordinate). 00108 { return m_Orient; }
|
|
Get part identifier (0,2 for cap, 1 for barrel).
00098 { return m_Part; }
|
|
Get part identifier (0,2 for cap, 1 for barrel).
00098 { return m_Part; }
|
|
Given parabola, and a line, find the intersection with the gap in the global.
|
|
Given a line, find the intersection with the gap in the global.
|
|
Given parabola, and a line, find the intersection with the gap in the global.
00477 { 00478 // Given a line by basepoint gPoint and direction gDirection, 00479 // find the intersection with the gap (in global coordinate). 00480 Hep3Vector gapVect = m_Rotation.colZ(); 00481 00482 HepPlane3D plane(gapVect, m_Center); 00483 MucGeometron geometron; 00484 //bool getPoint = 00485 geometron.GetIntersectionQuadPlane(gPoint, vy, y0, a, b, c, plane, gCross1, gCross2); 00486 00487 HepPoint3D localCross = TransformToGap(gCross1); 00488 00489 bool found = false; 00490 bool found1 = false; 00491 bool found2 = false; 00492 HepPoint3D temp; 00493 int good = 0; 00494 00495 if ( IsInGap(localCross.x(), 00496 localCross.y(), 00497 localCross.z()) ) { 00498 good = 1; 00499 found1 = true; 00500 } 00501 00502 localCross = TransformToGap(gCross2); 00503 if ( IsInGap(localCross.x(), 00504 localCross.y(), 00505 localCross.z()) ) { 00506 good = 2; 00507 found2 = true; 00508 } 00509 if(found1&&found2) { 00510 float center = b/(-2*a); 00511 if(whichhalf==2){ 00512 if(gCross1.x()>center) good = 1; 00513 if(gCross2.x()>center) good = 2; 00514 } 00515 if(whichhalf==1){ 00516 if(gCross1.x()<center) good = 1; 00517 if(gCross2.x()<center) good = 2; 00518 } 00519 } 00520 if(good == 2) {temp = gCross1; gCross1 = gCross2; gCross2 = temp;} //keep gCross1 be the good one! 00521 //cout<<"detail: "<<whichhalf<<" "<<gCross1<<" & "<<gCross2<<" "<<a<<" "<<b<<" "<<c<<endl; 00522 00523 return gCross1; 00524 }
|
|
Given a line, find the intersection with the gap in the global.
00381 { 00382 // Given a line by basepoint gPoint and direction gDirection, 00383 // find the intersection with the gap (in global coordinate). 00384 Hep3Vector gapVect = m_Rotation.colZ(); 00385 HepPoint3D gCross(0,0,0); 00386 00387 HepPlane3D plane(gapVect, m_Center); 00388 MucGeometron geometron; 00389 //bool getPoint = 00390 geometron.GetIntersectionLinePlane(gPoint, gDirection, plane, gCross); 00391 00392 return gCross; 00393 }
|
|
|
|
00443 { 00444 Hep3Vector gapVect, center_local; 00445 if(part == 1 && orient == 1) {gapVect = m_Rotation.colZ(); center_local = m_Center;} 00446 else if(part == 1 && orient == 0) {//in this orientation, the fitting is done in local coordinate. 00447 gapVect.setX(0); gapVect.setY(1); gapVect.setZ(0); 00448 center_local.setX(0); center_local.setY(m_Center.mag()); center_local.setZ(0); 00449 } 00450 else {//in this orientation, the fitting is done in local coordinate. 00451 gapVect.setX(1); gapVect.setY(0); gapVect.setZ(0); 00452 center_local.setX(m_Center.z()); center_local.setY(0); center_local.setZ(0); 00453 } 00454 00455 //cout<<"in mucgeogap: part = "<<part<<" o: "<<orient<<" gapvect: "<<gapVect<<" center = "<<m_Center<<endl; 00456 //cout<<"in mucgeogap: center local = "<<center_local<<endl; 00457 00458 HepPlane3D plane(gapVect, center_local); 00459 00460 MucGeometron geometron; 00461 geometron.GetIntersectionQuadPlaneLocal(part,orient, a, b, c, plane, gCross1, gCross2); 00462 00463 00464 }
|
|
Given parabola, and a line, find the intersection with two surface of the gap in the global.
|
|
Given a line, find the intersection with two surface of the gap in the global.
|
|
Given parabola, and a line, find the intersection with two surface of the gap in the global.
00537 { 00538 // Given a line by basepoint gPoint and direction gDirection, 00539 // find the intersection with the gap (in global coordinate). 00540 00541 HepPoint3D cross1, cross2, cross3, cross4; 00542 00543 Hep3Vector gapVect = m_Rotation.colZ(); 00544 00545 HepPlane3D planeInner(gapVect, m_SurfaceInner); 00546 HepPlane3D planeOuter(gapVect, m_SurfaceOuter); 00547 00548 MucGeometron geometron; 00549 //bool getPoint = 00550 geometron.GetIntersectionQuadPlane(gPoint, vy, y0, a, b, c, planeInner, cross1, cross2); 00551 geometron.GetIntersectionQuadPlane(gPoint, vy, y0, a, b, c, planeOuter, cross3, cross4); 00552 00553 gCross1 = CompareIntersection(whichhalf, cross1, cross2, a, b, c); 00554 gCross2 = CompareIntersection(whichhalf, cross3, cross4, a, b, c); 00555 00556 }
|
|
Given a line, find the intersection with two surface of the gap in the global.
00419 { 00420 // Given a line by basepoint gPoint and direction gDirection, 00421 // find the intersection with the gap (in global coordinate). 00422 Hep3Vector gapVect = m_Rotation.colZ(); 00423 00424 HepPlane3D planeInner(gapVect, m_SurfaceInner); 00425 HepPlane3D planeOuter(gapVect, m_SurfaceOuter); 00426 MucGeometron geometron; 00427 //bool getPoint = 00428 00429 geometron.GetIntersectionLinePlane(gPoint, gDirection, planeInner, gCross1); 00430 geometron.GetIntersectionLinePlane(gPoint, gDirection, planeOuter, gCross2); 00431 00432 }
|
|
|
|
00402 { 00403 Hep3Vector gapVect = m_Rotation.colZ(); 00404 00405 HepPlane3D plane(gapVect, m_Center); 00406 MucGeometron geometron; 00407 geometron.GetIntersectionLinePlaneWithSigma(gPoint, gDirection, gPointSigma, gDirectionSigma, plane, gCross, gCrossSigma); 00408 00409 00410 return gCross; 00411 }
|
|
Rotate a vector from global coordinate to gap coordinate.
|
|
Rotate a vector from global coordinate to gap coordinate.
00614 { 00615 // Rotate a vector from Bes global coordinate to gap coordinate. 00616 return m_RotationT * gVect; 00617 }
|
|
Rotate a vector from gap coordinate to global coordinate.
|
|
Rotate a vector from gap coordinate to global coordinate.
00607 { 00608 // Rotate a vector from gap coordinate to Bes global coordinate. 00609 return m_Rotation * pVect; 00610 }
|
|
Get seg identifier (0-7).
00101 { return m_Seg; }
|
|
Get seg identifier (0-7).
00101 { return m_Seg; }
|
|
Tell whether or not this gap registered a signal in this event.
00218 { m_HitStatus = hit; }
|
|
Tell whether or not this gap registered a signal in this event.
00218 { m_HitStatus = hit; }
|
|
Transform a point from global coordinate to gap coordinate.
|
|
Transform a point from global coordinate to gap coordinate.
00628 { 00629 // Transform a point from Bes global coordinate to gap coordinate. 00630 return m_RotationT * (gPoint - m_Translation); 00631 }
|
|
Transform a point from gap coordinate to global coordinate.
|
|
Transform a point from gap coordinate to global coordinate.
00621 { 00622 // Transform a point from gap coordinate to Bes global coordinate. 00623 return m_Rotation * pPoint + m_Translation; 00624 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|