CMS 3D CMS Logo

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