CMS 3D CMS Logo

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