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

Public Member Functions

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 isValid () const
 
unsigned int key () 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)
 
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 subClusMask = 0xF000000
 
static const unsigned int subClusShift = 24
 

Detailed Description

Definition at line 11 of file OmniClusterRef.h.

Member Typedef Documentation

Definition at line 24 of file OmniClusterRef.h.

Definition at line 25 of file OmniClusterRef.h.

Definition at line 26 of file OmniClusterRef.h.

Constructor & Destructor Documentation

OmniClusterRef::OmniClusterRef ( )
inline

Definition at line 28 of file OmniClusterRef.h.

28 : 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 29 of file OmniClusterRef.h.

29 : 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 30 of file OmniClusterRef.h.

30 : 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 31 of file OmniClusterRef.h.

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

Member Function Documentation

Phase2Cluster1DRef OmniClusterRef::cluster_phase2OT ( ) const
inline

Definition at line 41 of file OmniClusterRef.h.

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

Referenced by TrackerSingleRecHit::cluster_phase2OT(), and TrackingNtuple::fillSeeds().

41  {
43  }
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 33 of file OmniClusterRef.h.

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

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

33  {
34  return (isPixel() && isValid()) ? ClusterPixelRef(me.toRefCore(),index()) : ClusterPixelRef();
35  }
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 37 of file OmniClusterRef.h.

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

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

37  {
39  }
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 65 of file OmniClusterRef.h.

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

Referenced by HLTTrackClusterRemoverNew::cleanup(), and TrackingNtuple::fillSeeds().

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

Definition at line 71 of file OmniClusterRef.h.

References indexMask, and rawIndex().

Referenced by cluster_phase2OT(), cluster_pixel(), cluster_strip(), BeautifulSoup.PageElement::insert(), key(), phase2OTCluster(), pixelCluster(), and stripCluster().

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

Definition at line 78 of file OmniClusterRef.h.

References kIsPhase2, and rawIndex().

Referenced by cluster_phase2OT(), and isPixel().

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

Definition at line 76 of file OmniClusterRef.h.

References isPhase2(), and isStrip().

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

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

References kIsStrip, and rawIndex().

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

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

Definition at line 75 of file OmniClusterRef.h.

References kInvalid, and rawIndex().

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

75 { 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 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:21
bool OmniClusterRef::operator== ( OmniClusterRef const &  lh) const
inline

Definition at line 55 of file OmniClusterRef.h.

References rawIndex().

55  {
56  return rawIndex() == lh.rawIndex(); // in principle this is enough!
57  }
unsigned int rawIndex() const
bool int lh
Definition: SIMDVec.h:21
Phase2TrackerCluster1D const& OmniClusterRef::phase2OTCluster ( ) const
inline

Definition at line 51 of file OmniClusterRef.h.

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

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

51  {
52  return *Phase2Cluster1DRef(me.toRefCore(),index());
53  }
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 45 of file OmniClusterRef.h.

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

Referenced by TrackingNtuple::fillBeamSpot(), and TrackerSingleRecHit::pixelCluster().

45  {
46  return *ClusterPixelRef(me.toRefCore(),index());
47  }
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 69 of file OmniClusterRef.h.

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

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

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

Definition at line 48 of file OmniClusterRef.h.

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

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

48  {
49  return *ClusterStripRef(me.toRefCore(),index());
50  }
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 73 of file OmniClusterRef.h.

References rawIndex(), and subClusShift.

73 { 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 19 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 17 of file OmniClusterRef.h.

const unsigned int OmniClusterRef::kIsStrip = 0x20000000
staticprivate

Definition at line 14 of file OmniClusterRef.h.

Referenced by isStrip().

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

Definition at line 20 of file OmniClusterRef.h.

const unsigned int OmniClusterRef::subClusShift = 24
staticprivate

Definition at line 21 of file OmniClusterRef.h.

Referenced by subCluster().