CMS 3D CMS Logo

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...
 
double chi2 () const override
 Chi2 of the segment fit. More...
 
DTRecSegment4Dclone () const override
 
int degreesOfFreedom () const override
 Degrees of freedom of the segment fit. More...
 
int dimension () const override
 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...
 
LocalVector localDirection () const override
 Local direction in Chamber frame. More...
 
LocalError localDirectionError () const override
 Local direction error in the Chamber frame. More...
 
LocalPoint localPosition () const override
 Local position in Chamber frame. More...
 
LocalError localPositionError () const override
 Local position error in Chamber frame. More...
 
AlgebraicVector parameters () const override
 
AlgebraicSymMatrix parametersError () const override
 Covariance matrix fo parameters() More...
 
const DTChamberRecSegment2DphiSegment () const
 The superPhi segment: 0 if no phi projection available. More...
 
AlgebraicMatrix projectionMatrix () const override
 The projection matrix relates the trajectory state parameters to the segment parameters(). More...
 
std::vector< const TrackingRecHit * > recHits () const override
 Access to component RecHits (if any) More...
 
std::vector< TrackingRecHit * > recHits () override
 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 () override
 Destructor. More...
 
- Public Member Functions inherited from RecSegment
 RecSegment (DetId id)
 
 RecSegment (TrackingRecHit::id_type id=0)
 
 ~RecSegment () override
 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< ConstRecHitPointerConstRecHitContainer
 
using ConstRecHitPointer = std::shared_ptr< TrackingRecHit const >
 
typedef unsigned int id_type
 
typedef std::vector< ConstRecHitPointerRecHitContainer
 
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, inactive_inner = 6, inactive_outer = 7
}
 
- 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

◆ Projection

Which projections are actually there.

Enumerator
full 
phi 
none 

Definition at line 115 of file DTRecSegment4D.h.

Constructor & Destructor Documentation

◆ DTRecSegment4D() [1/4]

DTRecSegment4D::DTRecSegment4D ( )
inline

Empty constructor.

Definition at line 27 of file DTRecSegment4D.h.

Referenced by clone().

◆ DTRecSegment4D() [2/4]

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

Construct from phi and Z projections.

Definition at line 15 of file DTRecSegment4D.cc.

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

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

◆ DTRecSegment4D() [3/4]

DTRecSegment4D::DTRecSegment4D ( const DTChamberRecSegment2D phiSeg)

Construct from phi projection.

Definition at line 45 of file DTRecSegment4D.cc.

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

46  : RecSegment(phiSeg.chamberId()),
48  thePhiSeg(phiSeg),
50  theDimension(2) {
52 
54 
55  // set cov matrix
57  theCovMatrix[0][0] = phiSeg.covMatrix()[0][0]; //sigma (dx/dz)
58  theCovMatrix[0][2] = phiSeg.covMatrix()[0][1]; //cov(dx/dz,x)
59  theCovMatrix[2][2] = phiSeg.covMatrix()[1][1]; //sigma (x)
60 }
DTSLRecSegment2D theZedSeg
LocalPoint localPosition() const override
local position in SL frame
LocalPoint thePosition
LocalVector localDirection() const override
the local direction in SL frame
Projection theProjection
LocalVector theDirection
DTChamberId chamberId() const
The id of the chamber on which reside the segment.
AlgebraicSymMatrix theCovMatrix
AlgebraicSymMatrix covMatrix() const
the Covariance Matrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
RecSegment(DetId id)
Definition: RecSegment.h:29
DTChamberRecSegment2D thePhiSeg

◆ DTRecSegment4D() [4/4]

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

Construct from Z projection.

Definition at line 62 of file DTRecSegment4D.cc.

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

63  : RecSegment(zedSeg.superLayerId().chamberId()),
66  theZedSeg(zedSeg),
67  theDimension(2) {
68  LocalPoint posZAt0 = posZInCh + dirZInCh * (-posZInCh.z() / cos(dirZInCh.theta()));
69 
70  thePosition = posZAt0;
71  theDirection = dirZInCh;
72 
73  // set cov matrix
75  setCovMatrixForZed(posZInCh);
76 }
DTSLRecSegment2D theZedSeg
LocalPoint thePosition
T z() const
Definition: PV3DBase.h:61
Projection theProjection
LocalVector theDirection
void setCovMatrixForZed(const LocalPoint &posZInCh)
DTChamberId chamberId() const
Return the corresponding ChamberId.
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:29
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
DTChamberRecSegment2D thePhiSeg

◆ ~DTRecSegment4D()

DTRecSegment4D::~DTRecSegment4D ( )
override

Destructor.

Definition at line 78 of file DTRecSegment4D.cc.

78 {}

Member Function Documentation

◆ chamberId()

DTChamberId DTRecSegment4D::chamberId ( ) const
virtual

◆ chi2()

double DTRecSegment4D::chi2 ( ) const
overridevirtual

Chi2 of the segment fit.

Implements RecSegment.

Definition at line 170 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<<().

170  {
171  double result = 0;
172  if (hasPhi())
173  result += thePhiSeg.chi2();
174  if (hasZed())
175  result += theZedSeg.chi2();
176  return result;
177 }
DTSLRecSegment2D theZedSeg
bool hasPhi() const
Does it have the Phi projection?
double chi2() const override
the chi2 of the fit
bool hasZed() const
Does it have the Z projection?
DTChamberRecSegment2D thePhiSeg

◆ clone()

DTRecSegment4D* DTRecSegment4D::clone ( void  ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 46 of file DTRecSegment4D.h.

References DTRecSegment4D().

Referenced by DTSegment4DT0Corrector::produce().

46 { return new DTRecSegment4D(*this); }
DTRecSegment4D()
Empty constructor.

◆ degreesOfFreedom()

int DTRecSegment4D::degreesOfFreedom ( ) const
overridevirtual

Degrees of freedom of the segment fit.

Implements RecSegment.

Definition at line 179 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<<().

179  {
180  int result = 0;
181  if (hasPhi())
183  if (hasZed())
185  return result;
186 }
DTSLRecSegment2D theZedSeg
bool hasPhi() const
Does it have the Phi projection?
int degreesOfFreedom() const override
return the DOF of the segment
bool hasZed() const
Does it have the Z projection?
DTChamberRecSegment2D thePhiSeg

◆ dimension()

int DTRecSegment4D::dimension ( ) const
inlineoverridevirtual

Dimension (in parameter space)

Implements RecSegment.

Definition at line 79 of file DTRecSegment4D.h.

References theDimension.

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

79 { return theDimension; }

◆ hasPhi()

bool DTRecSegment4D::hasPhi ( ) const
inline

◆ hasZed()

bool DTRecSegment4D::hasZed ( ) const
inline

◆ localDirection()

LocalVector DTRecSegment4D::localDirection ( ) const
inlineoverridevirtual

◆ localDirectionError()

LocalError DTRecSegment4D::localDirectionError ( ) const
overridevirtual

Local direction error in the Chamber frame.

Implements RecSegment.

Definition at line 166 of file DTRecSegment4D.cc.

References theCovMatrix.

Referenced by DTSegment4DQuality::dqmAnalyze().

166  {
167  return LocalError(theCovMatrix[0][0], theCovMatrix[0][1], theCovMatrix[1][1]);
168 }
AlgebraicSymMatrix theCovMatrix

◆ localPosition()

LocalPoint DTRecSegment4D::localPosition ( ) const
inlineoverridevirtual

◆ localPositionError()

LocalError DTRecSegment4D::localPositionError ( ) const
overridevirtual

Local position error in Chamber frame.

Implements TrackingRecHit.

Definition at line 162 of file DTRecSegment4D.cc.

References theCovMatrix.

Referenced by DTSegment4DQuality::dqmAnalyze().

162  {
163  return LocalError(theCovMatrix[2][2], theCovMatrix[2][3], theCovMatrix[3][3]);
164 }
AlgebraicSymMatrix theCovMatrix

◆ parameters()

AlgebraicVector DTRecSegment4D::parameters ( void  ) const
overridevirtual

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 80 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 StateSegmentMatcher::StateSegmentMatcher().

80  {
81  if (dimension() == 4) {
82  // (dx/dz,dy/dz,x,y)
84  result[2] = thePosition.x();
85  result[3] = thePosition.y();
86  result[0] = theDirection.x() / theDirection.z();
87  result[1] = theDirection.y() / theDirection.z();
88  return result;
89  }
90 
92  if (theProjection == phi) {
93  // (dx/dz,x)
94  result[1] = thePosition.x();
95  result[0] = theDirection.x() / theDirection.z();
96  } else if (theProjection == Z) {
97  // (dy/dz,y) (note we are in the chamber r.f.)
98  result[1] = thePosition.y();
99  result[0] = theDirection.y() / theDirection.z();
100  }
101  return result;
102 }
LocalPoint thePosition
T z() const
Definition: PV3DBase.h:61
Projection theProjection
LocalVector theDirection
int dimension() const override
Dimension (in parameter space)
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
CLHEP::HepVector AlgebraicVector

◆ parametersError()

AlgebraicSymMatrix DTRecSegment4D::parametersError ( ) const
overridevirtual

Covariance matrix fo parameters()

Implements TrackingRecHit.

Definition at line 104 of file DTRecSegment4D.cc.

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

Referenced by StateSegmentMatcher::StateSegmentMatcher().

104  {
105  if (dimension() == 4) {
106  return theCovMatrix;
107  }
108 
110  if (theProjection == phi) {
111  result[0][0] = theCovMatrix[0][0]; //S(dx/dz)
112  result[0][1] = theCovMatrix[0][2]; //Cov(dx/dz,x)
113  result[1][1] = theCovMatrix[2][2]; //S(x)
114  } else if (theProjection == Z) {
115  result[0][0] = theCovMatrix[1][1]; //S(dy/dz)
116  result[0][1] = theCovMatrix[1][3]; //Cov(dy/dz,y)
117  result[1][1] = theCovMatrix[3][3]; //S(y)
118  }
119  return result;
120 }
Projection theProjection
int dimension() const override
Dimension (in parameter space)
AlgebraicSymMatrix theCovMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix

◆ phiSegment() [1/2]

const DTChamberRecSegment2D* DTRecSegment4D::phiSegment ( ) const
inline

◆ phiSegment() [2/2]

DTChamberRecSegment2D* DTRecSegment4D::phiSegment ( )
inlineprivate

the superPhi segment

Definition at line 119 of file DTRecSegment4D.h.

References thePhiSeg.

119 { return &thePhiSeg; }
DTChamberRecSegment2D thePhiSeg

◆ projectionMatrix()

AlgebraicMatrix DTRecSegment4D::projectionMatrix ( ) const
overridevirtual

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

Implements TrackingRecHit.

Definition at line 150 of file DTRecSegment4D.cc.

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

150  {
151  if (dimension() == 4) {
152  return the4DProjectionMatrix;
153  } else if (theProjection == phi) {
154  return the2DPhiProjMatrix;
155  } else if (theProjection == Z) {
156  return the2DZProjMatrix;
157  } else {
158  return AlgebraicMatrix();
159  }
160 }
Projection theProjection
int dimension() const override
Dimension (in parameter space)
CLHEP::HepMatrix AlgebraicMatrix
static const AlgebraicMatrix the2DPhiProjMatrix
static const AlgebraicMatrix the2DZProjMatrix
static const AlgebraicMatrix the4DProjectionMatrix

◆ recHits() [1/2]

std::vector< const TrackingRecHit * > DTRecSegment4D::recHits ( ) const
overridevirtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 233 of file DTRecSegment4D.cc.

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

Referenced by DynamicTruncation::updateWithDThits().

233  {
234  std::vector<const TrackingRecHit*> pointersOfRecHits;
235 
236  if (hasPhi())
237  pointersOfRecHits.push_back(phiSegment());
238  if (hasZed())
239  pointersOfRecHits.push_back(zSegment());
240 
241  return pointersOfRecHits;
242 }
bool hasPhi() const
Does it have the Phi projection?
const DTSLRecSegment2D * zSegment() const
The Z segment: 0 if not zed projection available.
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
bool hasZed() const
Does it have the Z projection?

◆ recHits() [2/2]

std::vector< TrackingRecHit * > DTRecSegment4D::recHits ( )
overridevirtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 245 of file DTRecSegment4D.cc.

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

245  {
246  std::vector<TrackingRecHit*> pointersOfRecHits;
247 
248  if (hasPhi())
249  pointersOfRecHits.push_back(phiSegment());
250  if (hasZed())
251  pointersOfRecHits.push_back(zSegment());
252 
253  return pointersOfRecHits;
254 }
bool hasPhi() const
Does it have the Phi projection?
const DTSLRecSegment2D * zSegment() const
The Z segment: 0 if not zed projection available.
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
bool hasZed() const
Does it have the Z projection?

◆ setCovMatrix()

void DTRecSegment4D::setCovMatrix ( const AlgebraicSymMatrix mat)
inline

Set covariance matrix.

Definition at line 108 of file DTRecSegment4D.h.

References theCovMatrix.

Referenced by DTSegmentUpdator::fit().

108 { theCovMatrix = mat; }
AlgebraicSymMatrix theCovMatrix

◆ setCovMatrixForZed()

void DTRecSegment4D::setCovMatrixForZed ( const LocalPoint posZInCh)
private

Definition at line 188 of file DTRecSegment4D.cc.

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

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

188  {
189  // Warning!!! the covariance matrix for Theta SL segment is defined in the SL
190  // reference frame, here that in the Chamber ref frame must be used.
191  // For direction, no problem, but the position is extrapolated, so we must
192  // propagate the error properly.
193 
194  // many thanks to Paolo Ronchese for the help in deriving the formulas!
195 
196  // y=m*z+q in SL frame
197  // y=m'*z+q' in CH frame
198 
199  // var(m') = var(m)
200  theCovMatrix[1][1] = theZedSeg.parametersError()[0][0]; //sigma (dy/dz)
201 
202  // cov(m',q') = DeltaZ*Var(m) + Cov(m,q)
203  theCovMatrix[1][3] =
204  posZInCh.z() * theZedSeg.parametersError()[0][0] + theZedSeg.parametersError()[0][1]; //cov(dy/dz,y)
205 
206  // Var(q') = DeltaZ^2*Var(m) + Var(q) + 2*DeltaZ*Cov(m,q)
207  // cout << "Var(q') = DeltaZ^2*Var(m) + Var(q) + 2*DeltaZ*Cov(m,q)" << endl;
208  // cout << "Var(q')= " << posZInCh.z()*posZInCh.z() << "*" <<
209  // theZedSeg.parametersError()[0][0] << " + " <<
210  // theZedSeg.parametersError()[1][1] << " + " <<
211  // 2*posZInCh.z() << "*" << theZedSeg.parametersError()[0][1] ;
212  theCovMatrix[3][3] = 2. * (posZInCh.z() * posZInCh.z()) * theZedSeg.parametersError()[0][0] +
213  theZedSeg.parametersError()[1][1] + 2. * posZInCh.z() * theZedSeg.parametersError()[0][1];
214  // cout << " = " << theCovMatrix[3][3] << endl;
215 }
DTSLRecSegment2D theZedSeg
T z() const
Definition: PV3DBase.h:61
AlgebraicSymMatrix parametersError() const override
AlgebraicSymMatrix theCovMatrix

◆ setDirection()

void DTRecSegment4D::setDirection ( LocalVector  dir)
inline

Set direction.

Definition at line 105 of file DTRecSegment4D.h.

References DeadROC_duringRun::dir, and theDirection.

Referenced by DTSegmentUpdator::fit().

◆ setPosition()

void DTRecSegment4D::setPosition ( LocalPoint  pos)
inline

Set position.

Definition at line 102 of file DTRecSegment4D.h.

References thePosition.

Referenced by DTSegmentUpdator::fit().

102 { thePosition = pos; }
LocalPoint thePosition

◆ zSegment() [1/2]

const DTSLRecSegment2D* DTRecSegment4D::zSegment ( ) const
inline

◆ zSegment() [2/2]

DTSLRecSegment2D* DTRecSegment4D::zSegment ( )
inlineprivate

the Z segment

Definition at line 122 of file DTRecSegment4D.h.

References theZedSeg.

122 { return &theZedSeg; }
DTSLRecSegment2D theZedSeg

Friends And Related Function Documentation

◆ DTSegmentUpdator

friend class DTSegmentUpdator
friend

Definition at line 25 of file DTRecSegment4D.h.

Member Data Documentation

◆ theCovMatrix

AlgebraicSymMatrix DTRecSegment4D::theCovMatrix
private

◆ theDimension

int DTRecSegment4D::theDimension
private

Definition at line 141 of file DTRecSegment4D.h.

Referenced by dimension().

◆ theDirection

LocalVector DTRecSegment4D::theDirection
private

Definition at line 125 of file DTRecSegment4D.h.

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

◆ thePhiSeg

DTChamberRecSegment2D DTRecSegment4D::thePhiSeg
private

Definition at line 138 of file DTRecSegment4D.h.

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

◆ thePosition

LocalPoint DTRecSegment4D::thePosition
private

Definition at line 124 of file DTRecSegment4D.h.

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

◆ theProjection

Projection DTRecSegment4D::theProjection
private

Definition at line 116 of file DTRecSegment4D.h.

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

◆ theZedSeg

DTSLRecSegment2D DTRecSegment4D::theZedSeg
private

Definition at line 139 of file DTRecSegment4D.h.

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