CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
DTRecSegment4D Class Reference

#include <DTRecSegment4D.h>

Inheritance diagram for DTRecSegment4D:
RecSegment TrackingRecHit

Public Member Functions

virtual DTChamberId chamberId () const
 The (specific) DetId of the chamber on which the segment resides. More...
 
virtual double chi2 () const
 Chi2 of the segment fit. More...
 
virtual DTRecSegment4Dclone () const
 
virtual int degreesOfFreedom () const
 Degrees of freedom of the segment fit. More...
 
virtual int dimension () const
 Dimension (in parameter space) More...
 
 DTRecSegment4D ()
 Empty constructor. More...
 
 DTRecSegment4D (const DTChamberRecSegment2D &phiSeg, const DTSLRecSegment2D &zedSeg, const LocalPoint &posZInCh, const LocalVector &dirZInCh)
 Construct from phi and Z projections. More...
 
 DTRecSegment4D (const DTChamberRecSegment2D &phiSeg)
 Construct from phi projection. More...
 
 DTRecSegment4D (const DTSLRecSegment2D &zedSeg, const LocalPoint &posZInCh, const LocalVector &dirZInCh)
 Construct from Z projection. More...
 
bool hasPhi () const
 Does it have the Phi projection? More...
 
bool hasZed () const
 Does it have the Z projection? More...
 
virtual LocalVector localDirection () const
 Local direction in Chamber frame. More...
 
virtual LocalError localDirectionError () const
 Local direction error in the Chamber frame. More...
 
virtual LocalPoint localPosition () const
 Local position in Chamber frame. More...
 
virtual LocalError localPositionError () const
 Local position error in Chamber frame. More...
 
AlgebraicVector parameters () const
 
AlgebraicSymMatrix parametersError () const
 Covariance matrix fo parameters() More...
 
const DTChamberRecSegment2DphiSegment () const
 The superPhi segment: 0 if no phi projection available. More...
 
virtual AlgebraicMatrix projectionMatrix () const
 The projection matrix relates the trajectory state parameters to the segment parameters(). More...
 
virtual std::vector< const
TrackingRecHit * > 
recHits () const
 Access to component RecHits (if any) More...
 
virtual std::vector
< TrackingRecHit * > 
recHits ()
 Non-const access to component RecHits (if any) More...
 
void setCovMatrix (AlgebraicSymMatrix mat)
 Set covariance matrix. More...
 
void setDirection (LocalVector dir)
 Set direction. More...
 
void setPosition (LocalPoint pos)
 Set position. More...
 
const DTSLRecSegment2DzSegment () const
 The Z segment: 0 if not zed projection available. More...
 
 ~DTRecSegment4D ()
 Destructor. More...
 
- Public Member Functions inherited from RecSegment
 RecSegment (DetId id)
 
 RecSegment (TrackingRecHit::id_type id=0)
 
virtual ~RecSegment ()
 Destructor. More...
 
- Public Member Functions inherited from TrackingRecHit
DetId geographicalId () const
 
virtual void getKfComponents (KfComponentsHolder &holder) const
 
unsigned int getRTTI () const
 
Type getType () const
 
virtual bool hasPositionAndError () const
 to be redefined by daughter class More...
 
bool isValid () const
 
id_type rawId () const
 
virtual void recHitsV (std::vector< const TrackingRecHit * > &) const
 
virtual void recHitsV (std::vector< TrackingRecHit * > &)
 
virtual bool sharesInput (const TrackingRecHit *other, SharedInputType what) const
 
 TrackingRecHit (DetId id, Type type=valid)
 
 TrackingRecHit (id_type id=0, Type type=valid)
 
 TrackingRecHit (DetId id, unsigned int rt, Type type=valid)
 
Type type () const
 
virtual float weight () const
 
virtual ~TrackingRecHit ()
 

Private Types

enum  Projection { full, phi, Z, none }
 Which projections are actually there. More...
 

Private Member Functions

DTChamberRecSegment2DphiSegment ()
 the superPhi segment More...
 
void setCovMatrixForZed (const LocalPoint &posZInCh)
 
DTSLRecSegment2DzSegment ()
 the Z segment More...
 

Private Attributes

AlgebraicSymMatrix theCovMatrix
 
int theDimension
 
LocalVector theDirection
 
DTChamberRecSegment2D thePhiSeg
 
LocalPoint thePosition
 
Projection theProjection
 
DTSLRecSegment2D theZedSeg
 

Friends

class DTSegmentUpdator
 

Additional Inherited Members

- Public Types inherited from TrackingRecHit
typedef unsigned int id_type
 
enum  SharedInputType { all, some }
 definition of equality via shared input More...
 
enum  Type { valid = 0, missing = 1, inactive = 2, bad = 3 }
 
- Static Public Attributes inherited from TrackingRecHit
static const int rttiShift = 24
 
static const int typeMask = 0xf
 
- Protected Member Functions inherited from TrackingRecHit
void setId (id_type iid)
 
void setRTTI (unsigned int rt)
 
void setType (Type ttype)
 

Detailed Description

4-parameter RecHits for MuonBarrel DT (x,y, dx/dz, dy/dz)

Date:
2009/10/20 09:06:12
Revision:
1.12
Author
Stefano Lacaprara - INFN Legnaro stefa.nosp@m.no.l.nosp@m.acapr.nosp@m.ara@.nosp@m.pd.in.nosp@m.fn.i.nosp@m.t
Riccardo Bellan - INFN TO ricca.nosp@m.rdo..nosp@m.bella.nosp@m.n@ce.nosp@m.rn.ch

Definition at line 25 of file DTRecSegment4D.h.

Member Enumeration Documentation

Which projections are actually there.

Enumerator
full 
phi 
Z 
none 

Definition at line 121 of file DTRecSegment4D.h.

Constructor & Destructor Documentation

DTRecSegment4D::DTRecSegment4D ( )
inline

Empty constructor.

Definition at line 30 of file DTRecSegment4D.h.

Referenced by clone().

DTRecSegment4D::DTRecSegment4D ( const DTChamberRecSegment2D phiSeg,
const DTSLRecSegment2D zedSeg,
const LocalPoint posZInCh,
const LocalVector dirZInCh 
)

Construct from phi and Z projections.

Definition at line 19 of file DTRecSegment4D.cc.

References funct::cos(), DTRecSegment2D::covMatrix(), DTChamberId, edm::hlt::Exception, TrackingRecHit::geographicalId(), DTRecSegment2D::localDirection(), DTRecSegment2D::localPosition(), DetId::rawId(), setCovMatrixForZed(), theCovMatrix, theDirection, thePosition, PV3DBase< T, PVType, FrameType >::theta(), Vector3DBase< T, FrameTag >::unit(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

22  :
23  RecSegment(phiSeg.chamberId()),
25  thePhiSeg(phiSeg),
26  theZedSeg(zedSeg),
27  theDimension(4)
28 {
29  // Check consistency of 2 sub-segments
30  if(DTChamberId(phiSeg.geographicalId().rawId()) != DTChamberId(zedSeg.geographicalId().rawId()))
31  throw cms::Exception("DTRecSegment4D")
32  <<"the z Segment and the phi segment have different chamber id"<<std::endl;
33 
34  // The position of 2D segments are defined in the SL frame: I must first
35  // extrapolate that position at the Chamber reference plane
36  LocalPoint posZAt0 = posZInCh +
37  dirZInCh * (-posZInCh.z())/cos(dirZInCh.theta());
38 
39 
40  thePosition=LocalPoint(phiSeg.localPosition().x(),posZAt0.y(),0.);
41  LocalVector dirPhiInCh=phiSeg.localDirection();
42 
43  // given the actual definition of chamber refFrame, (with z poiniting to IP),
44  // the zed component of direction is negative.
45  theDirection=LocalVector(dirPhiInCh.x()/fabs(dirPhiInCh.z()),
46  dirZInCh.y()/fabs(dirZInCh.z()),
47  -1.);
49 
50  // set cov matrix
52  theCovMatrix[0][0]=phiSeg.covMatrix()[0][0]; //sigma (dx/dz)
53  theCovMatrix[0][2]=phiSeg.covMatrix()[0][1]; //cov(dx/dz,x)
54  theCovMatrix[2][2]=phiSeg.covMatrix()[1][1]; //sigma (x)
55  setCovMatrixForZed(posZInCh);
56 }
DTSLRecSegment2D theZedSeg
Local3DVector LocalVector
Definition: LocalVector.h:12
LocalPoint thePosition
Projection theProjection
T y() const
Definition: PV3DBase.h:63
LocalVector theDirection
void setCovMatrixForZed(const LocalPoint &posZInCh)
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
T z() const
Definition: PV3DBase.h:64
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
DTChamberId chamberId() const
The id of the chamber on which reside the segment.
AlgebraicSymMatrix covMatrix() const
the Covariance Matrix
virtual LocalPoint localPosition() const
local position in SL frame
AlgebraicSymMatrix theCovMatrix
Vector3DBase unit() const
Definition: Vector3DBase.h:57
virtual LocalVector localDirection() const
the local direction in SL frame
CLHEP::HepSymMatrix AlgebraicSymMatrix
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
DetId geographicalId() const
RecSegment(DetId id)
Definition: RecSegment.h:32
T x() const
Definition: PV3DBase.h:62
DTChamberRecSegment2D thePhiSeg
DTRecSegment4D::DTRecSegment4D ( const DTChamberRecSegment2D phiSeg)

Construct from phi projection.

Definition at line 59 of file DTRecSegment4D.cc.

References DTRecSegment2D::covMatrix(), DTRecSegment2D::localDirection(), DTRecSegment2D::localPosition(), theCovMatrix, theDirection, thePhiSeg, and thePosition.

59  :
60  RecSegment(phiSeg.chamberId()),
62  thePhiSeg(phiSeg),
64  theDimension(2)
65 {
67 
69 
70  // set cov matrix
72  theCovMatrix[0][0]=phiSeg.covMatrix()[0][0]; //sigma (dx/dz)
73  theCovMatrix[0][2]=phiSeg.covMatrix()[0][1]; //cov(dx/dz,x)
74  theCovMatrix[2][2]=phiSeg.covMatrix()[1][1]; //sigma (x)
75 }
DTSLRecSegment2D theZedSeg
LocalPoint thePosition
Projection theProjection
LocalVector theDirection
DTChamberId chamberId() const
The id of the chamber on which reside the segment.
AlgebraicSymMatrix covMatrix() const
the Covariance Matrix
virtual LocalPoint localPosition() const
local position in SL frame
AlgebraicSymMatrix theCovMatrix
virtual LocalVector localDirection() const
the local direction in SL frame
CLHEP::HepSymMatrix AlgebraicSymMatrix
RecSegment(DetId id)
Definition: RecSegment.h:32
DTChamberRecSegment2D thePhiSeg
DTRecSegment4D::DTRecSegment4D ( const DTSLRecSegment2D zedSeg,
const LocalPoint posZInCh,
const LocalVector dirZInCh 
)

Construct from Z projection.

Definition at line 78 of file DTRecSegment4D.cc.

References funct::cos(), setCovMatrixForZed(), theCovMatrix, theDirection, thePosition, PV3DBase< T, PVType, FrameType >::theta(), and PV3DBase< T, PVType, FrameType >::z().

80  :
81  RecSegment(zedSeg.superLayerId().chamberId()),
84  theZedSeg(zedSeg),
85  theDimension(2)
86 {
87 
88  LocalPoint posZAt0=posZInCh+
89  dirZInCh*(-posZInCh.z()/cos(dirZInCh.theta()));
90 
91  thePosition=posZAt0;
92  theDirection = dirZInCh;
93 
94  // set cov matrix
96  setCovMatrixForZed(posZInCh);
97 }
DTSLRecSegment2D theZedSeg
LocalPoint thePosition
DTChamberId chamberId() const
Return the corresponding ChamberId.
Projection theProjection
LocalVector theDirection
void setCovMatrixForZed(const LocalPoint &posZInCh)
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
T z() const
Definition: PV3DBase.h:64
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
DTSuperLayerId superLayerId() const
The id of the superlayer on which reside the segment.
AlgebraicSymMatrix theCovMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
RecSegment(DetId id)
Definition: RecSegment.h:32
DTChamberRecSegment2D thePhiSeg
DTRecSegment4D::~DTRecSegment4D ( )

Destructor.

Definition at line 100 of file DTRecSegment4D.cc.

100 {}

Member Function Documentation

DTChamberId DTRecSegment4D::chamberId ( ) const
virtual
double DTRecSegment4D::chi2 ( ) const
virtual

Chi2 of the segment fit.

Implements RecSegment.

Definition at line 191 of file DTRecSegment4D.cc.

References DTRecSegment2D::chi2(), hasPhi(), hasZed(), query::result, thePhiSeg, and theZedSeg.

Referenced by DTChamberEfficiencyTask::getBestSegment(), DTChamberEfficiencyTask::isGoodSegment(), DTSegmentSelector::operator()(), and operator<<().

191  {
192  double result=0;
193  if (hasPhi()) result+=thePhiSeg.chi2();
194  if (hasZed()) result+=theZedSeg.chi2();
195  return result;
196 }
DTSLRecSegment2D theZedSeg
virtual double chi2() const
the chi2 of the fit
tuple result
Definition: query.py:137
bool hasPhi() const
Does it have the Phi projection?
bool hasZed() const
Does it have the Z projection?
DTChamberRecSegment2D thePhiSeg
virtual DTRecSegment4D* DTRecSegment4D::clone ( void  ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 46 of file DTRecSegment4D.h.

References DTRecSegment4D().

Referenced by DTSegment4DT0Corrector::produce().

46 { return new DTRecSegment4D(*this);}
DTRecSegment4D()
Empty constructor.
int DTRecSegment4D::degreesOfFreedom ( ) const
virtual

Degrees of freedom of the segment fit.

Implements RecSegment.

Definition at line 199 of file DTRecSegment4D.cc.

References DTRecSegment2D::degreesOfFreedom(), hasPhi(), hasZed(), query::result, thePhiSeg, and theZedSeg.

Referenced by DTChamberEfficiencyTask::getBestSegment(), DTChamberEfficiencyTask::isGoodSegment(), DTSegmentSelector::operator()(), and operator<<().

199  {
200  int result=0;
201  if (hasPhi()) result+=thePhiSeg.degreesOfFreedom();
202  if (hasZed()) result+=theZedSeg.degreesOfFreedom();
203  return result;
204 }
DTSLRecSegment2D theZedSeg
virtual int degreesOfFreedom() const
return the DOF of the segment
tuple result
Definition: query.py:137
bool hasPhi() const
Does it have the Phi projection?
bool hasZed() const
Does it have the Z projection?
DTChamberRecSegment2D thePhiSeg
virtual int DTRecSegment4D::dimension ( ) const
inlinevirtual

Dimension (in parameter space)

Implements RecSegment.

Definition at line 79 of file DTRecSegment4D.h.

References theDimension.

Referenced by DTCalibValidation::compute(), operator<<(), parameters(), parametersError(), and projectionMatrix().

79 { return theDimension; }
bool DTRecSegment4D::hasPhi ( ) const
inline
bool DTRecSegment4D::hasZed ( ) const
inline
virtual LocalVector DTRecSegment4D::localDirection ( ) const
inlinevirtual
LocalError DTRecSegment4D::localDirectionError ( ) const
virtual

Local direction error in the Chamber frame.

Implements RecSegment.

Definition at line 186 of file DTRecSegment4D.cc.

References theCovMatrix.

Referenced by DTSegment4DQuality::analyze().

186  {
187  return LocalError(theCovMatrix[0][0],theCovMatrix[0][1],theCovMatrix[1][1]);
188 }
AlgebraicSymMatrix theCovMatrix
virtual LocalPoint DTRecSegment4D::localPosition ( ) const
inlinevirtual
LocalError DTRecSegment4D::localPositionError ( ) const
virtual

Local position error in Chamber frame.

Implements TrackingRecHit.

Definition at line 181 of file DTRecSegment4D.cc.

References theCovMatrix.

Referenced by DTSegment4DQuality::analyze().

181  {
182  return LocalError(theCovMatrix[2][2],theCovMatrix[2][3],theCovMatrix[3][3]);
183 }
AlgebraicSymMatrix theCovMatrix
AlgebraicVector DTRecSegment4D::parameters ( void  ) const
virtual

Parameters of the segment, for the track fit. For a 4D segment: (dx/dy,dy/dz,x,y) For a 2D, phi-only segment: (dx/dz,x) For a 2D, Z-only segment: (dy/dz,y)

Implements TrackingRecHit.

Definition at line 103 of file DTRecSegment4D.cc.

References dimension(), phi, query::result, theDirection, thePosition, theProjection, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), PV3DBase< T, PVType, FrameType >::z(), and Z.

Referenced by ChamberSegmentUtility::getDTRHmap(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::inputTags(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::properties(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::recursePSetProperties(), and StateSegmentMatcher::StateSegmentMatcher().

103  {
104  if (dimension()==4) {
105  // (dx/dz,dy/dz,x,y)
107  result[2] = thePosition.x();
108  result[3] = thePosition.y();
110  result[1] = theDirection.y()/theDirection.z();
111  return result;
112  }
113 
115  if (theProjection==phi) {
116  // (dx/dz,x)
117  result[1] = thePosition.x();
119  } else if (theProjection==Z) {
120  // (dy/dz,y) (note we are in the chamber r.f.)
121  result[1] = thePosition.y();
123  }
124  return result;
125 }
LocalPoint thePosition
Projection theProjection
T y() const
Definition: PV3DBase.h:63
LocalVector theDirection
T z() const
Definition: PV3DBase.h:64
tuple result
Definition: query.py:137
virtual int dimension() const
Dimension (in parameter space)
CLHEP::HepVector AlgebraicVector
T x() const
Definition: PV3DBase.h:62
AlgebraicSymMatrix DTRecSegment4D::parametersError ( ) const
virtual

Covariance matrix fo parameters()

Implements TrackingRecHit.

Definition at line 128 of file DTRecSegment4D.cc.

References dimension(), phi, query::result, theCovMatrix, theProjection, and Z.

Referenced by StateSegmentMatcher::StateSegmentMatcher().

128  {
129 
130  if (dimension()==4) {
131  return theCovMatrix;
132  }
133 
135  if (theProjection==phi) {
136  result[0][0] = theCovMatrix[0][0]; //S(dx/dz)
137  result[0][1] = theCovMatrix[0][2]; //Cov(dx/dz,x)
138  result[1][1] = theCovMatrix[2][2]; //S(x)
139  } else if (theProjection==Z) {
140  result[0][0] = theCovMatrix[1][1]; //S(dy/dz)
141  result[0][1] = theCovMatrix[1][3]; //Cov(dy/dz,y)
142  result[1][1] = theCovMatrix[3][3]; //S(y)
143  }
144  return result;
145 }
Projection theProjection
tuple result
Definition: query.py:137
virtual int dimension() const
Dimension (in parameter space)
AlgebraicSymMatrix theCovMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
const DTChamberRecSegment2D* DTRecSegment4D::phiSegment ( ) const
inline
DTChamberRecSegment2D* DTRecSegment4D::phiSegment ( )
inlineprivate

the superPhi segment

Definition at line 125 of file DTRecSegment4D.h.

References thePhiSeg.

125 {return &thePhiSeg;}
DTChamberRecSegment2D thePhiSeg
AlgebraicMatrix DTRecSegment4D::projectionMatrix ( ) const
virtual

The projection matrix relates the trajectory state parameters to the segment parameters().

Implements TrackingRecHit.

Definition at line 148 of file DTRecSegment4D.cc.

References dimension(), phi, theProjection, and Z.

148  {
149  static bool isInitialized=false;
150  static AlgebraicMatrix the4DProjectionMatrix(4, 5, 0);
151  static AlgebraicMatrix the2DPhiProjMatrix(2, 5, 0);
152  static AlgebraicMatrix the2DZProjMatrix(2, 5, 0);
153 
154  if (!isInitialized) {
155  the4DProjectionMatrix[0][1] = 1;
156  the4DProjectionMatrix[1][2] = 1;
157  the4DProjectionMatrix[2][3] = 1;
158  the4DProjectionMatrix[3][4] = 1;
159 
160  the2DPhiProjMatrix[0][1] = 1;
161  the2DPhiProjMatrix[1][3] = 1;
162 
163  the2DZProjMatrix[0][2] = 1;
164  the2DZProjMatrix[1][4] = 1;
165 
166  isInitialized= true;
167  }
168 
169  if (dimension()==4) {
170  return the4DProjectionMatrix;
171  } else if (theProjection==phi) {
172  return the2DPhiProjMatrix;
173  } else if (theProjection==Z) {
174  return the2DZProjMatrix;
175  } else {
176  return AlgebraicMatrix();
177  }
178 }
Projection theProjection
CLHEP::HepMatrix AlgebraicMatrix
virtual int dimension() const
Dimension (in parameter space)
std::vector< const TrackingRecHit * > DTRecSegment4D::recHits ( ) const
virtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 254 of file DTRecSegment4D.cc.

References hasPhi(), hasZed(), phiSegment(), and zSegment().

254  {
255  std::vector<const TrackingRecHit*> pointersOfRecHits;
256 
257  if (hasPhi()) pointersOfRecHits.push_back(phiSegment());
258  if (hasZed()) pointersOfRecHits.push_back(zSegment());
259 
260  return pointersOfRecHits;
261 }
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
bool hasPhi() const
Does it have the Phi projection?
bool hasZed() const
Does it have the Z projection?
const DTSLRecSegment2D * zSegment() const
The Z segment: 0 if not zed projection available.
std::vector< TrackingRecHit * > DTRecSegment4D::recHits ( )
virtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 265 of file DTRecSegment4D.cc.

References hasPhi(), hasZed(), phiSegment(), and zSegment().

265  {
266 
267  std::vector<TrackingRecHit*> pointersOfRecHits;
268 
269  if (hasPhi()) pointersOfRecHits.push_back(phiSegment());
270  if (hasZed()) pointersOfRecHits.push_back(zSegment());
271 
272  return pointersOfRecHits;
273 }
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
bool hasPhi() const
Does it have the Phi projection?
bool hasZed() const
Does it have the Z projection?
const DTSLRecSegment2D * zSegment() const
The Z segment: 0 if not zed projection available.
void DTRecSegment4D::setCovMatrix ( AlgebraicSymMatrix  mat)
inline

Set covariance matrix.

Definition at line 114 of file DTRecSegment4D.h.

References theCovMatrix.

Referenced by DTSegmentUpdator::fit().

114 { theCovMatrix = mat; }
AlgebraicSymMatrix theCovMatrix
void DTRecSegment4D::setCovMatrixForZed ( const LocalPoint posZInCh)
private

Definition at line 207 of file DTRecSegment4D.cc.

References DTRecSegment2D::parametersError(), theCovMatrix, theZedSeg, and PV3DBase< T, PVType, FrameType >::z().

Referenced by DTRecSegment4D(), and DTSegmentUpdator::fit().

207  {
208  // Warning!!! the covariance matrix for Theta SL segment is defined in the SL
209  // reference frame, here that in the Chamber ref frame must be used.
210  // For direction, no problem, but the position is extrapolated, so we must
211  // propagate the error properly.
212 
213  // many thanks to Paolo Ronchese for the help in deriving the formulas!
214 
215  // y=m*z+q in SL frame
216  // y=m'*z+q' in CH frame
217 
218  // var(m') = var(m)
219  theCovMatrix[1][1] = theZedSeg.parametersError()[0][0]; //sigma (dy/dz)
220 
221  // cov(m',q') = DeltaZ*Var(m) + Cov(m,q)
222  theCovMatrix[1][3] =
223  posZInCh.z()*theZedSeg.parametersError()[0][0]+
224  theZedSeg.parametersError()[0][1]; //cov(dy/dz,y)
225 
226  // Var(q') = DeltaZ^2*Var(m) + Var(q) + 2*DeltaZ*Cov(m,q)
227  // cout << "Var(q') = DeltaZ^2*Var(m) + Var(q) + 2*DeltaZ*Cov(m,q)" << endl;
228  // cout << "Var(q')= " << posZInCh.z()*posZInCh.z() << "*" <<
229  // theZedSeg.parametersError()[0][0] << " + " <<
230  // theZedSeg.parametersError()[1][1] << " + " <<
231  // 2*posZInCh.z() << "*" << theZedSeg.parametersError()[0][1] ;
232  theCovMatrix[3][3] =
233  2.*(posZInCh.z()*posZInCh.z())*theZedSeg.parametersError()[0][0] +
234  theZedSeg.parametersError()[1][1] +
235  2.*posZInCh.z()*theZedSeg.parametersError()[0][1];
236  // cout << " = " << theCovMatrix[3][3] << endl;
237 }
DTSLRecSegment2D theZedSeg
T z() const
Definition: PV3DBase.h:64
AlgebraicSymMatrix theCovMatrix
virtual AlgebraicSymMatrix parametersError() const
void DTRecSegment4D::setDirection ( LocalVector  dir)
inline

Set direction.

Definition at line 111 of file DTRecSegment4D.h.

References dir, and theDirection.

Referenced by DTSegmentUpdator::fit().

111 { theDirection = dir; }
LocalVector theDirection
dbl *** dir
Definition: mlp_gen.cc:35
void DTRecSegment4D::setPosition ( LocalPoint  pos)
inline

Set position.

Definition at line 108 of file DTRecSegment4D.h.

References pos, and thePosition.

Referenced by DTSegmentUpdator::fit().

108 { thePosition = pos; }
LocalPoint thePosition
const DTSLRecSegment2D* DTRecSegment4D::zSegment ( ) const
inline
DTSLRecSegment2D* DTRecSegment4D::zSegment ( )
inlineprivate

the Z segment

Definition at line 128 of file DTRecSegment4D.h.

References theZedSeg.

128 {return &theZedSeg;}
DTSLRecSegment2D theZedSeg

Friends And Related Function Documentation

friend class DTSegmentUpdator
friend

Definition at line 28 of file DTRecSegment4D.h.

Member Data Documentation

AlgebraicSymMatrix DTRecSegment4D::theCovMatrix
private
int DTRecSegment4D::theDimension
private

Definition at line 147 of file DTRecSegment4D.h.

Referenced by dimension().

LocalVector DTRecSegment4D::theDirection
private

Definition at line 131 of file DTRecSegment4D.h.

Referenced by DTRecSegment4D(), localDirection(), parameters(), and setDirection().

DTChamberRecSegment2D DTRecSegment4D::thePhiSeg
private

Definition at line 144 of file DTRecSegment4D.h.

Referenced by chi2(), degreesOfFreedom(), DTRecSegment4D(), and phiSegment().

LocalPoint DTRecSegment4D::thePosition
private

Definition at line 130 of file DTRecSegment4D.h.

Referenced by DTRecSegment4D(), localPosition(), parameters(), and setPosition().

Projection DTRecSegment4D::theProjection
private

Definition at line 122 of file DTRecSegment4D.h.

Referenced by hasPhi(), hasZed(), parameters(), parametersError(), and projectionMatrix().

DTSLRecSegment2D DTRecSegment4D::theZedSeg
private

Definition at line 145 of file DTRecSegment4D.h.

Referenced by chi2(), degreesOfFreedom(), setCovMatrixForZed(), and zSegment().