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 | Public Attributes | Static Private Attributes
OmniClusterRef Class Reference

#include <OmniClusterRef.h>

Public Types

typedef edm::Ref
< edmNew::DetSetVector
< SiPixelCluster >
, SiPixelCluster
ClusterPixelRef
 
typedef edm::Ref
< edmNew::DetSetVector
< SiStripCluster >
, SiStripCluster
ClusterStripRef
 

Public Member Functions

ClusterPixelRef cluster_pixel () const
 
ClusterStripRef cluster_strip () const
 
edm::ProductID id () const
 
unsigned int index () const
 
bool isPixel () const
 
bool isStrip () const
 
bool isValid () const
 
unsigned int key () const
 
 OmniClusterRef ()
 
 OmniClusterRef (ClusterPixelRef const &ref)
 
 OmniClusterRef (ClusterStripRef const &ref)
 
bool operator< (OmniClusterRef const &lh) const
 
bool operator== (OmniClusterRef const &lh) const
 
SiPixelCluster const & pixelCluster () const
 
unsigned int rawIndex () const
 
SiStripCluster const & stripCluster () const
 

Public Attributes

edm::RefCoreWithIndex me
 

Static Private Attributes

static const unsigned int kInvalid = 0x80000000
 
static const unsigned int kIsRegional = 0x60000000
 
static const unsigned int kIsStrip = 0x20000000
 

Detailed Description

Definition at line 10 of file OmniClusterRef.h.

Member Typedef Documentation

Definition at line 17 of file OmniClusterRef.h.

Definition at line 18 of file OmniClusterRef.h.

Constructor & Destructor Documentation

OmniClusterRef::OmniClusterRef ( )
inline

Definition at line 20 of file OmniClusterRef.h.

20 : me(edm::RefCore(),kInvalid) {}
edm::RefCoreWithIndex me
static const unsigned int kInvalid
OmniClusterRef::OmniClusterRef ( ClusterPixelRef const &  ref)
inlineexplicit

Definition at line 21 of file OmniClusterRef.h.

21 : me(ref.refCore(), (ref.isNonnull() ? ref.key() : kInvalid) ){}
edm::RefCoreWithIndex me
static const unsigned int kInvalid
OmniClusterRef::OmniClusterRef ( ClusterStripRef const &  ref)
inlineexplicit

Definition at line 22 of file OmniClusterRef.h.

22 : me(ref.refCore(), (ref.isNonnull() ? ref.key() | kIsStrip : kInvalid) ){}
edm::RefCoreWithIndex me
static const unsigned int kIsStrip
static const unsigned int kInvalid

Member Function Documentation

ClusterPixelRef OmniClusterRef::cluster_pixel ( ) const
inline

Definition at line 24 of file OmniClusterRef.h.

References index(), isPixel(), isValid(), me, and edm::RefCoreWithIndex::toRefCore().

Referenced by TrackerSingleRecHit::cluster_pixel().

24  {
25  return (isPixel() && isValid()) ? ClusterPixelRef(me.toRefCore(),index()) : ClusterPixelRef();
26  }
bool isValid() const
RefCore const & toRefCore() const
edm::RefCoreWithIndex me
edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster > ClusterPixelRef
bool isPixel() const
unsigned int index() const
ClusterStripRef OmniClusterRef::cluster_strip ( ) const
inline

Definition at line 28 of file OmniClusterRef.h.

References index(), isStrip(), me, and edm::RefCoreWithIndex::toRefCore().

Referenced by TrackerSingleRecHit::cluster_strip(), SeedClusterRemover::process(), and TrackClusterRemover::process().

28  {
30  }
bool isStrip() const
RefCore const & toRefCore() const
edm::RefCoreWithIndex me
unsigned int index() const
edm::Ref< edmNew::DetSetVector< SiStripCluster >, SiStripCluster > ClusterStripRef
edm::ProductID OmniClusterRef::id ( void  ) const
inline

Definition at line 49 of file OmniClusterRef.h.

References edm::RefCoreWithIndex::id(), and me.

Referenced by HLTTrackClusterRemoverNew::process(), ClusterRemovalRefSetter::reKeyPixel(), and ClusterRemovalRefSetter::reKeyStrip().

49 { return me.id();}
ProductID id() const
edm::RefCoreWithIndex me
unsigned int OmniClusterRef::index ( ) const
inline

Definition at line 55 of file OmniClusterRef.h.

References kIsRegional, and rawIndex().

Referenced by BeautifulSoup.PageElement::_invert(), cluster_pixel(), cluster_strip(), key(), pixelCluster(), and stripCluster().

55 { return rawIndex() & (~kIsRegional);}
unsigned int rawIndex() const
static const unsigned int kIsRegional
bool OmniClusterRef::isPixel ( ) const
inline

Definition at line 59 of file OmniClusterRef.h.

References isStrip().

Referenced by cluster_pixel().

59 { return !isStrip(); } //NOTE: non-valid will also show up as a pixel
bool isStrip() const
bool OmniClusterRef::isStrip ( ) const
inline

Definition at line 60 of file OmniClusterRef.h.

References kIsStrip, and rawIndex().

Referenced by cluster_strip(), and isPixel().

60 { return rawIndex() & kIsStrip; }
unsigned int rawIndex() const
static const unsigned int kIsStrip
bool OmniClusterRef::isValid ( void  ) const
inline

Definition at line 58 of file OmniClusterRef.h.

References kInvalid, and rawIndex().

Referenced by cluster_pixel().

58 { return !(rawIndex() & kInvalid); }
unsigned int rawIndex() const
static const unsigned int kInvalid
unsigned int OmniClusterRef::key ( ) const
inline
bool OmniClusterRef::operator< ( OmniClusterRef const &  lh) const
inline

Definition at line 43 of file OmniClusterRef.h.

References rawIndex().

43  {
44  return rawIndex() < lh.rawIndex(); // in principle this is enough!
45  }
unsigned int rawIndex() const
bool int lh
Definition: SIMDVec.h:19
bool OmniClusterRef::operator== ( OmniClusterRef const &  lh) const
inline

Definition at line 39 of file OmniClusterRef.h.

References rawIndex().

39  {
40  return rawIndex() == lh.rawIndex(); // in principle this is enough!
41  }
unsigned int rawIndex() const
bool int lh
Definition: SIMDVec.h:19
SiPixelCluster const& OmniClusterRef::pixelCluster ( ) const
inline

Definition at line 32 of file OmniClusterRef.h.

References index(), me, and edm::RefCoreWithIndex::toRefCore().

Referenced by TrackerSingleRecHit::pixelCluster().

32  {
33  return *ClusterPixelRef(me.toRefCore(),index());
34  }
RefCore const & toRefCore() const
edm::RefCoreWithIndex me
edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster > ClusterPixelRef
unsigned int index() const
unsigned int OmniClusterRef::rawIndex ( ) const
inline

Definition at line 53 of file OmniClusterRef.h.

References edm::RefCoreWithIndex::index(), and me.

Referenced by index(), isStrip(), isValid(), operator<(), and operator==().

53 { return me.index();}
unsigned int index() const
edm::RefCoreWithIndex me
SiStripCluster const& OmniClusterRef::stripCluster ( ) const
inline

Definition at line 35 of file OmniClusterRef.h.

References index(), me, and edm::RefCoreWithIndex::toRefCore().

Referenced by Traj2TrackHits::build(), and TrackerSingleRecHit::stripCluster().

35  {
36  return *ClusterStripRef(me.toRefCore(),index());
37  }
RefCore const & toRefCore() const
edm::RefCoreWithIndex me
unsigned int index() const
edm::Ref< edmNew::DetSetVector< SiStripCluster >, SiStripCluster > ClusterStripRef

Member Data Documentation

const unsigned int OmniClusterRef::kInvalid = 0x80000000
staticprivate

Definition at line 12 of file OmniClusterRef.h.

Referenced by isValid().

const unsigned int OmniClusterRef::kIsRegional = 0x60000000
staticprivate

Definition at line 14 of file OmniClusterRef.h.

Referenced by index().

const unsigned int OmniClusterRef::kIsStrip = 0x20000000
staticprivate

Definition at line 13 of file OmniClusterRef.h.

Referenced by isStrip().

edm::RefCoreWithIndex OmniClusterRef::me

Definition at line 64 of file OmniClusterRef.h.

Referenced by cluster_pixel(), cluster_strip(), id(), pixelCluster(), rawIndex(), and stripCluster().