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
CSCSegment::specificRecHits
const std::vector< CSCRecHit2D > & specificRecHits() const
Definition: CSCSegment.h:66
Vector3DBase< float, LocalTag >
CSCRecHit2DCollection.h
GEMCSCSegment::cscSegment
const CSCSegment cscSegment() const
Definition: GEMCSCSegment.h:67
GEMCSCSegment::projectionMatrix
AlgebraicMatrix projectionMatrix() const override
The projection matrix relates the trajectory state parameters to the segment parameters().
Definition: GEMCSCSegment.cc:105
RecSegment
Definition: RecSegment.h:27
operator<<
std::ostream & operator<<(std::ostream &os, const GEMCSCSegment &seg)
Definition: GEMCSCSegment.cc:110
GEMCSCSegment::print
void print() const
GEMCSCSegment::chi2
double chi2() const override
Chi2 of the segment fit.
Definition: GEMCSCSegment.h:58
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
GEMCSCSegment::clone
GEMCSCSegment * clone() const override
Definition: GEMCSCSegment.h:41
GEMCSCSegment::recHits
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
Definition: GEMCSCSegment.cc:62
errors
Definition: errors.py:1
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
GEMCSCSegment::dimension
int dimension() const override
Dimension (in parameter space)
Definition: GEMCSCSegment.h:60
GEMCSCSegment::nRecHits
int nRecHits() const
Definition: GEMCSCSegment.h:64
GEMCSCSegment::parametersError
AlgebraicSymMatrix parametersError() const override
Covariance matrix of parameters()
Definition: GEMCSCSegment.h:53
GEMCSCSegment::theLocalDirection
LocalVector theLocalDirection
Definition: GEMCSCSegment.h:85
GEMCSCSegment::parameters
AlgebraicVector parameters() const override
Parameters of the segment, for the track fit in the order (dx/dz, dy/dz, x, y )
Definition: GEMCSCSegment.cc:91
GEMCSCSegment::gemRecHits
const std::vector< GEMRecHit > & gemRecHits() const
Definition: GEMCSCSegment.h:68
Point3DBase< float, LocalTag >
CSCSegment
Definition: CSCSegment.h:21
GEMCSCSegment
Definition: GEMCSCSegment.h:24
LocalError
Definition: LocalError.h:12
GEMCSCSegment::theGEMRecHits
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMCSCSegment.h:78
CSCDetId
Definition: CSCDetId.h:26
GEMCSCSegment::localDirectionError
LocalError localDirectionError() const override
Error on the local direction.
Definition: GEMCSCSegment.cc:87
GEMCSCSegment::localPositionError
LocalError localPositionError() const override
Definition: GEMCSCSegment.cc:83
GEMRecHitCollection.h
AlgebraicSymMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
Definition: AlgebraicObjects.h:15
GEMCSCSegment::~GEMCSCSegment
~GEMCSCSegment() override
Destructor.
Definition: GEMCSCSegment.cc:60
GEMCSCSegment::theOrigin
LocalPoint theOrigin
Definition: GEMCSCSegment.h:84
AlgebraicMatrix
CLHEP::HepMatrix AlgebraicMatrix
Definition: AlgebraicObjects.h:14
GEMCSCSegment::theCSCSegment
CSCSegment theCSCSegment
Definition: GEMCSCSegment.h:79
GEMCSCSegment::localPosition
LocalPoint localPosition() const override
Definition: GEMCSCSegment.h:43
GEMCSCSegment::cscDetId
CSCDetId cscDetId() const
Definition: GEMCSCSegment.h:73
GEMCSCSegment::cscRecHits
const std::vector< CSCRecHit2D > & cscRecHits() const
Definition: GEMCSCSegment.h:69
GEMCSCSegment::localDirection
LocalVector localDirection() const override
Local direction.
Definition: GEMCSCSegment.h:46
RecSegment.h
GEMCSCSegment::GEMCSCSegment
GEMCSCSegment()
Default constructor.
Definition: GEMCSCSegment.h:27
GEMCSCSegment::theChi2
double theChi2
Definition: GEMCSCSegment.h:87
GEMCSCSegment::degreesOfFreedom
int degreesOfFreedom() const override
Degrees of freedom of the segment fit.
Definition: GEMCSCSegment.h:62
GEMCSCSegment::theCovMatrix
AlgebraicSymMatrix theCovMatrix
Definition: GEMCSCSegment.h:86
CSCSegmentCollection.h