CMS 3D CMS Logo

GEMSegment.h
Go to the documentation of this file.
1 #ifndef GEMRecHit_GEMSegment_h
2 #define GEMRecHit_GEMSegment_h
3 
14 
15 #include <iosfwd>
16 
17 class GEMDetId;
18 
20 public:
22  GEMSegment() : theChi2(0.) {}
23 
25  GEMSegment(const std::vector<const GEMRecHit*>& proto_segment,
26  const LocalPoint& origin,
27  const LocalVector& direction,
29  double chi2);
30 
31  GEMSegment(const std::vector<const GEMRecHit*>& proto_segment,
32  const LocalPoint& origin,
33  const LocalVector& direction,
34  const AlgebraicSymMatrix& errors,
35  double chi2,
36  float bx);
37 
38  GEMSegment(const std::vector<const GEMRecHit*>& proto_segment,
39  const LocalPoint& origin,
40  const LocalVector& direction,
41  const AlgebraicSymMatrix& errors,
42  double chi2,
43  double time,
44  double timeErr);
45 
47  ~GEMSegment() override;
48 
49  //--- Base class interface
50  GEMSegment* clone() const override { return new GEMSegment(*this); }
51 
52  LocalPoint localPosition() const override { return theOrigin; }
53  LocalError localPositionError() const override;
54 
55  LocalVector localDirection() const override { return theLocalDirection; }
56  LocalError localDirectionError() const override;
57 
59  AlgebraicVector parameters() const override;
60 
62  AlgebraicSymMatrix parametersError() const override { return theCovMatrix; }
63 
65  AlgebraicMatrix projectionMatrix() const override;
66 
67  std::vector<const TrackingRecHit*> recHits() const override;
68 
69  std::vector<TrackingRecHit*> recHits() override;
70 
71  double chi2() const override { return theChi2; };
72 
73  int dimension() const override { return 4; }
74 
75  int degreesOfFreedom() const override { return 2 * nRecHits() - 4; }
76 
77  //--- Extension of the interface
78 
79  const std::vector<GEMRecHit>& specificRecHits() const { return theGEMRecHits; }
80 
81  int nRecHits() const { return theGEMRecHits.size(); }
82 
83  GEMDetId gemDetId() const { return geographicalId(); }
84 
85  float time() const { return theTimeValue; }
86  float timeErr() const { return theTimeUncrt; }
87  float bunchX() const { return theBX; }
88  void print() const;
89 
90 private:
91  std::vector<GEMRecHit> theGEMRecHits;
92  LocalPoint theOrigin; // in chamber frame - the GeomDet local coordinate system
93  LocalVector theLocalDirection; // in chamber frame - the GeomDet local coordinate system
94  AlgebraicSymMatrix theCovMatrix; // the covariance matrix
95  double theChi2; // the Chi squared of the segment fit
96  double theTimeValue; // the best time estimate of the segment
97  double theTimeUncrt; // the uncertainty on the time estimation
98  float theBX; // the bunch crossing
99 };
100 
101 std::ostream& operator<<(std::ostream& os, const GEMSegment& seg);
102 
103 #endif
float bunchX() const
Definition: GEMSegment.h:87
LocalError localPositionError() const override
Definition: GEMSegment.cc:101
GEMDetId gemDetId() const
Definition: GEMSegment.h:83
LocalVector localDirection() const override
Local direction.
Definition: GEMSegment.h:55
float theBX
Definition: GEMSegment.h:98
double theTimeValue
Definition: GEMSegment.h:96
std::ostream & operator<<(std::ostream &os, const GEMSegment &seg)
Definition: GEMSegment.cc:133
AlgebraicSymMatrix parametersError() const override
Covariance matrix of parameters()
Definition: GEMSegment.h:62
double theTimeUncrt
Definition: GEMSegment.h:97
~GEMSegment() override
Destructor.
Definition: GEMSegment.cc:83
LocalVector theLocalDirection
Definition: GEMSegment.h:93
int nRecHits() const
Definition: GEMSegment.h:81
int degreesOfFreedom() const override
Degrees of freedom of the segment fit.
Definition: GEMSegment.h:75
CLHEP::HepMatrix AlgebraicMatrix
float time() const
Definition: GEMSegment.h:85
#define GCC11_FINAL
AlgebraicMatrix projectionMatrix() const override
The projection matrix relates the trajectory state parameters to the segment parameters().
Definition: GEMSegment.cc:125
LocalPoint theOrigin
Definition: GEMSegment.h:92
double chi2() const override
Chi2 of the segment fit.
Definition: GEMSegment.h:71
LocalPoint localPosition() const override
Definition: GEMSegment.h:52
CLHEP::HepVector AlgebraicVector
int dimension() const override
Dimension (in parameter space)
Definition: GEMSegment.h:73
GEMSegment()
Default constructor.
Definition: GEMSegment.h:22
GEMSegment * clone() const override
Definition: GEMSegment.h:50
double theChi2
Definition: GEMSegment.h:95
LocalError localDirectionError() const override
Error on the local direction.
Definition: GEMSegment.cc:105
CLHEP::HepSymMatrix AlgebraicSymMatrix
float timeErr() const
Definition: GEMSegment.h:86
AlgebraicVector parameters() const override
Parameters of the segment, for the track fit in the order (dx/dz, dy/dz, x, y )
Definition: GEMSegment.cc:109
Definition: errors.py:1
const std::vector< GEMRecHit > & specificRecHits() const
Definition: GEMSegment.h:79
DetId geographicalId() const
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
Definition: GEMSegment.cc:85
void print() const
Definition: GEMSegment.cc:131
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:94
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:91