test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

virtual double chi2 () const
 the chi2 of the fit More...
 
virtual DTRecSegment2Dclone () const
 
AlgebraicSymMatrix covMatrix () const
 the Covariance Matrix More...
 
virtual int degreesOfFreedom () const
 return the DOF of the segment More...
 
virtual int dimension () const
 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
 
virtual LocalVector localDirection () const
 the local direction in SL frame More...
 
virtual LocalError localDirectionError () const
 the local direction error (xx,xy,yy) in SL frame: only xx is not 0. More...
 
virtual LocalPoint localPosition () const
 local position in SL frame More...
 
virtual LocalError localPositionError () const
 local position error in SL frame More...
 
virtual AlgebraicVector parameters () const
 the vector of parameters (dx/dz,x) More...
 
virtual AlgebraicSymMatrix parametersError () const
 
virtual AlgebraicMatrix projectionMatrix () const
 
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...
 
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
 
virtual ~DTRecSegment2D ()
 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 ()
 

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
< 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
 

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::DTRecSegment2D ( )
inline

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

Definition at line 51 of file DTRecSegment2D.h.

Referenced by clone().

51 : theChi2(0.0), theT0(0.), theVdrift(0.) {}
DTRecSegment2D::DTRecSegment2D ( DetId  id,
const std::vector< DTRecHit1D > &  hits 
)

c'tor from hits

Definition at line 57 of file DTRecSegment2D.cc.

57  :
58  RecSegment(id), theChi2(0.0), theT0(0.), theVdrift(0.), theHits(hits){
59 }
std::vector< DTRecHit1D > theHits
RecSegment(DetId id)
Definition: RecSegment.h:30
DTRecSegment2D::DTRecSegment2D ( DetId  id,
LocalPoint position,
LocalVector direction,
AlgebraicSymMatrix covMatrix,
double  chi2,
std::vector< DTRecHit1D > &  hits1D 
)

complete constructor

Definition at line 61 of file DTRecSegment2D.cc.

64  :
65  RecSegment(id), thePosition(position),theDirection(direction),
virtual double chi2() const
the chi2 of the fit
std::vector< DTRecHit1D > theHits
AlgebraicSymMatrix theCovMatrix
AlgebraicSymMatrix covMatrix() const
the Covariance Matrix
LocalPoint thePosition
LocalVector theDirection
RecSegment(DetId id)
Definition: RecSegment.h:30
DTRecSegment2D::~DTRecSegment2D ( )
virtual

Destructor.

Definition at line 55 of file DTRecSegment2D.cc.

55 {}

Member Function Documentation

virtual double DTRecSegment2D::chi2 ( void  ) const
inlinevirtual
virtual DTRecSegment2D* DTRecSegment2D::clone ( void  ) const
inlinevirtual

Implements TrackingRecHit.

Reimplemented in DTChamberRecSegment2D, and DTSLRecSegment2D.

Definition at line 67 of file DTRecSegment2D.h.

References DTRecSegment2D().

67 { return new DTRecSegment2D(*this);}
AlgebraicSymMatrix DTRecSegment2D::covMatrix ( ) const
inline

the Covariance Matrix

Definition at line 116 of file DTRecSegment2D.h.

References theCovMatrix.

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

116 {return theCovMatrix;}
AlgebraicSymMatrix theCovMatrix
int DTRecSegment2D::degreesOfFreedom ( ) const
virtual

return the DOF of the segment

Implements RecSegment.

Definition at line 77 of file DTRecSegment2D.cc.

References dimension(), and theHits.

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

77  {
78  return theHits.size()-dimension();
79 }
std::vector< DTRecHit1D > theHits
virtual int dimension() const
return 2. The dimension of the matrix
virtual int DTRecSegment2D::dimension ( ) const
inlinevirtual

return 2. The dimension of the matrix

Implements RecSegment.

Definition at line 86 of file DTRecSegment2D.h.

Referenced by degreesOfFreedom().

86 { return 2;}
bool DTRecSegment2D::ist0Valid ( ) const
inline
virtual LocalVector DTRecSegment2D::localDirection ( ) const
inlinevirtual
LocalError DTRecSegment2D::localDirectionError ( ) const
virtual

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

Implements RecSegment.

Definition at line 73 of file DTRecSegment2D.cc.

References theCovMatrix.

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

73  {
74  return LocalError(theCovMatrix[0][0],0.,0.);
75 }
AlgebraicSymMatrix theCovMatrix
virtual LocalPoint DTRecSegment2D::localPosition ( ) const
inlinevirtual
LocalError DTRecSegment2D::localPositionError ( ) const
virtual

local position error in SL frame

Implements TrackingRecHit.

Definition at line 69 of file DTRecSegment2D.cc.

References theCovMatrix.

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

69  {
70  return LocalError(theCovMatrix[1][1],0.,0.);
71 }
AlgebraicSymMatrix theCovMatrix
AlgebraicVector DTRecSegment2D::param ( const LocalPoint lp,
const LocalVector lv 
) const
inlineprivate

Definition at line 155 of file DTRecSegment2D.h.

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

Referenced by parameters().

155  {
157  result[1]=lp.x();
158  result[0]=lv.x()/lv.z();
159  return result;
160  }
tuple result
Definition: mps_fire.py:84
T z() const
Definition: PV3DBase.h:64
CLHEP::HepVector AlgebraicVector
T x() const
Definition: PV3DBase.h:62
virtual AlgebraicVector DTRecSegment2D::parameters ( void  ) const
inlinevirtual

the vector of parameters (dx/dz,x)

Implements TrackingRecHit.

Definition at line 71 of file DTRecSegment2D.h.

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

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

71  {
72  return param( localPosition(), localDirection());
73  }
virtual LocalPoint localPosition() const
local position in SL frame
AlgebraicVector param(const LocalPoint &lp, const LocalVector &lv) const
virtual LocalVector localDirection() const
the local direction in SL frame
AlgebraicSymMatrix DTRecSegment2D::parametersError ( ) const
virtual

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

Implements TrackingRecHit.

Definition at line 30 of file DTRecSegment2D.cc.

References visualization-live-secondInstance_cfg::m.

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

30  {
35  // if ( det().alignmentPositionError()) {
36  // LocalError lape =
37  // ErrorFrameTransformer().transform( det().alignmentPositionError()->globalError(),
38  // det().surface());
39  // m[0][0] = lv.xx();
40  // m[0][1] = 0.;
41  // m[1][1] = lp.xx()+lape.xx();
42  // } else {
43  m[0][0] = theCovMatrix[0][0];
44  m[0][1] = theCovMatrix[0][1];
45  m[1][1] = theCovMatrix[1][1];
46  //};
47 
48  //cout << "theCovMatrix elements " << theCovMatrix[0][0] << " , " << theCovMatrix[0][1] <<
49  // " , " << theCovMatrix[1][0] << " , " << theCovMatrix[1][1] << endl;
50 
51  return m;
52 
53 }
AlgebraicSymMatrix theCovMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual AlgebraicMatrix DTRecSegment2D::projectionMatrix ( ) const
inlinevirtual

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

References theProjectionMatrix.

81  {
82  return theProjectionMatrix;
83  }
static const AlgebraicMatrix theProjectionMatrix
std::vector< const TrackingRecHit * > DTRecSegment2D::recHits ( ) const
virtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 88 of file DTRecSegment2D.cc.

References theHits.

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

88  {
89 
90  std::vector<const TrackingRecHit*> pointersOfRecHits;
91 
92  for(std::vector<DTRecHit1D>::const_iterator rechit = theHits.begin();
93  rechit != theHits.end(); rechit++)
94  pointersOfRecHits.push_back( &(*rechit) );
95 
96  return pointersOfRecHits;
97 }
std::vector< DTRecHit1D > theHits
std::vector< TrackingRecHit * > DTRecSegment2D::recHits ( )
virtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 99 of file DTRecSegment2D.cc.

References theHits.

99  {
100 
101  std::vector<TrackingRecHit*> pointersOfRecHits;
102 
103  for(std::vector<DTRecHit1D>::iterator rechit = theHits.begin();
104  rechit != theHits.end(); rechit++)
105  pointersOfRecHits.push_back( &(*rechit) );
106 
107  return pointersOfRecHits;
108 }
std::vector< DTRecHit1D > theHits
void DTRecSegment2D::setChi2 ( const double &  chi2)
protected

Definition at line 130 of file DTRecSegment2D.cc.

References chi2(), and theChi2.

Referenced by DTSegmentUpdator::fit().

130  {
131  theChi2=chi2;
132 }
virtual double chi2() const
the chi2 of the fit
void DTRecSegment2D::setCovMatrix ( const AlgebraicSymMatrix cov)
protected

Definition at line 126 of file DTRecSegment2D.cc.

References theCovMatrix.

Referenced by DTSegmentUpdator::fit().

126  {
127  theCovMatrix = cov;
128 }
AlgebraicSymMatrix theCovMatrix
void DTRecSegment2D::setDirection ( const LocalVector dir)
protected

Definition at line 122 of file DTRecSegment2D.cc.

References dir, and theDirection.

Referenced by DTSegmentUpdator::fit().

122  {
124 }
LocalVector theDirection
dbl *** dir
Definition: mlp_gen.cc:35
void DTRecSegment2D::setPosition ( const LocalPoint pos)
protected

Definition at line 118 of file DTRecSegment2D.cc.

References thePosition.

Referenced by DTSegmentUpdator::fit().

118  {
119  thePosition= pos;
120 }
LocalPoint thePosition
void DTRecSegment2D::setT0 ( const double &  t0)
protected

Definition at line 134 of file DTRecSegment2D.cc.

References t0(), and theT0.

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

134  {
135  theT0=t0;
136 }
double t0() const
Get the segment t0 (if recomputed, 0 is returned otherwise)
void DTRecSegment2D::setVdrift ( const double &  vdrift)
protected

Definition at line 138 of file DTRecSegment2D.cc.

References theVdrift.

Referenced by DTSegmentUpdator::calculateT0corr().

138  {
139  theVdrift=vdrift;
140 }
std::vector< DTRecHit1D > DTRecSegment2D::specificRecHits ( ) const
double DTRecSegment2D::t0 ( ) const
inline
void DTRecSegment2D::update ( std::vector< DTRecHit1D > &  updatedRecHits)
protected

Definition at line 114 of file DTRecSegment2D.cc.

References theHits.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), DTSegmentUpdator::rejectBadHits(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), Vispa.Gui.PortConnection.PointToPointConnection::updateConnection(), and DTSegmentUpdator::updateHits().

114  {
115  theHits = updatedRecHits;
116 }
std::vector< DTRecHit1D > theHits
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 124 of file DTRecSegment2D.h.

References theVdrift.

Referenced by DTSegmentUpdator::updateHits().

124 {return theVdrift;}

Friends And Related Function Documentation

friend class DTSegmentUpdator
friend

Definition at line 127 of file DTRecSegment2D.h.

Member Data Documentation

double DTRecSegment2D::theChi2
protected

Definition at line 144 of file DTRecSegment2D.h.

Referenced by chi2(), and setChi2().

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

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

LocalVector DTRecSegment2D::theDirection
protected

Definition at line 137 of file DTRecSegment2D.h.

Referenced by localDirection(), and setDirection().

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

Definition at line 148 of file DTRecSegment2D.h.

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

LocalPoint DTRecSegment2D::thePosition
protected

Definition at line 136 of file DTRecSegment2D.h.

Referenced by localPosition(), and setPosition().

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

Definition at line 153 of file DTRecSegment2D.h.

Referenced by projectionMatrix().

double DTRecSegment2D::theT0
protected

Definition at line 145 of file DTRecSegment2D.h.

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

double DTRecSegment2D::theVdrift
protected

Definition at line 146 of file DTRecSegment2D.h.

Referenced by setVdrift(), and vDrift().