CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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
< FTLClusterCollection,
FTLCluster
ClusterMTDRef
 
typedef edm::Ref
< edmNew::DetSetVector
< SiPixelCluster >
, SiPixelCluster
ClusterPixelRef
 
typedef edm::Ref
< edmNew::DetSetVector
< SiStripCluster >
, SiStripCluster
ClusterStripRef
 
typedef edm::Ref
< edmNew::DetSetVector
< Phase2TrackerCluster1D >
, Phase2TrackerCluster1D
Phase2Cluster1DRef
 

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

Definition at line 28 of file OmniClusterRef.h.

Definition at line 25 of file OmniClusterRef.h.

Definition at line 26 of file OmniClusterRef.h.

Definition at line 27 of file OmniClusterRef.h.

Constructor & Destructor Documentation

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::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::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::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::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

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(); }
bool isTiming() const
RefCore const & toRefCore() const
edm::RefCoreWithIndex me
unsigned int index() const
edm::Ref< FTLClusterCollection, FTLCluster > ClusterMTDRef
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  }
RefCore const & toRefCore() const
edm::Ref< edmNew::DetSetVector< Phase2TrackerCluster1D >, Phase2TrackerCluster1D > Phase2Cluster1DRef
edm::RefCoreWithIndex me
unsigned int index() const
bool isPhase2() const
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::fillSeeds(), and TrackingNtuple::fillTracks().

40  {
41  return (isPixel() && isValid()) ? ClusterPixelRef(me.toRefCore(), index()) : ClusterPixelRef();
42  }
edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster > ClusterPixelRef
bool isValid() const
RefCore const & toRefCore() const
edm::RefCoreWithIndex me
bool isPixel() const
unsigned int index() const
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
RefCore const & toRefCore() const
edm::RefCoreWithIndex me
edm::Ref< edmNew::DetSetVector< SiStripCluster >, SiStripCluster > ClusterStripRef
unsigned int index() const
edm::ProductID OmniClusterRef::id ( ) const
inline
unsigned int OmniClusterRef::index ( ) const
inline
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; }
unsigned int rawIndex() const
static const unsigned int kIsPhase2
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
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; }
unsigned int rawIndex() const
static const unsigned int kIsStrip
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; }
unsigned int rawIndex() const
static const unsigned int kIsTiming
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
unsigned int OmniClusterRef::key ( ) const
inline
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()); }
RefCore const & toRefCore() const
edm::RefCoreWithIndex me
unsigned int index() const
edm::Ref< FTLClusterCollection, FTLCluster > ClusterMTDRef
bool OmniClusterRef::operator< ( OmniClusterRef const &  lh) const
inline

Definition at line 63 of file OmniClusterRef.h.

References rawIndex().

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

Definition at line 59 of file OmniClusterRef.h.

References rawIndex().

59  {
60  return rawIndex() == lh.rawIndex(); // in principle this is enough!
61  }
unsigned int rawIndex() const
bool int lh
Definition: SIMDVec.h:20
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()); }
RefCore const & toRefCore() const
edm::Ref< edmNew::DetSetVector< Phase2TrackerCluster1D >, Phase2TrackerCluster1D > Phase2Cluster1DRef
edm::RefCoreWithIndex me
unsigned int index() const
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
RefCore const & toRefCore() const
edm::RefCoreWithIndex me
unsigned int index() const
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(); }
unsigned int index() const
edm::RefCoreWithIndex me
SiStripCluster const& OmniClusterRef::stripCluster ( ) const
inline

Definition at line 55 of file OmniClusterRef.h.

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

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

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

Definition at line 76 of file OmniClusterRef.h.

References rawIndex(), subClusMask, and subClusShift.

76 { 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 20 of file OmniClusterRef.h.

Referenced by index().

const unsigned int OmniClusterRef::kInvalid = 0x80000000
staticprivate

Definition at line 13 of file OmniClusterRef.h.

Referenced by isValid().

const unsigned int OmniClusterRef::kIsPhase2 = 0x40000000
staticprivate

Definition at line 16 of file OmniClusterRef.h.

Referenced by isPhase2().

const unsigned int OmniClusterRef::kIsRegional = 0x60000000
staticprivate

Definition at line 18 of file OmniClusterRef.h.

const unsigned int OmniClusterRef::kIsStrip = 0x20000000
staticprivate

Definition at line 14 of file OmniClusterRef.h.

Referenced by isStrip().

const unsigned int OmniClusterRef::kIsTiming = 0x10000000
staticprivate

Definition at line 17 of file OmniClusterRef.h.

Referenced by isTiming().

edm::RefCoreWithIndex OmniClusterRef::me
private
const unsigned int OmniClusterRef::subClusMask = 0xF000000
staticprivate

Definition at line 21 of file OmniClusterRef.h.

Referenced by subCluster().

const unsigned int OmniClusterRef::subClusShift = 24
staticprivate

Definition at line 22 of file OmniClusterRef.h.

Referenced by subCluster().