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

Definition at line 29 of file OmniClusterRef.h.

Definition at line 26 of file OmniClusterRef.h.

Definition at line 27 of file OmniClusterRef.h.

Definition at line 28 of file OmniClusterRef.h.

Constructor & Destructor Documentation

OmniClusterRef::OmniClusterRef ( )
inline

Definition at line 31 of file OmniClusterRef.h.

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

33 : 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 34 of file OmniClusterRef.h.

34 : 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 35 of file OmniClusterRef.h.

35 : 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 49 of file OmniClusterRef.h.

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

Referenced by TrackerSingleRecHit::cluster_mtd().

49  {
51  }
bool isTiming() const
edm::Ref< FTLClusterCollection, FTLCluster > ClusterMTDRef
RefCore const & toRefCore() const
edm::RefCoreWithIndex me
unsigned int index() const
Phase2Cluster1DRef OmniClusterRef::cluster_phase2OT ( ) const
inline

Definition at line 45 of file OmniClusterRef.h.

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

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

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

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

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

37  {
38  return (isPixel() && isValid()) ? ClusterPixelRef(me.toRefCore(),index()) : ClusterPixelRef();
39  }
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 41 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().

41  {
43  }
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
unsigned int OmniClusterRef::index ( ) const
inline
bool OmniClusterRef::isPhase2 ( ) const
inline

Definition at line 88 of file OmniClusterRef.h.

References kIsPhase2, and rawIndex().

Referenced by cluster_phase2OT(), and isPixel().

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

Definition at line 86 of file OmniClusterRef.h.

References isPhase2(), and isStrip().

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

86 { 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 87 of file OmniClusterRef.h.

References kIsStrip, and rawIndex().

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

87 { return rawIndex() & kIsStrip; }
unsigned int rawIndex() const
static const unsigned int kIsStrip
bool OmniClusterRef::isTiming ( ) const
inline

Definition at line 89 of file OmniClusterRef.h.

References kIsTiming, and rawIndex().

Referenced by cluster_mtd().

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

Definition at line 85 of file OmniClusterRef.h.

References kInvalid, and rawIndex().

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

85 { 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 62 of file OmniClusterRef.h.

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

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

62  {
63  return *ClusterMTDRef(me.toRefCore(),index());
64  }
edm::Ref< FTLClusterCollection, FTLCluster > ClusterMTDRef
RefCore const & toRefCore() const
edm::RefCoreWithIndex me
unsigned int index() const
bool OmniClusterRef::operator< ( OmniClusterRef const &  lh) const
inline

Definition at line 70 of file OmniClusterRef.h.

References rawIndex().

70  {
71  return rawIndex() < lh.rawIndex(); // in principle this is enough!
72  }
unsigned int rawIndex() const
bool int lh
Definition: SIMDVec.h:21
bool OmniClusterRef::operator== ( OmniClusterRef const &  lh) const
inline

Definition at line 66 of file OmniClusterRef.h.

References rawIndex().

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

Definition at line 59 of file OmniClusterRef.h.

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

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

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

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

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

53  {
54  return *ClusterPixelRef(me.toRefCore(),index());
55  }
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 79 of file OmniClusterRef.h.

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

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

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

Definition at line 56 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().

56  {
57  return *ClusterStripRef(me.toRefCore(),index());
58  }
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 83 of file OmniClusterRef.h.

References rawIndex(), and subClusShift.

83 { 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 21 of file OmniClusterRef.h.

Referenced by index().

const unsigned int OmniClusterRef::kInvalid = 0x80000000
staticprivate

Definition at line 14 of file OmniClusterRef.h.

Referenced by isValid().

const unsigned int OmniClusterRef::kIsPhase2 = 0x40000000
staticprivate

Definition at line 17 of file OmniClusterRef.h.

Referenced by isPhase2().

const unsigned int OmniClusterRef::kIsRegional = 0x60000000
staticprivate

Definition at line 19 of file OmniClusterRef.h.

const unsigned int OmniClusterRef::kIsStrip = 0x20000000
staticprivate

Definition at line 15 of file OmniClusterRef.h.

Referenced by isStrip().

const unsigned int OmniClusterRef::kIsTiming = 0x10000000
staticprivate

Definition at line 18 of file OmniClusterRef.h.

Referenced by isTiming().

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

Definition at line 22 of file OmniClusterRef.h.

const unsigned int OmniClusterRef::subClusShift = 24
staticprivate

Definition at line 23 of file OmniClusterRef.h.

Referenced by subCluster().