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 MTDTrackingRecHit Phase2TrackerRecHit1D ProjectedSiStripRecHit2D SiPixelRecHit SiStripRecHit1D SiStripRecHit2D

Public Types

typedef BaseTrackerRecHit Base
 
typedef OmniClusterRef::ClusterMTDRef ClusterMTDRef
 
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, inactive_inner = 6, inactive_outer = 7
}
 

Public Member Functions

ClusterMTDRef cluster_mtd () const
 
ClusterPhase2Ref cluster_phase2OT () const
 
ClusterPixelRef cluster_pixel () const
 
ClusterStripRef cluster_strip () const
 
const GeomDetUnitdetUnit () const override
 
OmniClusterRef const & firstClusterRef () const final
 
FTLCluster const & mtdCluster () const
 
OmniClusterRefomniCluster ()
 
OmniClusterRef const & omniCluster () const
 
OmniClusterRefomniClusterRef ()
 
OmniClusterRef const & omniClusterRef () const
 
Phase2TrackerCluster1D const & phase2OTCluster () const
 
SiPixelCluster const & pixelCluster () const
 
std::vector< const TrackingRecHit * > recHits () const override
 Access to component RecHits (if any) More...
 
std::vector< TrackingRecHit * > recHits () override
 Non-const access to component RecHits (if any) More...
 
bool sameCluster (OmniClusterRef const &oh) const
 
void setClusterMTDRef (ClusterMTDRef const &ref)
 
void setClusterPhase2Ref (ClusterPhase2Ref const &ref)
 
void setClusterPixelRef (ClusterPixelRef const &ref)
 
void setClusterStripRef (ClusterStripRef const &ref)
 
bool sharesInput (const TrackingRecHit *other, SharedInputType what) const final
 
bool sharesInput (TrackerSingleRecHit const &other) const
 
SiStripCluster const & stripCluster () const
 
 TrackerSingleRecHit ()
 
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)
 
 TrackerSingleRecHit (DetId id, OmniClusterRef const &clus)
 
- Public Member Functions inherited from BaseTrackerRecHit
 BaseTrackerRecHit ()
 
 BaseTrackerRecHit (const GeomDet &idet, trackerHitRTTI::RTTI rt)
 
 BaseTrackerRecHit (const LocalPoint &p, const LocalError &e, GeomDet const &idet, trackerHitRTTI::RTTI rt)
 
 BaseTrackerRecHit (DetId id, trackerHitRTTI::RTTI rt)
 
virtual float clusterProbability () const
 cluster probability, overloaded by pixel rechits. More...
 
int dimension () const override=0
 
float errorGlobalR () const final
 
float errorGlobalRPhi () const final
 
float errorGlobalZ () const final
 
void getKfComponents (KfComponentsHolder &holder) const override=0
 
void getKfComponents1D (KfComponentsHolder &holder) const
 
void getKfComponents2D (KfComponentsHolder &holder) const
 
GlobalPoint globalPosition () const final
 
GlobalError globalPositionError () const final
 
TrackingRecHitGlobalState globalState () const
 
bool hasPositionAndError () const override
 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
 
LocalPoint localPosition () const override
 
LocalError localPositionError () const override
 
const LocalErrorlocalPositionErrorFast () const
 
const LocalPointlocalPositionFast () const
 
AlgebraicVector parameters () const override
 
AlgebraicSymMatrix parametersError () const override
 
AlgebraicMatrix projectionMatrix () const override
 
trackerHitRTTI::RTTI rtti () const
 
bool sameDetModule (TrackingRecHit const &hit) const
 
const Surfacesurface () const final
 
 ~BaseTrackerRecHit () override
 
- 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 (const GeomDet &idet, TrackingRecHit const &rh)
 
 TrackingRecHit (const GeomDet &idet, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, unsigned int rt, Type type=valid)
 
 TrackingRecHit (DetId id, Type type=valid)
 
 TrackingRecHit (DetId id, unsigned int rt, Type type=valid)
 
 TrackingRecHit (id_type id=0, Type type=valid)
 
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 11 of file TrackerSingleRecHit.h.

Member Typedef Documentation

◆ Base

Definition at line 13 of file TrackerSingleRecHit.h.

◆ ClusterMTDRef

Definition at line 20 of file TrackerSingleRecHit.h.

◆ ClusterPhase2Ref

Definition at line 19 of file TrackerSingleRecHit.h.

◆ ClusterPixelRef

Definition at line 17 of file TrackerSingleRecHit.h.

◆ ClusterStripRef

Definition at line 18 of file TrackerSingleRecHit.h.

Constructor & Destructor Documentation

◆ TrackerSingleRecHit() [1/4]

TrackerSingleRecHit::TrackerSingleRecHit ( )
inline

Definition at line 15 of file TrackerSingleRecHit.h.

15 {}

◆ TrackerSingleRecHit() [2/4]

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

Definition at line 23 of file TrackerSingleRecHit.h.

23 : Base(id, trackerHitRTTI::single), cluster_(clus) {}

◆ TrackerSingleRecHit() [3/4]

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

Definition at line 26 of file TrackerSingleRecHit.h.

27  : Base(p, e, idet, trackerHitRTTI::single), cluster_(clus) {}

◆ TrackerSingleRecHit() [4/4]

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

Definition at line 31 of file TrackerSingleRecHit.h.

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

Member Function Documentation

◆ cluster_mtd()

ClusterMTDRef TrackerSingleRecHit::cluster_mtd ( ) const
inline

Definition at line 53 of file TrackerSingleRecHit.h.

53 { return cluster_.cluster_mtd(); }

References cluster_, and OmniClusterRef::cluster_mtd().

◆ cluster_phase2OT()

ClusterPhase2Ref TrackerSingleRecHit::cluster_phase2OT ( ) const
inline

Definition at line 51 of file TrackerSingleRecHit.h.

51 { return cluster_.cluster_phase2OT(); }

References cluster_, and OmniClusterRef::cluster_phase2OT().

Referenced by Phase2TrackerRecHit1D::cluster().

◆ cluster_pixel()

ClusterPixelRef TrackerSingleRecHit::cluster_pixel ( ) const
inline

◆ cluster_strip()

ClusterStripRef TrackerSingleRecHit::cluster_strip ( ) const
inline

◆ detUnit()

const GeomDetUnit* TrackerSingleRecHit::detUnit ( ) const
inlineoverridevirtual

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 36 of file TrackerSingleRecHit.h.

36 { return det(); }

References TrackingRecHit::det().

Referenced by SiPixelCoordinates::pixel_(), and DeDxHitInfoProducer::processHit().

◆ firstClusterRef()

OmniClusterRef const& TrackerSingleRecHit::firstClusterRef ( ) const
inlinefinalvirtual

Implements BaseTrackerRecHit.

Definition at line 39 of file TrackerSingleRecHit.h.

39 { return cluster_; }

References cluster_.

◆ mtdCluster()

FTLCluster const& TrackerSingleRecHit::mtdCluster ( ) const
inline

Definition at line 61 of file TrackerSingleRecHit.h.

61 { return cluster_.mtdCluster(); }

References cluster_, and OmniClusterRef::mtdCluster().

◆ omniCluster() [1/2]

OmniClusterRef& TrackerSingleRecHit::omniCluster ( )
inline

Definition at line 45 of file TrackerSingleRecHit.h.

45 { return cluster_; }

References cluster_.

◆ omniCluster() [2/2]

OmniClusterRef const& TrackerSingleRecHit::omniCluster ( ) const
inline

Definition at line 42 of file TrackerSingleRecHit.h.

42 { return cluster_; }

References cluster_.

Referenced by MTDTrackingRecHit::energy(), MTDTrackingRecHit::time(), and MTDTrackingRecHit::timeError().

◆ omniClusterRef() [1/2]

OmniClusterRef& TrackerSingleRecHit::omniClusterRef ( )
inline

Definition at line 44 of file TrackerSingleRecHit.h.

44 { return cluster_; }

References cluster_.

◆ omniClusterRef() [2/2]

OmniClusterRef const& TrackerSingleRecHit::omniClusterRef ( ) const
inline

◆ phase2OTCluster()

Phase2TrackerCluster1D const& TrackerSingleRecHit::phase2OTCluster ( ) const
inline

Definition at line 59 of file TrackerSingleRecHit.h.

59 { return cluster_.phase2OTCluster(); }

References cluster_, and OmniClusterRef::phase2OTCluster().

◆ pixelCluster()

SiPixelCluster const& TrackerSingleRecHit::pixelCluster ( ) const
inline

Definition at line 57 of file TrackerSingleRecHit.h.

57 { return cluster_.pixelCluster(); }

References cluster_, and OmniClusterRef::pixelCluster().

◆ recHits() [1/2]

std::vector< const TrackingRecHit * > TrackerSingleRecHit::recHits ( ) const
overridevirtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 146 of file TrackerSingleRecHit.cc.

146  {
147  std::vector<const TrackingRecHit *> nullvector;
148  return nullvector;
149 }

◆ recHits() [2/2]

std::vector< TrackingRecHit * > TrackerSingleRecHit::recHits ( )
overridevirtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 150 of file TrackerSingleRecHit.cc.

150  {
151  std::vector<TrackingRecHit *> nullvector;
152  return nullvector;
153 }

◆ sameCluster()

bool TrackerSingleRecHit::sameCluster ( OmniClusterRef const &  oh) const
inline

Definition at line 73 of file TrackerSingleRecHit.h.

73 { return oh == cluster_; }

References cluster_.

◆ setClusterMTDRef()

void TrackerSingleRecHit::setClusterMTDRef ( ClusterMTDRef const &  ref)
inline

Definition at line 67 of file TrackerSingleRecHit.h.

67 { cluster_ = OmniClusterRef(ref); }

References cluster_.

◆ setClusterPhase2Ref()

void TrackerSingleRecHit::setClusterPhase2Ref ( ClusterPhase2Ref const &  ref)
inline

Definition at line 66 of file TrackerSingleRecHit.h.

66 { cluster_ = OmniClusterRef(ref); }

References cluster_.

Referenced by Phase2TrackerRecHit1D::setClusterRef().

◆ setClusterPixelRef()

void TrackerSingleRecHit::setClusterPixelRef ( ClusterPixelRef const &  ref)
inline

Definition at line 64 of file TrackerSingleRecHit.h.

64 { cluster_ = OmniClusterRef(ref); }

References cluster_.

Referenced by MuonReducedTrackExtraProducer::produce(), and SiPixelRecHit::setClusterRef().

◆ setClusterStripRef()

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

◆ sharesInput() [1/2]

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

104  {
105 #if defined(DO_INTERNAL_CHECKS)
106  verify(this);
107  verify(other);
108  if (!doingCheck && (other != this))
109  checkSelf(this, other);
110 #endif
111 
112  if (!sameDetModule(*other))
113  return false;
114 
115  // move to switch?
117  const TrackerSingleRecHit &otherCast = static_cast<const TrackerSingleRecHit &>(*other);
118  return sharesInput(otherCast);
119  }
120 
122  if (what == all)
123  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)
131  return false; //bho
132  if (ncomponents == 1)
133  return sharesInput(otherHits.front(), what);
134  // ncomponents>1
135  if (what == all)
136  return false;
137 
138  for (int i = 0; i < ncomponents; i++) {
139  if (sharesInput(otherHits[i], what))
140  return true;
141  }
142  return false;
143 }

References TrackingRecHit::all, mps_fire::i, trackerHitRTTI::isMatched(), trackerHitRTTI::isSingleType(), trackingPlots::other, and BaseTrackerRecHit::sameDetModule().

◆ sharesInput() [2/2]

bool TrackerSingleRecHit::sharesInput ( TrackerSingleRecHit const &  other) const
inline

Definition at line 71 of file TrackerSingleRecHit.h.

71 { return cluster_ == other.cluster_; }

References cluster_, and trackingPlots::other.

◆ stripCluster()

SiStripCluster const& TrackerSingleRecHit::stripCluster ( ) const
inline

Member Data Documentation

◆ cluster_

OmniClusterRef TrackerSingleRecHit::cluster_
private
mps_fire.i
i
Definition: mps_fire.py:428
OmniClusterRef::mtdCluster
FTLCluster const & mtdCluster() const
Definition: OmniClusterRef.h:57
BaseTrackerRecHit::sameDetModule
bool sameDetModule(TrackingRecHit const &hit) const
Definition: BaseTrackerRecHit.h:134
OmniClusterRef::cluster_mtd
ClusterMTDRef cluster_mtd() const
Definition: OmniClusterRef.h:52
hcal_runs.rt
rt
Definition: hcal_runs.py:76
TrackingRecHit::det
const GeomDet * det() const
Definition: TrackingRecHit.h:122
OmniClusterRef
Definition: OmniClusterRef.h:12
OmniClusterRef::cluster_phase2OT
Phase2Cluster1DRef cluster_phase2OT() const
Definition: OmniClusterRef.h:48
TrackerSingleRecHit::sharesInput
bool sharesInput(const TrackingRecHit *other, SharedInputType what) const final
Definition: TrackerSingleRecHit.cc:104
OmniClusterRef::cluster_strip
ClusterStripRef cluster_strip() const
Definition: OmniClusterRef.h:44
TrackerSingleRecHit::Base
BaseTrackerRecHit Base
Definition: TrackerSingleRecHit.h:13
OmniClusterRef::stripCluster
SiStripCluster const & stripCluster() const
Definition: OmniClusterRef.h:55
trackingPlots.other
other
Definition: trackingPlots.py:1464
trackerHitRTTI::isMatched
bool isMatched(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:33
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
trackerHitRTTI::single
Definition: trackerHitRTTI.h:10
TrackingRecHit::all
Definition: TrackingRecHit.h:59
OmniClusterRef::phase2OTCluster
Phase2TrackerCluster1D const & phase2OTCluster() const
Definition: OmniClusterRef.h:56
OmniClusterRef::pixelCluster
SiPixelCluster const & pixelCluster() const
Definition: OmniClusterRef.h:54
TrackerSingleRecHit
Definition: TrackerSingleRecHit.h:11
TrackerSingleRecHit::cluster_
OmniClusterRef cluster_
Definition: TrackerSingleRecHit.h:80
trackerHitRTTI::isSingleType
bool isSingleType(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:35
OmniClusterRef::cluster_pixel
ClusterPixelRef cluster_pixel() const
Definition: OmniClusterRef.h:40
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37