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 | Private Member Functions | Private Attributes
DTRecHit1DPair Class Reference

#include <DTRecHit1DPair.h>

Inheritance diagram for DTRecHit1DPair:
RecHit1D TrackingRecHit

Public Member Functions

virtual DTRecHit1DPairclone () const
 
const DTRecHit1DcomponentRecHit (DTEnums::DTCellSide lrSide) const
 Return the left/right DTRecHit1D. More...
 
std::pair< const DTRecHit1D
*, const DTRecHit1D * > 
componentRecHits () const
 Get the left and right 1D rechits (first and second respectively). More...
 
float digiTime () const
 Return the digi time (ns) used to build the rechits. More...
 
 DTRecHit1DPair (const DTWireId &wireId, const DTDigi &digi)
 Constructor without components: must use setPos and Err! More...
 
 DTRecHit1DPair ()
 Default constructor. Needed to write the RecHit into a STL container. More...
 
virtual DetId geographicalId () const
 Return the detId of the Det (a DTLayer). More...
 
virtual LocalPoint localPosition () const
 
LocalPoint localPosition (DTEnums::DTCellSide lrside) const
 
virtual LocalError localPositionError () const
 
LocalError localPositionError (DTEnums::DTCellSide lrside) const
 
bool operator!= (const DTRecHit1DPair &hit) const
 
bool operator== (const DTRecHit1DPair &hit) const
 Comparison operator, based on the wireId and the digi time. More...
 
virtual std::vector< const
TrackingRecHit * > 
recHits () const
 
virtual std::vector
< TrackingRecHit * > 
recHits ()
 
void setPosition (DTEnums::DTCellSide lrside, const LocalPoint &point)
 
void setPositionAndError (DTEnums::DTCellSide lrside, const LocalPoint &point, const LocalError &err)
 
DTWireId wireId () const
 
virtual ~DTRecHit1DPair ()
 Destructor. More...
 
- Public Member Functions inherited from RecHit1D
virtual int dimension () const
 Return the RecHit dimension. More...
 
virtual AlgebraicVector parameters () const
 Return just the x. More...
 
virtual AlgebraicSymMatrix parametersError () const
 Return just "(sigma_x)^2". More...
 
virtual AlgebraicMatrix projectionMatrix () const
 Return the projection matrix. More...
 
 RecHit1D (DetId id)
 
 RecHit1D (TrackingRecHit::id_type id=0)
 
virtual ~RecHit1D ()
 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 * > &)
 
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 Member Functions

DTRecHit1DcomponentRecHit (DTEnums::DTCellSide lrSide)
 Non const access to left/right DTRecHit1D. More...
 

Private Attributes

DTRecHit1D theLeftHit
 
DTRecHit1D theRightHit
 

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

Composed recHit representing a pair of reconstructed hits

For each signal theLeftHit in the DT wire, two hits can be constructed, due to the Left/Right ambiguity, which can be solved only associating several hits together. This class describes the pair of points associated to a single TDC signal. The two hits can be accessed via recHits() method. The position is the average of the theLeftHit and theRightHit hits, namely the wire position.

Author
S. Lacaprara & G. Cerminara

Definition at line 26 of file DTRecHit1DPair.h.

Constructor & Destructor Documentation

DTRecHit1DPair::DTRecHit1DPair ( const DTWireId wireId,
const DTDigi digi 
)

Constructor without components: must use setPos and Err!

Definition at line 18 of file DTRecHit1DPair.cc.

19  : theLeftHit(wireId, Left, digi.time()),
20  theRightHit(wireId, Right, digi.time()) {}
double time() const
Get time in ns.
Definition: DTDigi.cc:63
DTRecHit1D theLeftHit
DTRecHit1D theRightHit
DTRecHit1DPair::DTRecHit1DPair ( )

Default constructor. Needed to write the RecHit into a STL container.

Definition at line 24 of file DTRecHit1DPair.cc.

Referenced by clone().

24  : theLeftHit(),
25  theRightHit() {}
DTRecHit1D theLeftHit
DTRecHit1D theRightHit
DTRecHit1DPair::~DTRecHit1DPair ( )
virtual

Destructor.

Definition at line 29 of file DTRecHit1DPair.cc.

29 {}

Member Function Documentation

DTRecHit1DPair * DTRecHit1DPair::clone ( void  ) const
virtual

Implements TrackingRecHit.

Definition at line 33 of file DTRecHit1DPair.cc.

References DTRecHit1DPair().

33  {
34  return new DTRecHit1DPair(*this);
35 }
DTRecHit1DPair()
Default constructor. Needed to write the RecHit into a STL container.
const DTRecHit1D* DTRecHit1DPair::componentRecHit ( DTEnums::DTCellSide  lrSide) const
DTRecHit1D* DTRecHit1DPair::componentRecHit ( DTEnums::DTCellSide  lrSide)
private

Non const access to left/right DTRecHit1D.

pair< const DTRecHit1D *, const DTRecHit1D * > DTRecHit1DPair::componentRecHits ( ) const

Get the left and right 1D rechits (first and second respectively).

Definition at line 160 of file DTRecHit1DPair.cc.

References componentRecHit().

160  {
161  return make_pair(componentRecHit(Left), componentRecHit(Right));
162 }
const DTRecHit1D * componentRecHit(DTEnums::DTCellSide lrSide) const
Return the left/right DTRecHit1D.
float DTRecHit1DPair::digiTime ( ) const
inline

Return the digi time (ns) used to build the rechits.

Definition at line 71 of file DTRecHit1DPair.h.

References DTRecHit1D::digiTime(), and theLeftHit.

Referenced by DTHitPairForFit::DTHitPairForFit(), and operator==().

71  {
72  return theLeftHit.digiTime();
73  }
DTRecHit1D theLeftHit
float digiTime() const
Return the time (ns) of the digi used to build the rechit.
Definition: DTRecHit1D.h:113
DetId DTRecHit1DPair::geographicalId ( ) const
virtual

Return the detId of the Det (a DTLayer).

Definition at line 80 of file DTRecHit1DPair.cc.

References DTWireId::layerId(), and wireId().

Referenced by MuonDetRecHitMixer< T1, T2 >::getRawDetId().

80  {
81  return wireId().layerId();
82 }
DTLayerId layerId() const
Return the corresponding LayerId.
Definition: DTWireId.h:62
DTWireId wireId() const
LocalPoint DTRecHit1DPair::localPosition ( ) const
virtual

Return the 3-dimensional local position. The average theLeftHit/theRightHit hits position, namely the wire position is returned.

Implements RecHit1D.

Definition at line 42 of file DTRecHit1DPair.cc.

References DTRecHit1D::localPosition(), theLeftHit, and theRightHit.

Referenced by operator<<(), DTCalibValidation::recHitDistFromWire(), DTRecHitQuality::recHitDistFromWire(), GlobalRecHitsAnalyzer::recHitDistFromWire(), GlobalRecHitsProducer::recHitDistFromWire(), and DTCalibValidation::recHitPosition().

42  {
43  return theLeftHit.localPosition() +
45 }
DTRecHit1D theLeftHit
DTRecHit1D theRightHit
virtual LocalPoint localPosition() const
Return the 3-dimensional local position.
Definition: DTRecHit1D.h:60
LocalPoint DTRecHit1DPair::localPosition ( DTEnums::DTCellSide  lrside) const

Return position in the local (layer) coordinate system for a certain hypothesis about the L/R cell side

LocalError DTRecHit1DPair::localPositionError ( ) const
virtual

Return the 3-dimensional error on the local position. The error is defiened as half the distance between theLeftHit and theRightHit pos

Implements RecHit1D.

Definition at line 52 of file DTRecHit1DPair.cc.

References DTRecHit1D::localPosition(), theLeftHit, theRightHit, and PV3DBase< T, PVType, FrameType >::x().

Referenced by DTRecHitQuality::recHitPositionError().

52  {
54  theLeftHit.localPosition().x())/2.,0.,0.);
55 }
DTRecHit1D theLeftHit
DTRecHit1D theRightHit
virtual LocalPoint localPosition() const
Return the 3-dimensional local position.
Definition: DTRecHit1D.h:60
T x() const
Definition: PV3DBase.h:62
LocalError DTRecHit1DPair::localPositionError ( DTEnums::DTCellSide  lrside) const

Return position error in the local (layer) coordinate system for a certain hypothesis about the L/R cell side

bool DTRecHit1DPair::operator!= ( const DTRecHit1DPair hit) const
inline

Inequality operator, defined as the mirror image of the comparions operator

Definition at line 82 of file DTRecHit1DPair.h.

References TrackingRecHit::hit().

82  {
83  return !(*this==hit);
84  }
virtual TrackingRecHit const * hit() const
bool DTRecHit1DPair::operator== ( const DTRecHit1DPair hit) const

Comparison operator, based on the wireId and the digi time.

Definition at line 87 of file DTRecHit1DPair.cc.

References digiTime(), and wireId().

87  {
88  return wireId() == hit.wireId() && fabs(digiTime() - hit.digiTime()) < 0.1;
89 }
float digiTime() const
Return the digi time (ns) used to build the rechits.
DTWireId wireId() const
vector< const TrackingRecHit * > DTRecHit1DPair::recHits ( ) const
virtual

Access to component RecHits. Return the two recHits (L/R)

Implements TrackingRecHit.

Definition at line 60 of file DTRecHit1DPair.cc.

References componentRecHit(), and query::result.

60  {
61  vector<const TrackingRecHit*> result;
62  result.push_back(componentRecHit(Left));
63  result.push_back(componentRecHit(Right));
64  return result;
65 }
const DTRecHit1D * componentRecHit(DTEnums::DTCellSide lrSide) const
Return the left/right DTRecHit1D.
tuple result
Definition: query.py:137
vector< TrackingRecHit * > DTRecHit1DPair::recHits ( )
virtual

Non-const access to component RecHits. Return the two recHits (L/R)

Implements TrackingRecHit.

Definition at line 70 of file DTRecHit1DPair.cc.

References componentRecHit(), and query::result.

70  {
71  vector<TrackingRecHit*> result;
72  result.push_back(componentRecHit(Left));
73  result.push_back(componentRecHit(Right));
74  return result;
75 }
const DTRecHit1D * componentRecHit(DTEnums::DTCellSide lrSide) const
Return the left/right DTRecHit1D.
tuple result
Definition: query.py:137
void DTRecHit1DPair::setPosition ( DTEnums::DTCellSide  lrside,
const LocalPoint point 
)

Set the 3-dimensional local position for the component hit corresponding to the given cell side. Default value is assumed for the error.

Definition at line 111 of file DTRecHit1DPair.cc.

References componentRecHit(), edm::hlt::Exception, and DTRecHit1D::setPosition().

111  {
112  if(lrside != undefLR)
113  componentRecHit(lrside)->setPosition(point);
114  else throw cms::Exception("DTRecHit1DPair::setPosition with undefined LR");
115 }
void setPosition(LocalPoint pos)
Set local position.
Definition: DTRecHit1D.h:88
const DTRecHit1D * componentRecHit(DTEnums::DTCellSide lrSide) const
Return the left/right DTRecHit1D.
void DTRecHit1DPair::setPositionAndError ( DTEnums::DTCellSide  lrside,
const LocalPoint point,
const LocalError err 
)

Set the 3-dimensional local position and error for the component hit corresponding to the given cell side. Default value is assumed for the error.

Definition at line 121 of file DTRecHit1DPair.cc.

References componentRecHit(), edm::hlt::Exception, DTRecHit1D::setError(), and DTRecHit1D::setPosition().

Referenced by DTNoDriftAlgo::reconstruct(), and DTRecHitBaseAlgo::reconstruct().

123  {
124  if(lrside != undefLR) {
125  componentRecHit(lrside)->setPosition(point);
126  componentRecHit(lrside)->setError(err);
127  }
128  else throw cms::Exception("DTRecHit1DPair::setPosition with undefined LR");
129 }
void setPosition(LocalPoint pos)
Set local position.
Definition: DTRecHit1D.h:88
const DTRecHit1D * componentRecHit(DTEnums::DTCellSide lrSide) const
Return the left/right DTRecHit1D.
void setError(LocalError err)
Set local position error.
Definition: DTRecHit1D.h:94
DTWireId DTRecHit1DPair::wireId ( ) const
inline

Definition at line 110 of file DTRecHit1DPair.h.

References theLeftHit, and DTRecHit1D::wireId().

Referenced by FWDTRecHitProxyBuilder::buildViewType(), DTHitPairForFit::DTHitPairForFit(), geographicalId(), and operator==().

110  {
111  return theLeftHit.wireId();
112  }
DTRecHit1D theLeftHit
DTWireId wireId() const
Return the wireId.
Definition: DTRecHit1D.h:107

Member Data Documentation

DTRecHit1D DTRecHit1DPair::theLeftHit
private

Definition at line 129 of file DTRecHit1DPair.h.

Referenced by digiTime(), localPosition(), localPositionError(), and wireId().

DTRecHit1D DTRecHit1DPair::theRightHit
private

Definition at line 130 of file DTRecHit1DPair.h.

Referenced by localPosition(), and localPositionError().