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  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
Vector3DBase< float, LocalTag >
operator<<
std::ostream & operator<<(std::ostream &os, const GEMSegment &seg)
Definition: GEMSegment.cc:133
GEMSegment::theCovMatrix
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:94
GEMSegment::localPosition
LocalPoint localPosition() const override
Definition: GEMSegment.h:52
GEMSegment::parameters
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
RecSegment
Definition: RecSegment.h:27
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
GEMSegment::projectionMatrix
AlgebraicMatrix projectionMatrix() const override
The projection matrix relates the trajectory state parameters to the segment parameters().
Definition: GEMSegment.cc:125
GEMSegment::~GEMSegment
~GEMSegment() override
Destructor.
Definition: GEMSegment.cc:83
GEMSegment::recHits
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
Definition: GEMSegment.cc:85
GEMSegment::dimension
int dimension() const override
Dimension (in parameter space)
Definition: GEMSegment.h:73
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
GEMSegment::clone
GEMSegment * clone() const override
Definition: GEMSegment.h:50
GEMSegment::theBX
float theBX
Definition: GEMSegment.h:98
GEMSegment::bunchX
float bunchX() const
Definition: GEMSegment.h:87
GEMSegment::nRecHits
int nRecHits() const
Definition: GEMSegment.h:81
errors
Definition: errors.py:1
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
GEMSegment::time
float time() const
Definition: GEMSegment.h:85
GEMSegment::timeErr
float timeErr() const
Definition: GEMSegment.h:86
GEMSegment::degreesOfFreedom
int degreesOfFreedom() const override
Degrees of freedom of the segment fit.
Definition: GEMSegment.h:75
GEMSegment::theTimeUncrt
double theTimeUncrt
Definition: GEMSegment.h:97
GEMSegment::localPositionError
LocalError localPositionError() const override
Definition: GEMSegment.cc:101
Point3DBase< float, LocalTag >
GEMSegment::theTimeValue
double theTimeValue
Definition: GEMSegment.h:96
GEMSegment::theLocalDirection
LocalVector theLocalDirection
Definition: GEMSegment.h:93
LocalError
Definition: LocalError.h:12
GEMDetId
Definition: GEMDetId.h:17
GEMRecHitCollection.h
AlgebraicSymMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
Definition: AlgebraicObjects.h:15
GEMSegment
Definition: GEMSegment.h:19
GEMSegment::print
void print() const
Definition: GEMSegment.cc:131
GEMSegment::chi2
double chi2() const override
Chi2 of the segment fit.
Definition: GEMSegment.h:71
GEMSegment::gemDetId
GEMDetId gemDetId() const
Definition: GEMSegment.h:83
AlgebraicMatrix
CLHEP::HepMatrix AlgebraicMatrix
Definition: AlgebraicObjects.h:14
GEMSegment::GEMSegment
GEMSegment()
Default constructor.
Definition: GEMSegment.h:22
GEMSegment::localDirection
LocalVector localDirection() const override
Local direction.
Definition: GEMSegment.h:55
GEMSegment::theChi2
double theChi2
Definition: GEMSegment.h:95
GEMSegment::theOrigin
LocalPoint theOrigin
Definition: GEMSegment.h:92
GEMSegment::specificRecHits
const std::vector< GEMRecHit > & specificRecHits() const
Definition: GEMSegment.h:79
GEMSegment::parametersError
AlgebraicSymMatrix parametersError() const override
Covariance matrix of parameters()
Definition: GEMSegment.h:62
GEMSegment::localDirectionError
LocalError localDirectionError() const override
Error on the local direction.
Definition: GEMSegment.cc:105
RecSegment.h
GEMSegment::theGEMRecHits
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:91