CMS 3D CMS Logo

DTRecSegment4D.h
Go to the documentation of this file.
1 #ifndef DTRecHit_DTRecSegment4D_h
2 #define DTRecHit_DTRecSegment4D_h
3 
13 /* Base Class Headers */
15 
16 /* Collaborating Class Declarations */
19 
20 /* C++ Headers */
21 #include <iosfwd>
22 
23 class DTRecSegment4D : public RecSegment {
24 public:
25  friend class DTSegmentUpdator;
28 
31  const DTSLRecSegment2D& zedSeg,
32  const LocalPoint& posZInCh,
33  const LocalVector& dirZInCh);
34 
37 
39  DTRecSegment4D(const DTSLRecSegment2D& zedSeg, const LocalPoint& posZInCh, const LocalVector& dirZInCh);
40 
42  ~DTRecSegment4D() override;
43 
44  //--- Base class interface
45 
46  DTRecSegment4D* clone() const override { return new DTRecSegment4D(*this); }
47 
52  AlgebraicVector parameters() const override;
53 
55  AlgebraicSymMatrix parametersError() const override;
56 
58  AlgebraicMatrix projectionMatrix() const override;
59 
61  LocalPoint localPosition() const override { return thePosition; }
62 
64  LocalError localPositionError() const override;
65 
67  LocalVector localDirection() const override { return theDirection; }
68 
70  LocalError localDirectionError() const override;
71 
72  // Chi2 of the segment fit
73  double chi2() const override;
74 
75  // Degrees of freedom of the segment fit
76  int degreesOfFreedom() const override;
77 
78  // Dimension (in parameter space)
79  int dimension() const override { return theDimension; }
80 
81  // Access to component RecHits (if any)
82  std::vector<const TrackingRecHit*> recHits() const override;
83 
84  // Non-const access to component RecHits (if any)
85  std::vector<TrackingRecHit*> recHits() override;
86 
87  //--- Extension of the interface
88 
90  bool hasPhi() const { return (theProjection == full || theProjection == phi); }
91 
93  bool hasZed() const { return (theProjection == full || theProjection == Z); }
94 
96  const DTChamberRecSegment2D* phiSegment() const { return hasPhi() ? &thePhiSeg : nullptr; }
97 
99  const DTSLRecSegment2D* zSegment() const { return hasZed() ? &theZedSeg : nullptr; }
100 
103 
106 
108  void setCovMatrix(const AlgebraicSymMatrix& mat) { theCovMatrix = mat; }
109 
111  virtual DTChamberId chamberId() const;
112 
113 private:
115  enum Projection { full, phi, Z, none };
117 
120 
123 
124  LocalPoint thePosition; // in chamber frame
125  LocalVector theDirection; // in chamber frame
126 
127  void setCovMatrixForZed(const LocalPoint& posZInCh);
128 
129  // the covariance matrix, has the following meaning
130  // mat[0][0]=sigma (dx/dz)
131  // mat[1][1]=sigma (dy/dz)
132  // mat[2][2]=sigma (x)
133  // mat[3][3]=sigma (y)
134  // mat[0][2]=cov(dx/dz,x)
135  // mat[1][3]=cov(dy/dz,y)
137 
140 
141  int theDimension; // the dimension of this rechit
142 };
143 
144 std::ostream& operator<<(std::ostream& os, const DTRecSegment4D& seg);
145 
146 #endif // DTRecHit_DTRecSegment4D_h
Vector3DBase< float, LocalTag >
DTSLRecSegment2D
Definition: DTSLRecSegment2D.h:15
DTRecSegment4D::DTRecSegment4D
DTRecSegment4D()
Empty constructor.
Definition: DTRecSegment4D.h:27
DTRecSegment4D
Definition: DTRecSegment4D.h:23
DTRecSegment4D::dimension
int dimension() const override
Dimension (in parameter space)
Definition: DTRecSegment4D.h:79
DTRecSegment4D::localDirection
LocalVector localDirection() const override
Local direction in Chamber frame.
Definition: DTRecSegment4D.h:67
DTRecSegment4D::full
Definition: DTRecSegment4D.h:115
DTRecSegment4D::none
Definition: DTRecSegment4D.h:115
DTRecSegment4D::localDirectionError
LocalError localDirectionError() const override
Local direction error in the Chamber frame.
Definition: DTRecSegment4D.cc:166
DTRecSegment4D::clone
DTRecSegment4D * clone() const override
Definition: DTRecSegment4D.h:46
DTRecSegment4D::phiSegment
DTChamberRecSegment2D * phiSegment()
the superPhi segment
Definition: DTRecSegment4D.h:119
pos
Definition: PixelAliasList.h:18
RecSegment
Definition: RecSegment.h:27
DTRecSegment4D::chamberId
virtual DTChamberId chamberId() const
The (specific) DetId of the chamber on which the segment resides.
Definition: DTRecSegment4D.cc:256
DTRecSegment4D::setCovMatrixForZed
void setCovMatrixForZed(const LocalPoint &posZInCh)
Definition: DTRecSegment4D.cc:188
DTRecSegment4D::thePhiSeg
DTChamberRecSegment2D thePhiSeg
Definition: DTRecSegment4D.h:138
DTRecSegment4D::localPosition
LocalPoint localPosition() const override
Local position in Chamber frame.
Definition: DTRecSegment4D.h:61
DTRecSegment4D::zSegment
const DTSLRecSegment2D * zSegment() const
The Z segment: 0 if not zed projection available.
Definition: DTRecSegment4D.h:99
DTRecSegment4D::thePosition
LocalPoint thePosition
Definition: DTRecSegment4D.h:124
DTRecSegment4D::recHits
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
Definition: DTRecSegment4D.cc:233
DTSegmentUpdator
Definition: DTSegmentUpdator.h:43
operator<<
std::ostream & operator<<(std::ostream &os, const DTRecSegment4D &seg)
Definition: DTRecSegment4D.cc:217
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
DTRecSegment4D::setDirection
void setDirection(LocalVector dir)
Set direction.
Definition: DTRecSegment4D.h:105
DTRecSegment4D::Z
Definition: DTRecSegment4D.h:115
DTRecSegment4D::theProjection
Projection theProjection
Definition: DTRecSegment4D.h:116
DTRecSegment4D::theDirection
LocalVector theDirection
Definition: DTRecSegment4D.h:125
Point3DBase< float, LocalTag >
DTRecSegment4D::setCovMatrix
void setCovMatrix(const AlgebraicSymMatrix &mat)
Set covariance matrix.
Definition: DTRecSegment4D.h:108
DTRecSegment4D::degreesOfFreedom
int degreesOfFreedom() const override
Degrees of freedom of the segment fit.
Definition: DTRecSegment4D.cc:179
DTRecSegment4D::parametersError
AlgebraicSymMatrix parametersError() const override
Covariance matrix fo parameters()
Definition: DTRecSegment4D.cc:104
LocalError
Definition: LocalError.h:12
DTRecSegment4D::projectionMatrix
AlgebraicMatrix projectionMatrix() const override
The projection matrix relates the trajectory state parameters to the segment parameters().
Definition: DTRecSegment4D.cc:150
DTChamberRecSegment2D
Definition: DTChamberRecSegment2D.h:31
DTRecSegment4D::parameters
AlgebraicVector parameters() const override
Definition: DTRecSegment4D.cc:80
AlgebraicSymMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
Definition: AlgebraicObjects.h:15
DTChamberRecSegment2D.h
AlgebraicMatrix
CLHEP::HepMatrix AlgebraicMatrix
Definition: AlgebraicObjects.h:14
DTRecSegment4D::hasZed
bool hasZed() const
Does it have the Z projection?
Definition: DTRecSegment4D.h:93
DTRecSegment4D::Projection
Projection
Which projections are actually there.
Definition: DTRecSegment4D.h:115
DTRecSegment4D::zSegment
DTSLRecSegment2D * zSegment()
the Z segment
Definition: DTRecSegment4D.h:122
DTRecSegment4D::theDimension
int theDimension
Definition: DTRecSegment4D.h:141
DTRecSegment4D::theZedSeg
DTSLRecSegment2D theZedSeg
Definition: DTRecSegment4D.h:139
DTRecSegment4D::localPositionError
LocalError localPositionError() const override
Local position error in Chamber frame.
Definition: DTRecSegment4D.cc:162
DTRecSegment4D::chi2
double chi2() const override
Chi2 of the segment fit.
Definition: DTRecSegment4D.cc:170
DTSLRecSegment2D.h
DTRecSegment4D::hasPhi
bool hasPhi() const
Does it have the Phi projection?
Definition: DTRecSegment4D.h:90
DTRecSegment4D::~DTRecSegment4D
~DTRecSegment4D() override
Destructor.
Definition: DTRecSegment4D.cc:78
DTChamberId
Definition: DTChamberId.h:14
DTRecSegment4D::theCovMatrix
AlgebraicSymMatrix theCovMatrix
Definition: DTRecSegment4D.h:136
DTRecSegment4D::setPosition
void setPosition(LocalPoint pos)
Set position.
Definition: DTRecSegment4D.h:102
RecSegment.h
DTRecSegment4D::phiSegment
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
Definition: DTRecSegment4D.h:96
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
DTRecSegment4D::phi
Definition: DTRecSegment4D.h:115