Go to the documentation of this file.00001 #ifndef DataFormats_SiPixelRecHit_h
00002 #define DataFormats_SiPixelRecHit_h 1
00003
00004
00014
00015
00017 #include "DataFormats/TrackerRecHit2D/interface/TrackerSingleRecHit.h"
00019 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitQuality.h"
00020
00021
00022 class SiPixelRecHit GCC11_FINAL : public TrackerSingleRecHit {
00023
00024 public:
00025
00026 typedef edm::Ref<edmNew::DetSetVector<SiPixelCluster>, SiPixelCluster > ClusterRef;
00027
00028 SiPixelRecHit(): qualWord_(0) {}
00029
00030 ~SiPixelRecHit() {}
00031
00032 SiPixelRecHit( const LocalPoint& pos , const LocalError& err,
00033 const DetId& id,
00034 ClusterRef const& clus) :
00035 TrackerSingleRecHit(pos,err,id,clus),
00036 qualWord_(0)
00037 {}
00038
00039 virtual SiPixelRecHit * clone() const {return new SiPixelRecHit( * this); }
00040
00041 ClusterRef cluster() const { return cluster_pixel(); }
00042 void setClusterRef(ClusterRef const & ref) {setClusterPixelRef(ref);}
00043 virtual int dimension() const {return 2;}
00044 virtual void getKfComponents( KfComponentsHolder & holder ) const { getKfComponents2D(holder); }
00045
00046
00047
00048
00049
00050 private:
00051
00052
00053 SiPixelRecHitQuality::QualWordType qualWord_ ;
00054
00055
00056
00057 public:
00058
00059
00060
00061
00062
00063
00064 float clusterProbability(unsigned int flags = 0) const;
00065
00066
00067
00068 inline SiPixelRecHitQuality::QualWordType rawQualityWord() const {
00069 return qualWord_ ;
00070 }
00071 inline void setRawQualityWord( SiPixelRecHitQuality::QualWordType w ) {
00072 qualWord_ = w;
00073 }
00074
00075
00076
00077
00078 inline float probabilityX() const {
00079 return SiPixelRecHitQuality::thePacking.probabilityX( qualWord_ );
00080 }
00081 inline float probabilityY() const {
00082 return SiPixelRecHitQuality::thePacking.probabilityY( qualWord_ );
00083 }
00084
00085
00086 inline float probabilityXY() const {
00087 return SiPixelRecHitQuality::thePacking.probabilityXY( qualWord_ );
00088 }
00089 inline float probabilityQ() const {
00090 return SiPixelRecHitQuality::thePacking.probabilityQ( qualWord_ );
00091 }
00092
00093
00094
00095
00096 inline int qBin() const {
00097 return SiPixelRecHitQuality::thePacking.qBin( qualWord_ );
00098 }
00099
00100
00101
00102
00103 inline bool isOnEdge() const {
00104 return SiPixelRecHitQuality::thePacking.isOnEdge( qualWord_ );
00105 }
00106
00107 inline bool hasBadPixels() const {
00108 return SiPixelRecHitQuality::thePacking.hasBadPixels( qualWord_ );
00109 }
00110
00111 inline bool spansTwoROCs() const {
00112 return SiPixelRecHitQuality::thePacking.spansTwoROCs( qualWord_ );
00113 }
00114
00115
00116 inline bool hasFilledProb() const {
00117 return SiPixelRecHitQuality::thePacking.hasFilledProb( qualWord_ );
00118 }
00119
00120
00121 inline void setProbabilityXY( float prob ) {
00122 SiPixelRecHitQuality::thePacking.setProbabilityXY( prob, qualWord_ );
00123 }
00124 inline void setProbabilityQ( float prob ) {
00125 SiPixelRecHitQuality::thePacking.setProbabilityQ( prob, qualWord_ );
00126 }
00127 inline void setQBin( int qbin ) {
00128 SiPixelRecHitQuality::thePacking.setQBin( qbin, qualWord_ );
00129 }
00130 inline void setIsOnEdge( bool flag ) {
00131 SiPixelRecHitQuality::thePacking.setIsOnEdge( flag, qualWord_ );
00132 }
00133 inline void setHasBadPixels( bool flag ) {
00134 SiPixelRecHitQuality::thePacking.setHasBadPixels( flag, qualWord_ );
00135 }
00136 inline void setSpansTwoROCs( bool flag ) {
00137 SiPixelRecHitQuality::thePacking.setSpansTwoROCs( flag, qualWord_ );
00138 }
00139 inline void setHasFilledProb( bool flag ) {
00140 SiPixelRecHitQuality::thePacking.setHasFilledProb( flag, qualWord_ );
00141 }
00142
00143 };
00144
00145 #endif