CMS 3D CMS Logo

Public Member Functions | Private Attributes

BaseTrackerRecHit Class Reference

#include <BaseTrackerRecHit.h>

Inheritance diagram for BaseTrackerRecHit:
TrackingRecHit GCC11_FINAL< T > ProjectedSiStripRecHit2D SiTrackerMultiRecHit TrackerSingleRecHit GCC11_FINAL< T > GCC11_FINAL< T > GCC11_FINAL< T >

List of all members.

Public Member Functions

 BaseTrackerRecHit ()
 BaseTrackerRecHit (const LocalPoint &p, const LocalError &e, DetId id, trackerHitRTTI::RTTI rt)
 BaseTrackerRecHit (DetId id, trackerHitRTTI::RTTI rt)
virtual int dimension () const =0
virtual OmniClusterRef const & firstClusterRef () const =0
virtual void getKfComponents (KfComponentsHolder &holder) const =0
void getKfComponents1D (KfComponentsHolder &holder) const
void getKfComponents2D (KfComponentsHolder &holder) const
bool hasPositionAndError () const GCC11_FINAL
 to be redefined by daughter class
bool isMatched () const
bool isMulti () const
bool isProjected () const
bool isSingle () const
virtual LocalPoint localPosition () const GCC11_FINAL
virtual LocalError localPositionError () const GCC11_FINAL
const LocalErrorlocalPositionErrorFast () const
const LocalPointlocalPositionFast () const
virtual AlgebraicVector parameters () const
virtual AlgebraicSymMatrix parametersError () const
virtual AlgebraicMatrix projectionMatrix () const
trackerHitRTTI::RTTI rtti () const
bool sameDetModule (TrackingRecHit const &hit) const
virtual ~BaseTrackerRecHit ()

Private Attributes

LocalError err_
LocalPoint pos_

Detailed Description

Definition at line 21 of file BaseTrackerRecHit.h.


Constructor & Destructor Documentation

BaseTrackerRecHit::BaseTrackerRecHit ( ) [inline]

Definition at line 23 of file BaseTrackerRecHit.h.

{}
virtual BaseTrackerRecHit::~BaseTrackerRecHit ( ) [inline, virtual]

Definition at line 25 of file BaseTrackerRecHit.h.

{}
BaseTrackerRecHit::BaseTrackerRecHit ( DetId  id,
trackerHitRTTI::RTTI  rt 
) [inline]

Definition at line 28 of file BaseTrackerRecHit.h.

:  TrackingRecHit(id,(unsigned int)(rt)) {}
BaseTrackerRecHit::BaseTrackerRecHit ( const LocalPoint p,
const LocalError e,
DetId  id,
trackerHitRTTI::RTTI  rt 
) [inline]

Definition at line 30 of file BaseTrackerRecHit.h.

                                                      :  TrackingRecHit(id,(unsigned int)(rt)), pos_(p), err_(e){}

Member Function Documentation

virtual int BaseTrackerRecHit::dimension ( ) const [pure virtual]
virtual OmniClusterRef const& BaseTrackerRecHit::firstClusterRef ( ) const [pure virtual]
virtual void BaseTrackerRecHit::getKfComponents ( KfComponentsHolder holder) const [pure virtual]
void BaseTrackerRecHit::getKfComponents1D ( KfComponentsHolder holder) const
void BaseTrackerRecHit::getKfComponents2D ( KfComponentsHolder holder) const
bool BaseTrackerRecHit::hasPositionAndError ( ) const [virtual]

to be redefined by daughter class

Reimplemented from TrackingRecHit.

Definition at line 23 of file BaseTrackerRecHit.cc.

References err_, pos_, PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), LocalError::xy(), PV3DBase< T, PVType, FrameType >::y(), LocalError::yy(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by getKfComponents1D(), getKfComponents2D(), localPosition(), and localPositionError().

                                                  {
    return (err_.xx() != 0) || (err_.yy() != 0) || (err_.xy() != 0) ||
           (pos_.x()  != 0) || (pos_.y()  != 0) || (pos_.z()  != 0);
}
bool BaseTrackerRecHit::isMatched ( ) const [inline]

Definition at line 36 of file BaseTrackerRecHit.h.

{ return trackerHitRTTI::isMatched(*this);}
bool BaseTrackerRecHit::isMulti ( ) const [inline]

Definition at line 37 of file BaseTrackerRecHit.h.

{ return trackerHitRTTI::isMulti(*this);}
bool BaseTrackerRecHit::isProjected ( ) const [inline]

Definition at line 35 of file BaseTrackerRecHit.h.

{ return trackerHitRTTI::isProjected(*this);}
bool BaseTrackerRecHit::isSingle ( ) const [inline]

Definition at line 34 of file BaseTrackerRecHit.h.

{ return trackerHitRTTI::isSingle(*this);}
LocalPoint BaseTrackerRecHit::localPosition ( ) const [virtual]

Implements TrackingRecHit.

Reimplemented in GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, and GCC11_FINAL< T >.

Definition at line 28 of file BaseTrackerRecHit.cc.

References hasPositionAndError(), and pos_.

                                                  {
    if (!hasPositionAndError()) throwExceptionUninitialized("localPosition");
    return pos_;
}
LocalError BaseTrackerRecHit::localPositionError ( ) const [virtual]

Implements TrackingRecHit.

Reimplemented in GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, and GCC11_FINAL< T >.

Definition at line 33 of file BaseTrackerRecHit.cc.

References err_, and hasPositionAndError().

                                                      { 
    if (!hasPositionAndError()) throwExceptionUninitialized("localPositionError");
    return err_;
}
const LocalError& BaseTrackerRecHit::localPositionErrorFast ( ) const [inline]

Definition at line 53 of file BaseTrackerRecHit.h.

References err_.

{ return err_; }
const LocalPoint& BaseTrackerRecHit::localPositionFast ( ) const [inline]

Definition at line 52 of file BaseTrackerRecHit.h.

References pos_.

{ return pos_; }
AlgebraicVector BaseTrackerRecHit::parameters ( void  ) const [virtual]
AlgebraicSymMatrix BaseTrackerRecHit::parametersError ( ) const [virtual]
AlgebraicMatrix BaseTrackerRecHit::projectionMatrix ( ) const [virtual]
trackerHitRTTI::RTTI BaseTrackerRecHit::rtti ( ) const [inline]

Definition at line 33 of file BaseTrackerRecHit.h.

{ return trackerHitRTTI::rtti(*this);}
bool BaseTrackerRecHit::sameDetModule ( TrackingRecHit const &  hit) const [inline]

Definition at line 77 of file BaseTrackerRecHit.h.

References TrackingRecHit::geographicalId(), TrackingRecHit::isValid(), DetId::kSubdetOffset, and DetId::rawId().

Referenced by TrackerSingleRecHit::sharesInput().

                                                                      {
  unsigned int myid = geographicalId().rawId();
  unsigned int mysubd = myid >> (DetId::kSubdetOffset);

  unsigned int id = hit.geographicalId().rawId();
  unsigned int subd = id >> (DetId::kSubdetOffset);
  
  if (mysubd!=subd) return false;
  
  //Protection against invalid hits
  if(!hit.isValid()) return false;
  
  const unsigned int limdet = 10;  // TIB=11
  
  if (mysubd>limdet) { // strip
    // mask glue and stereo
    myid|=3;
    id|=3;
  }
  return id==myid;

}

Member Data Documentation