12#ifndef MUC_REC_2DROAD_H
13#define MUC_REC_2DROAD_H
15#include "GaudiKernel/ContainedObject.h"
16#include "GaudiKernel/SmartRef.h"
17#include "GaudiKernel/ObjectVector.h"
19#include "MucRecEvent/MucRecHit.h"
21using CLHEP::Hep3Vector;
45 const int &orient = 0,
46 const float &xVertex = 0.0,
47 const float &yVertex = 0.0,
48 const float &zVertex = 0.0,
49 const int &fittingMethod = 0);
75 float &sigmaSlope,
float &sigmaIntercept,
76 float &chisq,
int &ndof);
80 float &sigmaSlope,
float &sigmaIntercept,
81 float &chisq,
int &ndof);
87 int Fit(
const float &x,
90 float &slope,
float &intercept,
91 float &sigmaSlope,
float &sigmaIntercept,
92 float &chisq,
int &ndof);
95 void Project(
const int &gap,
float &x,
float &y,
float &z,
float &x2,
float &y2,
float &z2);
98 float WeightFunc(
const float &chisq,
const float &distance)
const;
101 float WindowFunc(
const float &chisq,
const float &distance)
const;
153 float &sigmaSlope,
float &sigmaIntercept,
154 float &chisq,
int &ndof)
const;
158 float &sigmaa,
float &sigmab,
float &sigmac,
159 float &chisq,
int &ndof)
const;
189 Hep3Vector m_VertexPos;
190 Hep3Vector m_VertexSigma;
198 float m_SimpleIntercept;
199 float m_SimpleSlopeSigma;
200 float m_SimpleInterceptSigma;
201 float m_SimplePosSigma;
206 float m_SimpleQuad_a;
207 float m_SimpleQuad_b;
208 float m_SimpleQuad_c;
209 int m_SimpleQuad_whichhalf;
210 float m_SimpleQuad_aSigma;
211 float m_SimpleQuad_bSigma;
212 float m_SimpleQuad_cSigma;
224 int m_MaxNSkippedGaps;
230 vector<float> m_HitDistance;
231 vector<MucRecHit*> m_pHits;
ObjectVector< MucRec2DRoad > MucRec2DRoadContainer
~MucRec2DRoad()
Destructor.
int Fit(const float &x, const float &y, const float &z, float &slope, float &intercept, float &sigmaSlope, float &sigmaIntercept, float &chisq, int &ndof)
Fit (with weights) the hit center to a straight line.
vector< Identifier > GetHitsID() const
Get indices of all hits in the road.
int GetNGapsWithHits() const
How many gaps provide hits attached to this road?
bool HasHitInGap(const int &gap) const
Does this road contain any hits in the given gap?
void PrintHitsInfo() const
Print Hits Infomation.
int GetTotalHits() const
How many hits in all does this road contain?
int GetHitsPerGap(const int &gap) const
How many hits per gap does this road contain?
float GetReducedChiSquare() const
Chi-square parameter (per degree of freedom) of the trajectory fit.
void SetIndex(const int &index)
Set the index for this road.
void Project(const int &gap, float &x, float &y, float &z, float &x2, float &y2, float &z2)
Where does the trajectory of this road intersect a specific gap?
void GetSimpleFitParams(float &a, float &b, float &c, int &whichhalf, float &sigmaa, float &sigmab, float &sigmac, float &chisq, int &ndof) const
Get the parameters from the simple quad fit.
void GetVertexPos(float &x, float &y, float &z) const
Position of the vertex point.
void GetPosSigma(float &possigma) const
float WindowFunc(const float &chisq, const float &distance) const
MucRec2DRoad & operator=(const MucRec2DRoad &orig)
Assignment constructor.
float GetSearchWindowSize(const int &gap) const
Determine the size of the search window in the given gap.
float GetIntercept() const
Intercept of trajectory.
void AttachHit(MucRecHit *hit)
Attach the given hit to this road.
MucRec2DRoad(const int &part=0, const int &seg=0, const int &orient=0, const float &xVertex=0.0, const float &yVertex=0.0, const float &zVertex=0.0, const int &fittingMethod=0)
Constructor.
int GetMaxHitsPerGap() const
How many hits were attached in the gap with the most attached hits?
int GetLastGap() const
Which gap is the last one with hits attached to this road?
void AttachHitNoFit(MucRecHit *hit)
Attach the given hit to this road, but not fit this road.
float GetSlope() const
Slope of trajectory.
MucRec2DRoad(const MucRec2DRoad &source)
Copy constructor.
bool HasHit(MucRecHit *hit) const
Does the hit exist in the road .
int GetNSharedHits(const MucRec2DRoad *road) const
How many hits do two roads share?
void SetMaxNSkippedGaps(const int &nGaps)
int GetPart() const
In which part was this road found?
int SimpleFit(float &slope, float &intercept, float &sigmaSlope, float &sigmaIntercept, float &chisq, int &ndof)
Calculate the best-fit straight line with "simple" weights.
float GetHitDistance(const MucRecHit *hit)
Distance to a hit.
int GetDegreesOfFreedom() const
How many degrees of freedom in the trajectory fit?
int GetIndex() const
A unique identifier for this road in the current event.
void GetSimpleFitParams(float &slope, float &intercept, float &sigmaSlope, float &sigmaIntercept, float &chisq, int &ndof) const
Get the parameters from the simple fit.
vector< MucRecHit * > GetHits() const
float WeightFunc(const float &chisq, const float &distance) const
int GetSeg() const
In which segment was this road found?
int GetOrient() const
In which orientation was this road found?
MucRecHit * GetHit(const int &gap) const
Get a pointer to the first found hit attached in a particular gap.
int SimpleFitNoCurrentGap(int currentgap, float &slope, float &intercept, float &sigmaSlope, float &sigmaIntercept, float &chisq, int &ndof)
Calculate the best-fit straight line with "simple" weights. not use current gap!!!