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,
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 localPosition() const override
Definition: ME0Segment.h:47
LocalPoint theOrigin
Definition: ME0Segment.h:89
LocalVector theLocalDirection
Definition: ME0Segment.h:90
int nRecHits() const
Definition: ME0Segment.h:76
std::ostream & operator<<(std::ostream &os, const ME0Segment &seg)
Definition: ME0Segment.cc:117
float time() const
Definition: ME0Segment.h:80
~ME0Segment() override
Destructor.
Definition: ME0Segment.cc:67
AlgebraicMatrix projectionMatrix() const override
The projection matrix relates the trajectory state parameters to the segment parameters().
Definition: ME0Segment.cc:109
float theChi2
Definition: ME0Segment.h:92
ME0DetId me0DetId() const
Definition: ME0Segment.h:78
const std::vector< ME0RecHit > & specificRecHits() const
Definition: ME0Segment.h:74
AlgebraicSymMatrix parametersError() const override
Covariance matrix of parameters()
Definition: ME0Segment.h:57
float theDeltaPhi
Definition: ME0Segment.h:95
std::vector< ME0RecHit > theME0RecHits
Definition: ME0Segment.h:88
float theTimeValue
Definition: ME0Segment.h:93
float theTimeUncrt
Definition: ME0Segment.h:94
float deltaPhi() const
Definition: ME0Segment.h:83
ME0Segment()
Default constructor.
Definition: ME0Segment.h:23
CLHEP::HepMatrix AlgebraicMatrix
double chi2() const override
Chi2 of the segment fit.
Definition: ME0Segment.h:66
int degreesOfFreedom() const override
Degrees of freedom of the segment fit.
Definition: ME0Segment.h:70
void print() const
Definition: ME0Segment.cc:115
AlgebraicVector parameters() const override
Parameters of the segment, for the track fit in the order (dx/dz, dy/dz, x, y )
Definition: ME0Segment.cc:93
CLHEP::HepVector AlgebraicVector
LocalError localDirectionError() const override
Error on the local direction.
Definition: ME0Segment.cc:89
DetId geographicalId() const
LocalError localPositionError() const override
Definition: ME0Segment.cc:85
float timeErr() const
Definition: ME0Segment.h:81
LocalVector localDirection() const override
Local direction.
Definition: ME0Segment.h:50
ME0Segment * clone() const override
Definition: ME0Segment.h:45
CLHEP::HepSymMatrix AlgebraicSymMatrix
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
Definition: ME0Segment.cc:69
Definition: errors.py:1
AlgebraicSymMatrix theCovMatrix
Definition: ME0Segment.h:91
int dimension() const override
Dimension (in parameter space)
Definition: ME0Segment.h:68