CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiPixelRecHit.h
Go to the documentation of this file.
1 #ifndef DataFormats_SiPixelRecHit_h
2 #define DataFormats_SiPixelRecHit_h 1
3 
4 //---------------------------------------------------------------------------
14 //---------------------------------------------------------------------------
15 
20 
21 
23 
24 public:
25 
27 
28  SiPixelRecHit(): qualWord_(0) {}
29 
31 
32  SiPixelRecHit( const LocalPoint& pos , const LocalError& err,
33  const DetId& id,
34  ClusterRef const& clus) :
35  TrackerSingleRecHit(pos,err,id,clus),
36  qualWord_(0)
37  {}
38 
39  virtual SiPixelRecHit * clone() const {return new SiPixelRecHit( * this); }
40 
41  ClusterRef cluster() const { return cluster_pixel(); }
42  void setClusterRef(ClusterRef const & ref) {setClusterPixelRef(ref);}
43  virtual int dimension() const {return 2;}
44  virtual void getKfComponents( KfComponentsHolder & holder ) const { getKfComponents2D(holder); }
45 
46 
47  //--------------------------------------------------------------------------
48  //--- Accessors of other auxiliary quantities
49  //--- Added Oct 07 by Petar for 18x.
50 private:
51  // *************************************************************************
52  //
53  SiPixelRecHitQuality::QualWordType qualWord_ ; // unsigned int 32-bit wide
54  //
55  // *************************************************************************
56 
57 public:
58  //--- The overall probability. flags is the 32-bit-packed set of flags that
59  //--- our own concrete implementation of clusterProbability() uses to direct
60  //--- the computation based on the information stored in the quality word
61  //--- (and which was computed by the CPE). The default of flags==0 returns
62  //--- probabilityY() only (as that's the safest thing to do).
63  //--- Flags are static and kept in the transient rec hit.
64  float clusterProbability(unsigned int flags = 0) const;
65 
66 
67  //--- Allow direct access to the packed quality information.
69  return qualWord_ ;
70  }
72  qualWord_ = w;
73  }
74 
75 
76  //--- Template fit probability, in X and Y directions
77  //--- These are obsolete and will be taken care of in the quality code
78  inline float probabilityX() const {
80  }
81  inline float probabilityY() const {
83  }
84 
85  //--- Template fit probability, in X and Y direction combined and in charge
86  inline float probabilityXY() const {
88  }
89  inline float probabilityQ() const {
91  }
92 
93  //--- Charge `bin' (values 0, 1, 2, 3) according to Morris's template
94  //--- code. qBin==4 is unphysical, qBin=5,6,7 are yet unused)
95  //
96  inline int qBin() const {
97  return SiPixelRecHitQuality::thePacking.qBin( qualWord_ );
98  }
99 
100  //--- Quality flags (true or false):
101 
102  //--- The cluster is on the edge of the module, or straddles a dead ROC
103  inline bool isOnEdge() const {
104  return SiPixelRecHitQuality::thePacking.isOnEdge( qualWord_ );
105  }
106  //--- The cluster contains bad pixels, or straddles bad column or two-column
107  inline bool hasBadPixels() const {
109  }
110  //--- The cluster spans two ROCS (and thus contains big pixels)
111  inline bool spansTwoROCs() const {
113  }
114 
115  //--- Quality flag for whether the probability is filled
116  inline bool hasFilledProb() const {
118  }
119 
120  //--- Setters for the above
121  inline void setProbabilityXY( float prob ) {
123  }
124  inline void setProbabilityQ( float prob ) {
126  }
127  inline void setQBin( int qbin ) {
128  SiPixelRecHitQuality::thePacking.setQBin( qbin, qualWord_ );
129  }
130  inline void setIsOnEdge( bool flag ) {
132  }
133  inline void setHasBadPixels( bool flag ) {
135  }
136  inline void setSpansTwoROCs( bool flag ) {
138  }
139  inline void setHasFilledProb( bool flag ) {
141  }
142 
143 };
144 
145 #endif
float probabilityQ(QualWordType qualWord) const
bool spansTwoROCs(QualWordType qualWord) const
long int flag
Definition: mlp_lapack.h:47
void setIsOnEdge(bool flag, QualWordType &qualWord)
SiPixelRecHitQuality::QualWordType qualWord_
Definition: SiPixelRecHit.h:53
void setProbabilityXY(float prob, QualWordType &qualWord)
edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster > ClusterRef
Definition: SiPixelRecHit.h:26
void setSpansTwoROCs(bool flag, QualWordType &qualWord)
void setHasBadPixels(bool flag, QualWordType &qualWord)
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
bool isOnEdge() const
void setSpansTwoROCs(bool flag)
float probabilityX() const
Definition: SiPixelRecHit.h:78
void setHasFilledProb(bool flag)
SiPixelRecHitQuality::QualWordType rawQualityWord() const
Definition: SiPixelRecHit.h:68
virtual SiPixelRecHit * clone() const
Definition: SiPixelRecHit.h:39
float probabilityXY(QualWordType qualWord) const
void setProbabilityQ(float prob, QualWordType &qualWord)
void setClusterRef(ClusterRef const &ref)
Definition: SiPixelRecHit.h:42
void setHasBadPixels(bool flag)
float probabilityY() const
Definition: SiPixelRecHit.h:81
bool hasFilledProb() const
float probabilityY(QualWordType qualWord) const
int qBin(QualWordType qualWord) const
virtual void getKfComponents(KfComponentsHolder &holder) const
Definition: SiPixelRecHit.h:44
float probabilityX(QualWordType qualWord) const
virtual int dimension() const
Definition: SiPixelRecHit.h:43
float probabilityXY() const
Definition: SiPixelRecHit.h:86
Definition: DetId.h:20
void setHasFilledProb(bool flag, QualWordType &qualWord)
bool spansTwoROCs() const
int qBin() const
Definition: SiPixelRecHit.h:96
float probabilityQ() const
Definition: SiPixelRecHit.h:89
SiPixelRecHit(const LocalPoint &pos, const LocalError &err, const DetId &id, ClusterRef const &clus)
Definition: SiPixelRecHit.h:32
bool isOnEdge(QualWordType qualWord) const
bool hasBadPixels() const
Pixel cluster – collection of neighboring pixels above threshold.
ClusterRef cluster() const
Definition: SiPixelRecHit.h:41
void setQBin(int qbin)
void setQBin(int qbin, QualWordType &qualWord)
void setIsOnEdge(bool flag)
void setProbabilityXY(float prob)
bool hasBadPixels(QualWordType qualWord) const
void setProbabilityQ(float prob)
void setRawQualityWord(SiPixelRecHitQuality::QualWordType w)
Definition: SiPixelRecHit.h:71
T w() const
Pixel Reconstructed Hit.
bool hasFilledProb(QualWordType qualWord) const
Our base class.
Definition: SiPixelRecHit.h:22