CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTRecSegment4D.h
Go to the documentation of this file.
1 #ifndef DTRecHit_DTRecSegment4D_h
2 #define DTRecHit_DTRecSegment4D_h
3 
15 /* Base Class Headers */
17 
18 /* Collaborating Class Declarations */
21 
22 /* C++ Headers */
23 #include <iosfwd>
24 
25 class DTRecSegment4D : public RecSegment {
26 
27  public:
28  friend class DTSegmentUpdator;
31 
33  DTRecSegment4D(const DTChamberRecSegment2D& phiSeg, const DTSLRecSegment2D& zedSeg, const LocalPoint& posZInCh, const LocalVector& dirZInCh);
34 
37 
39  DTRecSegment4D(const DTSLRecSegment2D& zedSeg, const LocalPoint& posZInCh, const LocalVector& dirZInCh);
40 
42  ~DTRecSegment4D() ;
43 
44  //--- Base class interface
45 
46  virtual DTRecSegment4D* clone() const { return new DTRecSegment4D(*this);}
47 
52  AlgebraicVector parameters() const ;
53 
56 
58  virtual AlgebraicMatrix projectionMatrix() const;
59 
61  virtual LocalPoint localPosition() const { return thePosition;}
62 
64  virtual LocalError localPositionError() const ;
65 
67  virtual LocalVector localDirection() const { return theDirection; }
68 
70  virtual LocalError localDirectionError() const ;
71 
72  // Chi2 of the segment fit
73  virtual double chi2() const ;
74 
75  // Degrees of freedom of the segment fit
76  virtual int degreesOfFreedom() const ;
77 
78  // Dimension (in parameter space)
79  virtual int dimension() const { return theDimension; }
80 
81  // Access to component RecHits (if any)
82  virtual std::vector<const TrackingRecHit*> recHits() const ;
83 
84  // Non-const access to component RecHits (if any)
85  virtual std::vector<TrackingRecHit*> recHits() ;
86 
87 
88  //--- Extension of the interface
89 
90 
92  bool hasPhi() const {return (theProjection==full || theProjection==phi);}
93 
95  bool hasZed() const {return (theProjection==full || theProjection==Z);}
96 
99  return hasPhi()? &thePhiSeg: 0;
100  }
101 
103  const DTSLRecSegment2D *zSegment() const {
104  return hasZed()? &theZedSeg : 0;
105  }
106 
109 
112 
115 
117  virtual DTChamberId chamberId() const;
118 
119  private:
121  enum Projection {full, phi, Z, none};
123 
126 
129 
130  LocalPoint thePosition; // in chamber frame
131  LocalVector theDirection; // in chamber frame
132 
133  void setCovMatrixForZed(const LocalPoint& posZInCh);
134 
135  // the covariance matrix, has the following meaning
136  // mat[0][0]=sigma (dx/dz)
137  // mat[1][1]=sigma (dy/dz)
138  // mat[2][2]=sigma (x)
139  // mat[3][3]=sigma (y)
140  // mat[0][2]=cov(dx/dz,x)
141  // mat[1][3]=cov(dy/dz,y)
143 
146 
147  int theDimension; // the dimension of this rechit
148 
149 };
150 
151 std::ostream& operator<<(std::ostream& os, const DTRecSegment4D& seg);
152 
153 #endif // DTRecHit_DTRecSegment4D_h
154 
AlgebraicVector parameters() const
DTRecSegment4D()
Empty constructor.
DTSLRecSegment2D theZedSeg
virtual DTRecSegment4D * clone() const
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
LocalPoint thePosition
DTChamberRecSegment2D * phiSegment()
the superPhi segment
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
Projection theProjection
LocalVector theDirection
virtual DTChamberId chamberId() const
The (specific) DetId of the chamber on which the segment resides.
virtual int degreesOfFreedom() const
Degrees of freedom of the segment fit.
void setCovMatrixForZed(const LocalPoint &posZInCh)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
virtual LocalError localPositionError() const
Local position error in Chamber frame.
virtual LocalVector localDirection() const
Local direction in Chamber frame.
CLHEP::HepMatrix AlgebraicMatrix
~DTRecSegment4D()
Destructor.
Projection
Which projections are actually there.
DTSLRecSegment2D * zSegment()
the Z segment
void setDirection(LocalVector dir)
Set direction.
bool hasPhi() const
Does it have the Phi projection?
virtual AlgebraicMatrix projectionMatrix() const
The projection matrix relates the trajectory state parameters to the segment parameters().
virtual LocalPoint localPosition() const
Local position in Chamber frame.
virtual int dimension() const
Dimension (in parameter space)
AlgebraicSymMatrix theCovMatrix
bool hasZed() const
Does it have the Z projection?
CLHEP::HepVector AlgebraicVector
const DTSLRecSegment2D * zSegment() const
The Z segment: 0 if not zed projection available.
AlgebraicSymMatrix parametersError() const
Covariance matrix fo parameters()
CLHEP::HepSymMatrix AlgebraicSymMatrix
void setPosition(LocalPoint pos)
Set position.
dbl *** dir
Definition: mlp_gen.cc:35
virtual double chi2() const
Chi2 of the segment fit.
virtual LocalError localDirectionError() const
Local direction error in the Chamber frame.
void setCovMatrix(AlgebraicSymMatrix mat)
Set covariance matrix.
DTChamberRecSegment2D thePhiSeg