30 cout << endl <<
"****** Initialize MucGeoGeneral! ******" << endl << endl;
34 std::cout<<
"================================ begin event " << std::endl;
37 Hep3Vector gVect(-1,0.8,-1.4);
39 cout <<
"********************" << endl << endl ;
40 cout <<
" Origin of the track : " << gPoint << endl;
41 cout <<
" Direction of the track : " << gVect << endl;
43 vector<Identifier> idGap, idGapTemp;
48 for( vector<Identifier>::iterator
iter = idGapTemp.begin();
50 idGap.push_back(*
iter);
55 cout << endl <<
"********************" << endl << endl;
56 cout <<
" Number of intersect gaps : " << idGap.size() << endl << endl;
58 for(
unsigned int i = 0; i< idGap.size(); i++){
59 cout << idGap[i] << endl;
62 vector<Identifier> idStrip, idStripTemp;
67 for( vector<Identifier>::iterator
iter = idStripTemp.begin();
69 idStrip.push_back(*
iter);
74 cout << endl <<
"********************" << endl << endl;
75 cout <<
" Number of intersect strips : " << idStrip.size() << endl << endl;
77 float stripCenterX, stripCenterY, stripCenterZ;
83 for(
unsigned int i = 0; i < idStrip.size(); i++) {
94 localStripCenter.setX(stripCenterX);
95 localStripCenter.setY(stripCenterY);
96 localStripCenter.setZ(stripCenterZ);
100 cout << idStrip[i] <<
" center : " << stripCenter << endl;
110 for( vector<HepPoint3D>::iterator
iter = intersectionTemp.begin();
111 iter != intersectionTemp.end(); ++
iter) {
117 cout << endl <<
"********************" << endl << endl;
118 cout <<
" Number of intersections : " <<
intersection.size() << endl << endl;
121 for(
unsigned int i = 0; i <
intersection.size(); i++) {
125 cout << endl <<
"********************" << endl << endl;
127 cout <<
" MucGeoTest1:: Execute Successfully!!"
int intersection(const HepPoint3D &c1, double r1, const HepPoint3D &c2, double r2, double eps, HepPoint3D &x1, HepPoint3D &x2)
Circle utilities.
HepPoint3D TransformToGlobal(const HepPoint3D pPoint) const
Transform a point from gap coordinate to global coordinate.
void Init()
Initialize the instance of MucGeoGeneral.
MucGeoStrip * GetStrip(const int part, const int seg, const int gap, const int strip) const
Get a pointer to the strip identified by (part,seg,gap,strip).
vector< HepPoint3D > FindIntersections(const int part, const int gap, const HepPoint3D gPoint, const Hep3Vector gDirection)
vector< Identifier > FindIntersectGaps(const int part, const int gap, const HepPoint3D gPoint, const Hep3Vector gDirection)
vector< Identifier > FindIntersectStrips(const int part, const int gap, const HepPoint3D gPoint, const Hep3Vector gDirection)
static MucGeoGeneral * Instance()
Get a pointer to the single instance of MucGeoGeneral.
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).
static int part(const Identifier &id)
static value_type getPartNum()
static int gap(const Identifier &id)
static int seg(const Identifier &id)
static int strip(const Identifier &id)
static value_type getGapNum(int part)