CMS 3D CMS Logo

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

DTRecHit1DPairclone () const override
 
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 ()
 Default constructor. Needed to write the RecHit into a STL container. More...
 
 DTRecHit1DPair (const DTWireId &wireId, const DTDigi &digi)
 Constructor without components: must use setPos and Err! More...
 
virtual DetId geographicalId () const
 Return the detId of the Det (a DTLayer). More...
 
LocalPoint localPosition () const override
 
LocalPoint localPosition (DTEnums::DTCellSide lrside) const
 
LocalError localPositionError () const override
 
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...
 
std::vector< const TrackingRecHit * > recHits () const override
 
std::vector< TrackingRecHit * > recHits () override
 
void setPosition (DTEnums::DTCellSide lrside, const LocalPoint &point)
 
void setPositionAndError (DTEnums::DTCellSide lrside, const LocalPoint &point, const LocalError &err)
 
DTWireId wireId () const
 
 ~DTRecHit1DPair () override
 Destructor. More...
 
- Public Member Functions inherited from RecHit1D
int dimension () const override
 Return the RecHit dimension. More...
 
AlgebraicVector parameters () const override
 Return just the x. More...
 
AlgebraicSymMatrix parametersError () const override
 Return just "(sigma_x)^2". More...
 
AlgebraicMatrix projectionMatrix () const override
 Return the projection matrix. More...
 
 RecHit1D (DetId id)
 
 RecHit1D (TrackingRecHit::id_type id=0)
 
 ~RecHit1D () 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 ()
 

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

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() [1/2]

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

Constructor without components: must use setPos and Err!

Definition at line 15 of file DTRecHit1DPair.cc.

16  : theLeftHit(wireId, Left, digi.time()), theRightHit(wireId, Right, digi.time()) {}

◆ DTRecHit1DPair() [2/2]

DTRecHit1DPair::DTRecHit1DPair ( )

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

Definition at line 19 of file DTRecHit1DPair.cc.

19 : theLeftHit(), theRightHit() {}

Referenced by clone().

◆ ~DTRecHit1DPair()

DTRecHit1DPair::~DTRecHit1DPair ( )
override

Destructor.

Definition at line 22 of file DTRecHit1DPair.cc.

22 {}

Member Function Documentation

◆ clone()

DTRecHit1DPair * DTRecHit1DPair::clone ( void  ) const
overridevirtual

Implements TrackingRecHit.

Definition at line 24 of file DTRecHit1DPair.cc.

24 { return new DTRecHit1DPair(*this); }

References DTRecHit1DPair().

◆ componentRecHit() [1/2]

DTRecHit1D* DTRecHit1DPair::componentRecHit ( DTEnums::DTCellSide  lrSide)
private

Non const access to left/right DTRecHit1D.

◆ componentRecHit() [2/2]

const DTRecHit1D* DTRecHit1DPair::componentRecHit ( DTEnums::DTCellSide  lrSide) const

◆ componentRecHits()

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

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

Definition at line 116 of file DTRecHit1DPair.cc.

116  {
117  return make_pair(componentRecHit(Left), componentRecHit(Right));
118 }

References componentRecHit().

◆ digiTime()

float DTRecHit1DPair::digiTime ( ) const
inline

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

Definition at line 63 of file DTRecHit1DPair.h.

63 { return theLeftHit.digiTime(); }

References DTRecHit1D::digiTime(), and theLeftHit.

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

◆ geographicalId()

DetId DTRecHit1DPair::geographicalId ( ) const
virtual

Return the detId of the Det (a DTLayer).

Definition at line 57 of file DTRecHit1DPair.cc.

57 { return wireId().layerId(); }

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

◆ localPosition() [1/2]

LocalPoint DTRecHit1DPair::localPosition ( ) const
overridevirtual

◆ localPosition() [2/2]

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

◆ localPositionError() [1/2]

LocalError DTRecHit1DPair::localPositionError ( ) const
overridevirtual

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 36 of file DTRecHit1DPair.cc.

36  {
37  return LocalError((theRightHit.localPosition().x() - theLeftHit.localPosition().x()) / 2., 0., 0.);
38 }

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

◆ localPositionError() [2/2]

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

◆ operator!=()

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

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

Definition at line 70 of file DTRecHit1DPair.h.

70 { return !(*this == hit); }

References TrackingRecHit::hit().

◆ operator==()

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

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

Definition at line 60 of file DTRecHit1DPair.cc.

60  {
61  return wireId() == hit.wireId() && fabs(digiTime() - hit.digiTime()) < 0.1;
62 }

References digiTime(), and wireId().

◆ recHits() [1/2]

vector< const TrackingRecHit * > DTRecHit1DPair::recHits ( ) const
overridevirtual

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

Implements TrackingRecHit.

Definition at line 41 of file DTRecHit1DPair.cc.

41  {
42  vector<const TrackingRecHit*> result;
43  result.push_back(componentRecHit(Left));
44  result.push_back(componentRecHit(Right));
45  return result;
46 }

References componentRecHit(), and mps_fire::result.

◆ recHits() [2/2]

vector< TrackingRecHit * > DTRecHit1DPair::recHits ( )
overridevirtual

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

Implements TrackingRecHit.

Definition at line 49 of file DTRecHit1DPair.cc.

49  {
50  vector<TrackingRecHit*> result;
51  result.push_back(componentRecHit(Left));
52  result.push_back(componentRecHit(Right));
53  return result;
54 }

References componentRecHit(), and mps_fire::result.

◆ setPosition()

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 76 of file DTRecHit1DPair.cc.

76  {
77  if (lrside != undefLR)
79  else
80  throw cms::Exception("DTRecHit1DPair::setPosition with undefined LR");
81 }

References componentRecHit(), Exception, point, and DTRecHit1D::setPosition().

◆ setPositionAndError()

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 85 of file DTRecHit1DPair.cc.

85  {
86  if (lrside != undefLR) {
88  componentRecHit(lrside)->setError(err);
89  } else
90  throw cms::Exception("DTRecHit1DPair::setPosition with undefined LR");
91 }

References componentRecHit(), submitPVResolutionJobs::err, Exception, point, DTRecHit1D::setError(), and DTRecHit1D::setPosition().

Referenced by DTNoDriftAlgo::reconstruct().

◆ wireId()

DTWireId DTRecHit1DPair::wireId ( ) const
inline

Member Data Documentation

◆ theLeftHit

DTRecHit1D DTRecHit1DPair::theLeftHit
private

Definition at line 102 of file DTRecHit1DPair.h.

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

◆ theRightHit

DTRecHit1D DTRecHit1DPair::theRightHit
private

Definition at line 103 of file DTRecHit1DPair.h.

Referenced by localPosition(), and localPositionError().

DTRecHit1DPair::componentRecHit
const DTRecHit1D * componentRecHit(DTEnums::DTCellSide lrSide) const
Return the left/right DTRecHit1D.
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
DTRecHit1DPair::theRightHit
DTRecHit1D theRightHit
Definition: DTRecHit1DPair.h:103
TrackingRecHit::hit
virtual TrackingRecHit const * hit() const
Definition: TrackingRecHit.h:75
DTRecHit1DPair::DTRecHit1DPair
DTRecHit1DPair()
Default constructor. Needed to write the RecHit into a STL container.
Definition: DTRecHit1DPair.cc:19
DTRecHit1DPair::theLeftHit
DTRecHit1D theLeftHit
Definition: DTRecHit1DPair.h:102
DTDigi::time
double time() const
Get time in ns.
Definition: DTDigi.cc:37
DTRecHit1DPair::digiTime
float digiTime() const
Return the digi time (ns) used to build the rechits.
Definition: DTRecHit1DPair.h:63
DTRecHit1D::wireId
DTWireId wireId() const
Return the wireId.
Definition: DTRecHit1D.h:76
DTRecHit1D::localPosition
LocalPoint localPosition() const override
Return the 3-dimensional local position.
Definition: DTRecHit1D.h:47
LocalError
Definition: LocalError.h:12
DTRecHit1DPair::wireId
DTWireId wireId() const
Definition: DTRecHit1DPair.h:89
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
DTRecHit1D::digiTime
float digiTime() const
Return the time (ns) of the digi used to build the rechit.
Definition: DTRecHit1D.h:79
Exception
Definition: hltDiff.cc:246
DTWireId::layerId
DTLayerId layerId() const
Return the corresponding LayerId.
Definition: DTWireId.h:45
DTRecHit1D::setPosition
void setPosition(LocalPoint pos)
Set local position.
Definition: DTRecHit1D.h:64
mps_fire.result
result
Definition: mps_fire.py:311
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
DTRecHit1D::setError
void setError(LocalError err)
Set local position error.
Definition: DTRecHit1D.h:67
hit
Definition: SiStripHitEffFromCalibTree.cc:88