CMS 3D CMS Logo

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 #include "TkCloner.h"
22 
23 class SiPixelRecHit final : public TrackerSingleRecHit {
24 
25 public:
26 
28 
30 
32 
33  SiPixelRecHit( const LocalPoint& pos , const LocalError& err,
35  GeomDet const & idet,
36  ClusterRef const& clus) :
37  TrackerSingleRecHit(pos,err,idet, clus){
38  qualWord_=qual; }
39 
40  virtual bool isPixel() const override { return true;}
41 
42 
43  virtual SiPixelRecHit * clone() const override {return new SiPixelRecHit( * this); }
44 #ifndef __GCCXML__
45  virtual RecHitPointer cloneSH() const override { return std::make_shared<SiPixelRecHit>(*this);}
46 #endif
47 
48 
49  ClusterRef cluster() const { return cluster_pixel(); }
50 
51  void setClusterRef(ClusterRef const & ref) {setClusterPixelRef(ref);}
52 
53  virtual int dimension() const override {return 2;}
54  virtual void getKfComponents( KfComponentsHolder & holder ) const override { getKfComponents2D(holder); }
55 
56 
57  virtual bool canImproveWithTrack() const override {return true;}
58 private:
59  // double dispatch
60  virtual SiPixelRecHit * clone(TkCloner const& cloner, TrajectoryStateOnSurface const& tsos) const override {
61  return cloner(*this,tsos).release();
62  }
63 #ifndef __GCCXML__
64  virtual RecHitPointer cloneSH(TkCloner const& cloner, TrajectoryStateOnSurface const& tsos) const override {
65  return cloner.makeShared(*this,tsos);
66  }
67 #endif
68 
69 public:
70  //--- The overall probability. flags is the 32-bit-packed set of flags that
71  //--- our own concrete implementation of clusterProbability() uses to direct
72  //--- the computation based on the information stored in the quality word
73  //--- (and which was computed by the CPE). The default of flags==0 returns
74  //--- probabilityY() only (as that's the safest thing to do).
75  //--- Flags are static and kept in the transient rec hit.
77  float clusterProbability(unsigned int flags = 0) const;
78 
79 
80  //--- Allow direct access to the packed quality information.
82  return qualWord_ ;
83  }
84 
85 
86  //--- Template fit probability, in X and Y directions
87  //--- These are obsolete and will be taken care of in the quality code
88  inline float probabilityX() const {
90  }
91  inline float probabilityY() const {
93  }
94 
95  //--- Template fit probability, in X and Y direction combined and in charge
96  inline float probabilityXY() const {
98  }
99  inline float probabilityQ() const {
101  }
102 
103  //--- Charge `bin' (values 0, 1, 2, 3) according to Morris's template
104  //--- code. qBin==4 is unphysical, qBin=5,6,7 are yet unused)
105  //
106  inline int qBin() const {
108  }
109 
110  //--- Quality flags (true or false):
111 
112  //--- The cluster is on the edge of the module, or straddles a dead ROC
113  inline bool isOnEdge() const {
115  }
116  //--- The cluster contains bad pixels, or straddles bad column or two-column
117  inline bool hasBadPixels() const {
119  }
120  //--- The cluster spans two ROCS (and thus contains big pixels)
121  inline bool spansTwoROCs() const {
123  }
124 
125  //--- Quality flag for whether the probability is filled
126  inline bool hasFilledProb() const {
128  }
129 
130 };
131 
132 #endif
float probabilityQ(QualWordType qualWord) const
bool spansTwoROCs(QualWordType qualWord) const
static const Packing thePacking
bool hasFilledProb() const
virtual SiPixelRecHit * clone() const override
Definition: SiPixelRecHit.h:43
virtual bool canImproveWithTrack() const override
Definition: SiPixelRecHit.h:57
virtual void getKfComponents(KfComponentsHolder &holder) const override
Definition: SiPixelRecHit.h:54
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
virtual bool isPixel() const override
Definition: SiPixelRecHit.h:40
bool isOnEdge() const
bool hasBadPixels() const
float probabilityXY(QualWordType qualWord) const
SiPixelRecHit(const LocalPoint &pos, const LocalError &err, SiPixelRecHitQuality::QualWordType qual, GeomDet const &idet, ClusterRef const &clus)
Definition: SiPixelRecHit.h:33
virtual RecHitPointer cloneSH(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
Definition: SiPixelRecHit.h:64
void getKfComponents2D(KfComponentsHolder &holder) const
void setClusterRef(ClusterRef const &ref)
Definition: SiPixelRecHit.h:51
float probabilityY() const
Definition: SiPixelRecHit.h:91
float probabilityY(QualWordType qualWord) const
int qBin(QualWordType qualWord) const
float probabilityX(QualWordType qualWord) const
std::shared_ptr< TrackingRecHit const > RecHitPointer
int qBin() const
ClusterRef cluster() const
Definition: SiPixelRecHit.h:49
virtual TrackingRecHit::ConstRecHitPointer makeShared(SiPixelRecHit const &hit, TrajectoryStateOnSurface const &tsos) const =0
bool isOnEdge(QualWordType qualWord) const
Pixel cluster – collection of neighboring pixels above threshold.
float probabilityXY() const
Definition: SiPixelRecHit.h:96
bool spansTwoROCs() const
virtual int dimension() const override
Definition: SiPixelRecHit.h:53
ClusterPixelRef cluster_pixel() const
float probabilityX() const
Definition: SiPixelRecHit.h:88
bool hasBadPixels(QualWordType qualWord) const
virtual float clusterProbability() const
cluster probability, overloaded by pixel rechits.
void setClusterPixelRef(ClusterPixelRef const &ref)
virtual SiPixelRecHit * clone(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
Definition: SiPixelRecHit.h:60
edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster > ClusterRef
Definition: SiPixelRecHit.h:27
unsigned int qualWord_
SiPixelRecHitQuality::QualWordType rawQualityWord() const
Definition: SiPixelRecHit.h:81
float probabilityQ() const
Definition: SiPixelRecHit.h:99
virtual RecHitPointer cloneSH() const override
Definition: SiPixelRecHit.h:45
Our base class.
Definition: SiPixelRecHit.h:23
bool hasFilledProb(QualWordType qualWord) const