CMS 3D CMS Logo

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< FTLClusterCollection, FTLClusterClusterMTDRef
 
typedef edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelClusterClusterPixelRef
 
typedef edm::Ref< edmNew::DetSetVector< SiStripCluster >, SiStripClusterClusterStripRef
 
typedef edm::Ref< edmNew::DetSetVector< Phase2TrackerCluster1D >, Phase2TrackerCluster1DPhase2Cluster1DRef
 

Public Member Functions

ClusterMTDRef cluster_mtd () const
 
Phase2Cluster1DRef cluster_phase2OT () const
 
ClusterPixelRef cluster_pixel () const
 
ClusterStripRef cluster_strip () const
 
edm::ProductID id () const
 
unsigned int index () const
 
bool isPhase2 () const
 
bool isPixel () const
 
bool isStrip () const
 
bool isTiming () const
 
bool isValid () const
 
unsigned int key () const
 
FTLCluster const & mtdCluster () const
 
 OmniClusterRef ()
 
 OmniClusterRef (ClusterMTDRef const &ref)
 
 OmniClusterRef (ClusterPixelRef const &ref, unsigned int subClus=0)
 
 OmniClusterRef (ClusterStripRef const &ref, unsigned int subClus=0)
 
 OmniClusterRef (Phase2Cluster1DRef const &ref, unsigned int subClus=0)
 
bool operator< (OmniClusterRef const &lh) const
 
bool operator== (OmniClusterRef const &lh) const
 
Phase2TrackerCluster1D const & phase2OTCluster () 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 kIsPhase2 = 0x40000000
 
static const unsigned int kIsRegional = 0x60000000
 
static const unsigned int kIsStrip = 0x20000000
 
static const unsigned int kIsTiming = 0x10000000
 
static const unsigned int subClusMask = 0xF000000
 
static const unsigned int subClusShift = 24
 

Detailed Description

Definition at line 12 of file OmniClusterRef.h.

Member Typedef Documentation

◆ ClusterMTDRef

Definition at line 28 of file OmniClusterRef.h.

◆ ClusterPixelRef

Definition at line 25 of file OmniClusterRef.h.

◆ ClusterStripRef

Definition at line 26 of file OmniClusterRef.h.

◆ Phase2Cluster1DRef

Definition at line 27 of file OmniClusterRef.h.

Constructor & Destructor Documentation

◆ OmniClusterRef() [1/5]

OmniClusterRef::OmniClusterRef ( )
inline

Definition at line 30 of file OmniClusterRef.h.

30 : me(edm::RefCore(), kInvalid) {}

◆ OmniClusterRef() [2/5]

OmniClusterRef::OmniClusterRef ( ClusterPixelRef const &  ref,
unsigned int  subClus = 0 
)
inlineexplicit

Definition at line 31 of file OmniClusterRef.h.

32  : me(ref.refCore(), (ref.isNonnull() ? ref.key() | (subClus << subClusShift) : kInvalid)) {}

◆ OmniClusterRef() [3/5]

OmniClusterRef::OmniClusterRef ( ClusterStripRef const &  ref,
unsigned int  subClus = 0 
)
inlineexplicit

Definition at line 33 of file OmniClusterRef.h.

34  : me(ref.refCore(), (ref.isNonnull() ? (ref.key() | kIsStrip) | (subClus << subClusShift) : kInvalid)) {}

◆ OmniClusterRef() [4/5]

OmniClusterRef::OmniClusterRef ( Phase2Cluster1DRef const &  ref,
unsigned int  subClus = 0 
)
inlineexplicit

Definition at line 35 of file OmniClusterRef.h.

36  : me(ref.refCore(), (ref.isNonnull() ? (ref.key() | kIsPhase2) | (subClus << subClusShift) : kInvalid)) {}

◆ OmniClusterRef() [5/5]

OmniClusterRef::OmniClusterRef ( ClusterMTDRef const &  ref)
inlineexplicit

Definition at line 37 of file OmniClusterRef.h.

38  : me(ref.refCore(), (ref.isNonnull() ? (ref.key() | kIsTiming) : kInvalid)) {}

Member Function Documentation

◆ cluster_mtd()

ClusterMTDRef OmniClusterRef::cluster_mtd ( ) const
inline

Definition at line 52 of file OmniClusterRef.h.

52 { return isTiming() ? ClusterMTDRef(me.toRefCore(), index()) : ClusterMTDRef(); }

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

Referenced by TrackerSingleRecHit::cluster_mtd().

◆ cluster_phase2OT()

Phase2Cluster1DRef OmniClusterRef::cluster_phase2OT ( ) const
inline

◆ cluster_pixel()

ClusterPixelRef OmniClusterRef::cluster_pixel ( ) const
inline

◆ cluster_strip()

ClusterStripRef OmniClusterRef::cluster_strip ( ) const
inline

◆ id()

edm::ProductID OmniClusterRef::id ( ) const
inline

◆ index()

unsigned int OmniClusterRef::index ( ) const
inline

◆ isPhase2()

bool OmniClusterRef::isPhase2 ( ) const
inline

Definition at line 81 of file OmniClusterRef.h.

81 { return rawIndex() & kIsPhase2; }

References kIsPhase2, and rawIndex().

Referenced by cluster_phase2OT(), and isPixel().

◆ isPixel()

bool OmniClusterRef::isPixel ( ) const
inline

Definition at line 79 of file OmniClusterRef.h.

79 { return !isStrip() && !isPhase2(); } //NOTE: non-valid will also show up as a pixel

References isPhase2(), and isStrip().

Referenced by BDHadronTrackMonitoringAnalyzer::analyze(), and cluster_pixel().

◆ isStrip()

bool OmniClusterRef::isStrip ( ) const
inline

Definition at line 80 of file OmniClusterRef.h.

80 { return rawIndex() & kIsStrip; }

References kIsStrip, and rawIndex().

Referenced by BDHadronTrackMonitoringAnalyzer::analyze(), cluster_strip(), and isPixel().

◆ isTiming()

bool OmniClusterRef::isTiming ( ) const
inline

Definition at line 82 of file OmniClusterRef.h.

82 { return rawIndex() & kIsTiming; }

References kIsTiming, and rawIndex().

Referenced by cluster_mtd().

◆ isValid()

bool OmniClusterRef::isValid ( void  ) const
inline

◆ key()

unsigned int OmniClusterRef::key ( ) const
inline

◆ mtdCluster()

FTLCluster const& OmniClusterRef::mtdCluster ( ) const
inline

◆ operator<()

bool OmniClusterRef::operator< ( OmniClusterRef const &  lh) const
inline

Definition at line 63 of file OmniClusterRef.h.

63  {
64  return rawIndex() < lh.rawIndex(); // in principle this is enough!
65  }

References mathSSE::lh, and rawIndex().

◆ operator==()

bool OmniClusterRef::operator== ( OmniClusterRef const &  lh) const
inline

Definition at line 59 of file OmniClusterRef.h.

59  {
60  return rawIndex() == lh.rawIndex(); // in principle this is enough!
61  }

References mathSSE::lh, and rawIndex().

◆ phase2OTCluster()

Phase2TrackerCluster1D const& OmniClusterRef::phase2OTCluster ( ) const
inline

◆ pixelCluster()

SiPixelCluster const& OmniClusterRef::pixelCluster ( ) const
inline

Definition at line 54 of file OmniClusterRef.h.

54 { return *ClusterPixelRef(me.toRefCore(), index()); }

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

Referenced by TrackerSingleRecHit::pixelCluster().

◆ rawIndex()

unsigned int OmniClusterRef::rawIndex ( ) const
inline

Definition at line 72 of file OmniClusterRef.h.

72 { return me.index(); }

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

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

◆ stripCluster()

SiStripCluster const& OmniClusterRef::stripCluster ( ) const
inline

◆ subCluster()

unsigned int OmniClusterRef::subCluster ( ) const
inline

Definition at line 76 of file OmniClusterRef.h.

76 { return (rawIndex() & subClusMask) >> subClusShift; }

References rawIndex(), subClusMask, and subClusShift.

Member Data Documentation

◆ indexMask

const unsigned int OmniClusterRef::indexMask = 0xFFFFFF
staticprivate

Definition at line 20 of file OmniClusterRef.h.

Referenced by index().

◆ kInvalid

const unsigned int OmniClusterRef::kInvalid = 0x80000000
staticprivate

Definition at line 13 of file OmniClusterRef.h.

Referenced by isValid().

◆ kIsPhase2

const unsigned int OmniClusterRef::kIsPhase2 = 0x40000000
staticprivate

Definition at line 16 of file OmniClusterRef.h.

Referenced by isPhase2().

◆ kIsRegional

const unsigned int OmniClusterRef::kIsRegional = 0x60000000
staticprivate

Definition at line 18 of file OmniClusterRef.h.

◆ kIsStrip

const unsigned int OmniClusterRef::kIsStrip = 0x20000000
staticprivate

Definition at line 14 of file OmniClusterRef.h.

Referenced by isStrip().

◆ kIsTiming

const unsigned int OmniClusterRef::kIsTiming = 0x10000000
staticprivate

Definition at line 17 of file OmniClusterRef.h.

Referenced by isTiming().

◆ me

edm::RefCoreWithIndex OmniClusterRef::me
private

◆ subClusMask

const unsigned int OmniClusterRef::subClusMask = 0xF000000
staticprivate

Definition at line 21 of file OmniClusterRef.h.

Referenced by subCluster().

◆ subClusShift

const unsigned int OmniClusterRef::subClusShift = 24
staticprivate

Definition at line 22 of file OmniClusterRef.h.

Referenced by subCluster().

OmniClusterRef::indexMask
static const unsigned int indexMask
Definition: OmniClusterRef.h:20
edm::RefCore
Definition: RefCore.h:21
edm::RefCoreWithIndex::index
unsigned int index() const
Definition: RefCoreWithIndex.h:78
OmniClusterRef::isTiming
bool isTiming() const
Definition: OmniClusterRef.h:82
OmniClusterRef::isPixel
bool isPixel() const
Definition: OmniClusterRef.h:79
mathSSE::lh
bool int lh
Definition: SIMDVec.h:20
OmniClusterRef::rawIndex
unsigned int rawIndex() const
Definition: OmniClusterRef.h:72
OmniClusterRef::index
unsigned int index() const
Definition: OmniClusterRef.h:74
OmniClusterRef::ClusterMTDRef
edm::Ref< FTLClusterCollection, FTLCluster > ClusterMTDRef
Definition: OmniClusterRef.h:28
OmniClusterRef::subClusShift
static const unsigned int subClusShift
Definition: OmniClusterRef.h:22
OmniClusterRef::kInvalid
static const unsigned int kInvalid
Definition: OmniClusterRef.h:13
OmniClusterRef::ClusterStripRef
edm::Ref< edmNew::DetSetVector< SiStripCluster >, SiStripCluster > ClusterStripRef
Definition: OmniClusterRef.h:26
OmniClusterRef::isPhase2
bool isPhase2() const
Definition: OmniClusterRef.h:81
OmniClusterRef::isStrip
bool isStrip() const
Definition: OmniClusterRef.h:80
OmniClusterRef::kIsPhase2
static const unsigned int kIsPhase2
Definition: OmniClusterRef.h:16
OmniClusterRef::kIsTiming
static const unsigned int kIsTiming
Definition: OmniClusterRef.h:17
OmniClusterRef::subClusMask
static const unsigned int subClusMask
Definition: OmniClusterRef.h:21
OmniClusterRef::ClusterPixelRef
edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster > ClusterPixelRef
Definition: OmniClusterRef.h:25
OmniClusterRef::me
edm::RefCoreWithIndex me
Definition: OmniClusterRef.h:87
edm::RefCoreWithIndex::toRefCore
RefCore const & toRefCore() const
Definition: RefCoreWithIndex.h:95
edm::RefCoreWithIndex::id
ProductID id() const
Definition: RefCoreWithIndex.h:59
OmniClusterRef::isValid
bool isValid() const
Definition: OmniClusterRef.h:78
OmniClusterRef::Phase2Cluster1DRef
edm::Ref< edmNew::DetSetVector< Phase2TrackerCluster1D >, Phase2TrackerCluster1D > Phase2Cluster1DRef
Definition: OmniClusterRef.h:27
OmniClusterRef::kIsStrip
static const unsigned int kIsStrip
Definition: OmniClusterRef.h:14