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 
19 class GEMSegment final : public RecSegment {
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,
35  double chi2,
36  float bx);
37 
38  GEMSegment(const std::vector<const GEMRecHit*>& proto_segment,
39  const LocalPoint& origin,
40  const LocalVector& direction,
42  double chi2,
43  float bx,
44  float deltaPhi);
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 bunchX() const { return theBX; }
86 
87  float deltaPhi() const { return theDeltaPhi; }
88 
89  void print() const;
90 
91 private:
92  std::vector<GEMRecHit> theGEMRecHits;
93  LocalPoint theOrigin; // in chamber frame - the GeomDet local coordinate system
94  LocalVector theLocalDirection; // in chamber frame - the GeomDet local coordinate system
95  AlgebraicSymMatrix theCovMatrix; // the covariance matrix
96  double theChi2; // the Chi squared of the segment fit
97  float theBX; // the bunch crossing
98  float theDeltaPhi; // Difference in segment phi position: outer layer - inner lay
99 };
100 
101 std::ostream& operator<<(std::ostream& os, const GEMSegment& seg);
102 
103 #endif
LocalError localPositionError() const override
Definition: GEMSegment.cc:98
AlgebraicMatrix projectionMatrix() const override
The projection matrix relates the trajectory state parameters to the segment parameters().
Definition: GEMSegment.cc:122
LocalPoint localPosition() const override
Definition: GEMSegment.h:52
LocalVector localDirection() const override
Local direction.
Definition: GEMSegment.h:55
float theBX
Definition: GEMSegment.h:97
LocalError localDirectionError() const override
Error on the local direction.
Definition: GEMSegment.cc:102
std::ostream & operator<<(std::ostream &os, const GEMSegment &seg)
Definition: GEMSegment.cc:130
float deltaPhi() const
Definition: GEMSegment.h:87
int degreesOfFreedom() const override
Degrees of freedom of the segment fit.
Definition: GEMSegment.h:75
float theDeltaPhi
Definition: GEMSegment.h:98
~GEMSegment() override
Destructor.
Definition: GEMSegment.cc:80
LocalVector theLocalDirection
Definition: GEMSegment.h:94
int nRecHits() const
Definition: GEMSegment.h:81
CLHEP::HepMatrix AlgebraicMatrix
AlgebraicVector parameters() const override
Parameters of the segment, for the track fit in the order (dx/dz, dy/dz, x, y )
Definition: GEMSegment.cc:106
const std::vector< GEMRecHit > & specificRecHits() const
Definition: GEMSegment.h:79
GEMSegment * clone() const override
Definition: GEMSegment.h:50
LocalPoint theOrigin
Definition: GEMSegment.h:93
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
Definition: GEMSegment.cc:82
AlgebraicSymMatrix parametersError() const override
Covariance matrix of parameters()
Definition: GEMSegment.h:62
int dimension() const override
Dimension (in parameter space)
Definition: GEMSegment.h:73
CLHEP::HepVector AlgebraicVector
DetId geographicalId() const
GEMDetId gemDetId() const
Definition: GEMSegment.h:83
float bunchX() const
Definition: GEMSegment.h:85
void print() const
Definition: GEMSegment.cc:128
GEMSegment()
Default constructor.
Definition: GEMSegment.h:22
double theChi2
Definition: GEMSegment.h:96
CLHEP::HepSymMatrix AlgebraicSymMatrix
Definition: errors.py:1
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:95
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:92
double chi2() const override
Chi2 of the segment fit.
Definition: GEMSegment.h:71