CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

DTRecHit1DPair Class Reference

#include <DTRecHit1DPair.h>

Inheritance diagram for DTRecHit1DPair:
RecHit1D TrackingRecHit

List of all members.

Public Member Functions

virtual DTRecHit1DPairclone () const
const DTRecHit1DcomponentRecHit (DTEnums::DTCellSide lrSide) const
 Return the left/right DTRecHit1D.
std::pair< const DTRecHit1D
*, const DTRecHit1D * > 
componentRecHits () const
 Get the left and right 1D rechits (first and second respectively).
float digiTime () const
 Return the digi time (ns) used to build the rechits.
 DTRecHit1DPair ()
 Default constructor. Needed to write the RecHit into a STL container.
 DTRecHit1DPair (const DTWireId &wireId, const DTDigi &digi)
 Constructor without components: must use setPos and Err!
virtual DetId geographicalId () const
 Return the detId of the Det (a DTLayer).
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.
virtual std::vector
< TrackingRecHit * > 
recHits ()
virtual std::vector< const
TrackingRecHit * > 
recHits () const
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.

Private Member Functions

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

Private Attributes

DTRecHit1D theLeftHit
DTRecHit1D theRightHit

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.

Date:
2006/04/05 16:43:55
Revision:
1.4
Author:
S. Lacaprara & G. Cerminara

Definition at line 28 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 20 of file DTRecHit1DPair.cc.

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

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

Definition at line 26 of file DTRecHit1DPair.cc.

Referenced by clone().

DTRecHit1DPair::~DTRecHit1DPair ( ) [virtual]

Destructor.

Definition at line 31 of file DTRecHit1DPair.cc.

{}

Member Function Documentation

DTRecHit1DPair * DTRecHit1DPair::clone ( void  ) const [virtual]

Implements TrackingRecHit.

Definition at line 35 of file DTRecHit1DPair.cc.

References DTRecHit1DPair().

                                             {
  return new DTRecHit1DPair(*this);
}
DTRecHit1D* DTRecHit1DPair::componentRecHit ( DTEnums::DTCellSide  lrSide) [private]

Non const access to left/right DTRecHit1D.

const DTRecHit1D* DTRecHit1DPair::componentRecHit ( DTEnums::DTCellSide  lrSide) const
pair< const DTRecHit1D *, const DTRecHit1D * > DTRecHit1DPair::componentRecHits ( ) const

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

Definition at line 162 of file DTRecHit1DPair.cc.

References componentRecHit().

                                                                                  {
  return make_pair(componentRecHit(Left), componentRecHit(Right));
}
float DTRecHit1DPair::digiTime ( ) const [inline]

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

Definition at line 73 of file DTRecHit1DPair.h.

References DTRecHit1D::digiTime(), and theLeftHit.

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

                         {
    return theLeftHit.digiTime();
  }
DetId DTRecHit1DPair::geographicalId ( ) const [virtual]

Return the detId of the Det (a DTLayer).

Reimplemented from TrackingRecHit.

Definition at line 82 of file DTRecHit1DPair.cc.

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

                                           { 
  return wireId().layerId();
}
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 44 of file DTRecHit1DPair.cc.

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

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

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 ( DTEnums::DTCellSide  lrside) const

Return position error 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 54 of file DTRecHit1DPair.cc.

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

Referenced by DTRecHitQuality::recHitPositionError().

                                                    {
  return LocalError((theRightHit.localPosition().x()-
                     theLeftHit.localPosition().x())/2.,0.,0.);
}
bool DTRecHit1DPair::operator!= ( const DTRecHit1DPair hit) const [inline]

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

Definition at line 84 of file DTRecHit1DPair.h.

                                                   {
    return !(*this==hit);
  }
bool DTRecHit1DPair::operator== ( const DTRecHit1DPair hit) const

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

Definition at line 89 of file DTRecHit1DPair.cc.

References digiTime(), and wireId().

                                                               {
  return wireId() == hit.wireId() && fabs(digiTime() - hit.digiTime()) < 0.1;
}
vector< const TrackingRecHit * > DTRecHit1DPair::recHits ( ) const [virtual]

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

Implements TrackingRecHit.

Definition at line 62 of file DTRecHit1DPair.cc.

References componentRecHit(), and query::result.

                                                            {
  vector<const TrackingRecHit*> result;
  result.push_back(componentRecHit(Left));
  result.push_back(componentRecHit(Right));
  return result;
}
vector< TrackingRecHit * > DTRecHit1DPair::recHits ( ) [virtual]

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

Implements TrackingRecHit.

Definition at line 72 of file DTRecHit1DPair.cc.

References componentRecHit(), and query::result.

                                                {
  vector<TrackingRecHit*> result;
  result.push_back(const_cast<DTRecHit1D*>(componentRecHit(Left)));
  result.push_back(const_cast<DTRecHit1D*>(componentRecHit(Right)));
  return result;
}
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.

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.

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

DTWireId DTRecHit1DPair::wireId ( ) const [inline]

Member Data Documentation

Definition at line 131 of file DTRecHit1DPair.h.

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

Definition at line 132 of file DTRecHit1DPair.h.

Referenced by localPosition(), and localPositionError().