CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

TrackerSingleRecHit Class Reference

#include <TrackerSingleRecHit.h>

Inheritance diagram for TrackerSingleRecHit:
BaseTrackerRecHit TrackingRecHit GCC11_FINAL< T > GCC11_FINAL< T > GCC11_FINAL< T >

List of all members.

Public Types

typedef BaseTrackerRecHit Base
typedef
OmniClusterRef::ClusterPixelRef 
ClusterPixelRef
typedef
OmniClusterRef::ClusterRegionalRef 
ClusterRegionalRef
typedef
OmniClusterRef::ClusterStripRef 
ClusterStripRef

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)
virtual std::vector
< TrackingRecHit * > 
recHits ()
 Non-const access to component RecHits (if any)
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 (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)
 TrackerSingleRecHit ()
 TrackerSingleRecHit (DetId id, OmniClusterRef const &clus)

Private Attributes

OmniClusterRef cluster_

Detailed Description

Definition at line 12 of file TrackerSingleRecHit.h.


Member Typedef Documentation

Definition at line 20 of file TrackerSingleRecHit.h.

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

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.

{}
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.

                                                   : Base(p,e,id, trackerHitRTTI::single), cluster_(clus){}
TrackerSingleRecHit::TrackerSingleRecHit ( const LocalPoint p,
const LocalError e,
DetId  id,
ClusterPixelRef const &  clus 
) [inline]

Definition at line 34 of file TrackerSingleRecHit.h.

                                                    : Base(p,e,id, trackerHitRTTI::single), cluster_(clus){}
TrackerSingleRecHit::TrackerSingleRecHit ( const LocalPoint p,
const LocalError e,
DetId  id,
ClusterStripRef const &  clus 
) [inline]

Definition at line 38 of file TrackerSingleRecHit.h.

                                                    : Base(p,e,id, trackerHitRTTI::single), cluster_(clus){}
TrackerSingleRecHit::TrackerSingleRecHit ( const LocalPoint p,
const LocalError e,
DetId  id,
ClusterRegionalRef const &  clus 
) [inline]

Definition at line 42 of file TrackerSingleRecHit.h.

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

Member Function Documentation

ClusterPixelRef TrackerSingleRecHit::cluster_pixel ( ) const [inline]

Definition at line 55 of file TrackerSingleRecHit.h.

References cluster_, and OmniClusterRef::cluster_pixel().

                                         { 
    return cluster_.cluster_pixel();
  }
ClusterRegionalRef TrackerSingleRecHit::cluster_regional ( ) const [inline]

Definition at line 63 of file TrackerSingleRecHit.h.

References cluster_, and OmniClusterRef::cluster_regional().

                                               { 
    return cluster_.cluster_regional();
  }
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 >::cluster().

                                         { 
    return cluster_.cluster_strip();
  }
virtual OmniClusterRef const& TrackerSingleRecHit::firstClusterRef ( ) const [inline, virtual]

Implements BaseTrackerRecHit.

Reimplemented in GCC11_FINAL< T >.

Definition at line 47 of file TrackerSingleRecHit.h.

References cluster_.

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

Definition at line 53 of file TrackerSingleRecHit.h.

References cluster_.

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

Definition at line 50 of file TrackerSingleRecHit.h.

References cluster_.

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

Definition at line 52 of file TrackerSingleRecHit.h.

References cluster_.

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

Definition at line 49 of file TrackerSingleRecHit.h.

References cluster_.

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

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

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

Definition at line 146 of file TrackerSingleRecHit.cc.

                                                        {
  std::vector<TrackingRecHit*> nullvector;
  return nullvector; 
}
std::vector< const TrackingRecHit * > TrackerSingleRecHit::recHits ( ) const [virtual]

Access to component RecHits (if any)

Implements TrackingRecHit.

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

Definition at line 142 of file TrackerSingleRecHit.cc.

                                                                    {
  std::vector<const TrackingRecHit*> nullvector;
  return nullvector; 
}
bool TrackerSingleRecHit::sameCluster ( OmniClusterRef const &  oh) const [inline]

Definition at line 85 of file TrackerSingleRecHit.h.

References cluster_.

                                                     {
    return oh == cluster_;
  }
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 >::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 >.

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().

{
  //  verify(this); verify(other);
  // if (!doingCheck && (other!=this)) checkSelf(this,other);


  if (!sameDetModule(*other)) return false;

  // move to switch?
  if (trackerHitRTTI::isSingle(*other)) {
    const TrackerSingleRecHit & otherCast = static_cast<const TrackerSingleRecHit&>(*other);
    return sharesInput(otherCast);
  } 

  if (trackerHitRTTI::isProjected(*other)) 
    return other->sharesInput(this,what);

  if (trackerHitRTTI::isMatched(*other) ) {
    if (what == all) return false;
    return static_cast<SiStripMatchedRecHit2D const &>(*other).sharesInput(*this);
  }

  // last resort, recur to 'recHits()', even if it returns a vector by value
  std::vector<const TrackingRecHit*> otherHits = other->recHits();
  int ncomponents=otherHits.size();
  if(ncomponents==0)return false; //bho
  if(ncomponents==1) return sharesInput(otherHits.front(),what);
  // ncomponents>1
  if(what == all )return false;

  for(int i=0;i<ncomponents;i++){
    if(sharesInput(otherHits[i],what))return true;
  }
  return false; 
}
bool TrackerSingleRecHit::sharesInput ( TrackerSingleRecHit const &  other) const [inline]

Reimplemented in GCC11_FINAL< T >.

Definition at line 81 of file TrackerSingleRecHit.h.

References cluster_.

                                                            {
    return cluster_== other.cluster_;
  }
SiStripCluster const& TrackerSingleRecHit::stripCluster ( ) const [inline]

Definition at line 67 of file TrackerSingleRecHit.h.

References cluster_, and OmniClusterRef::stripCluster().

Referenced by DeDxTools::GetCluster().

                                              { 
    return cluster_.stripCluster();
  }  

Member Data Documentation