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