CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTRecSegment2D.h
Go to the documentation of this file.
1 #ifndef TrackingRecHit_DTRecSegment2D_h
2 #define TrackingRecHit_DTRecSegment2D_h
3 
26 /* Base Class Headers */
28 
29 /* Collaborating Class Declarations */
33 
35 /* C++ Headers */
36 #include <iosfwd>
37 
38 /* Fwd declaration */
39 class DTSegmentUpdator;
40 
41 /* ====================================================================== */
42 
43 /* Class DTRecSegment2D Interface */
44 
45 class DTRecSegment2D : public RecSegment{
46 
47  public:
48 
51  DTRecSegment2D(): theChi2(0.0), theT0(0.), theVdrift(0.) {}
52 
54  DTRecSegment2D(DetId id, const std::vector<DTRecHit1D>& hits) ;
55 
58  LocalPoint &position, LocalVector &direction,
60  std::vector<DTRecHit1D> &hits1D);
61 
63  virtual ~DTRecSegment2D();
64 
65  /* Operations */
66 
67  virtual DTRecSegment2D* clone() const { return new DTRecSegment2D(*this);}
68 
69 
71  virtual AlgebraicVector parameters() const {
72  return param( localPosition(), localDirection());
73  }
74 
75  // The parameter error matrix
76  virtual AlgebraicSymMatrix parametersError() const;
77 
82  return theProjectionMatrix;
83  }
84 
86  virtual int dimension() const { return 2;}
87 
89  virtual LocalPoint localPosition() const {return thePosition; }
90 
92  virtual LocalError localPositionError() const ;
93 
95  virtual LocalVector localDirection() const { return theDirection; }
96 
98  virtual LocalError localDirectionError() const;
99 
101  virtual double chi2() const { return theChi2; }
102 
104  virtual int degreesOfFreedom() const ;
105 
106  // Access to component RecHits (if any)
107  virtual std::vector<const TrackingRecHit*> recHits() const ;
108 
109  // Non-const access to component RecHits (if any)
110  virtual std::vector<TrackingRecHit*> recHits() ;
111 
113  std::vector<DTRecHit1D> specificRecHits() const ;
114 
117 
119  double t0() const {return theT0;}
120  bool ist0Valid() const {return (theT0 > -998.) ? true : false;}
121 
124  double vDrift() const {return theVdrift;}
125 
126  protected:
127  friend class DTSegmentUpdator;
128  void setPosition(const LocalPoint& pos);
129  void setDirection(const LocalVector& dir);
130  void setCovMatrix(const AlgebraicSymMatrix& cov);
131  void setChi2(const double& chi2);
132  void update(std::vector<DTRecHit1D> & updatedRecHits);
133  void setT0(const double& t0);
134  void setVdrift(const double& vdrift);
135 
136  LocalPoint thePosition; // in SL frame
137  LocalVector theDirection; // in SL frame
138 
142  AlgebraicSymMatrix theCovMatrix; // the covariance matrix
143 
144  double theChi2; // chi2 of the fit
145  double theT0; // T0 as coming from the fit
146  double theVdrift; // vDrift as coming from the fit
147 
148  std::vector<DTRecHit1D> theHits; // the hits with defined R/L
149 
150 
151  private:
152 
154 
155  AlgebraicVector param( const LocalPoint& lp, const LocalVector& lv) const {
157  result[1]=lp.x();
158  result[0]=lv.x()/lv.z();
159  return result;
160  }
161 
162 };
163 std::ostream& operator<<(std::ostream& os, const DTRecSegment2D& seg);
164 #endif // TrackingRecHit_DTRecSegment2D_h
165 
virtual LocalError localPositionError() const
local position error in SL frame
void setChi2(const double &chi2)
virtual ~DTRecSegment2D()
Destructor.
virtual AlgebraicVector parameters() const
the vector of parameters (dx/dz,x)
virtual int degreesOfFreedom() const
return the DOF of the segment
virtual double chi2() const
the chi2 of the fit
virtual LocalError localDirectionError() const
the local direction error (xx,xy,yy) in SL frame: only xx is not 0.
std::vector< DTRecHit1D > theHits
void setCovMatrix(const AlgebraicSymMatrix &cov)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
void update(std::vector< DTRecHit1D > &updatedRecHits)
tuple result
Definition: mps_fire.py:84
double vDrift() const
CLHEP::HepMatrix AlgebraicMatrix
static const AlgebraicMatrix theProjectionMatrix
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
T z() const
Definition: PV3DBase.h:64
AlgebraicSymMatrix theCovMatrix
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
bool ist0Valid() const
AlgebraicSymMatrix covMatrix() const
the Covariance Matrix
virtual LocalPoint localPosition() const
local position in SL frame
Definition: DetId.h:18
CLHEP::HepVector AlgebraicVector
virtual AlgebraicSymMatrix parametersError() const
LocalPoint thePosition
virtual DTRecSegment2D * clone() const
void setT0(const double &t0)
AlgebraicVector param(const LocalPoint &lp, const LocalVector &lv) const
virtual int dimension() const
return 2. The dimension of the matrix
static int position[264][3]
Definition: ReadPGInfo.cc:509
void setPosition(const LocalPoint &pos)
virtual LocalVector localDirection() const
the local direction in SL frame
CLHEP::HepSymMatrix AlgebraicSymMatrix
void setDirection(const LocalVector &dir)
LocalVector theDirection
void setVdrift(const double &vdrift)
dbl *** dir
Definition: mlp_gen.cc:35
double t0() const
Get the segment t0 (if recomputed, 0 is returned otherwise)
virtual AlgebraicMatrix projectionMatrix() const
T x() const
Definition: PV3DBase.h:62