BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/MucRecEvent/MucRecEvent/MucRec3DRoad.h
Go to the documentation of this file.
1//$id$
2//
3//$log$
4
5/*
6 * 2003/12/25 Zhengyun You Peking University
7 *
8 * 2005/02/27 Zhengyun You Peking University
9 * transplanted to Gaudi framework
10 */
11
12#ifndef MUC_REC_3DROAD_H
13#define MUC_REC_3DROAD_H
14
15#include "GaudiKernel/ContainedObject.h"
16#include "GaudiKernel/SmartRef.h"
17#include "GaudiKernel/ObjectVector.h"
18
19#include "MucRecEvent/MucRec2DRoad.h"
20
21/**
22 * Describes a road found in the muon chamber.
23 *
24 * A 3Droad is a set of hits in muon chamber strips that we expect to
25 * be associated with a single particle traversing the muon chamber.
26 * (Roads are found by the MucRecRoadFinder class.)
27 * Methods include adding hits, calculating and retrieving the
28 * trajectory indicated by the hits, projecting along the trajectory
29 * to an arbitrary gap, etc.
30 *
31 * @author Zhengyun You \URL{mailto:[email protected]}
32 *
33 */
34
35class MucRec3DRoad : virtual public ContainedObject
36{
37public:
38
39 /// Constructor.
41
42 /// Assignment constructor.
44
45 /// Copy constructor.
46 MucRec3DRoad(const MucRec3DRoad &source);
47 /// Destructor.
49
50 /// set the index for this road
51 void SetIndex(const int &index);
52
53 /// set the group index for this road
54 void SetGroup(const int &Group);
55
56 /// set the fit parameters : slope and intercept for XZ and YZ.
57 void SetSimpleFitParams(const float &m_SlopeZX,
58 const float &m_InterceptZX,
59 const float &m_SlopeZY,
60 const float &m_InterceptZY);
61 /// refit the 3D road without the assigned gap
62 int RefitNoCurrentGap(const int &gap,
63 float &slopeZX,
64 float &interceptZX,
65 float &slopeZY,
66 float &interceptZY);
67
68 vector<Identifier> ProjectToStrip(const int& part, const int& gap, const HepPoint3D& gPoint, const Hep3Vector&gDirection);
69
70 vector<Identifier> ProjectToStrip(const int& part, const int& gap, const HepPoint3D& gPoint, const Hep3Vector&gDirection, vector<int>&padID, vector<float>&intersect_x, vector<float>&intersect_y, vector<float>&intersect_z);
71
72 /// Where does the trajectory of this road intersect a specific gap?
73 void ProjectWithSigma(const int &gap, float &x, float &y, float &z, float &sigmaX, float &sigmaY, float &sigmaZ);
74
75 /// Where does the trajectory of this road intersect a specific gap when refit without current gap!!!
76 void ProjectNoCurrentGap(const int &gap, float &x, float &y, float &z, float &sigmaX, float &sigmaY, float &sigmaZ,
77 float& quad_x1, float& quad_y1, float& quad_z1, float& quad_x2, float& quad_y2, float& quad_z2);
78
79 /// Where does the trajectory of this road intersect two surfaces of a specific gap?
80 void Project(const int &gap, float &x1, float &y1, float &z1, float &x2, float &y2, float &z2);
81
82 /// project with assigned pos and dir
83 void Project(const int &gap, const float zx, const float x0,const float zy,const float y0 , float &x1, float &y1, float &z1);
84
85 /// Where does the trajectory of this road intersect the reference plane?
86 //void ProjectToReference(float &x, float &y, float &z);
87
88 /// Where does the trajectory of this road intersect a z=const plane?
89 //void ProjectToZ(float &x, float &y, float &zplane);
90
91 /// Transform the Phi, ZR cord. to ZX, ZY cord.
92 void TransformPhiRToXY(const float &vk, const float &vr,
93 const float &k0, const float &r0,
94 float &vx, float &vy,
95 float &x0, float &y0) const;
96
97 /// Get sign of vx in TransformPhiRToXY
98 float GetVxSign(const float vk) const;
99
100 /// A unique identifier for this road in the current event.
101 int GetIndex() const;
102
103 /// In which part was this road found?
104 int GetPart() const;
105
106 /// In which segment was this road found?
107 int GetSeg() const;
108
109 /// unique index of group this road belongs to
110 int GetGroup() const;
111
112 /// Which gap is the last one with hits attached to this road?
113 int GetLastGap() const;
114
115 /// How many gaps provide hits attached to this road?
116 int GetNGapsWithHits() const;
117
118 /// How many hits in all does this road contain?
119 int GetTotalHits() const;
120
121 /// How many hits per gap does this road contain?
122 int GetHitsPerGap(const int &gap) const;
123
124 /// How many hits were attached in the gap with the most attached hits?
125 int GetMaxHitsPerGap() const;
126
127 /// Does this road contain any hits in the given segment?
128 bool HasHitInGap(const int &gap) const;
129
130 /// How many hits do two roads share?
131 int GetNSharedHits(const MucRec3DRoad *road) const;
132
133 // Are the two X and Y clusters in each gap in the same panel?
134 // bool ClusterPanelsMatch() const;
135
136 /// Difference between the last gap in the two 1-D roads.
137 int GetLastGapDelta() const;
138
139 /// Difference between the number of hits in the two 1-D roads.
140 int GetTotalHitsDelta() const;
141
142 /// How many degrees of freedom in the trajectory fit?
143 int GetDegreesOfFreedom() const;
144
145 /// Chi-square parameter (per degree of freedom) of the trajectory fit.
146 float GetReducedChiSquare() const;
147
148 /// Get Z-X dimension slope.
149 float GetSlopeZX() const;
150
151 /// Get Z-X dimension intercept.
152 float GetInterceptZX() const;
153
154 /// Get Z-Y dimension slope.
155 float GetSlopeZY() const;
156
157 /// Get Z-Y dimension intercept.
158 float GetInterceptZY() const;
159
160 /// Get a pointer to the first hit attached in a particular gap.
161 MucRecHit *GetHit(const int &gap) const;
162
163 /// Is the intersection of a pair of H and V clusters inside a panel?
164 //bool IsIntersectionOK(const TMuiCluster *hcluster,
165 // const TMuiCluster *vcluster) const;
166
167 /// get a pointer to the 2D road in the 3D road.
168 MucRec2DRoad *Get2DRoad(const int &orient = 0) const;
169
170 /// Get indices of all hits in the road.
171 vector<Identifier> GetHitsID() const;
172
173 /// Print Hits Infomation.
174 void PrintHitsInfo();
175
176private:
177
178 Hep3Vector m_VertexPos; // Event vertex position.
179 Hep3Vector m_VertexSigma; // Uncertainty of event vertex position.
180
181 MucRec2DRoad *m_Road0; // object describing the 2-D road orient 0
182 MucRec2DRoad *m_Road1; // object describing the 2-D road orient 1
183
184 int m_Index; // uniquely identifies this road in the event
185 int m_Part; // the part in which this road was found
186 int m_Seg; // the segment in which this road was found
187 int m_LastGap; // Last gap with attached hits.
188 float m_Chi2; // Chi-square parameter of trajectory fit.
189 int m_DOF; // Number of degrees of freedom of fit.
190
191 float m_SlopeZX; // X = m_InterceptZX + m_SlopeZX * Z.
192 float m_InterceptZX; // X = m_InterceptZX + m_SlopeZX * Z.
193 float m_SlopeZY; // Y = m_InterceptZY + m_SlopeZY * Z.
194 float m_InterceptZY; // Y = m_InterceptZY + m_SlopeZY * Z.
195
196 // == true if X and Y clusters are in the same panels in all gaps.
197 //bool m_ClusterPanelsMatch;
198 int m_Group; // Which group does this road belong to?
199};
200
201typedef ObjectVector<MucRec3DRoad> MucRec3DRoadContainer;
202
203#endif /* MUC_REC_3DROAD_H */
204
ObjectVector< MucRec3DRoad > MucRec3DRoadContainer
int RefitNoCurrentGap(const int &gap, float &slopeZX, float &interceptZX, float &slopeZY, float &interceptZY)
refit the 3D road without the assigned gap
float GetSlopeZX() const
Get Z-X dimension slope.
float GetSlopeZY() const
Get Z-Y dimension slope.
void TransformPhiRToXY(const float &vk, const float &vr, const float &k0, const float &r0, float &vx, float &vy, float &x0, float &y0) const
Where does the trajectory of this road intersect the reference plane?
bool HasHitInGap(const int &gap) const
Does this road contain any hits in the given segment?
int GetLastGapDelta() const
Difference between the last gap in the two 1-D roads.
void SetIndex(const int &index)
set the index for this road
int GetHitsPerGap(const int &gap) const
How many hits per gap does this road contain?
void ProjectNoCurrentGap(const int &gap, float &x, float &y, float &z, float &sigmaX, float &sigmaY, float &sigmaZ, float &quad_x1, float &quad_y1, float &quad_z1, float &quad_x2, float &quad_y2, float &quad_z2)
Where does the trajectory of this road intersect a specific gap when refit without current gap!...
float GetVxSign(const float vk) const
Get sign of vx in TransformPhiRToXY.
MucRecHit * GetHit(const int &gap) const
Get a pointer to the first hit attached in a particular gap.
int GetPart() const
In which part was this road found?
vector< Identifier > ProjectToStrip(const int &part, const int &gap, const HepPoint3D &gPoint, const Hep3Vector &gDirection)
int GetLastGap() const
Which gap is the last one with hits attached to this road?
MucRec3DRoad & operator=(const MucRec3DRoad &orig)
Assignment constructor.
int GetTotalHitsDelta() const
Difference between the number of hits in the two 1-D roads.
void PrintHitsInfo()
Print Hits Infomation.
void SetGroup(const int &Group)
set the group index for this road
int GetTotalHits() const
How many hits in all does this road contain?
float GetInterceptZY() const
Get Z-Y dimension intercept.
int GetGroup() const
unique index of group this road belongs to
void SetSimpleFitParams(const float &m_SlopeZX, const float &m_InterceptZX, const float &m_SlopeZY, const float &m_InterceptZY)
set the fit parameters : slope and intercept for XZ and YZ.
int GetNSharedHits(const MucRec3DRoad *road) const
How many hits do two roads share?
int GetSeg() const
In which segment was this road found?
int GetDegreesOfFreedom() const
How many degrees of freedom in the trajectory fit?
~MucRec3DRoad()
Destructor.
MucRec2DRoad * Get2DRoad(const int &orient=0) const
Is the intersection of a pair of H and V clusters inside a panel?
void Project(const int &gap, float &x1, float &y1, float &z1, float &x2, float &y2, float &z2)
Where does the trajectory of this road intersect two surfaces of a specific gap?
vector< Identifier > GetHitsID() const
Get indices of all hits in the road.
void ProjectWithSigma(const int &gap, float &x, float &y, float &z, float &sigmaX, float &sigmaY, float &sigmaZ)
Where does the trajectory of this road intersect a specific gap?
float GetInterceptZX() const
Get Z-X dimension intercept.
int GetNGapsWithHits() const
How many gaps provide hits attached to this road?
int GetIndex() const
A unique identifier for this road in the current event.
float GetReducedChiSquare() const
Chi-square parameter (per degree of freedom) of the trajectory fit.
int GetMaxHitsPerGap() const
How many hits were attached in the gap with the most attached hits?
double y[1000]