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 (ClusterPixelRef const &ref, unsigned int subClus=0)
 
 OmniClusterRef (ClusterStripRef const &ref, unsigned int subClus=0)
 
 OmniClusterRef (Phase2Cluster1DRef const &ref, unsigned int subClus=0)
 
 OmniClusterRef (ClusterMTDRef const &ref)
 
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) {}
edm::RefCoreWithIndex me
static const unsigned int 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)) {}
edm::RefCoreWithIndex me
static const unsigned int subClusShift
static const unsigned int 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)) {}
edm::RefCoreWithIndex me
static const unsigned int kIsStrip
static const unsigned int subClusShift
static const unsigned int 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)) {}
static const unsigned int kIsPhase2
edm::RefCoreWithIndex me
static const unsigned int subClusShift
static const unsigned int 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)) {}
edm::RefCoreWithIndex me
static const unsigned int kIsTiming
static const unsigned int kInvalid

Member Function Documentation

◆ cluster_mtd()

ClusterMTDRef OmniClusterRef::cluster_mtd ( ) const
inline

Definition at line 52 of file OmniClusterRef.h.

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

Referenced by TrackerSingleRecHit::cluster_mtd().

52 { return isTiming() ? ClusterMTDRef(me.toRefCore(), index()) : ClusterMTDRef(); }
unsigned int index() const
edm::RefCoreWithIndex me
bool isTiming() const
edm::Ref< FTLClusterCollection, FTLCluster > ClusterMTDRef
RefCore const & toRefCore() const

◆ cluster_phase2OT()

Phase2Cluster1DRef OmniClusterRef::cluster_phase2OT ( ) const
inline

Definition at line 48 of file OmniClusterRef.h.

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

Referenced by VectorHit::cluster(), TrackerSingleRecHit::cluster_phase2OT(), TrackingNtuple::fillSeeds(), VectorHit::lowerCluster(), and VectorHit::upperCluster().

48  {
50  }
unsigned int index() const
edm::Ref< edmNew::DetSetVector< Phase2TrackerCluster1D >, Phase2TrackerCluster1D > Phase2Cluster1DRef
edm::RefCoreWithIndex me
bool isPhase2() const
RefCore const & toRefCore() const

◆ cluster_pixel()

ClusterPixelRef OmniClusterRef::cluster_pixel ( ) const
inline

Definition at line 40 of file OmniClusterRef.h.

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

Referenced by TrackerSingleRecHit::cluster_pixel(), TrackingNtuple::fillCandidates(), TrackingNtuple::fillSeeds(), and TrackingNtuple::fillTracks().

40  {
41  return (isPixel() && isValid()) ? ClusterPixelRef(me.toRefCore(), index()) : ClusterPixelRef();
42  }
edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster > ClusterPixelRef
bool isPixel() const
unsigned int index() const
bool isValid() const
edm::RefCoreWithIndex me
RefCore const & toRefCore() const

◆ cluster_strip()

ClusterStripRef OmniClusterRef::cluster_strip ( ) const
inline

Definition at line 44 of file OmniClusterRef.h.

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

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

44  {
46  }
bool isStrip() const
unsigned int index() const
edm::RefCoreWithIndex me
edm::Ref< edmNew::DetSetVector< SiStripCluster >, SiStripCluster > ClusterStripRef
RefCore const & toRefCore() const

◆ id()

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

Definition at line 69 of file OmniClusterRef.h.

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

Referenced by ClusterTPAssociation::emplace_back(), TrackingNtuple::fillSeeds(), and HLTTrackClusterRemoverNew::process().

69 { return me.id(); }
edm::RefCoreWithIndex me
ProductID id() const

◆ index()

unsigned int OmniClusterRef::index ( ) const
inline

Definition at line 74 of file OmniClusterRef.h.

References indexMask, and rawIndex().

Referenced by cluster_mtd(), cluster_phase2OT(), cluster_pixel(), cluster_strip(), MkFitSeedConverter::convertSeeds(), key(), mtdCluster(), phase2OTCluster(), pixelCluster(), and stripCluster().

74 { return rawIndex() & indexMask; }
static const unsigned int indexMask
unsigned int rawIndex() const

◆ isPhase2()

bool OmniClusterRef::isPhase2 ( ) const
inline

Definition at line 81 of file OmniClusterRef.h.

References kIsPhase2, and rawIndex().

Referenced by cluster_phase2OT(), and isPixel().

81 { return rawIndex() & kIsPhase2; }
static const unsigned int kIsPhase2
unsigned int rawIndex() const

◆ isPixel()

bool OmniClusterRef::isPixel ( ) const
inline

Definition at line 79 of file OmniClusterRef.h.

References isPhase2(), and isStrip().

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

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

◆ isStrip()

bool OmniClusterRef::isStrip ( ) const
inline

Definition at line 80 of file OmniClusterRef.h.

References kIsStrip, and rawIndex().

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

80 { return rawIndex() & kIsStrip; }
static const unsigned int kIsStrip
unsigned int rawIndex() const

◆ isTiming()

bool OmniClusterRef::isTiming ( ) const
inline

Definition at line 82 of file OmniClusterRef.h.

References kIsTiming, and rawIndex().

Referenced by cluster_mtd().

82 { return rawIndex() & kIsTiming; }
static const unsigned int kIsTiming
unsigned int rawIndex() const

◆ isValid()

bool OmniClusterRef::isValid ( void  ) const
inline

Definition at line 78 of file OmniClusterRef.h.

References kInvalid, and rawIndex().

Referenced by ntupleDataFormat._Object::_checkIsValid(), BDHadronTrackMonitoringAnalyzer::analyze(), cluster_pixel(), and core.AutoHandle.AutoHandle::ReallyLoad().

78 { return !(rawIndex() & kInvalid); }
unsigned int rawIndex() const
static const unsigned int kInvalid

◆ key()

unsigned int OmniClusterRef::key ( ) const
inline

◆ mtdCluster()

FTLCluster const& OmniClusterRef::mtdCluster ( ) const
inline

Definition at line 57 of file OmniClusterRef.h.

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

Referenced by MTDTrackingRecHit::energy(), TrackerSingleRecHit::mtdCluster(), MTDTrackingRecHit::time(), and MTDTrackingRecHit::timeError().

57 { return *ClusterMTDRef(me.toRefCore(), index()); }
unsigned int index() const
edm::RefCoreWithIndex me
edm::Ref< FTLClusterCollection, FTLCluster > ClusterMTDRef
RefCore const & toRefCore() const

◆ operator<()

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

Definition at line 63 of file OmniClusterRef.h.

References mathSSE::lh, and rawIndex().

63  {
64  return rawIndex() < lh.rawIndex(); // in principle this is enough!
65  }
bool int lh
Definition: SIMDVec.h:20
unsigned int rawIndex() const

◆ operator==()

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

Definition at line 59 of file OmniClusterRef.h.

References mathSSE::lh, and rawIndex().

59  {
60  return rawIndex() == lh.rawIndex(); // in principle this is enough!
61  }
bool int lh
Definition: SIMDVec.h:20
unsigned int rawIndex() const

◆ phase2OTCluster()

Phase2TrackerCluster1D const& OmniClusterRef::phase2OTCluster ( ) const
inline

Definition at line 56 of file OmniClusterRef.h.

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

Referenced by TrackingNtuple::matchCluster(), and TrackerSingleRecHit::phase2OTCluster().

56 { return *Phase2Cluster1DRef(me.toRefCore(), index()); }
unsigned int index() const
edm::Ref< edmNew::DetSetVector< Phase2TrackerCluster1D >, Phase2TrackerCluster1D > Phase2Cluster1DRef
edm::RefCoreWithIndex me
RefCore const & toRefCore() const

◆ pixelCluster()

SiPixelCluster const& OmniClusterRef::pixelCluster ( ) const
inline

Definition at line 54 of file OmniClusterRef.h.

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

Referenced by TrackerSingleRecHit::pixelCluster().

54 { return *ClusterPixelRef(me.toRefCore(), index()); }
edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster > ClusterPixelRef
unsigned int index() const
edm::RefCoreWithIndex me
RefCore const & toRefCore() const

◆ rawIndex()

unsigned int OmniClusterRef::rawIndex ( ) const
inline

Definition at line 72 of file OmniClusterRef.h.

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

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

72 { return me.index(); }
edm::RefCoreWithIndex me
unsigned int index() const

◆ stripCluster()

SiStripCluster const& OmniClusterRef::stripCluster ( ) const
inline

Definition at line 55 of file OmniClusterRef.h.

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

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

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

◆ subCluster()

unsigned int OmniClusterRef::subCluster ( ) const
inline

Definition at line 76 of file OmniClusterRef.h.

References rawIndex(), subClusMask, and subClusShift.

76 { return (rawIndex() & subClusMask) >> subClusShift; }
static const unsigned int subClusMask
unsigned int rawIndex() const
static const unsigned int 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().