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 | Private 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, unsigned int subClus=0)
 
 OmniClusterRef (ClusterStripRef const &ref, unsigned int subClus=0)
 
bool operator< (OmniClusterRef const &lh) const
 
bool operator== (OmniClusterRef const &lh) const
 
SiPixelCluster const & pixelCluster () const
 
unsigned int rawIndex () const
 
SiStripCluster const & stripCluster () const
 
unsigned int subCluster () const
 

Private Attributes

edm::RefCoreWithIndex me
 

Static Private Attributes

static const unsigned int indexMask = 0xFFFFFF
 
static const unsigned int kInvalid = 0x80000000
 
static const unsigned int kIsRegional = 0x60000000
 
static const unsigned int kIsStrip = 0x20000000
 
static const unsigned int subClusMask = 0xF000000
 
static const unsigned int subClusShift = 24
 

Detailed Description

Definition at line 10 of file OmniClusterRef.h.

Member Typedef Documentation

Definition at line 21 of file OmniClusterRef.h.

Definition at line 22 of file OmniClusterRef.h.

Constructor & Destructor Documentation

OmniClusterRef::OmniClusterRef ( )
inline

Definition at line 24 of file OmniClusterRef.h.

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

Definition at line 25 of file OmniClusterRef.h.

25 : me(ref.refCore(), (ref.isNonnull() ? ref.key() | (subClus<<subClusShift) : kInvalid) ){ }
edm::RefCoreWithIndex me
static const unsigned int subClusShift
static const unsigned int kInvalid
OmniClusterRef::OmniClusterRef ( ClusterStripRef const &  ref,
unsigned int  subClus = 0 
)
inlineexplicit

Definition at line 26 of file OmniClusterRef.h.

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

Member Function Documentation

ClusterPixelRef OmniClusterRef::cluster_pixel ( ) const
inline

Definition at line 28 of file OmniClusterRef.h.

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

Referenced by TrackerSingleRecHit::cluster_pixel().

28  {
29  return (isPixel() && isValid()) ? ClusterPixelRef(me.toRefCore(),index()) : ClusterPixelRef();
30  }
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 32 of file OmniClusterRef.h.

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

Referenced by TrackerSingleRecHit::cluster_strip(), SeedClusterRemover::process(), HITrackClusterRemover::process(), and ctfseeding::HitExtractorSTRP::skipThis().

32  {
34  }
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 ( ) const
inline

Definition at line 53 of file OmniClusterRef.h.

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

Referenced by HLTTrackClusterRemoverNew::process().

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

Definition at line 59 of file OmniClusterRef.h.

References indexMask, and rawIndex().

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

59 { return rawIndex() & indexMask;}
unsigned int rawIndex() const
static const unsigned int indexMask
bool OmniClusterRef::isPixel ( ) const
inline

Definition at line 64 of file OmniClusterRef.h.

References isStrip().

Referenced by cluster_pixel().

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

Definition at line 65 of file OmniClusterRef.h.

References kIsStrip, and rawIndex().

Referenced by cluster_strip(), and isPixel().

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

Definition at line 63 of file OmniClusterRef.h.

References kInvalid, and rawIndex().

Referenced by cluster_pixel(), and core.AutoHandle.AutoHandle::ReallyLoad().

63 { 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 47 of file OmniClusterRef.h.

References rawIndex().

47  {
48  return rawIndex() < lh.rawIndex(); // in principle this is enough!
49  }
unsigned int rawIndex() const
bool int lh
Definition: SIMDVec.h:21
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:21
SiPixelCluster const& OmniClusterRef::pixelCluster ( ) const
inline

Definition at line 36 of file OmniClusterRef.h.

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

Referenced by TrackerSingleRecHit::pixelCluster().

36  {
37  return *ClusterPixelRef(me.toRefCore(),index());
38  }
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 57 of file OmniClusterRef.h.

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

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

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

Definition at line 39 of file OmniClusterRef.h.

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

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

39  {
40  return *ClusterStripRef(me.toRefCore(),index());
41  }
RefCore const & toRefCore() const
edm::RefCoreWithIndex me
unsigned int index() const
edm::Ref< edmNew::DetSetVector< SiStripCluster >, SiStripCluster > ClusterStripRef
unsigned int OmniClusterRef::subCluster ( ) const
inline

Definition at line 61 of file OmniClusterRef.h.

References rawIndex(), subClusMask, and subClusShift.

61 { return (rawIndex() & subClusMask)>>subClusShift; }
unsigned int rawIndex() const
static const unsigned int subClusMask
static const unsigned int subClusShift

Member Data Documentation

const unsigned int OmniClusterRef::indexMask = 0xFFFFFF
staticprivate

Definition at line 16 of file OmniClusterRef.h.

Referenced by index().

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.

const unsigned int OmniClusterRef::kIsStrip = 0x20000000
staticprivate

Definition at line 13 of file OmniClusterRef.h.

Referenced by isStrip().

edm::RefCoreWithIndex OmniClusterRef::me
private

Definition at line 70 of file OmniClusterRef.h.

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

const unsigned int OmniClusterRef::subClusMask = 0xF000000
staticprivate

Definition at line 17 of file OmniClusterRef.h.

Referenced by subCluster().

const unsigned int OmniClusterRef::subClusShift = 24
staticprivate

Definition at line 18 of file OmniClusterRef.h.

Referenced by subCluster().