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
Vector3DBase< float, LocalTag >
operator<<
std::ostream & operator<<(std::ostream &os, const GEMSegment &seg)
Definition: GEMSegment.cc:130
GEMSegment::theCovMatrix
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:95
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:106
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:122
GEMSegment::~GEMSegment
~GEMSegment() override
Destructor.
Definition: GEMSegment.cc:80
GEMSegment::recHits
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
Definition: GEMSegment.cc:82
GEMSegment::deltaPhi
float deltaPhi() const
Definition: GEMSegment.h:87
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:97
GEMSegment::bunchX
float bunchX() const
Definition: GEMSegment.h:85
GEMSegment::nRecHits
int nRecHits() const
Definition: GEMSegment.h:81
errors
Definition: errors.py:1
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
GEMSegment::degreesOfFreedom
int degreesOfFreedom() const override
Degrees of freedom of the segment fit.
Definition: GEMSegment.h:75
GEMSegment::localPositionError
LocalError localPositionError() const override
Definition: GEMSegment.cc:98
Point3DBase< float, LocalTag >
GEMSegment::theLocalDirection
LocalVector theLocalDirection
Definition: GEMSegment.h:94
LocalError
Definition: LocalError.h:12
GEMDetId
Definition: GEMDetId.h:18
GEMRecHitCollection.h
AlgebraicSymMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
Definition: AlgebraicObjects.h:15
GEMSegment
Definition: GEMSegment.h:19
GEMSegment::print
void print() const
Definition: GEMSegment.cc:128
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:96
GEMSegment::theOrigin
LocalPoint theOrigin
Definition: GEMSegment.h:93
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:102
RecSegment.h
GEMSegment::theGEMRecHits
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:92
GEMSegment::theDeltaPhi
float theDeltaPhi
Definition: GEMSegment.h:98