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 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
SiPixelRecHitQuality::Packing::probabilityQ
float probabilityQ(QualWordType qualWord) const
Definition: SiPixelRecHitQuality.h:81
SiPixelRecHitQuality.h
GeomDet
Definition: GeomDet.h:27
SiPixelRecHitQuality::Packing::hasFilledProb
bool hasFilledProb(QualWordType qualWord) const
Definition: SiPixelRecHitQuality.h:112
BaseTrackerRecHit::clusterProbability
virtual float clusterProbability() const
cluster probability, overloaded by pixel rechits.
Definition: BaseTrackerRecHit.h:107
SiPixelRecHitQuality::Packing::probabilityY
float probabilityY(QualWordType qualWord) const
Definition: SiPixelRecHitQuality.h:63
SiPixelRecHit::setClusterRef
void setClusterRef(ClusterRef const &ref)
Definition: SiPixelRecHit.h:49
pos
Definition: PixelAliasList.h:18
SiPixelRecHitQuality::Packing::isOnEdge
bool isOnEdge(QualWordType qualWord) const
Definition: SiPixelRecHitQuality.h:106
SiPixelCluster
Pixel cluster – collection of neighboring pixels above threshold.
Definition: SiPixelCluster.h:27
TrackingRecHit::RecHitPointer
std::shared_ptr< TrackingRecHit const > RecHitPointer
Definition: TrackingRecHit.h:24
SiPixelRecHitQuality::Packing::probabilityXY
float probabilityXY(QualWordType qualWord) const
Definition: SiPixelRecHitQuality.h:69
SiPixelRecHit::cluster
ClusterRef cluster() const
Definition: SiPixelRecHit.h:47
SiPixelRecHitQuality::Packing::qBin
int qBin(QualWordType qualWord) const
Definition: SiPixelRecHitQuality.h:95
SiPixelRecHit
Our base class.
Definition: SiPixelRecHit.h:23
SiPixelRecHitQuality::Packing::hasBadPixels
bool hasBadPixels(QualWordType qualWord) const
Definition: SiPixelRecHitQuality.h:108
edm::Ref
Definition: AssociativeIterator.h:58
SiPixelRecHit::hasFilledProb
bool hasFilledProb() const
Definition: SiPixelRecHit.h:104
SiPixelRecHit::probabilityQ
float probabilityQ() const
Definition: SiPixelRecHit.h:87
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
SiPixelRecHitQuality::Packing::spansTwoROCs
bool spansTwoROCs(QualWordType qualWord) const
Definition: SiPixelRecHitQuality.h:110
TkCloner
Definition: TkCloner.h:15
SiPixelRecHitQuality::thePacking
static const Packing thePacking
Definition: SiPixelRecHitQuality.h:166
SiPixelRecHit::probabilityXY
float probabilityXY() const
Definition: SiPixelRecHit.h:86
SiPixelRecHitQuality::QualWordType
unsigned int QualWordType
Definition: SiPixelRecHitQuality.h:10
SiPixelRecHit::isPixel
bool isPixel() const override
Definition: SiPixelRecHit.h:40
TrackerSingleRecHit::cluster_pixel
ClusterPixelRef cluster_pixel() const
Definition: TrackerSingleRecHit.h:47
SiPixelRecHit::rawQualityWord
SiPixelRecHitQuality::QualWordType rawQualityWord() const
Definition: SiPixelRecHit.h:78
SiPixelRecHit::~SiPixelRecHit
~SiPixelRecHit() override
Definition: SiPixelRecHit.h:29
Point3DBase< float, LocalTag >
SiPixelRecHit::SiPixelRecHit
SiPixelRecHit(const LocalPoint &pos, const LocalError &err, SiPixelRecHitQuality::QualWordType qual, GeomDet const &idet, ClusterRef const &clus)
Definition: SiPixelRecHit.h:31
SiPixelRecHit::spansTwoROCs
bool spansTwoROCs() const
Definition: SiPixelRecHit.h:101
SiPixelRecHit::canImproveWithTrack
bool canImproveWithTrack() const override
Definition: SiPixelRecHit.h:54
runTheMatrix.err
err
Definition: runTheMatrix.py:288
LocalError
Definition: LocalError.h:12
SiPixelRecHit::ClusterRef
edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster > ClusterRef
Definition: SiPixelRecHit.h:25
SiPixelRecHit::probabilityX
float probabilityX() const
Definition: SiPixelRecHit.h:82
SiPixelRecHit::dimension
int dimension() const override
Definition: SiPixelRecHit.h:51
SiPixelRecHitQuality::Packing::probabilityX
float probabilityX(QualWordType qualWord) const
Definition: SiPixelRecHitQuality.h:58
TkCloner.h
TkCloner::makeShared
TrackingRecHit::ConstRecHitPointer makeShared(TrackingRecHit::ConstRecHitPointer const &hit, TrajectoryStateOnSurface const &tsos) const
Definition: TkCloner.h:23
SiPixelRecHit::SiPixelRecHit
SiPixelRecHit()
Definition: SiPixelRecHit.h:27
SiPixelRecHit::cloneSH
RecHitPointer cloneSH() const override
Definition: SiPixelRecHit.h:44
KfComponentsHolder
Definition: KfComponentsHolder.h:13
SiPixelRecHit::qBin
int qBin() const
Definition: SiPixelRecHit.h:92
SiPixelRecHit::clone_
SiPixelRecHit * clone_(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
Definition: SiPixelRecHit.h:58
BaseTrackerRecHit::qualWord_
unsigned int qualWord_
Definition: BaseTrackerRecHit.h:130
TrackerSingleRecHit::setClusterPixelRef
void setClusterPixelRef(ClusterPixelRef const &ref)
Definition: TrackerSingleRecHit.h:64
TrackerSingleRecHit
Definition: TrackerSingleRecHit.h:11
SiPixelRecHit::probabilityY
float probabilityY() const
Definition: SiPixelRecHit.h:83
BaseTrackerRecHit::getKfComponents2D
void getKfComponents2D(KfComponentsHolder &holder) const
Definition: BaseTrackerRecHit.cc:54
TrackerSingleRecHit.h
SiPixelRecHit::cloneSH_
RecHitPointer cloneSH_(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
Definition: SiPixelRecHit.h:62
HLT_2018_cff.flags
flags
Definition: HLT_2018_cff.py:11758
SiPixelRecHit::hasBadPixels
bool hasBadPixels() const
Definition: SiPixelRecHit.h:99
SiPixelRecHit::clone
SiPixelRecHit * clone() const override
Definition: SiPixelRecHit.h:42
SiPixelRecHit::getKfComponents
void getKfComponents(KfComponentsHolder &holder) const override
Definition: SiPixelRecHit.h:52
SiPixelRecHit::isOnEdge
bool isOnEdge() const
Definition: SiPixelRecHit.h:97