CMS 3D CMS Logo

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 public:
49  DTRecSegment2D() : theChi2(0.0), theT0(0.), theVdrift(0.) {}
50 
52  DTRecSegment2D(DetId id, const std::vector<DTRecHit1D>& hits);
53 
57  LocalVector& direction,
59  double chi2,
60  std::vector<DTRecHit1D>& hits1D);
61 
63  ~DTRecSegment2D() override;
64 
65  /* Operations */
66 
67  DTRecSegment2D* clone() const override { return new DTRecSegment2D(*this); }
68 
70  AlgebraicVector parameters() const override { return param(localPosition(), localDirection()); }
71 
72  // The parameter error matrix
73  AlgebraicSymMatrix parametersError() const override;
74 
79 
81  int dimension() const override { return 2; }
82 
84  LocalPoint localPosition() const override { return thePosition; }
85 
87  LocalError localPositionError() const override;
88 
90  LocalVector localDirection() const override { return theDirection; }
91 
93  LocalError localDirectionError() const override;
94 
96  double chi2() const override { return theChi2; }
97 
99  int degreesOfFreedom() const override;
100 
101  // Access to component RecHits (if any)
102  std::vector<const TrackingRecHit*> recHits() const override;
103 
104  // Non-const access to component RecHits (if any)
105  std::vector<TrackingRecHit*> recHits() override;
106 
108  std::vector<DTRecHit1D> specificRecHits() const;
109 
112 
114  double t0() const { return theT0; }
115  bool ist0Valid() const { return (theT0 > -998.) ? true : false; }
116 
119  double vDrift() const { return theVdrift; }
120 
121 protected:
122  friend class DTSegmentUpdator;
123  void setPosition(const LocalPoint& pos);
124  void setDirection(const LocalVector& dir);
125  void setCovMatrix(const AlgebraicSymMatrix& cov);
126  void setChi2(const double& chi2);
127  void update(std::vector<DTRecHit1D>& updatedRecHits);
128  void setT0(const double& t0);
129  void setVdrift(const double& vdrift);
130 
131  LocalPoint thePosition; // in SL frame
132  LocalVector theDirection; // in SL frame
133 
137  AlgebraicSymMatrix theCovMatrix; // the covariance matrix
138 
139  double theChi2; // chi2 of the fit
140  double theT0; // T0 as coming from the fit
141  double theVdrift; // vDrift as coming from the fit
142 
143  std::vector<DTRecHit1D> theHits; // the hits with defined R/L
144 
145 private:
147 
148  AlgebraicVector param(const LocalPoint& lp, const LocalVector& lv) const {
150  result[1] = lp.x();
151  result[0] = lv.x() / lv.z();
152  return result;
153  }
154 };
155 std::ostream& operator<<(std::ostream& os, const DTRecSegment2D& seg);
156 #endif // TrackingRecHit_DTRecSegment2D_h
Vector3DBase< float, LocalTag >
DTRecSegment2D::thePosition
LocalPoint thePosition
Definition: DTRecSegment2D.h:131
DTRecSegment2D::ist0Valid
bool ist0Valid() const
Definition: DTRecSegment2D.h:115
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
DTRecSegment2D::t0
double t0() const
Get the segment t0 (if recomputed, 0 is returned otherwise)
Definition: DTRecSegment2D.h:114
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
operator<<
std::ostream & operator<<(std::ostream &os, const DTRecSegment2D &seg)
DTRecHit1D.h
pos
Definition: PixelAliasList.h:18
DTRecSegment2D::update
void update(std::vector< DTRecHit1D > &updatedRecHits)
Definition: DTRecSegment2D.cc:106
RecSegment
Definition: RecSegment.h:27
DTRecSegment2D::theChi2
double theChi2
Definition: DTRecSegment2D.h:139
DTRecSegment2D::~DTRecSegment2D
~DTRecSegment2D() override
Destructor.
Definition: DTRecSegment2D.cc:53
DTRecSegment2D::theProjectionMatrix
static const AlgebraicMatrix theProjectionMatrix
Definition: DTRecSegment2D.h:146
DTRecSegment2D::parameters
AlgebraicVector parameters() const override
the vector of parameters (dx/dz,x)
Definition: DTRecSegment2D.h:70
DTRecSegment2D::localDirectionError
LocalError localDirectionError() const override
the local direction error (xx,xy,yy) in SL frame: only xx is not 0.
Definition: DTRecSegment2D.cc:76
DTRecSegment2D::theHits
std::vector< DTRecHit1D > theHits
Definition: DTRecSegment2D.h:143
DTRecSegment2D::setDirection
void setDirection(const LocalVector &dir)
Definition: DTRecSegment2D.cc:110
DTRecSegment2D::localPositionError
LocalError localPositionError() const override
local position error in SL frame
Definition: DTRecSegment2D.cc:74
DTSegmentUpdator
Definition: DTSegmentUpdator.h:43
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
DTRecSegment2D::recHits
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
Definition: DTRecSegment2D.cc:86
DetId
Definition: DetId.h:17
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
LocalError.h
DTRecSegment2D::param
AlgebraicVector param(const LocalPoint &lp, const LocalVector &lv) const
Definition: DTRecSegment2D.h:148
Point3DBase< float, LocalTag >
DTRecSegment2D::setPosition
void setPosition(const LocalPoint &pos)
Definition: DTRecSegment2D.cc:108
DTRecSegment2D::dimension
int dimension() const override
return 2. The dimension of the matrix
Definition: DTRecSegment2D.h:81
funct::true
true
Definition: Factorize.h:173
DTRecSegment2D
Definition: DTRecSegment2D.h:45
DTRecSegment2D::chi2
double chi2() const override
the chi2 of the fit
Definition: DTRecSegment2D.h:96
LocalError
Definition: LocalError.h:12
DTRecSegment2D::theDirection
LocalVector theDirection
Definition: DTRecSegment2D.h:132
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
DTRecSegment2D::localPosition
LocalPoint localPosition() const override
local position in SL frame
Definition: DTRecSegment2D.h:84
AlgebraicSymMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
Definition: AlgebraicObjects.h:15
DTRecSegment2D::covMatrix
AlgebraicSymMatrix covMatrix() const
the Covariance Matrix
Definition: DTRecSegment2D.h:111
AlgebraicMatrix
CLHEP::HepMatrix AlgebraicMatrix
Definition: AlgebraicObjects.h:14
DTRecSegment2D::setT0
void setT0(const double &t0)
Definition: DTRecSegment2D.cc:116
LocalPoint.h
DTRecSegment2D::parametersError
AlgebraicSymMatrix parametersError() const override
Definition: DTRecSegment2D.cc:29
DTRecSegment2D::setVdrift
void setVdrift(const double &vdrift)
Definition: DTRecSegment2D.cc:118
DTRecSegment2D::specificRecHits
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
Definition: DTRecSegment2D.cc:104
DTRecSegment2D::setCovMatrix
void setCovMatrix(const AlgebraicSymMatrix &cov)
Definition: DTRecSegment2D.cc:112
DTRecSegment2D::clone
DTRecSegment2D * clone() const override
Definition: DTRecSegment2D.h:67
DTRecSegment2D::degreesOfFreedom
int degreesOfFreedom() const override
return the DOF of the segment
Definition: DTRecSegment2D.cc:78
mps_fire.result
result
Definition: mps_fire.py:303
DTRecSegment2D::theT0
double theT0
Definition: DTRecSegment2D.h:140
DTRecSegment2D::localDirection
LocalVector localDirection() const override
the local direction in SL frame
Definition: DTRecSegment2D.h:90
DTRecSegment2D::theVdrift
double theVdrift
Definition: DTRecSegment2D.h:141
LocalVector.h
RecSegment.h
DTRecSegment2D::vDrift
double vDrift() const
Definition: DTRecSegment2D.h:119
DTRecSegment2D::theCovMatrix
AlgebraicSymMatrix theCovMatrix
Definition: DTRecSegment2D.h:137
DTRecSegment2D::setChi2
void setChi2(const double &chi2)
Definition: DTRecSegment2D.cc:114
DTRecSegment2D::DTRecSegment2D
DTRecSegment2D()
Definition: DTRecSegment2D.h:49
DTRecSegment2D::projectionMatrix
AlgebraicMatrix projectionMatrix() const override
Definition: DTRecSegment2D.h:78
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23