CMS 3D CMS Logo

ME0Segment.h
Go to the documentation of this file.
1 #ifndef GEMRecHit_ME0Segment_h
2 #define GEMRecHit_ME0Segment_h
3 
15 
16 #include <iosfwd>
17 
18 class ME0DetId;
19 
20 class ME0Segment final : public RecSegment {
21 public:
24 
26  ME0Segment(const std::vector<const ME0RecHit*>& proto_segment,
27  const LocalPoint& origin,
28  const LocalVector& direction,
30  float chi2);
31 
32  ME0Segment(const std::vector<const ME0RecHit*>& proto_segment,
33  const LocalPoint& origin,
34  const LocalVector& direction,
35  const AlgebraicSymMatrix& errors,
36  float chi2,
37  float time,
38  float timeErr,
39  float deltaPhi);
40 
42  ~ME0Segment() override;
43 
44  //--- Base class interface
45  ME0Segment* clone() const override { return new ME0Segment(*this); }
46 
47  LocalPoint localPosition() const override { return theOrigin; }
48  LocalError localPositionError() const override;
49 
50  LocalVector localDirection() const override { return theLocalDirection; }
51  LocalError localDirectionError() const override;
52 
54  AlgebraicVector parameters() const override;
55 
57  AlgebraicSymMatrix parametersError() const override { return theCovMatrix; }
58 
60  AlgebraicMatrix projectionMatrix() const override;
61 
62  std::vector<const TrackingRecHit*> recHits() const override;
63 
64  std::vector<TrackingRecHit*> recHits() override;
65 
66  double chi2() const override { return theChi2; };
67 
68  int dimension() const override { return 4; }
69 
70  int degreesOfFreedom() const override { return 2 * nRecHits() - 4; }
71 
72  //--- Extension of the interface
73 
74  const std::vector<ME0RecHit>& specificRecHits() const { return theME0RecHits; }
75 
76  int nRecHits() const { return theME0RecHits.size(); }
77 
78  ME0DetId me0DetId() const { return geographicalId(); }
79 
80  float time() const { return theTimeValue; }
81  float timeErr() const { return theTimeUncrt; }
82 
83  float deltaPhi() const { return theDeltaPhi; }
84 
85  void print() const;
86 
87 private:
88  std::vector<ME0RecHit> theME0RecHits;
89  LocalPoint theOrigin; // in chamber frame - the GeomDet local coordinate system
90  LocalVector theLocalDirection; // in chamber frame - the GeomDet local coordinate system
91  AlgebraicSymMatrix theCovMatrix; // the covariance matrix
92  float theChi2; // the Chi squared of the segment fit
93  float theTimeValue; // the best time estimate of the segment
94  float theTimeUncrt; // the uncertainty on the time estimation
95  float theDeltaPhi; // Difference in segment phi position: outer layer - inner lay
96 };
97 
98 std::ostream& operator<<(std::ostream& os, const ME0Segment& seg);
99 
100 #endif
LocalPoint theOrigin
Definition: ME0Segment.h:89
LocalVector theLocalDirection
Definition: ME0Segment.h:90
std::ostream & operator<<(std::ostream &os, const ME0Segment &seg)
Definition: ME0Segment.cc:115
const std::vector< ME0RecHit > & specificRecHits() const
Definition: ME0Segment.h:74
LocalError localDirectionError() const override
Error on the local direction.
Definition: ME0Segment.cc:87
~ME0Segment() override
Destructor.
Definition: ME0Segment.cc:67
int degreesOfFreedom() const override
Degrees of freedom of the segment fit.
Definition: ME0Segment.h:70
ME0DetId me0DetId() const
Definition: ME0Segment.h:78
int dimension() const override
Dimension (in parameter space)
Definition: ME0Segment.h:68
AlgebraicSymMatrix parametersError() const override
Covariance matrix of parameters()
Definition: ME0Segment.h:57
float theChi2
Definition: ME0Segment.h:92
float theDeltaPhi
Definition: ME0Segment.h:95
std::vector< ME0RecHit > theME0RecHits
Definition: ME0Segment.h:88
float theTimeValue
Definition: ME0Segment.h:93
float deltaPhi() const
Definition: ME0Segment.h:83
float theTimeUncrt
Definition: ME0Segment.h:94
ME0Segment()
Default constructor.
Definition: ME0Segment.h:23
CLHEP::HepMatrix AlgebraicMatrix
AlgebraicMatrix projectionMatrix() const override
The projection matrix relates the trajectory state parameters to the segment parameters().
Definition: ME0Segment.cc:107
ME0Segment * clone() const override
Definition: ME0Segment.h:45
void print() const
Definition: ME0Segment.cc:113
double chi2() const override
Chi2 of the segment fit.
Definition: ME0Segment.h:66
LocalVector localDirection() const override
Local direction.
Definition: ME0Segment.h:50
LocalPoint localPosition() const override
Definition: ME0Segment.h:47
CLHEP::HepVector AlgebraicVector
int nRecHits() const
Definition: ME0Segment.h:76
AlgebraicVector parameters() const override
Parameters of the segment, for the track fit in the order (dx/dz, dy/dz, x, y )
Definition: ME0Segment.cc:91
LocalError localPositionError() const override
Definition: ME0Segment.cc:83
CLHEP::HepSymMatrix AlgebraicSymMatrix
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
Definition: ME0Segment.cc:69
Definition: errors.py:1
float timeErr() const
Definition: ME0Segment.h:81
DetId geographicalId() const
AlgebraicSymMatrix theCovMatrix
Definition: ME0Segment.h:91
float time() const
Definition: ME0Segment.h:80