CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCSegment.h
Go to the documentation of this file.
1 #ifndef CSCRecHit_CSCSegment_h
2 #define CSCRecHit_CSCSegment_h
3 
17 
18 #include <iosfwd>
19 
20 class CSCDetId;
21 
22 class CSCSegment GCC11_FINAL : public RecSegment {
23 
24 public:
25 
27  CSCSegment() : theChi2(0.), aME11a_duplicate(false) {}
28 
30  CSCSegment(const std::vector<const CSCRecHit2D*>& proto_segment, LocalPoint origin,
31  LocalVector direction, AlgebraicSymMatrix errors, double chi2);
32 
34  virtual ~CSCSegment();
35 
36  //--- Base class interface
37  CSCSegment* clone() const { return new CSCSegment(*this); }
38 
39  LocalPoint localPosition() const { return theOrigin; }
40  LocalError localPositionError() const ;
41 
42  LocalVector localDirection() const { return theLocalDirection; }
43  LocalError localDirectionError() const ;
44 
47 
49  AlgebraicSymMatrix parametersError() const { return theCovMatrix; }
50 
52  virtual AlgebraicMatrix projectionMatrix() const;
53 
54  virtual std::vector<const TrackingRecHit*> recHits() const;
55 
56  virtual std::vector<TrackingRecHit*> recHits();
57 
58  double chi2() const { return theChi2; };
59 
60  virtual int dimension() const { return 4; }
61 
62  virtual int degreesOfFreedom() const { return 2*nRecHits() - 4;}
63 
64  //--- Extension of the interface
65 
66  const std::vector<CSCRecHit2D>& specificRecHits() const { return theCSCRecHits; }
67 
68  int nRecHits() const { return theCSCRecHits.size(); }
69 
70  CSCDetId cscDetId() const { return geographicalId(); }
71 
72  void setDuplicateSegments(std::vector<CSCSegment*>& duplicates);
73 
74  bool isME11a_duplicate() const { return (theDuplicateSegments.size() > 0 ? true : false); }
75  // a copy of the duplicated segments (ME1/1a only)
76  const std::vector< CSCSegment> & duplicateSegments() const { return theDuplicateSegments; }
77 
78  bool testSharesAllInSpecificRecHits( const std::vector<CSCRecHit2D>& specificRecHits_1,
79  const std::vector<CSCRecHit2D>& specificRecHits_2,
80  CSCRecHit2D::SharedInputType) const;
81 
82  //bool sharesRecHits(CSCSegment & anotherSegment, CSCRecHit2D::SharedInputType);
83  // checks if ALL the rechits share the specific input (allWires, allStrips or all)
84  bool sharesRecHits(const CSCSegment & anotherSegment, CSCRecHit2D::SharedInputType sharesInput) const;
85  // checks if ALL the rechits share SOME wire AND SOME strip input
86  bool sharesRecHits(const CSCSegment & anotherSegment) const;
87 
88  float time() const;
89 
90  void print() const;
91 
92  private:
93 
94  std::vector<CSCRecHit2D> theCSCRecHits;
95  LocalPoint theOrigin; // in chamber frame - the GeomDet local coordinate system
96  LocalVector theLocalDirection; // in chamber frame - the GeomDet local coordinate system
97  AlgebraicSymMatrix theCovMatrix; // the covariance matrix
98  double theChi2;
100  std::vector<CSCSegment> theDuplicateSegments;// ME1/1a only
101 };
102 
103 std::ostream& operator<<(std::ostream& os, const CSCSegment& seg);
104 
105 #endif // CSCRecHit_CSCSegment_h
LocalPoint localPosition() const
Definition: CSCSegment.h:39
dictionary parameters
Definition: Parameters.py:2
LocalPoint theOrigin
Definition: CSCSegment.h:95
double theChi2
Definition: CSCSegment.h:98
std::vector< CSCSegment > theDuplicateSegments
Definition: CSCSegment.h:100
const std::vector< CSCRecHit2D > & specificRecHits() const
Definition: CSCSegment.h:66
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
Definition: print.cc:8
CSCSegment * clone() const
Definition: CSCSegment.h:37
LocalVector theLocalDirection
Definition: CSCSegment.h:96
bool aME11a_duplicate
Definition: CSCSegment.h:99
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
int nRecHits() const
Definition: CSCSegment.h:68
double chi2() const
Chi2 of the segment fit.
Definition: CSCSegment.h:58
CSCSegment()
Default constructor.
Definition: CSCSegment.h:27
GloballyPositioned< float >::LocalVector LocalVector
Definition: MagVolume.h:19
AlgebraicSymMatrix theCovMatrix
Definition: CSCSegment.h:97
CLHEP::HepMatrix AlgebraicMatrix
LocalVector localDirection() const
Local direction.
Definition: CSCSegment.h:42
virtual int degreesOfFreedom() const
Degrees of freedom of the segment fit.
Definition: CSCSegment.h:62
std::vector< CSCRecHit2D > theCSCRecHits
Definition: CSCSegment.h:94
CLHEP::HepVector AlgebraicVector
bool isME11a_duplicate() const
Definition: CSCSegment.h:74
AlgebraicSymMatrix parametersError() const
Covariance matrix of parameters()
Definition: CSCSegment.h:49
CLHEP::HepSymMatrix AlgebraicSymMatrix
const std::vector< CSCSegment > & duplicateSegments() const
Definition: CSCSegment.h:76
CSCDetId cscDetId() const
Definition: CSCSegment.h:70
virtual int dimension() const
Definition: CSCSegment.h:60
Unlimited (trivial) bounds.