CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
TrackerSingleRecHit Class Reference

#include <TrackerSingleRecHit.h>

Inheritance diagram for TrackerSingleRecHit:
BaseTrackerRecHit TrackingRecHit ProjectedSiStripRecHit2D SiPixelRecHit SiStripRecHit1D SiStripRecHit2D

Public Types

typedef BaseTrackerRecHit Base
 
typedef
OmniClusterRef::ClusterPixelRef 
ClusterPixelRef
 
typedef
OmniClusterRef::ClusterStripRef 
ClusterStripRef
 
- 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 }
 

Public Member Functions

ClusterPixelRef cluster_pixel () const
 
ClusterStripRef cluster_strip () const
 
const GeomDetUnitdetUnit () const
 
virtual OmniClusterRef const & firstClusterRef () const
 
OmniClusterRef const & omniCluster () const
 
OmniClusterRefomniCluster ()
 
OmniClusterRef const & omniClusterRef () const
 
OmniClusterRefomniClusterRef ()
 
SiPixelCluster const & pixelCluster () const
 
virtual std::vector< const
TrackingRecHit * > 
recHits () const
 Access to component RecHits (if any) More...
 
virtual std::vector
< TrackingRecHit * > 
recHits ()
 Non-const access to component RecHits (if any) More...
 
bool sameCluster (OmniClusterRef const &oh) const
 
void setClusterPixelRef (ClusterPixelRef const &ref)
 
void setClusterStripRef (ClusterStripRef const &ref)
 
virtual bool sharesInput (const TrackingRecHit *other, SharedInputType what) const
 
bool sharesInput (TrackerSingleRecHit const &other) const
 
SiStripCluster const & stripCluster () const
 
 TrackerSingleRecHit ()
 
 TrackerSingleRecHit (DetId id, OmniClusterRef const &clus)
 
template<typename CluRef >
 TrackerSingleRecHit (const LocalPoint &p, const LocalError &e, GeomDet const &idet, CluRef const &clus)
 
template<typename CluRef >
 TrackerSingleRecHit (const LocalPoint &p, const LocalError &e, GeomDet const &idet, trackerHitRTTI::RTTI rt, CluRef const &clus)
 
- Public Member Functions inherited from BaseTrackerRecHit
 BaseTrackerRecHit ()
 
 BaseTrackerRecHit (DetId id, trackerHitRTTI::RTTI rt)
 
 BaseTrackerRecHit (const LocalPoint &p, const LocalError &e, GeomDet const &idet, trackerHitRTTI::RTTI rt)
 
virtual float clusterProbability () const
 cluster probability, overloaded by pixel rechits. More...
 
virtual int dimension () const =0
 
float errorGlobalR () const
 
float errorGlobalRPhi () const
 
float errorGlobalZ () const
 
virtual void getKfComponents (KfComponentsHolder &holder) const =0
 
void getKfComponents1D (KfComponentsHolder &holder) const
 
void getKfComponents2D (KfComponentsHolder &holder) const
 
virtual GlobalPoint globalPosition () const
 
GlobalError globalPositionError () const
 
TrackingRecHitGlobalState globalState () const
 
bool hasPositionAndError () const
 to be redefined by daughter class More...
 
BaseTrackerRecHit const * hit () const
 
bool isMatched () const
 
bool isMulti () const
 
virtual bool isPixel () const
 
bool isProjected () const
 
bool isProjMono () const
 
bool isProjSterep () 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 const Surfacesurface () const
 
virtual ~BaseTrackerRecHit ()
 
- Public Member Functions inherited from TrackingRecHit
virtual bool canImproveWithTrack () const
 
virtual TrackingRecHitclone () const =0
 
RecHitPointer cloneForFit (const GeomDet &idet) const
 
virtual TrackingRecHitcloneHit () const
 
virtual RecHitPointer cloneSH () const
 
const GeomDetdet () const
 
DetId geographicalId () const
 
unsigned int getRTTI () const
 
Type getType () 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)
 
 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 Attributes

OmniClusterRef cluster_
 

Additional Inherited Members

- 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)
 
- Protected Attributes inherited from BaseTrackerRecHit
unsigned int qualWord_
 

Detailed Description

Definition at line 13 of file TrackerSingleRecHit.h.

Member Typedef Documentation

Definition at line 16 of file TrackerSingleRecHit.h.

Definition at line 21 of file TrackerSingleRecHit.h.

Definition at line 22 of file TrackerSingleRecHit.h.

Constructor & Destructor Documentation

TrackerSingleRecHit::TrackerSingleRecHit ( )
inline

Definition at line 18 of file TrackerSingleRecHit.h.

18 {}
TrackerSingleRecHit::TrackerSingleRecHit ( DetId  id,
OmniClusterRef const &  clus 
)
inline

Definition at line 25 of file TrackerSingleRecHit.h.

template<typename CluRef >
TrackerSingleRecHit::TrackerSingleRecHit ( const LocalPoint p,
const LocalError e,
GeomDet const &  idet,
CluRef const &  clus 
)
inline

Definition at line 30 of file TrackerSingleRecHit.h.

template<typename CluRef >
TrackerSingleRecHit::TrackerSingleRecHit ( const LocalPoint p,
const LocalError e,
GeomDet const &  idet,
trackerHitRTTI::RTTI  rt,
CluRef const &  clus 
)
inline

Definition at line 36 of file TrackerSingleRecHit.h.

38  : Base(p,e,idet, rt), cluster_(clus){}
BaseTrackerRecHit Base

Member Function Documentation

ClusterPixelRef TrackerSingleRecHit::cluster_pixel ( ) const
inline

Definition at line 56 of file TrackerSingleRecHit.h.

References cluster_, and OmniClusterRef::cluster_pixel().

Referenced by SiPixelRecHit::cluster().

56  {
57  return cluster_.cluster_pixel();
58  }
ClusterPixelRef cluster_pixel() const
ClusterStripRef TrackerSingleRecHit::cluster_strip ( ) const
inline

Definition at line 60 of file TrackerSingleRecHit.h.

References cluster_, and OmniClusterRef::cluster_strip().

Referenced by SiStripRecHit1D::cluster(), SiStripRecHit2D::cluster(), and ProjectedSiStripRecHit2D::cluster().

60  {
61  return cluster_.cluster_strip();
62  }
ClusterStripRef cluster_strip() const
const GeomDetUnit* TrackerSingleRecHit::detUnit ( ) const
inlinevirtual

CAUTION: the GeomDetUnit* is zero for composite hits (matched hits in the tracker, segments in the muon). Always check this pointer before using it!

Reimplemented from TrackingRecHit.

Definition at line 42 of file TrackerSingleRecHit.h.

References TrackingRecHit::det().

Referenced by TkClonerImpl::makeShared(), and TkClonerImpl::operator()().

42  {
43  return static_cast<const GeomDetUnit*>(det());
44  }
const GeomDet * det() const
virtual OmniClusterRef const& TrackerSingleRecHit::firstClusterRef ( ) const
inlinevirtual

Implements BaseTrackerRecHit.

Definition at line 48 of file TrackerSingleRecHit.h.

References cluster_.

48 { return cluster_;}
OmniClusterRef const& TrackerSingleRecHit::omniCluster ( ) const
inline
OmniClusterRef& TrackerSingleRecHit::omniCluster ( )
inline

Definition at line 54 of file TrackerSingleRecHit.h.

References cluster_.

54 { return cluster_;}
OmniClusterRef const& TrackerSingleRecHit::omniClusterRef ( ) const
inline
OmniClusterRef& TrackerSingleRecHit::omniClusterRef ( )
inline

Definition at line 53 of file TrackerSingleRecHit.h.

References cluster_.

53 { return cluster_;}
SiPixelCluster const& TrackerSingleRecHit::pixelCluster ( ) const
inline

Definition at line 68 of file TrackerSingleRecHit.h.

References cluster_, and OmniClusterRef::pixelCluster().

68  {
69  return cluster_.pixelCluster();
70  }
SiPixelCluster const & pixelCluster() const
std::vector< const TrackingRecHit * > TrackerSingleRecHit::recHits ( ) const
virtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Reimplemented in ProjectedSiStripRecHit2D.

Definition at line 138 of file TrackerSingleRecHit.cc.

138  {
139  std::vector<const TrackingRecHit*> nullvector;
140  return nullvector;
141 }
std::vector< TrackingRecHit * > TrackerSingleRecHit::recHits ( )
virtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Reimplemented in ProjectedSiStripRecHit2D.

Definition at line 142 of file TrackerSingleRecHit.cc.

142  {
143  std::vector<TrackingRecHit*> nullvector;
144  return nullvector;
145 }
bool TrackerSingleRecHit::sameCluster ( OmniClusterRef const &  oh) const
inline

Definition at line 86 of file TrackerSingleRecHit.h.

References cluster_.

Referenced by SiStripMatchedRecHit2D::sharesInput().

86  {
87  return oh == cluster_;
88  }
void TrackerSingleRecHit::setClusterPixelRef ( ClusterPixelRef const &  ref)
inline

Definition at line 74 of file TrackerSingleRecHit.h.

References cluster_.

Referenced by SiPixelRecHit::setClusterRef().

void TrackerSingleRecHit::setClusterStripRef ( ClusterStripRef const &  ref)
inline
bool TrackerSingleRecHit::sharesInput ( const TrackingRecHit other,
SharedInputType  what 
) const
virtual

Returns true if the two TrackingRecHits are using the same input information (like Digis, Clusters, etc), false otherwise. The second argument specifies how much sharing is needed in order to return true: the value "all" means that all inputs of the two hits must be identical; the value "some" means that at least one of the inputs is in common.

Reimplemented from TrackingRecHit.

Definition at line 103 of file TrackerSingleRecHit.cc.

References TrackingRecHit::all, i, trackerHitRTTI::isMatched(), trackerHitRTTI::isSingleType(), TrackingRecHit::recHits(), BaseTrackerRecHit::sameDetModule(), and SiStripMatchedRecHit2D::sharesInput().

105 {
106  // verify(this); verify(other);
107  // if (!doingCheck && (other!=this)) checkSelf(this,other);
108 
109 
110  if (!sameDetModule(*other)) return false;
111 
112  // move to switch?
113  if (trackerHitRTTI::isSingleType(*other)) {
114  const TrackerSingleRecHit & otherCast = static_cast<const TrackerSingleRecHit&>(*other);
115  return sharesInput(otherCast);
116  }
117 
118  if (trackerHitRTTI::isMatched(*other) ) {
119  if (what == all) return false;
120  return static_cast<SiStripMatchedRecHit2D const &>(*other).sharesInput(*this);
121  }
122 
123  // last resort, recur to 'recHits()', even if it returns a vector by value
124  std::vector<const TrackingRecHit*> otherHits = other->recHits();
125  int ncomponents=otherHits.size();
126  if(ncomponents==0)return false; //bho
127  if(ncomponents==1) return sharesInput(otherHits.front(),what);
128  // ncomponents>1
129  if(what == all )return false;
130 
131  for(int i=0;i<ncomponents;i++){
132  if(sharesInput(otherHits[i],what))return true;
133  }
134  return false;
135 }
int i
Definition: DBlmapReader.cc:9
bool isSingleType(TrackingRecHit const &hit)
virtual bool sharesInput(const TrackingRecHit *other, SharedInputType what) const
bool sameDetModule(TrackingRecHit const &hit) const
virtual std::vector< const TrackingRecHit * > recHits() const =0
Access to component RecHits (if any)
bool isMatched(TrackingRecHit const &hit)
virtual bool sharesInput(const TrackingRecHit *other, SharedInputType what) const
bool TrackerSingleRecHit::sharesInput ( TrackerSingleRecHit const &  other) const
inline

Definition at line 82 of file TrackerSingleRecHit.h.

References cluster_.

82  {
83  return cluster_== other.cluster_;
84  }
SiStripCluster const& TrackerSingleRecHit::stripCluster ( ) const
inline

Member Data Documentation

OmniClusterRef TrackerSingleRecHit::cluster_
private