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 
21 public:
22 
24  GEMSegment() : theChi2(0.){}
25 
27  GEMSegment(const std::vector<const GEMRecHit*>& proto_segment, const LocalPoint& origin,
28  const LocalVector& direction, const AlgebraicSymMatrix& errors, double chi2);
29 
30  GEMSegment(const std::vector<const GEMRecHit*>& proto_segment, const LocalPoint& origin,
31  const LocalVector& direction, const AlgebraicSymMatrix& errors, double chi2, float bx);
32 
33  GEMSegment(const std::vector<const GEMRecHit*>& proto_segment, const LocalPoint& origin,
34  const LocalVector& direction, const AlgebraicSymMatrix& errors, double chi2, double time, double timeErr);
35 
37  ~GEMSegment() override;
38 
39  //--- Base class interface
40  GEMSegment* clone() const override { return new GEMSegment(*this); }
41 
42  LocalPoint localPosition() const override { return theOrigin; }
43  LocalError localPositionError() const override ;
44 
45  LocalVector localDirection() const override { return theLocalDirection; }
46  LocalError localDirectionError() const override ;
47 
49  AlgebraicVector parameters() const override;
50 
52  AlgebraicSymMatrix parametersError() const override { return theCovMatrix; }
53 
55  AlgebraicMatrix projectionMatrix() const override;
56 
57  std::vector<const TrackingRecHit*> recHits() const override;
58 
59  std::vector<TrackingRecHit*> recHits() override;
60 
61  double chi2() const override { return theChi2; };
62 
63  int dimension() const override { return 4; }
64 
65  int degreesOfFreedom() const override { return 2*nRecHits() - 4;}
66 
67  //--- Extension of the interface
68 
69  const std::vector<GEMRecHit>& specificRecHits() const { return theGEMRecHits; }
70 
71  int nRecHits() const { return theGEMRecHits.size(); }
72 
73  GEMDetId gemDetId() const { return geographicalId(); }
74 
75  float time() const { return theTimeValue; }
76  float timeErr() const { return theTimeUncrt; }
77  float bunchX() const { return theBX; }
78  void print() const;
79 
80  private:
81 
82  std::vector<GEMRecHit> theGEMRecHits;
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  double theChi2; // the Chi squared of the segment fit
87  double theTimeValue; // the best time estimate of the segment
88  double theTimeUncrt; // the uncertainty on the time estimation
89  float theBX; // the bunch crossing
90 };
91 
92 std::ostream& operator<<(std::ostream& os, const GEMSegment& seg);
93 
94 #endif
float bunchX() const
Definition: GEMSegment.h:77
LocalError localPositionError() const override
Definition: GEMSegment.cc:89
GEMDetId gemDetId() const
Definition: GEMSegment.h:73
LocalVector localDirection() const override
Local direction.
Definition: GEMSegment.h:45
float theBX
Definition: GEMSegment.h:89
double theTimeValue
Definition: GEMSegment.h:87
std::ostream & operator<<(std::ostream &os, const GEMSegment &seg)
Definition: GEMSegment.cc:126
AlgebraicSymMatrix parametersError() const override
Covariance matrix of parameters()
Definition: GEMSegment.h:52
double theTimeUncrt
Definition: GEMSegment.h:88
~GEMSegment() override
Destructor.
Definition: GEMSegment.cc:70
LocalVector theLocalDirection
Definition: GEMSegment.h:84
int nRecHits() const
Definition: GEMSegment.h:71
int degreesOfFreedom() const override
Degrees of freedom of the segment fit.
Definition: GEMSegment.h:65
CLHEP::HepMatrix AlgebraicMatrix
float time() const
Definition: GEMSegment.h:75
#define GCC11_FINAL
AlgebraicMatrix projectionMatrix() const override
The projection matrix relates the trajectory state parameters to the segment parameters().
Definition: GEMSegment.cc:115
LocalPoint theOrigin
Definition: GEMSegment.h:83
double chi2() const override
Chi2 of the segment fit.
Definition: GEMSegment.h:61
LocalPoint localPosition() const override
Definition: GEMSegment.h:42
CLHEP::HepVector AlgebraicVector
int dimension() const override
Dimension (in parameter space)
Definition: GEMSegment.h:63
GEMSegment()
Default constructor.
Definition: GEMSegment.h:24
GEMSegment * clone() const override
Definition: GEMSegment.h:40
double theChi2
Definition: GEMSegment.h:86
LocalError localDirectionError() const override
Error on the local direction.
Definition: GEMSegment.cc:93
CLHEP::HepSymMatrix AlgebraicSymMatrix
float timeErr() const
Definition: GEMSegment.h:76
AlgebraicVector parameters() const override
Parameters of the segment, for the track fit in the order (dx/dz, dy/dz, x, y )
Definition: GEMSegment.cc:98
Definition: errors.py:1
const std::vector< GEMRecHit > & specificRecHits() const
Definition: GEMSegment.h:69
DetId geographicalId() const
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
Definition: GEMSegment.cc:72
void print() const
Definition: GEMSegment.cc:121
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:85
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:82