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  virtual ~GEMSegment();
38 
39  //--- Base class interface
40  GEMSegment* clone() const { return new GEMSegment(*this); }
41 
42  LocalPoint localPosition() const { return theOrigin; }
44 
47 
50 
53 
55  virtual AlgebraicMatrix projectionMatrix() const;
56 
57  virtual std::vector<const TrackingRecHit*> recHits() const;
58 
59  virtual std::vector<TrackingRecHit*> recHits();
60 
61  double chi2() const { return theChi2; };
62 
63  virtual int dimension() const { return 4; }
64 
65  virtual int degreesOfFreedom() const { 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
AlgebraicVector parameters() const
Parameters of the segment, for the track fit in the order (dx/dz, dy/dz, x, y )
Definition: GEMSegment.cc:98
LocalError localPositionError() const
Definition: GEMSegment.cc:89
#define GCC11_FINAL
float bunchX() const
Definition: GEMSegment.h:77
virtual ~GEMSegment()
Destructor.
Definition: GEMSegment.cc:70
GEMDetId gemDetId() const
Definition: GEMSegment.h:73
double chi2() const
Chi2 of the segment fit.
Definition: GEMSegment.h:61
float theBX
Definition: GEMSegment.h:89
virtual int degreesOfFreedom() const
Degrees of freedom of the segment fit.
Definition: GEMSegment.h:65
virtual int dimension() const
Dimension (in parameter space)
Definition: GEMSegment.h:63
double theTimeValue
Definition: GEMSegment.h:87
std::ostream & operator<<(std::ostream &os, const GEMSegment &seg)
Definition: GEMSegment.cc:126
virtual AlgebraicMatrix projectionMatrix() const
The projection matrix relates the trajectory state parameters to the segment parameters().
Definition: GEMSegment.cc:115
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
Definition: GEMSegment.cc:72
double theTimeUncrt
Definition: GEMSegment.h:88
LocalVector theLocalDirection
Definition: GEMSegment.h:84
int nRecHits() const
Definition: GEMSegment.h:71
CLHEP::HepMatrix AlgebraicMatrix
LocalError localDirectionError() const
Error on the local direction.
Definition: GEMSegment.cc:93
LocalPoint localPosition() const
Definition: GEMSegment.h:42
float time() const
Definition: GEMSegment.h:75
GEMSegment * clone() const
Definition: GEMSegment.h:40
LocalPoint theOrigin
Definition: GEMSegment.h:83
CLHEP::HepVector AlgebraicVector
GEMSegment()
Default constructor.
Definition: GEMSegment.h:24
LocalVector localDirection() const
Local direction.
Definition: GEMSegment.h:45
double theChi2
Definition: GEMSegment.h:86
CLHEP::HepSymMatrix AlgebraicSymMatrix
AlgebraicSymMatrix parametersError() const
Covariance matrix of parameters()
Definition: GEMSegment.h:52
float timeErr() const
Definition: GEMSegment.h:76
Definition: errors.py:1
const std::vector< GEMRecHit > & specificRecHits() const
Definition: GEMSegment.h:69
DetId geographicalId() const
void print() const
Definition: GEMSegment.cc:121
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:85
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:82