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 Attributes
BaseTrackerRecHit Class Referenceabstract

#include <BaseTrackerRecHit.h>

Inheritance diagram for BaseTrackerRecHit:
TrackingRecHit ProjectedSiStripRecHit2D SiStripMatchedRecHit2D SiTrackerMultiRecHit TrackerSingleRecHit SiPixelRecHit SiStripRecHit1D SiStripRecHit2D

Public Member Functions

 BaseTrackerRecHit ()
 
 BaseTrackerRecHit (DetId id, trackerHitRTTI::RTTI rt)
 
 BaseTrackerRecHit (const LocalPoint &p, const LocalError &e, 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
 to be redefined by daughter class More...
 
bool isMatched () const
 
bool isMulti () const
 
bool isProjected () const
 
bool isSingle () const
 
virtual LocalPoint localPosition () const
 
virtual LocalError localPositionError () const
 
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 ()
 
- Public Member Functions inherited from TrackingRecHit
virtual TrackingRecHitclone () const =0
 
DetId geographicalId () const
 
unsigned int getRTTI () const
 
Type getType () const
 
bool isValid () const
 
id_type rawId () const
 
virtual std::vector< const
TrackingRecHit * > 
recHits () const =0
 Access to component RecHits (if any) More...
 
virtual std::vector
< TrackingRecHit * > 
recHits ()=0
 Non-const access to component RecHits (if any) More...
 
virtual void recHitsV (std::vector< const TrackingRecHit * > &) const
 
virtual void recHitsV (std::vector< TrackingRecHit * > &)
 
virtual bool sharesInput (const TrackingRecHit *other, SharedInputType what) const
 
 TrackingRecHit (DetId id, Type type=valid)
 
 TrackingRecHit (id_type id=0, Type type=valid)
 
 TrackingRecHit (DetId id, unsigned int rt, Type type=valid)
 
Type type () const
 
virtual float weight () const
 
virtual ~TrackingRecHit ()
 

Private Attributes

LocalError err_
 
LocalPoint pos_
 

Additional Inherited Members

- Public Types inherited from TrackingRecHit
typedef unsigned int id_type
 
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

Definition at line 21 of file BaseTrackerRecHit.h.

Constructor & Destructor Documentation

BaseTrackerRecHit::BaseTrackerRecHit ( )
inline

Definition at line 23 of file BaseTrackerRecHit.h.

23 {}
virtual BaseTrackerRecHit::~BaseTrackerRecHit ( )
inlinevirtual

Definition at line 25 of file BaseTrackerRecHit.h.

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

Definition at line 28 of file BaseTrackerRecHit.h.

28 : TrackingRecHit(id,(unsigned int)(rt)) {}
TrackingRecHit(DetId id, Type type=valid)
BaseTrackerRecHit::BaseTrackerRecHit ( const LocalPoint p,
const LocalError e,
DetId  id,
trackerHitRTTI::RTTI  rt 
)
inline

Definition at line 30 of file BaseTrackerRecHit.h.

31  : TrackingRecHit(id,(unsigned int)(rt)), pos_(p), err_(e){}
TrackingRecHit(DetId id, Type type=valid)

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

Definition at line 41 of file BaseTrackerRecHit.cc.

References err_, KfComponentsHolder::errors(), hasPositionAndError(), KfComponentsHolder::measuredErrors(), KfComponentsHolder::measuredParams(), KfComponentsHolder::params(), pos_, trackerHitRTTI::proj, KfComponentsHolder::projection(), KfComponentsHolder::tsosLocalErrors(), KfComponentsHolder::tsosLocalParameters(), PV3DBase< T, PVType, FrameType >::x(), and LocalError::xx().

Referenced by SiStripRecHit1D::getKfComponents().

42 {
43  if (!hasPositionAndError()) throwExceptionUninitialized("getKfComponents");
44  AlgebraicVector1 & pars = holder.params<1>();
45  pars[0] = pos_.x();
46 
47  AlgebraicSymMatrix11 & errs = holder.errors<1>();
48  errs(0,0) = err_.xx();
49 
50  AlgebraicMatrix15 & proj = holder.projection<1>();
51  proj(0,3) = 1;
52 
53  holder.measuredParams<1>() = AlgebraicVector1( holder.tsosLocalParameters().At(3) );
54  holder.measuredErrors<1>() = holder.tsosLocalErrors().Sub<AlgebraicSymMatrix11>( 3, 3 );
55 }
float xx() const
Definition: LocalError.h:24
AlgebraicROOTObject< D, D >::SymMatrix & measuredErrors()
bool hasPositionAndError() const
to be redefined by daughter class
ROOT::Math::SVector< double, 1 > AlgebraicVector1
ROOT::Math::SMatrix< double, 1, 5, ROOT::Math::MatRepStd< double, 1, 5 > > AlgebraicMatrix15
AlgebraicROOTObject< D >::Vector & params()
const AlgebraicVector5 & tsosLocalParameters() const
AlgebraicROOTObject< D >::Vector & measuredParams()
AlgebraicROOTObject< D, D >::SymMatrix & errors()
AlgebraicROOTObject< D, 5 >::Matrix & projection()
T x() const
Definition: PV3DBase.h:61
const AlgebraicSymMatrix55 & tsosLocalErrors() const
ROOT::Math::SMatrix< double, 1, 1, ROOT::Math::MatRepSym< double, 1 > > AlgebraicSymMatrix11
void BaseTrackerRecHit::getKfComponents2D ( KfComponentsHolder holder) const

Definition at line 58 of file BaseTrackerRecHit.cc.

References KfComponentsHolder::doUseProjFunc(), err_, KfComponentsHolder::errors(), hasPositionAndError(), ProjectMatrix< T, N, D >::index, KfComponentsHolder::measuredErrors(), KfComponentsHolder::measuredParams(), KfComponentsHolder::params(), pos_, trackerHitRTTI::proj, KfComponentsHolder::projection(), KfComponentsHolder::projFunc(), KfComponentsHolder::tsosLocalErrors(), KfComponentsHolder::tsosLocalParameters(), PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), LocalError::xy(), PV3DBase< T, PVType, FrameType >::y(), and LocalError::yy().

Referenced by ProjectedSiStripRecHit2D::getKfComponents(), SiTrackerMultiRecHit::getKfComponents(), SiPixelRecHit::getKfComponents(), SiStripMatchedRecHit2D::getKfComponents(), and SiStripRecHit2D::getKfComponents().

59 {
60  if (!hasPositionAndError()) throwExceptionUninitialized("getKfComponents");
61  AlgebraicVector2 & pars = holder.params<2>();
62  pars[0] = pos_.x();
63  pars[1] = pos_.y();
64 
65  AlgebraicSymMatrix22 & errs = holder.errors<2>();
66  errs(0,0) = err_.xx();
67  errs(0,1) = err_.xy();
68  errs(1,1) = err_.yy();
69 
70 
71  AlgebraicMatrix25 & proj = holder.projection<2>();
72  proj(0,3) = 1;
73  proj(1,4) = 1;
74 
75  ProjectMatrix<double,5,2> & pf = holder.projFunc<2>();
76  pf.index[0] = 3;
77  pf.index[1] = 4;
78  holder.doUseProjFunc();
79 
80  holder.measuredParams<2>() = AlgebraicVector2( & holder.tsosLocalParameters().At(3), 2 );
81  holder.measuredErrors<2>() = holder.tsosLocalErrors().Sub<AlgebraicSymMatrix22>( 3, 3 );
82 
83 }
float xx() const
Definition: LocalError.h:24
AlgebraicROOTObject< D, D >::SymMatrix & measuredErrors()
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > AlgebraicSymMatrix22
bool hasPositionAndError() const
to be redefined by daughter class
T y() const
Definition: PV3DBase.h:62
float xy() const
Definition: LocalError.h:25
float yy() const
Definition: LocalError.h:26
AlgebraicROOTObject< D >::Vector & params()
const AlgebraicVector5 & tsosLocalParameters() const
AlgebraicROOTObject< D >::Vector & measuredParams()
ROOT::Math::SMatrix< double, 2, 5, ROOT::Math::MatRepStd< double, 2, 5 > > AlgebraicMatrix25
unsigned int index[D]
Definition: ProjectMatrix.h:42
AlgebraicROOTObject< D, D >::SymMatrix & errors()
AlgebraicROOTObject< D, 5 >::Matrix & projection()
T x() const
Definition: PV3DBase.h:61
const AlgebraicSymMatrix55 & tsosLocalErrors() const
ProjectMatrix< double, 5, D > & projFunc()
ROOT::Math::SVector< double, 2 > AlgebraicVector2
bool BaseTrackerRecHit::hasPositionAndError ( ) const
virtual
bool BaseTrackerRecHit::isMatched ( ) const
inline

Definition at line 36 of file BaseTrackerRecHit.h.

References trackerHitRTTI::isMatched().

36 { return trackerHitRTTI::isMatched(*this);}
bool isMatched(TrackingRecHit const &hit)
bool BaseTrackerRecHit::isMulti ( ) const
inline

Definition at line 37 of file BaseTrackerRecHit.h.

References trackerHitRTTI::isMulti().

37 { return trackerHitRTTI::isMulti(*this);}
bool isMulti(TrackingRecHit const &hit)
bool BaseTrackerRecHit::isProjected ( ) const
inline

Definition at line 35 of file BaseTrackerRecHit.h.

References trackerHitRTTI::isProjected().

35 { return trackerHitRTTI::isProjected(*this);}
bool isProjected(TrackingRecHit const &hit)
bool BaseTrackerRecHit::isSingle ( ) const
inline

Definition at line 34 of file BaseTrackerRecHit.h.

References trackerHitRTTI::isSingle().

34 { return trackerHitRTTI::isSingle(*this);}
bool isSingle(TrackingRecHit const &hit)
LocalPoint BaseTrackerRecHit::localPosition ( ) const
virtual

Implements TrackingRecHit.

Definition at line 28 of file BaseTrackerRecHit.cc.

References hasPositionAndError(), and pos_.

Referenced by SiStripLAProfileBooker::analyze(), SiStripRecHitsValid::analyze(), SiStripTrackingRecHitsValid::analyze(), SiPixelLorentzAngle::analyze(), SiPixelMuonHLT::analyze(), RoadSearchCloudMakerAlgorithm::CorrectMatchedHit(), SiPixelRecHitsValid::fillBarrel(), SiPixelRecHitsValid::fillForward(), RoadSearchCloudMakerAlgorithm::FillPixRecHitsIntoCloud(), RoadSearchCloudMakerAlgorithm::FillRecHitsIntoCloudGeneral(), GlobalRecHitsAnalyzer::fillTrk(), GlobalRecHitsProducer::fillTrk(), SiStripElectronSeedGenerator::findSeedsFromCluster(), SiStripFineDelayTLA::findtrackangle(), CRackTrajectoryBuilder::isDifferentStripReHit2D(), CalibrationTrackSelector::isIsolated(), AlignmentTrackSelector::isIsolated(), TSiTrackerMultiRecHit::localPosition(), TSiPixelRecHit::localPosition(), TSiStripRecHit2DLocalPos::localPosition(), TSiStripRecHit1D::localPosition(), PlotRecHits::printPixelRecHit(), PlotRecTracks::printRecTracks(), PlotRecHits::printStripRecHit(), ShallowRechitClustersProducer::produce(), reco::CentralityProducer::produce(), and SiStripElectronAlgo::projectPhiBand().

28  {
29  if (!hasPositionAndError()) throwExceptionUninitialized("localPosition");
30  return pos_;
31 }
bool hasPositionAndError() const
to be redefined by daughter class
LocalError BaseTrackerRecHit::localPositionError ( ) const
virtual
const LocalError& BaseTrackerRecHit::localPositionErrorFast ( ) const
inline

Definition at line 53 of file BaseTrackerRecHit.h.

References err_.

Referenced by SiStripRecHitMatcher::match().

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

Definition at line 52 of file BaseTrackerRecHit.h.

References pos_.

Referenced by SiStripRecHitMatcher::match().

52 { return pos_; }
AlgebraicVector BaseTrackerRecHit::parameters ( void  ) const
virtual
AlgebraicSymMatrix BaseTrackerRecHit::parametersError ( ) const
virtual

Implements TrackingRecHit.

Definition at line 91 of file BaseTrackerRecHit.cc.

91  {
92  obsolete();
93  return AlgebraicSymMatrix();
94 }
CLHEP::HepSymMatrix AlgebraicSymMatrix
AlgebraicMatrix BaseTrackerRecHit::projectionMatrix ( ) const
virtual

Implements TrackingRecHit.

Definition at line 97 of file BaseTrackerRecHit.cc.

Referenced by TSiTrackerMultiRecHit::projectionMatrix(), TSiPixelRecHit::projectionMatrix(), TSiStripRecHit2DLocalPos::projectionMatrix(), and TSiStripRecHit1D::projectionMatrix().

97  {
98  obsolete();
99  return AlgebraicMatrix();
100 }
CLHEP::HepMatrix AlgebraicMatrix
trackerHitRTTI::RTTI BaseTrackerRecHit::rtti ( ) const
inline

Definition at line 33 of file BaseTrackerRecHit.h.

References trackerHitRTTI::rtti().

33 { return trackerHitRTTI::rtti(*this);}
RTTI rtti(TrackingRecHit const &hit)
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 SiStripMatchedRecHit2D::sharesInput(), and TrackerSingleRecHit::sharesInput().

77  {
78  unsigned int myid = geographicalId().rawId();
79  unsigned int mysubd = myid >> (DetId::kSubdetOffset);
80 
81  unsigned int id = hit.geographicalId().rawId();
82  unsigned int subd = id >> (DetId::kSubdetOffset);
83 
84  if (mysubd!=subd) return false;
85 
86  //Protection against invalid hits
87  if(!hit.isValid()) return false;
88 
89  const unsigned int limdet = 10; // TIB=11
90 
91  if (mysubd>limdet) { // strip
92  // mask glue and stereo
93  myid|=3;
94  id|=3;
95  }
96  return id==myid;
97 
98 }
static const int kSubdetOffset
Definition: DetId.h:23
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
DetId geographicalId() const

Member Data Documentation

LocalError BaseTrackerRecHit::err_
private
LocalPoint BaseTrackerRecHit::pos_
private