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 (const 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
virtual bool canImproveWithTrack () const
 
RecHitPointer cloneForFit (const GeomDet &idet) const
 
virtual TrackingRecHitcloneHit () const
 
virtual RecHitPointer cloneSH () const
 
const GeomDetdet () const
 
virtual const GeomDetUnitdetUnit () const
 
virtual float errorGlobalR () const
 
virtual float errorGlobalRPhi () const
 
virtual float errorGlobalZ () const
 
DetId geographicalId () const
 
virtual void getKfComponents (KfComponentsHolder &holder) const
 
unsigned int getRTTI () const
 
Type getType () const
 
virtual GlobalPoint globalPosition () const
 
virtual GlobalError globalPositionError () const
 
virtual bool hasPositionAndError () const
 to be redefined by daughter class More...
 
virtual TrackingRecHit const * hit () const
 
bool isValid () const
 
id_type rawId () const
 
virtual void recHitsV (std::vector< const TrackingRecHit * > &) const
 
virtual void recHitsV (std::vector< TrackingRecHit * > &)
 
virtual void setDet (const GeomDet &idet)
 
virtual bool sharesInput (const TrackingRecHit *other, SharedInputType what) const
 
virtual const Surfacesurface () const
 
 TrackingRecHit (DetId id, Type type=valid)
 
 TrackingRecHit (id_type id=0, Type type=valid)
 
 TrackingRecHit (DetId id, unsigned int rt, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, unsigned int rt, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, TrackingRecHit const &rh)
 
virtual ConstRecHitContainer transientHits () const
 
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 std::vector
< ConstRecHitPointer
ConstRecHitContainer
 
using ConstRecHitPointer = std::shared_ptr< TrackingRecHit const >
 
typedef unsigned int id_type
 
typedef std::vector
< ConstRecHitPointer
RecHitContainer
 
using RecHitPointer = std::shared_ptr< TrackingRecHit const >
 
enum  SharedInputType { all, some }
 definition of equality via shared input More...
 
enum  Type {
  valid = 0, missing = 1, inactive = 2, bad = 3,
  missing_inner = 4, missing_outer = 5
}
 
- 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)

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 23 of file DTRecSegment4D.h.

Member Enumeration Documentation

Which projections are actually there.

Enumerator
full 
phi 
Z 
none 

Definition at line 119 of file DTRecSegment4D.h.

Constructor & Destructor Documentation

DTRecSegment4D::DTRecSegment4D ( )
inline

Empty constructor.

Definition at line 28 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 17 of file DTRecSegment4D.cc.

References funct::cos(), DTRecSegment2D::covMatrix(), DTChamberId, 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().

20  :
21  RecSegment(phiSeg.chamberId()),
23  thePhiSeg(phiSeg),
24  theZedSeg(zedSeg),
25  theDimension(4)
26 {
27  // Check consistency of 2 sub-segments
28  if(DTChamberId(phiSeg.geographicalId().rawId()) != DTChamberId(zedSeg.geographicalId().rawId()))
29  throw cms::Exception("DTRecSegment4D")
30  <<"the z Segment and the phi segment have different chamber id"<<std::endl;
31 
32  // The position of 2D segments are defined in the SL frame: I must first
33  // extrapolate that position at the Chamber reference plane
34  LocalPoint posZAt0 = posZInCh +
35  dirZInCh * (-posZInCh.z())/cos(dirZInCh.theta());
36 
37 
38  thePosition=LocalPoint(phiSeg.localPosition().x(),posZAt0.y(),0.);
39  LocalVector dirPhiInCh=phiSeg.localDirection();
40 
41  // given the actual definition of chamber refFrame, (with z poiniting to IP),
42  // the zed component of direction is negative.
43  theDirection=LocalVector(dirPhiInCh.x()/fabs(dirPhiInCh.z()),
44  dirZInCh.y()/fabs(dirZInCh.z()),
45  -1.);
47 
48  // set cov matrix
50  theCovMatrix[0][0]=phiSeg.covMatrix()[0][0]; //sigma (dx/dz)
51  theCovMatrix[0][2]=phiSeg.covMatrix()[0][1]; //cov(dx/dz,x)
52  theCovMatrix[2][2]=phiSeg.covMatrix()[1][1]; //sigma (x)
53  setCovMatrixForZed(posZInCh);
54 }
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:43
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:30
T x() const
Definition: PV3DBase.h:62
DTChamberRecSegment2D thePhiSeg
DTRecSegment4D::DTRecSegment4D ( const DTChamberRecSegment2D phiSeg)

Construct from phi projection.

Definition at line 57 of file DTRecSegment4D.cc.

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

57  :
58  RecSegment(phiSeg.chamberId()),
60  thePhiSeg(phiSeg),
62  theDimension(2)
63 {
65 
67 
68  // set cov matrix
70  theCovMatrix[0][0]=phiSeg.covMatrix()[0][0]; //sigma (dx/dz)
71  theCovMatrix[0][2]=phiSeg.covMatrix()[0][1]; //cov(dx/dz,x)
72  theCovMatrix[2][2]=phiSeg.covMatrix()[1][1]; //sigma (x)
73 }
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:30
DTChamberRecSegment2D thePhiSeg
DTRecSegment4D::DTRecSegment4D ( const DTSLRecSegment2D zedSeg,
const LocalPoint posZInCh,
const LocalVector dirZInCh 
)

Construct from Z projection.

Definition at line 76 of file DTRecSegment4D.cc.

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

78  :
79  RecSegment(zedSeg.superLayerId().chamberId()),
82  theZedSeg(zedSeg),
83  theDimension(2)
84 {
85 
86  LocalPoint posZAt0=posZInCh+
87  dirZInCh*(-posZInCh.z()/cos(dirZInCh.theta()));
88 
89  thePosition=posZAt0;
90  theDirection = dirZInCh;
91 
92  // set cov matrix
94  setCovMatrixForZed(posZInCh);
95 }
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:30
DTChamberRecSegment2D thePhiSeg
DTRecSegment4D::~DTRecSegment4D ( )

Destructor.

Definition at line 98 of file DTRecSegment4D.cc.

98 {}

Member Function Documentation

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

Chi2 of the segment fit.

Implements RecSegment.

Definition at line 197 of file DTRecSegment4D.cc.

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

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

197  {
198  double result=0;
199  if (hasPhi()) result+=thePhiSeg.chi2();
200  if (hasZed()) result+=theZedSeg.chi2();
201  return result;
202 }
DTSLRecSegment2D theZedSeg
virtual double chi2() const
the chi2 of the fit
tuple result
Definition: mps_fire.py:83
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 44 of file DTRecSegment4D.h.

References DTRecSegment4D().

Referenced by DTSegment4DT0Corrector::produce().

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

Degrees of freedom of the segment fit.

Implements RecSegment.

Definition at line 205 of file DTRecSegment4D.cc.

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

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

205  {
206  int result=0;
207  if (hasPhi()) result+=thePhiSeg.degreesOfFreedom();
208  if (hasZed()) result+=theZedSeg.degreesOfFreedom();
209  return result;
210 }
DTSLRecSegment2D theZedSeg
virtual int degreesOfFreedom() const
return the DOF of the segment
tuple result
Definition: mps_fire.py:83
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 77 of file DTRecSegment4D.h.

References theDimension.

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

77 { 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 192 of file DTRecSegment4D.cc.

References theCovMatrix.

Referenced by DTSegment4DQuality::analyze().

192  {
193  return LocalError(theCovMatrix[0][0],theCovMatrix[0][1],theCovMatrix[1][1]);
194 }
AlgebraicSymMatrix theCovMatrix
virtual LocalPoint DTRecSegment4D::localPosition ( ) const
inlinevirtual
LocalError DTRecSegment4D::localPositionError ( ) const
virtual

Local position error in Chamber frame.

Implements TrackingRecHit.

Definition at line 187 of file DTRecSegment4D.cc.

References theCovMatrix.

Referenced by DTSegment4DQuality::analyze().

187  {
188  return LocalError(theCovMatrix[2][2],theCovMatrix[2][3],theCovMatrix[3][3]);
189 }
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 101 of file DTRecSegment4D.cc.

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

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

101  {
102  if (dimension()==4) {
103  // (dx/dz,dy/dz,x,y)
105  result[2] = thePosition.x();
106  result[3] = thePosition.y();
108  result[1] = theDirection.y()/theDirection.z();
109  return result;
110  }
111 
113  if (theProjection==phi) {
114  // (dx/dz,x)
115  result[1] = thePosition.x();
117  } else if (theProjection==Z) {
118  // (dy/dz,y) (note we are in the chamber r.f.)
119  result[1] = thePosition.y();
121  }
122  return result;
123 }
LocalPoint thePosition
Projection theProjection
T y() const
Definition: PV3DBase.h:63
LocalVector theDirection
tuple result
Definition: mps_fire.py:83
T z() const
Definition: PV3DBase.h:64
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 126 of file DTRecSegment4D.cc.

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

Referenced by StateSegmentMatcher::StateSegmentMatcher().

126  {
127 
128  if (dimension()==4) {
129  return theCovMatrix;
130  }
131 
133  if (theProjection==phi) {
134  result[0][0] = theCovMatrix[0][0]; //S(dx/dz)
135  result[0][1] = theCovMatrix[0][2]; //Cov(dx/dz,x)
136  result[1][1] = theCovMatrix[2][2]; //S(x)
137  } else if (theProjection==Z) {
138  result[0][0] = theCovMatrix[1][1]; //S(dy/dz)
139  result[0][1] = theCovMatrix[1][3]; //Cov(dy/dz,y)
140  result[1][1] = theCovMatrix[3][3]; //S(y)
141  }
142  return result;
143 }
Projection theProjection
tuple result
Definition: mps_fire.py:83
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 123 of file DTRecSegment4D.h.

References thePhiSeg.

123 {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 174 of file DTRecSegment4D.cc.

References dimension(), phi, the2DPhiProjMatrix, the2DZProjMatrix, the4DProjectionMatrix, theProjection, and Z.

174  {
175  if (dimension()==4) {
176  return the4DProjectionMatrix;
177  } else if (theProjection==phi) {
178  return the2DPhiProjMatrix;
179  } else if (theProjection==Z) {
180  return the2DZProjMatrix;
181  } else {
182  return AlgebraicMatrix();
183  }
184 }
Projection theProjection
CLHEP::HepMatrix AlgebraicMatrix
static const AlgebraicMatrix the2DPhiProjMatrix
virtual int dimension() const
Dimension (in parameter space)
static const AlgebraicMatrix the2DZProjMatrix
static const AlgebraicMatrix the4DProjectionMatrix
std::vector< const TrackingRecHit * > DTRecSegment4D::recHits ( ) const
virtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 260 of file DTRecSegment4D.cc.

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

Referenced by DynamicTruncation::updateWithDThits().

260  {
261  std::vector<const TrackingRecHit*> pointersOfRecHits;
262 
263  if (hasPhi()) pointersOfRecHits.push_back(phiSegment());
264  if (hasZed()) pointersOfRecHits.push_back(zSegment());
265 
266  return pointersOfRecHits;
267 }
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 271 of file DTRecSegment4D.cc.

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

271  {
272 
273  std::vector<TrackingRecHit*> pointersOfRecHits;
274 
275  if (hasPhi()) pointersOfRecHits.push_back(phiSegment());
276  if (hasZed()) pointersOfRecHits.push_back(zSegment());
277 
278  return pointersOfRecHits;
279 }
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 ( const AlgebraicSymMatrix mat)
inline

Set covariance matrix.

Definition at line 112 of file DTRecSegment4D.h.

References theCovMatrix.

Referenced by DTSegmentUpdator::fit().

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

Definition at line 213 of file DTRecSegment4D.cc.

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

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

213  {
214  // Warning!!! the covariance matrix for Theta SL segment is defined in the SL
215  // reference frame, here that in the Chamber ref frame must be used.
216  // For direction, no problem, but the position is extrapolated, so we must
217  // propagate the error properly.
218 
219  // many thanks to Paolo Ronchese for the help in deriving the formulas!
220 
221  // y=m*z+q in SL frame
222  // y=m'*z+q' in CH frame
223 
224  // var(m') = var(m)
225  theCovMatrix[1][1] = theZedSeg.parametersError()[0][0]; //sigma (dy/dz)
226 
227  // cov(m',q') = DeltaZ*Var(m) + Cov(m,q)
228  theCovMatrix[1][3] =
229  posZInCh.z()*theZedSeg.parametersError()[0][0]+
230  theZedSeg.parametersError()[0][1]; //cov(dy/dz,y)
231 
232  // Var(q') = DeltaZ^2*Var(m) + Var(q) + 2*DeltaZ*Cov(m,q)
233  // cout << "Var(q') = DeltaZ^2*Var(m) + Var(q) + 2*DeltaZ*Cov(m,q)" << endl;
234  // cout << "Var(q')= " << posZInCh.z()*posZInCh.z() << "*" <<
235  // theZedSeg.parametersError()[0][0] << " + " <<
236  // theZedSeg.parametersError()[1][1] << " + " <<
237  // 2*posZInCh.z() << "*" << theZedSeg.parametersError()[0][1] ;
238  theCovMatrix[3][3] =
239  2.*(posZInCh.z()*posZInCh.z())*theZedSeg.parametersError()[0][0] +
240  theZedSeg.parametersError()[1][1] +
241  2.*posZInCh.z()*theZedSeg.parametersError()[0][1];
242  // cout << " = " << theCovMatrix[3][3] << endl;
243 }
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 109 of file DTRecSegment4D.h.

References dir, and theDirection.

Referenced by DTSegmentUpdator::fit().

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

Set position.

Definition at line 106 of file DTRecSegment4D.h.

References thePosition.

Referenced by DTSegmentUpdator::fit().

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

the Z segment

Definition at line 126 of file DTRecSegment4D.h.

References theZedSeg.

126 {return &theZedSeg;}
DTSLRecSegment2D theZedSeg

Friends And Related Function Documentation

friend class DTSegmentUpdator
friend

Definition at line 26 of file DTRecSegment4D.h.

Member Data Documentation

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

Definition at line 145 of file DTRecSegment4D.h.

Referenced by dimension().

LocalVector DTRecSegment4D::theDirection
private

Definition at line 129 of file DTRecSegment4D.h.

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

DTChamberRecSegment2D DTRecSegment4D::thePhiSeg
private

Definition at line 142 of file DTRecSegment4D.h.

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

LocalPoint DTRecSegment4D::thePosition
private

Definition at line 128 of file DTRecSegment4D.h.

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

Projection DTRecSegment4D::theProjection
private

Definition at line 120 of file DTRecSegment4D.h.

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

DTSLRecSegment2D DTRecSegment4D::theZedSeg
private

Definition at line 143 of file DTRecSegment4D.h.

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