CMS 3D CMS Logo

GEMCSCSegment.h
Go to the documentation of this file.
1 #ifndef GEMRecHit_GEMCSCSegment_h
2 #define GEMRecHit_GEMCSCSegment_h
3 
15 
19 
20 #include <iosfwd>
21 
22 class CSCDetId;
23 
24 class GEMCSCSegment final : public RecSegment {
25 public:
28 
30  GEMCSCSegment(const CSCSegment* csc_segment,
31  const std::vector<const GEMRecHit*> gem_rhs,
32  LocalPoint origin,
33  LocalVector direction,
35  double chi2);
36 
38  ~GEMCSCSegment() override;
39 
40  //--- Base class interface
41  GEMCSCSegment* clone() const override { return new GEMCSCSegment(*this); }
42 
43  LocalPoint localPosition() const override { return theOrigin; }
44  LocalError localPositionError() const override;
45 
46  LocalVector localDirection() const override { return theLocalDirection; }
47  LocalError localDirectionError() const override;
48 
50  AlgebraicVector parameters() const override;
51 
53  AlgebraicSymMatrix parametersError() const override { return theCovMatrix; }
54 
56  AlgebraicMatrix projectionMatrix() const override;
57 
58  double chi2() const override { return theChi2; };
59 
60  int dimension() const override { return 4; }
61 
62  int degreesOfFreedom() const override { return 2 * nRecHits() - 4; }
63 
64  int nRecHits() const { return (theGEMRecHits.size() + theCSCSegment.specificRecHits().size()); }
65 
66  //--- Return the constituents in different ways
67  const CSCSegment cscSegment() const { return theCSCSegment; }
68  const std::vector<GEMRecHit>& gemRecHits() const { return theGEMRecHits; }
69  const std::vector<CSCRecHit2D>& cscRecHits() const { return theCSCSegment.specificRecHits(); }
70  std::vector<const TrackingRecHit*> recHits() const override;
71  std::vector<TrackingRecHit*> recHits() override;
72 
73  CSCDetId cscDetId() const { return geographicalId(); }
74 
75  void print() const;
76 
77 private:
78  std::vector<GEMRecHit> theGEMRecHits; // store GEM Rechits
79  CSCSegment theCSCSegment; // store CSC RecHits and store CSC Segment
80  // eventually we have to disentangle if later on we decide
81  // not to have a one-to-one relationship anymore
82  // i.e. if we allow the GEMCSC segment to modify the
83  // (selection of the rechits of the) CSC segment
84  LocalPoint theOrigin; // in chamber frame - the GeomDet local coordinate system
85  LocalVector theLocalDirection; // in chamber frame - the GeomDet local coordinate system
86  AlgebraicSymMatrix theCovMatrix; // the covariance matrix
87  double theChi2;
88 };
89 
90 std::ostream& operator<<(std::ostream& os, const GEMCSCSegment& seg);
91 
92 #endif
LocalPoint theOrigin
Definition: GEMCSCSegment.h:84
int nRecHits() const
Definition: GEMCSCSegment.h:64
const std::vector< GEMRecHit > & gemRecHits() const
Definition: GEMCSCSegment.h:68
LocalVector localDirection() const override
Local direction.
Definition: GEMCSCSegment.h:46
GEMCSCSegment()
Default constructor.
Definition: GEMCSCSegment.h:27
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMCSCSegment.h:78
CSCSegment theCSCSegment
Definition: GEMCSCSegment.h:79
int dimension() const override
Dimension (in parameter space)
Definition: GEMCSCSegment.h:60
int degreesOfFreedom() const override
Degrees of freedom of the segment fit.
Definition: GEMCSCSegment.h:62
LocalError localDirectionError() const override
Error on the local direction.
LocalError localPositionError() const override
std::ostream & operator<<(std::ostream &os, const GEMCSCSegment &seg)
double chi2() const override
Chi2 of the segment fit.
Definition: GEMCSCSegment.h:58
CLHEP::HepMatrix AlgebraicMatrix
LocalPoint localPosition() const override
Definition: GEMCSCSegment.h:43
CSCDetId cscDetId() const
Definition: GEMCSCSegment.h:73
AlgebraicSymMatrix theCovMatrix
Definition: GEMCSCSegment.h:86
void print() const
~GEMCSCSegment() override
Destructor.
GEMCSCSegment * clone() const override
Definition: GEMCSCSegment.h:41
CLHEP::HepVector AlgebraicVector
const std::vector< CSCRecHit2D > & cscRecHits() const
Definition: GEMCSCSegment.h:69
DetId geographicalId() const
AlgebraicMatrix projectionMatrix() const override
The projection matrix relates the trajectory state parameters to the segment parameters().
AlgebraicVector parameters() const override
Parameters of the segment, for the track fit in the order (dx/dz, dy/dz, x, y )
LocalVector theLocalDirection
Definition: GEMCSCSegment.h:85
CLHEP::HepSymMatrix AlgebraicSymMatrix
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
const std::vector< CSCRecHit2D > & specificRecHits() const
Definition: CSCSegment.h:66
Definition: errors.py:1
const CSCSegment cscSegment() const
Definition: GEMCSCSegment.h:67
AlgebraicSymMatrix parametersError() const override
Covariance matrix of parameters()
Definition: GEMCSCSegment.h:53