CMS 3D CMS Logo

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

#include <SiStripMatchedRecHit2D.h>

Inheritance diagram for SiStripMatchedRecHit2D:
BaseTrackerRecHit TrackingRecHit

Public Types

typedef BaseTrackerRecHit Base
 
- 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,
  missing_inner = 4, missing_outer = 5, inactive_inner = 6, inactive_outer = 7
}
 

Public Member Functions

bool canImproveWithTrack () const override
 
SiStripMatchedRecHit2Dclone () const override
 
RecHitPointer cloneSH () const override
 
int dimension () const override
 
OmniClusterRef const & firstClusterRef () const override
 
void getKfComponents (KfComponentsHolder &holder) const override
 
SiStripCluster const & monoCluster () const
 
OmniClusterRef const & monoClusterRef () const
 
OmniClusterRefmonoClusterRef ()
 
SiStripRecHit2D monoHit () const
 
unsigned int monoId () 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 sharesInput (const TrackingRecHit *other, SharedInputType what) const override
 
bool sharesInput (TrackerSingleRecHit const &other) const
 
 SiStripMatchedRecHit2D ()
 
 SiStripMatchedRecHit2D (const LocalPoint &pos, const LocalError &err, GeomDet const &idet, const SiStripRecHit2D *rMono, const SiStripRecHit2D *rStereo)
 
SiStripCluster const & stereoCluster () const
 
OmniClusterRef const & stereoClusterRef () const
 
OmniClusterRefstereoClusterRef ()
 
SiStripRecHit2D stereoHit () const
 
unsigned int stereoId () const
 
 ~SiStripMatchedRecHit2D () override
 
- Public Member Functions inherited from BaseTrackerRecHit
 BaseTrackerRecHit ()
 
 BaseTrackerRecHit (DetId id, trackerHitRTTI::RTTI rt)
 
 BaseTrackerRecHit (const GeomDet &idet, 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...
 
float errorGlobalR () const final
 
float errorGlobalRPhi () const final
 
float errorGlobalZ () const final
 
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
RecHitPointer cloneForFit (const GeomDet &idet) const
 
virtual TrackingRecHitcloneHit () const
 
const GeomDetdet () const
 
virtual const GeomDetUnitdetUnit () 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 Member Functions

SiStripMatchedRecHit2Dclone_ (TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
 
RecHitPointer cloneSH_ (TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
 

Private Attributes

OmniClusterRef clusterMono_
 
OmniClusterRef clusterStereo_
 

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 8 of file SiStripMatchedRecHit2D.h.

Member Typedef Documentation

Definition at line 10 of file SiStripMatchedRecHit2D.h.

Constructor & Destructor Documentation

SiStripMatchedRecHit2D::SiStripMatchedRecHit2D ( )
inline

Definition at line 12 of file SiStripMatchedRecHit2D.h.

Referenced by clone().

12 {}
SiStripMatchedRecHit2D::~SiStripMatchedRecHit2D ( )
inlineoverride

Definition at line 13 of file SiStripMatchedRecHit2D.h.

13 {}
SiStripMatchedRecHit2D::SiStripMatchedRecHit2D ( const LocalPoint pos,
const LocalError err,
GeomDet const &  idet,
const SiStripRecHit2D rMono,
const SiStripRecHit2D rStereo 
)
inline

Definition at line 15 of file SiStripMatchedRecHit2D.h.

20  : BaseTrackerRecHit(pos, err, idet, trackerHitRTTI::match),
21  clusterMono_(rMono->omniClusterRef()),
22  clusterStereo_(rStereo->omniClusterRef()) {}
OmniClusterRef const & omniClusterRef() const

Member Function Documentation

bool SiStripMatchedRecHit2D::canImproveWithTrack ( ) const
inlineoverridevirtual

Returns true if the clone( const TrajectoryStateOnSurface&) method returns an improved hit, false if it returns an identical copy. In order to avoid redundent copies one should call canImproveWithTrack() before calling clone( const TrajectoryStateOnSurface&). this will be done inside the TkCloner itself

Reimplemented from TrackingRecHit.

Definition at line 59 of file SiStripMatchedRecHit2D.h.

59 { return true; }
SiStripMatchedRecHit2D* SiStripMatchedRecHit2D::clone ( void  ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 43 of file SiStripMatchedRecHit2D.h.

References SiStripMatchedRecHit2D().

Referenced by SiStripRecHitMatcher::match(), and TkClonerImpl::operator()().

43 { return new SiStripMatchedRecHit2D(*this); }
SiStripMatchedRecHit2D* SiStripMatchedRecHit2D::clone_ ( TkCloner const &  cloner,
TrajectoryStateOnSurface const &  tsos 
) const
inlineoverrideprivatevirtual

Reimplemented from TrackingRecHit.

Definition at line 63 of file SiStripMatchedRecHit2D.h.

63  {
64  return cloner(*this, tsos).release();
65  }
RecHitPointer SiStripMatchedRecHit2D::cloneSH ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 45 of file SiStripMatchedRecHit2D.h.

Referenced by TkGluedMeasurementDet::HitCollectorForRecHits::add(), and TkGluedMeasurementDet::HitCollectorForFastMeasurements::add().

45 { return std::make_shared<SiStripMatchedRecHit2D>(*this); }
RecHitPointer SiStripMatchedRecHit2D::cloneSH_ ( TkCloner const &  cloner,
TrajectoryStateOnSurface const &  tsos 
) const
inlineoverrideprivatevirtual

Reimplemented from TrackingRecHit.

Definition at line 67 of file SiStripMatchedRecHit2D.h.

References TkCloner::makeShared().

67  {
68  return cloner.makeShared(*this, tsos);
69  }
int SiStripMatchedRecHit2D::dimension ( ) const
inlineoverridevirtual

Implements BaseTrackerRecHit.

Definition at line 48 of file SiStripMatchedRecHit2D.h.

48 { return 2; }
OmniClusterRef const& SiStripMatchedRecHit2D::firstClusterRef ( ) const
inlineoverridevirtual

Implements BaseTrackerRecHit.

Definition at line 32 of file SiStripMatchedRecHit2D.h.

References monoClusterRef().

Referenced by TrackingNtuple::addStripMatchedHit(), and sharesInput().

32 { return monoClusterRef(); }
OmniClusterRef const & monoClusterRef() const
void SiStripMatchedRecHit2D::getKfComponents ( KfComponentsHolder holder) const
inlineoverridevirtual

Implements BaseTrackerRecHit.

Definition at line 49 of file SiStripMatchedRecHit2D.h.

References BaseTrackerRecHit::getKfComponents2D().

49 { getKfComponents2D(holder); }
void getKfComponents2D(KfComponentsHolder &holder) const
SiStripCluster const& SiStripMatchedRecHit2D::monoCluster ( ) const
inline
OmniClusterRef const& SiStripMatchedRecHit2D::monoClusterRef ( ) const
inline
OmniClusterRef& SiStripMatchedRecHit2D::monoClusterRef ( )
inline

Definition at line 38 of file SiStripMatchedRecHit2D.h.

References clusterMono_.

38 { return clusterMono_; }
SiStripRecHit2D SiStripMatchedRecHit2D::monoHit ( ) const
inline
unsigned int SiStripMatchedRecHit2D::monoId ( ) const
inline
std::vector< const TrackingRecHit * > SiStripMatchedRecHit2D::recHits ( ) const
overridevirtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 30 of file SiStripMatchedRecHit2D.cc.

References HI_PhotonSkim_cff::rechits.

30  {
31  std::vector<const TrackingRecHit*> rechits;
32  return rechits;
33 }
std::vector< TrackingRecHit * > SiStripMatchedRecHit2D::recHits ( )
overridevirtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 35 of file SiStripMatchedRecHit2D.cc.

References HI_PhotonSkim_cff::rechits.

35  {
36  std::vector<TrackingRecHit*> rechits;
37  return rechits;
38 }
bool SiStripMatchedRecHit2D::sharesInput ( const TrackingRecHit other,
SharedInputType  what 
) const
overridevirtual

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 3 of file SiStripMatchedRecHit2D.cc.

References TrackingRecHit::all, firstClusterRef(), TrackingRecHit::geographicalId(), trackerHitRTTI::isFromDet(), trackerHitRTTI::isMatched(), monoClusterRef(), BaseTrackerRecHit::sameDetModule(), sharesClusters(), and stereoClusterRef().

Referenced by TrackerSingleRecHit::sharesInput().

3  {
4  if (what == all && (geographicalId() != other->geographicalId()))
5  return false;
6 
7  if (!sameDetModule(*other))
8  return false;
9 
10  if (trackerHitRTTI::isMatched(*other)) {
11  const SiStripMatchedRecHit2D* otherMatched = static_cast<const SiStripMatchedRecHit2D*>(other);
12  return sharesClusters(*this, *otherMatched, what);
13  }
14 
15  if (what == all)
16  return false;
17  // what about multi ???
18  if (!trackerHitRTTI::isFromDet(*other))
19  return false;
20 
21  auto const& otherClus = reinterpret_cast<const BaseTrackerRecHit*>(other)->firstClusterRef();
22  return (otherClus == stereoClusterRef()) || (otherClus == monoClusterRef());
23 }
bool isFromDet(TrackingRecHit const &hit)
OmniClusterRef const & stereoClusterRef() const
bool sameDetModule(TrackingRecHit const &hit) const
OmniClusterRef const & firstClusterRef() const override
bool isMatched(TrackingRecHit const &hit)
OmniClusterRef const & monoClusterRef() const
DetId geographicalId() const
bool sharesClusters(SiStripMatchedRecHit2D const &h1, SiStripMatchedRecHit2D const &h2, TrackingRecHit::SharedInputType what)
bool SiStripMatchedRecHit2D::sharesInput ( TrackerSingleRecHit const &  other) const

Definition at line 25 of file SiStripMatchedRecHit2D.cc.

References monoClusterRef(), TrackerSingleRecHit::sameCluster(), and stereoClusterRef().

25  {
26  return other.sameCluster(monoClusterRef()) || other.sameCluster(stereoClusterRef());
27 }
OmniClusterRef const & stereoClusterRef() const
OmniClusterRef const & monoClusterRef() const
SiStripCluster const& SiStripMatchedRecHit2D::stereoCluster ( ) const
inline
OmniClusterRef const& SiStripMatchedRecHit2D::stereoClusterRef ( ) const
inline
OmniClusterRef& SiStripMatchedRecHit2D::stereoClusterRef ( )
inline

Definition at line 37 of file SiStripMatchedRecHit2D.h.

References clusterStereo_.

37 { return clusterStereo_; }
SiStripRecHit2D SiStripMatchedRecHit2D::stereoHit ( ) const
inline
unsigned int SiStripMatchedRecHit2D::stereoId ( ) const
inline

Member Data Documentation

OmniClusterRef SiStripMatchedRecHit2D::clusterMono_
private

Definition at line 73 of file SiStripMatchedRecHit2D.h.

Referenced by monoClusterRef().

OmniClusterRef SiStripMatchedRecHit2D::clusterStereo_
private

Definition at line 73 of file SiStripMatchedRecHit2D.h.

Referenced by stereoClusterRef().