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 GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO >

Public Types

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

Public Member Functions

ClusterPixelRef cluster_pixel () const
 
ClusterRegionalRef cluster_regional () const
 
ClusterStripRef cluster_strip () const
 
virtual OmniClusterRef const & firstClusterRef () const GCC11_FINAL
 
OmniClusterRef const & omniCluster () const
 
OmniClusterRefomniCluster ()
 
OmniClusterRef const & omniClusterRef () const
 
OmniClusterRefomniClusterRef ()
 
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 setClusterRegionalRef (ClusterRegionalRef const &ref)
 
void setClusterStripRef (ClusterStripRef const &ref)
 
virtual bool sharesInput (const TrackingRecHit *other, SharedInputType what) const GCC11_FINAL
 
bool sharesInput (TrackerSingleRecHit const &other) const
 
SiStripCluster const & stripCluster () const
 
 TrackerSingleRecHit ()
 
 TrackerSingleRecHit (DetId id, OmniClusterRef const &clus)
 
 TrackerSingleRecHit (const LocalPoint &p, const LocalError &e, DetId id, OmniClusterRef const &clus)
 
 TrackerSingleRecHit (const LocalPoint &p, const LocalError &e, DetId id, ClusterPixelRef const &clus)
 
 TrackerSingleRecHit (const LocalPoint &p, const LocalError &e, DetId id, ClusterStripRef const &clus)
 
 TrackerSingleRecHit (const LocalPoint &p, const LocalError &e, DetId id, ClusterRegionalRef const &clus)
 
- Public Member Functions inherited from BaseTrackerRecHit
 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 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 More...
 
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 ()
 
- 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 void recHitsV (std::vector< const TrackingRecHit * > &) const
 
virtual void recHitsV (std::vector< TrackingRecHit * > &)
 
 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

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)
 

Detailed Description

Definition at line 12 of file TrackerSingleRecHit.h.

Member Typedef Documentation

Definition at line 15 of file TrackerSingleRecHit.h.

Definition at line 20 of file TrackerSingleRecHit.h.

Definition at line 22 of file TrackerSingleRecHit.h.

Definition at line 21 of file TrackerSingleRecHit.h.

Constructor & Destructor Documentation

TrackerSingleRecHit::TrackerSingleRecHit ( )
inline

Definition at line 17 of file TrackerSingleRecHit.h.

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

Definition at line 26 of file TrackerSingleRecHit.h.

TrackerSingleRecHit::TrackerSingleRecHit ( const LocalPoint p,
const LocalError e,
DetId  id,
OmniClusterRef const &  clus 
)
inline

Definition at line 30 of file TrackerSingleRecHit.h.

TrackerSingleRecHit::TrackerSingleRecHit ( const LocalPoint p,
const LocalError e,
DetId  id,
ClusterPixelRef const &  clus 
)
inline

Definition at line 34 of file TrackerSingleRecHit.h.

TrackerSingleRecHit::TrackerSingleRecHit ( const LocalPoint p,
const LocalError e,
DetId  id,
ClusterStripRef const &  clus 
)
inline

Definition at line 38 of file TrackerSingleRecHit.h.

TrackerSingleRecHit::TrackerSingleRecHit ( const LocalPoint p,
const LocalError e,
DetId  id,
ClusterRegionalRef const &  clus 
)
inline

Definition at line 42 of file TrackerSingleRecHit.h.

Member Function Documentation

ClusterPixelRef TrackerSingleRecHit::cluster_pixel ( ) const
inline

Definition at line 55 of file TrackerSingleRecHit.h.

References cluster_, and OmniClusterRef::cluster_pixel().

55  {
56  return cluster_.cluster_pixel();
57  }
ClusterPixelRef cluster_pixel() const
ClusterRegionalRef TrackerSingleRecHit::cluster_regional ( ) const
inline

Definition at line 63 of file TrackerSingleRecHit.h.

References cluster_, and OmniClusterRef::cluster_regional().

63  {
64  return cluster_.cluster_regional();
65  }
ClusterRegionalRef cluster_regional() const
ClusterStripRef TrackerSingleRecHit::cluster_strip ( ) const
inline

Definition at line 59 of file TrackerSingleRecHit.h.

References cluster_, and OmniClusterRef::cluster_strip().

Referenced by GCC11_FINAL< T, TOPO >::cluster().

59  {
60  return cluster_.cluster_strip();
61  }
ClusterStripRef cluster_strip() const
virtual OmniClusterRef const& TrackerSingleRecHit::firstClusterRef ( ) const
inlinevirtual

Implements BaseTrackerRecHit.

Reimplemented in GCC11_FINAL< T, TOPO >.

Definition at line 47 of file TrackerSingleRecHit.h.

References cluster_.

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

Definition at line 50 of file TrackerSingleRecHit.h.

References cluster_.

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

Definition at line 53 of file TrackerSingleRecHit.h.

References cluster_.

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

Definition at line 49 of file TrackerSingleRecHit.h.

References cluster_.

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

Definition at line 52 of file TrackerSingleRecHit.h.

References cluster_.

52 { return cluster_;}
std::vector< const TrackingRecHit * > TrackerSingleRecHit::recHits ( ) const
virtual

Access to component RecHits (if any)

Implements TrackingRecHit.

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

Definition at line 142 of file TrackerSingleRecHit.cc.

142  {
143  std::vector<const TrackingRecHit*> nullvector;
144  return nullvector;
145 }
std::vector< TrackingRecHit * > TrackerSingleRecHit::recHits ( )
virtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

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

Definition at line 146 of file TrackerSingleRecHit.cc.

146  {
147  std::vector<TrackingRecHit*> nullvector;
148  return nullvector;
149 }
bool TrackerSingleRecHit::sameCluster ( OmniClusterRef const &  oh) const
inline

Definition at line 85 of file TrackerSingleRecHit.h.

References cluster_.

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

Definition at line 72 of file TrackerSingleRecHit.h.

References cluster_.

void TrackerSingleRecHit::setClusterRegionalRef ( ClusterRegionalRef const &  ref)
inline

Definition at line 74 of file TrackerSingleRecHit.h.

References cluster_.

void TrackerSingleRecHit::setClusterStripRef ( ClusterStripRef const &  ref)
inline

Definition at line 73 of file TrackerSingleRecHit.h.

References cluster_.

Referenced by GCC11_FINAL< T, TOPO >::setClusterRef().

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.

Reimplemented in GCC11_FINAL< T, TOPO >.

Definition at line 104 of file TrackerSingleRecHit.cc.

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

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

Definition at line 81 of file TrackerSingleRecHit.h.

References cluster_.

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

Definition at line 67 of file TrackerSingleRecHit.h.

References cluster_, and OmniClusterRef::stripCluster().

Referenced by DeDxTools::GetCluster().

67  {
68  return cluster_.stripCluster();
69  }
SiStripCluster const & stripCluster() const

Member Data Documentation

OmniClusterRef TrackerSingleRecHit::cluster_
private