CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
TrackerSingleRecHit Class Reference

#include <TrackerSingleRecHit.h>

Inheritance diagram for TrackerSingleRecHit:
BaseTrackerRecHit TrackingRecHit Phase2TrackerRecHit1D ProjectedSiStripRecHit2D SiPixelRecHit SiStripRecHit1D SiStripRecHit2D

Public Types

typedef BaseTrackerRecHit Base
 
typedef OmniClusterRef::Phase2Cluster1DRef ClusterPhase2Ref
 
typedef OmniClusterRef::ClusterPixelRef ClusterPixelRef
 
typedef OmniClusterRef::ClusterStripRef ClusterStripRef
 
- Public Types inherited from TrackingRecHit
typedef std::vector< ConstRecHitPointerConstRecHitContainer
 
using ConstRecHitPointer = std::shared_ptr< TrackingRecHit const >
 
typedef unsigned int id_type
 
typedef std::vector< ConstRecHitPointerRecHitContainer
 
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,
  missing_inner = 4, missing_outer = 5
}
 

Public Member Functions

ClusterPhase2Ref cluster_phase2OT () const
 
ClusterPixelRef cluster_pixel () const
 
ClusterStripRef cluster_strip () const
 
const GeomDetUnitdetUnit () const
 
virtual OmniClusterRef const & firstClusterRef () const final
 
OmniClusterRef const & omniCluster () const
 
OmniClusterRefomniCluster ()
 
OmniClusterRef const & omniClusterRef () const
 
OmniClusterRefomniClusterRef ()
 
Phase2TrackerCluster1D const & phase2OTCluster () const
 
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 setClusterPhase2Ref (ClusterPhase2Ref const &ref)
 
void setClusterPixelRef (ClusterPixelRef const &ref)
 
void setClusterStripRef (ClusterStripRef const &ref)
 
virtual bool sharesInput (const TrackingRecHit *other, SharedInputType what) const final
 
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 final
 
float errorGlobalRPhi () const final
 
float errorGlobalZ () const final
 
virtual void getKfComponents (KfComponentsHolder &holder) const =0
 
void getKfComponents1D (KfComponentsHolder &holder) const
 
void getKfComponents2D (KfComponentsHolder &holder) const
 
virtual GlobalPoint globalPosition () const final
 
GlobalError globalPositionError () const final
 
TrackingRecHitGlobalState globalState () const
 
bool hasPositionAndError () const final
 to be redefined by daughter class More...
 
BaseTrackerRecHit const * hit () const final
 
bool isMatched () const
 
bool isMulti () const
 
virtual bool isPhase2 () const
 
virtual bool isPixel () const
 
bool isProjected () const
 
bool isProjMono () const
 
bool isProjStereo () const
 
bool isSingle () const
 
virtual LocalPoint localPosition () const final
 
virtual LocalError localPositionError () const 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 const Surfacesurface () const final
 
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 * > &)
 
virtual 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
LocalError err_
 
LocalPoint pos_
 
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 23 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 26 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 31 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 37 of file TrackerSingleRecHit.h.

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

Member Function Documentation

ClusterPhase2Ref TrackerSingleRecHit::cluster_phase2OT ( ) const
inline

Definition at line 63 of file TrackerSingleRecHit.h.

References cluster_, and OmniClusterRef::cluster_phase2OT().

Referenced by Phase2TrackerRecHit1D::cluster().

63  {
64  return cluster_.cluster_phase2OT();
65  }
Phase2Cluster1DRef cluster_phase2OT() const
ClusterPixelRef TrackerSingleRecHit::cluster_pixel ( ) const
inline

Definition at line 55 of file TrackerSingleRecHit.h.

References cluster_, and OmniClusterRef::cluster_pixel().

Referenced by SiPixelRecHit::cluster().

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

Definition at line 59 of file TrackerSingleRecHit.h.

References cluster_, and OmniClusterRef::cluster_strip().

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

59  {
60  return cluster_.cluster_strip();
61  }
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(), TkClonerImpl::operator()(), SiPixelCoordinates::pixel_(), HSCPDeDxInfoProducer::processHit(), and DeDxHitInfoProducer::processHit().

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

Implements BaseTrackerRecHit.

Definition at line 47 of file TrackerSingleRecHit.h.

References cluster_.

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

Definition at line 53 of file TrackerSingleRecHit.h.

References cluster_.

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

Definition at line 52 of file TrackerSingleRecHit.h.

References cluster_.

52 { return cluster_;}
Phase2TrackerCluster1D const& TrackerSingleRecHit::phase2OTCluster ( ) const
inline

Definition at line 75 of file TrackerSingleRecHit.h.

References cluster_, and OmniClusterRef::phase2OTCluster().

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

75  {
76  return cluster_.phase2OTCluster();
77  }
Phase2TrackerCluster1D const & phase2OTCluster() const
SiPixelCluster const& TrackerSingleRecHit::pixelCluster ( ) const
inline

Definition at line 71 of file TrackerSingleRecHit.h.

References cluster_, and OmniClusterRef::pixelCluster().

71  {
72  return cluster_.pixelCluster();
73  }
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 136 of file TrackerSingleRecHit.cc.

Referenced by sameCluster().

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

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Reimplemented in ProjectedSiStripRecHit2D.

Definition at line 140 of file TrackerSingleRecHit.cc.

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

Definition at line 91 of file TrackerSingleRecHit.h.

References cluster_, and recHits().

Referenced by SiStripMatchedRecHit2D::sharesInput().

91  {
92  return oh == cluster_;
93  }
void TrackerSingleRecHit::setClusterPhase2Ref ( ClusterPhase2Ref const &  ref)
inline
void TrackerSingleRecHit::setClusterPixelRef ( ClusterPixelRef const &  ref)
inline

Definition at line 80 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
finalvirtual

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 101 of file TrackerSingleRecHit.cc.

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

Referenced by setClusterPhase2Ref().

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

Definition at line 87 of file TrackerSingleRecHit.h.

References cluster_.

87  {
88  return cluster_== other.cluster_;
89  }
SiStripCluster const& TrackerSingleRecHit::stripCluster ( ) const
inline

Member Data Documentation

OmniClusterRef TrackerSingleRecHit::cluster_
private