25{
26
27
28
29
30 cout << endl << "****** Initialize MucGeoGeneral! ******" << endl << endl;
32
33
34 std::cout<<"================================ begin event " << std::endl;
35
37 Hep3Vector gVect(-1,0.8,-1.4);
38
39 cout << "********************" << endl << endl ;
40 cout << " Origin of the track : " << gPoint << endl;
41 cout << " Direction of the track : " << gVect << endl;
42
43 vector<Identifier> idGap, idGapTemp;
47
48 for( vector<Identifier>::iterator
iter = idGapTemp.begin();
50 idGap.push_back(*
iter);
51 }
52 }
53 }
54
55 cout << endl << "********************" << endl << endl;
56 cout << " Number of intersect gaps : " << idGap.size() << endl << endl;
57
58 for( unsigned int i = 0; i< idGap.size(); i++){
59 cout << idGap[i] << endl;
60 }
61
62 vector<Identifier> idStrip, idStripTemp;
66
67 for( vector<Identifier>::iterator
iter = idStripTemp.begin();
69 idStrip.push_back(*
iter);
70 }
71 }
72 }
73
74 cout << endl << "********************" << endl << endl;
75 cout << " Number of intersect strips : " << idStrip.size() << endl << endl;
76
77 float stripCenterX, stripCenterY, stripCenterZ;
81
82
83 for( unsigned int i = 0; i < idStrip.size(); i++) {
89
91 stripCenterY,
92 stripCenterZ);
93
94 localStripCenter.setX(stripCenterX);
95 localStripCenter.setY(stripCenterY);
96 localStripCenter.setZ(stripCenterZ);
97
99
100 cout << idStrip[i] << " center : " << stripCenter << endl;
101 }
102
105
109
110 for( vector<HepPoint3D>::iterator
iter = intersectionTemp.begin();
111 iter != intersectionTemp.end(); ++
iter) {
113 }
114 }
115 }
116
117 cout << endl << "********************" << endl << endl;
118 cout <<
" Number of intersections : " <<
intersection.size() << endl << endl;
119
120
121 for(
unsigned int i = 0; i <
intersection.size(); i++) {
123 }
124
125 cout << endl << "********************" << endl << endl;
126
127 cout << " MucGeoTest1:: Execute Successfully!!"
128 << endl;
129}
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)