CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Attributes | Friends
DTRecSegment2D Class Reference

#include <DTRecSegment2D.h>

Inheritance diagram for DTRecSegment2D:
RecSegment TrackingRecHit DTChamberRecSegment2D DTSLRecSegment2D

Public Member Functions

double chi2 () const override
 the chi2 of the fit More...
 
DTRecSegment2Dclone () const override
 
AlgebraicSymMatrix covMatrix () const
 the Covariance Matrix More...
 
int degreesOfFreedom () const override
 return the DOF of the segment More...
 
int dimension () const override
 return 2. The dimension of the matrix More...
 
 DTRecSegment2D ()
 
 DTRecSegment2D (DetId id, const std::vector< DTRecHit1D > &hits)
 c'tor from hits More...
 
 DTRecSegment2D (DetId id, LocalPoint &position, LocalVector &direction, AlgebraicSymMatrix &covMatrix, double chi2, std::vector< DTRecHit1D > &hits1D)
 complete constructor More...
 
bool ist0Valid () const
 
LocalVector localDirection () const override
 the local direction in SL frame More...
 
LocalError localDirectionError () const override
 the local direction error (xx,xy,yy) in SL frame: only xx is not 0. More...
 
LocalPoint localPosition () const override
 local position in SL frame More...
 
LocalError localPositionError () const override
 local position error in SL frame More...
 
AlgebraicVector parameters () const override
 the vector of parameters (dx/dz,x) More...
 
AlgebraicSymMatrix parametersError () const override
 
AlgebraicMatrix projectionMatrix () const override
 
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...
 
std::vector< DTRecHit1DspecificRecHits () const
 Access to specific components. More...
 
double t0 () const
 Get the segment t0 (if recomputed, 0 is returned otherwise) More...
 
double vDrift () const
 
 ~DTRecSegment2D () 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 (const GeomDet &idet, TrackingRecHit const &rh)
 
 TrackingRecHit (const GeomDet &idet, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, unsigned int rt, Type type=valid)
 
 TrackingRecHit (DetId id, Type type=valid)
 
 TrackingRecHit (DetId id, unsigned int rt, Type type=valid)
 
 TrackingRecHit (id_type id=0, Type type=valid)
 
virtual ConstRecHitContainer transientHits () const
 
Type type () const
 
virtual float weight () const
 
virtual ~TrackingRecHit ()
 

Protected Member Functions

void setChi2 (const double &chi2)
 
void setCovMatrix (const AlgebraicSymMatrix &cov)
 
void setDirection (const LocalVector &dir)
 
void setPosition (const LocalPoint &pos)
 
void setT0 (const double &t0)
 
void setVdrift (const double &vdrift)
 
void update (std::vector< DTRecHit1D > &updatedRecHits)
 
- Protected Member Functions inherited from TrackingRecHit
void setId (id_type iid)
 
void setRTTI (unsigned int rt)
 
void setType (Type ttype)
 

Protected Attributes

double theChi2
 
AlgebraicSymMatrix theCovMatrix
 
LocalVector theDirection
 
std::vector< DTRecHit1DtheHits
 
LocalPoint thePosition
 
double theT0
 
double theVdrift
 

Private Member Functions

AlgebraicVector param (const LocalPoint &lp, const LocalVector &lv) const
 

Static Private Attributes

static const AlgebraicMatrix theProjectionMatrix {initTheProjectionMatrix()}
 

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
 

Detailed Description

Base class for 2-parameters segments measuring position and direction in X projection.

Implements the AbstractDetMeasurement part of the interface for 2D RecHits in terms of localPosition() and localPositionError() and Direction. This segment is measuring the position and the direction in just one projection, the "X". Typical use case is a segment reconstructed only in X projection. To be used as base class for all 2D positional-directional segments. The coordinate measured is assumend to be the local "x" and "dx/dz"

2D Segments for the muon barrel system. 2D means that this segment has information about position and direction in one projection (r-phi or r-theta/zeta).

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 45 of file DTRecSegment2D.h.

Constructor & Destructor Documentation

◆ DTRecSegment2D() [1/3]

DTRecSegment2D::DTRecSegment2D ( )
inline

Constructor empty c'tor needed by POOL (I guess)

Definition at line 49 of file DTRecSegment2D.h.

49 : theChi2(0.0), theT0(0.), theVdrift(0.) {}

Referenced by clone().

◆ DTRecSegment2D() [2/3]

DTRecSegment2D::DTRecSegment2D ( DetId  id,
const std::vector< DTRecHit1D > &  hits 
)

c'tor from hits

Definition at line 55 of file DTRecSegment2D.cc.

56  : RecSegment(id), theChi2(0.0), theT0(0.), theVdrift(0.), theHits(hits) {}

◆ DTRecSegment2D() [3/3]

DTRecSegment2D::DTRecSegment2D ( DetId  id,
LocalPoint position,
LocalVector direction,
AlgebraicSymMatrix covMatrix,
double  chi2,
std::vector< DTRecHit1D > &  hits1D 
)

complete constructor

Definition at line 58 of file DTRecSegment2D.cc.

64  : RecSegment(id),
66  theDirection(direction),
68  theChi2(chi2),
69  theT0(0.),
70  theVdrift(0.),
71  theHits(hits1D) {}

◆ ~DTRecSegment2D()

DTRecSegment2D::~DTRecSegment2D ( )
override

Destructor.

Definition at line 53 of file DTRecSegment2D.cc.

53 {}

Member Function Documentation

◆ chi2()

double DTRecSegment2D::chi2 ( void  ) const
inlineoverridevirtual

◆ clone()

DTRecSegment2D* DTRecSegment2D::clone ( void  ) const
inlineoverridevirtual

Implements TrackingRecHit.

Reimplemented in DTSLRecSegment2D.

Definition at line 67 of file DTRecSegment2D.h.

67 { return new DTRecSegment2D(*this); }

References DTRecSegment2D().

◆ covMatrix()

AlgebraicSymMatrix DTRecSegment2D::covMatrix ( ) const
inline

the Covariance Matrix

Definition at line 111 of file DTRecSegment2D.h.

111 { return theCovMatrix; }

References theCovMatrix.

Referenced by DTRecSegment4D::DTRecSegment4D(), and DTCombinatorialPatternReco4D::segmentSpecialZed().

◆ degreesOfFreedom()

int DTRecSegment2D::degreesOfFreedom ( ) const
overridevirtual

return the DOF of the segment

Implements RecSegment.

Definition at line 78 of file DTRecSegment2D.cc.

78 { return theHits.size() - dimension(); }

References dimension(), and theHits.

Referenced by DTLocalTriggerSynchTask::analyze(), DTRecSegment4D::degreesOfFreedom(), and operator<<().

◆ dimension()

int DTRecSegment2D::dimension ( ) const
inlineoverridevirtual

return 2. The dimension of the matrix

Implements RecSegment.

Definition at line 81 of file DTRecSegment2D.h.

81 { return 2; }

Referenced by degreesOfFreedom().

◆ ist0Valid()

bool DTRecSegment2D::ist0Valid ( ) const
inline

◆ localDirection()

LocalVector DTRecSegment2D::localDirection ( ) const
inlineoverridevirtual

◆ localDirectionError()

LocalError DTRecSegment2D::localDirectionError ( ) const
overridevirtual

the local direction error (xx,xy,yy) in SL frame: only xx is not 0.

Implements RecSegment.

Definition at line 76 of file DTRecSegment2D.cc.

76 { return LocalError(theCovMatrix[0][0], 0., 0.); }

References theCovMatrix.

Referenced by DTSegment2DQuality::dqmAnalyze(), DTSegment2DSLPhiQuality::dqmAnalyze(), and DTSegment4DQuality::dqmAnalyze().

◆ localPosition()

LocalPoint DTRecSegment2D::localPosition ( ) const
inlineoverridevirtual

◆ localPositionError()

LocalError DTRecSegment2D::localPositionError ( ) const
overridevirtual

local position error in SL frame

Implements TrackingRecHit.

Definition at line 74 of file DTRecSegment2D.cc.

74 { return LocalError(theCovMatrix[1][1], 0., 0.); }

References theCovMatrix.

Referenced by DTSegment2DQuality::dqmAnalyze(), DTSegment2DSLPhiQuality::dqmAnalyze(), DTSegment4DQuality::dqmAnalyze(), and DTCombinatorialPatternReco4D::segmentSpecialZed().

◆ param()

AlgebraicVector DTRecSegment2D::param ( const LocalPoint lp,
const LocalVector lv 
) const
inlineprivate

Definition at line 148 of file DTRecSegment2D.h.

148  {
150  result[1] = lp.x();
151  result[0] = lv.x() / lv.z();
152  return result;
153  }

References mps_fire::result, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by parameters().

◆ parameters()

AlgebraicVector DTRecSegment2D::parameters ( void  ) const
inlineoverridevirtual

the vector of parameters (dx/dz,x)

Implements TrackingRecHit.

Definition at line 70 of file DTRecSegment2D.h.

70 { return param(localPosition(), localDirection()); }

References localDirection(), localPosition(), and param().

◆ parametersError()

AlgebraicSymMatrix DTRecSegment2D::parametersError ( ) const
overridevirtual

mat[0][0]=sigma (dx/dz) mat[1][1]=sigma (x) mat[0][1]=cov(dx/dz,x)

Implements TrackingRecHit.

Definition at line 29 of file DTRecSegment2D.cc.

29  {
34  // if ( det().alignmentPositionError()) {
35  // LocalError lape =
36  // ErrorFrameTransformer().transform( det().alignmentPositionError()->globalError(),
37  // det().surface());
38  // m[0][0] = lv.xx();
39  // m[0][1] = 0.;
40  // m[1][1] = lp.xx()+lape.xx();
41  // } else {
42  m[0][0] = theCovMatrix[0][0];
43  m[0][1] = theCovMatrix[0][1];
44  m[1][1] = theCovMatrix[1][1];
45  //};
46 
47  //cout << "theCovMatrix elements " << theCovMatrix[0][0] << " , " << theCovMatrix[0][1] <<
48  // " , " << theCovMatrix[1][0] << " , " << theCovMatrix[1][1] << endl;
49 
50  return m;
51 }

References visualization-live-secondInstance_cfg::m.

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

◆ projectionMatrix()

AlgebraicMatrix DTRecSegment2D::projectionMatrix ( ) const
inlineoverridevirtual

return the projection matrix, which must project a parameter vector, whose components are (q/p, dx/dz, dy/dz, x, y), into the vector returned by parameters()

Implements TrackingRecHit.

Definition at line 78 of file DTRecSegment2D.h.

78 { return theProjectionMatrix; }

References theProjectionMatrix.

◆ recHits() [1/2]

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

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 86 of file DTRecSegment2D.cc.

86  {
87  std::vector<const TrackingRecHit*> pointersOfRecHits;
88 
89  for (std::vector<DTRecHit1D>::const_iterator rechit = theHits.begin(); rechit != theHits.end(); rechit++)
90  pointersOfRecHits.push_back(&(*rechit));
91 
92  return pointersOfRecHits;
93 }

References theHits.

Referenced by DTSegment4DQuality::dqmAnalyze(), DTChamberEfficiencyTask::getBestSegment(), MuonAssociatorByHitsHelper::getMatchedIds(), TrackerMuonHitExtractor::getMuonHits(), DTChamberEfficiencyTask::isGoodSegment(), MuonSegmentMatcher::matchDT(), operator<<(), and MuonTrackProducer::produce().

◆ recHits() [2/2]

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

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 95 of file DTRecSegment2D.cc.

95  {
96  std::vector<TrackingRecHit*> pointersOfRecHits;
97 
98  for (std::vector<DTRecHit1D>::iterator rechit = theHits.begin(); rechit != theHits.end(); rechit++)
99  pointersOfRecHits.push_back(&(*rechit));
100 
101  return pointersOfRecHits;
102 }

References theHits.

◆ setChi2()

void DTRecSegment2D::setChi2 ( const double &  chi2)
protected

Definition at line 114 of file DTRecSegment2D.cc.

114 { theChi2 = chi2; }

References chi2(), and theChi2.

Referenced by DTSegmentUpdator::fit().

◆ setCovMatrix()

void DTRecSegment2D::setCovMatrix ( const AlgebraicSymMatrix cov)
protected

Definition at line 112 of file DTRecSegment2D.cc.

112 { theCovMatrix = cov; }

References theCovMatrix.

Referenced by DTSegmentUpdator::fit().

◆ setDirection()

void DTRecSegment2D::setDirection ( const LocalVector dir)
protected

Definition at line 110 of file DTRecSegment2D.cc.

110 { theDirection = dir; }

References DeadROC_duringRun::dir, and theDirection.

Referenced by DTSegmentUpdator::fit().

◆ setPosition()

void DTRecSegment2D::setPosition ( const LocalPoint pos)
protected

Definition at line 108 of file DTRecSegment2D.cc.

108 { thePosition = pos; }

References thePosition.

Referenced by DTSegmentUpdator::fit().

◆ setT0()

void DTRecSegment2D::setT0 ( const double &  t0)
protected

Definition at line 116 of file DTRecSegment2D.cc.

116 { theT0 = t0; }

References t0(), and theT0.

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

◆ setVdrift()

void DTRecSegment2D::setVdrift ( const double &  vdrift)
protected

Definition at line 118 of file DTRecSegment2D.cc.

118 { theVdrift = vdrift; }

References theVdrift.

Referenced by DTSegmentUpdator::calculateT0corr().

◆ specificRecHits()

std::vector< DTRecHit1D > DTRecSegment2D::specificRecHits ( ) const

◆ t0()

double DTRecSegment2D::t0 ( ) const
inline

◆ update()

void DTRecSegment2D::update ( std::vector< DTRecHit1D > &  updatedRecHits)
protected

◆ vDrift()

double DTRecSegment2D::vDrift ( ) const
inline

Get the vDirft as computed by the algo for the computation of the segment t0 (if recomputed, 0 is returned otherwise)

Definition at line 119 of file DTRecSegment2D.h.

119 { return theVdrift; }

References theVdrift.

Referenced by DTSegmentUpdator::updateHits().

Friends And Related Function Documentation

◆ DTSegmentUpdator

friend class DTSegmentUpdator
friend

Definition at line 122 of file DTRecSegment2D.h.

Member Data Documentation

◆ theChi2

double DTRecSegment2D::theChi2
protected

Definition at line 139 of file DTRecSegment2D.h.

Referenced by chi2(), and setChi2().

◆ theCovMatrix

AlgebraicSymMatrix DTRecSegment2D::theCovMatrix
protected

mat[0][0]=sigma (dx/dz) mat[1][1]=sigma (x) mat[0][1]=cov(dx/dz,x)

Definition at line 137 of file DTRecSegment2D.h.

Referenced by covMatrix(), localDirectionError(), localPositionError(), and setCovMatrix().

◆ theDirection

LocalVector DTRecSegment2D::theDirection
protected

Definition at line 132 of file DTRecSegment2D.h.

Referenced by localDirection(), and setDirection().

◆ theHits

std::vector<DTRecHit1D> DTRecSegment2D::theHits
protected

Definition at line 143 of file DTRecSegment2D.h.

Referenced by degreesOfFreedom(), recHits(), specificRecHits(), and update().

◆ thePosition

LocalPoint DTRecSegment2D::thePosition
protected

Definition at line 131 of file DTRecSegment2D.h.

Referenced by localPosition(), and setPosition().

◆ theProjectionMatrix

const AlgebraicMatrix DTRecSegment2D::theProjectionMatrix {initTheProjectionMatrix()}
staticprivate

Definition at line 146 of file DTRecSegment2D.h.

Referenced by projectionMatrix().

◆ theT0

double DTRecSegment2D::theT0
protected

Definition at line 140 of file DTRecSegment2D.h.

Referenced by ist0Valid(), setT0(), and t0().

◆ theVdrift

double DTRecSegment2D::theVdrift
protected

Definition at line 141 of file DTRecSegment2D.h.

Referenced by setVdrift(), and vDrift().

DTRecSegment2D::thePosition
LocalPoint thePosition
Definition: DTRecSegment2D.h:131
RecSegment::RecSegment
RecSegment(DetId id)
Definition: RecSegment.h:29
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
DTRecSegment2D::t0
double t0() const
Get the segment t0 (if recomputed, 0 is returned otherwise)
Definition: DTRecSegment2D.h:114
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
pos
Definition: PixelAliasList.h:18
DTRecSegment2D::theChi2
double theChi2
Definition: DTRecSegment2D.h:139
DTRecSegment2D::theProjectionMatrix
static const AlgebraicMatrix theProjectionMatrix
Definition: DTRecSegment2D.h:146
DTRecSegment2D::theHits
std::vector< DTRecHit1D > theHits
Definition: DTRecSegment2D.h:143
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
DTRecSegment2D::param
AlgebraicVector param(const LocalPoint &lp, const LocalVector &lv) const
Definition: DTRecSegment2D.h:148
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
DTRecSegment2D::dimension
int dimension() const override
return 2. The dimension of the matrix
Definition: DTRecSegment2D.h:81
funct::true
true
Definition: Factorize.h:173
DTRecSegment2D::chi2
double chi2() const override
the chi2 of the fit
Definition: DTRecSegment2D.h:96
LocalError
Definition: LocalError.h:12
DTRecSegment2D::theDirection
LocalVector theDirection
Definition: DTRecSegment2D.h:132
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
DTRecSegment2D::localPosition
LocalPoint localPosition() const override
local position in SL frame
Definition: DTRecSegment2D.h:84
AlgebraicSymMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
Definition: AlgebraicObjects.h:15
DTRecSegment2D::covMatrix
AlgebraicSymMatrix covMatrix() const
the Covariance Matrix
Definition: DTRecSegment2D.h:111
mps_fire.result
result
Definition: mps_fire.py:311
DTRecSegment2D::theT0
double theT0
Definition: DTRecSegment2D.h:140
DTRecSegment2D::localDirection
LocalVector localDirection() const override
the local direction in SL frame
Definition: DTRecSegment2D.h:90
DTRecSegment2D::theVdrift
double theVdrift
Definition: DTRecSegment2D.h:141
DTRecSegment2D::theCovMatrix
AlgebraicSymMatrix theCovMatrix
Definition: DTRecSegment2D.h:137
DTRecSegment2D::DTRecSegment2D
DTRecSegment2D()
Definition: DTRecSegment2D.h:49
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23