test
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 
16 
17 #include <iosfwd>
18 
19 class CSCDetId;
20 
21 class CSCSegment final : public RecSegment {
22 
23 public:
24 
27 
29  CSCSegment(const std::vector<const CSCRecHit2D*>& proto_segment, LocalPoint origin,
30  LocalVector direction, const AlgebraicSymMatrix& errors, double chi2);
31 
33  virtual ~CSCSegment();
34 
35  //--- Base class interface
36  CSCSegment* clone() const { return new CSCSegment(*this); }
37 
38  LocalPoint localPosition() const { return theOrigin; }
40 
43 
46 
49 
51  virtual AlgebraicMatrix projectionMatrix() const;
52 
53  virtual std::vector<const TrackingRecHit*> recHits() const;
54 
55  virtual std::vector<TrackingRecHit*> recHits();
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  //--- Extension of the interface
64 
65  const std::vector<CSCRecHit2D>& specificRecHits() const { return theCSCRecHits; }
66 
67  int nRecHits() const { return theCSCRecHits.size(); }
68 
69  CSCDetId cscDetId() const { return geographicalId(); }
70 
71  void setDuplicateSegments(std::vector<CSCSegment*>& duplicates);
72 
73  bool isME11a_duplicate() const { return (theDuplicateSegments.size() > 0 ? true : false); }
74  // a copy of the duplicated segments (ME1/1a only)
75  const std::vector< CSCSegment> & duplicateSegments() const { return theDuplicateSegments; }
76 
77  bool testSharesAllInSpecificRecHits( const std::vector<CSCRecHit2D>& specificRecHits_1,
78  const std::vector<CSCRecHit2D>& specificRecHits_2,
80 
81  //bool sharesRecHits(CSCSegment & anotherSegment, CSCRecHit2D::SharedInputType);
82  // checks if ALL the rechits share the specific input (allWires, allStrips or all)
83  bool sharesRecHits(const CSCSegment & anotherSegment, CSCRecHit2D::SharedInputType sharesInput) const;
84  // checks if ALL the rechits share SOME wire AND SOME strip input
85  bool sharesRecHits(const CSCSegment & anotherSegment) const;
86 
87  float time() const;
88 
89  void print() const;
90 
91  private:
92 
93  std::vector<CSCRecHit2D> theCSCRecHits;
94  LocalPoint theOrigin; // in chamber frame - the GeomDet local coordinate system
95  LocalVector theLocalDirection; // in chamber frame - the GeomDet local coordinate system
96  AlgebraicSymMatrix theCovMatrix; // the covariance matrix
97  double theChi2;
99  std::vector<CSCSegment> theDuplicateSegments;// ME1/1a only
100 };
101 
102 std::ostream& operator<<(std::ostream& os, const CSCSegment& seg);
103 
104 #endif // CSCRecHit_CSCSegment_h
virtual int dimension() const
Dimension (in parameter space)
Definition: CSCSegment.h:59
CSCDetId cscDetId() const
Definition: CSCSegment.h:69
AlgebraicVector parameters() const
Parameters of the segment, for the track fit in the order (dx/dz, dy/dz, x, y )
Definition: CSCSegment.cc:56
LocalError localPositionError() const
Definition: CSCSegment.cc:47
const std::vector< CSCSegment > & duplicateSegments() const
Definition: CSCSegment.h:75
virtual bool sharesInput(const TrackingRecHit *other, SharedInputType what) const
std::vector< CSCSegment > theDuplicateSegments
Definition: CSCSegment.h:99
void setDuplicateSegments(std::vector< CSCSegment * > &duplicates)
Definition: CSCSegment.cc:86
CSCSegment * clone() const
Definition: CSCSegment.h:36
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
bool aME11a_duplicate
Definition: CSCSegment.h:98
virtual int degreesOfFreedom() const
Degrees of freedom of the segment fit.
Definition: CSCSegment.h:61
double theChi2
Definition: CSCSegment.h:97
LocalPoint localPosition() const
Definition: CSCSegment.h:38
LocalVector localDirection() const
Local direction.
Definition: CSCSegment.h:41
bool testSharesAllInSpecificRecHits(const std::vector< CSCRecHit2D > &specificRecHits_1, const std::vector< CSCRecHit2D > &specificRecHits_2, CSCRecHit2D::SharedInputType) const
Definition: CSCSegment.cc:95
int nRecHits() const
Definition: CSCSegment.h:67
CLHEP::HepMatrix AlgebraicMatrix
AlgebraicSymMatrix theCovMatrix
Definition: CSCSegment.h:96
bool isME11a_duplicate() const
Definition: CSCSegment.h:73
LocalPoint theOrigin
Definition: CSCSegment.h:94
virtual ~CSCSegment()
Destructor.
Definition: CSCSegment.cc:28
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
Definition: CSCSegment.cc:30
const std::vector< CSCRecHit2D > & specificRecHits() const
Definition: CSCSegment.h:65
CLHEP::HepVector AlgebraicVector
std::vector< CSCRecHit2D > theCSCRecHits
Definition: CSCSegment.h:93
AlgebraicSymMatrix parametersError() const
Covariance matrix of parameters()
Definition: CSCSegment.h:48
CSCSegment()
Default constructor.
Definition: CSCSegment.h:26
virtual AlgebraicMatrix projectionMatrix() const
The projection matrix relates the trajectory state parameters to the segment parameters().
Definition: CSCSegment.cc:82
double chi2() const
Chi2 of the segment fit.
Definition: CSCSegment.h:57
LocalVector theLocalDirection
Definition: CSCSegment.h:95
CLHEP::HepSymMatrix AlgebraicSymMatrix
bool sharesRecHits(const CSCSegment &anotherSegment, CSCRecHit2D::SharedInputType sharesInput) const
Definition: CSCSegment.cc:133
DetId geographicalId() const
volatile std::atomic< bool > shutdown_flag false
void print() const
Definition: CSCSegment.cc:186
float time() const
Definition: CSCSegment.cc:149
LocalError localDirectionError() const
Error on the local direction.
Definition: CSCSegment.cc:51