CMS 3D CMS Logo

TkPixelMeasurementDet.h
Go to the documentation of this file.
1 #ifndef TkPixelMeasurementDet_H
2 #define TkPixelMeasurementDet_H
3 
6 //#include "DataFormats/SiPixelCluster/interface/SiPixelClusterFwd.h"
13 
14 class TrackingRecHit;
16 
18 public:
20 
24 
25  TkPixelMeasurementDet(const GeomDet* gdet, PxMeasurementConditionSet& conditionSet);
26 
27  void update(PxMeasurementDetSet& data, const detset& detSet) {
28  data.update(index(), detSet);
29  data.setActiveThisEvent(index(), true);
30  }
31 
32  void setEmpty(PxMeasurementDetSet& data) { data.setEmpty(index()); }
33  bool isEmpty(const PxMeasurementDetSet& data) const { return data.empty(index()); }
34 
35  ~TkPixelMeasurementDet() override {}
36 
37  // all hits
38  RecHitContainer recHits(const TrajectoryStateOnSurface&, const MeasurementTrackerEvent& dat) const override;
39 
40  // only hits compatible with tsos
41  RecHitContainer compHits(const TrajectoryStateOnSurface&,
42  const MeasurementTrackerEvent& dat,
43  float xl,
44  float yl) const;
45 
46  // simple hits
48  const TrajectoryStateOnSurface& stateOnThisDet,
49  const MeasurementEstimator&,
50  const MeasurementTrackerEvent& data) const override {
51  assert("not implemented for Pixel yet" == nullptr);
52  }
53 
54  bool measurements(const TrajectoryStateOnSurface& stateOnThisDet,
55  const MeasurementEstimator& est,
56  const MeasurementTrackerEvent& dat,
57  TempMeasurements& result) const override;
58 
59  const PixelGeomDetUnit& specificGeomDet() const { return static_cast<PixelGeomDetUnit const&>(fastGeomDet()); }
60 
61  TrackingRecHit::RecHitPointer buildRecHit(const SiPixelClusterRef& cluster,
62  const LocalTrajectoryParameters& ltp) const;
63 
65  void setActive(bool active) { conditionSet().setActive(index(), active); }
68  void setActiveThisEvent(PxMeasurementDetSet& data, bool active) const { data.setActiveThisEvent(index(), active); }
70  bool isActive(const MeasurementTrackerEvent& data) const override { return data.pixelData().isActive(index()); }
71 
72  bool hasBadComponents(const TrajectoryStateOnSurface& tsos, const MeasurementTrackerEvent& dat) const override;
73 
75  void setBadRocPositions(std::vector<LocalPoint>& positions) { badRocPositions_.swap(positions); }
77  void clearBadRocPositions() { badRocPositions_.clear(); }
78 
80  const MeasurementTrackerEvent& data) const {
81  return data.pixelData().getBadFEDChannelPositions(index());
82  }
83 
84  int index() const { return index_; }
85  void setIndex(int i) { index_ = i; }
86 
87 private:
88  unsigned int id_;
89  std::vector<LocalPoint> badRocPositions_;
90 
91  int index_;
93  PxMeasurementConditionSet& conditionSet() { return *theDetConditions; }
94  const PxMeasurementConditionSet& conditionSet() const { return *theDetConditions; }
95 
96  const PixelClusterParameterEstimator* cpe() const { return conditionSet().pixelCPE(); }
97 
98 public:
99  inline bool accept(SiPixelClusterRefNew& r, const std::vector<bool> skipClusters) const {
100  if (skipClusters.empty())
101  return true;
102  if (r.key() >= skipClusters.size()) {
103  edm::LogError("IndexMisMatch") << r.key() << " is larger than: " << skipClusters.size() << " no skipping done";
104  return true;
105  }
106  return not skipClusters[r.key()];
107  }
108 };
109 
110 #endif
std::vector< std::pair< LocalPoint, LocalPoint > > BadFEDChannelPositions
const PixelClusterParameterEstimator * cpe() const
bool isEmpty(const PxMeasurementDetSet &data) const
bool isActive(const MeasurementTrackerEvent &data) const override
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
std::vector< LocalPoint > badRocPositions_
const PixelGeomDetUnit & specificGeomDet() const
const PxMeasurementDetSet::BadFEDChannelPositions * getBadFEDChannelPositions(const MeasurementTrackerEvent &data) const
void setActive(bool active)
Turn on/off the module for reconstruction, for the full run or lumi (using info from DB...
data_type const * const_iterator
Definition: DetSetNew.h:31
Log< level::Error, false > LogError
assert(be >=bs)
PxMeasurementConditionSet & conditionSet()
edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster > SiPixelClusterRef
bool accept(SiPixelClusterRefNew &r, const std::vector< bool > skipClusters) const
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
void setEmpty(PxMeasurementDetSet &data)
#define dso_hidden
Definition: Visibility.h:12
PixelClusterParameterEstimator::LocalValues LocalValues
detset::const_iterator const_iterator
void update(PxMeasurementDetSet &data, const detset &detSet)
const GeomDet & fastGeomDet() const
void setActiveThisEvent(PxMeasurementDetSet &data, bool active) const
Turn on/off the module for reconstruction for one events. This per-event flag is cleared by any call ...
Pixel cluster – collection of neighboring pixels above threshold.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
PxMeasurementConditionSet * theDetConditions
const PxMeasurementConditionSet & conditionSet() const
void setBadRocPositions(std::vector< LocalPoint > &positions)
Sets the list of bad ROCs, identified by the positions of their centers in the local coordinate frame...
std::vector< BaseTrackerRecHit * > SimpleHitContainer
edmNew::DetSet< SiPixelCluster > detset
bool recHits(SimpleHitContainer &result, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &, const MeasurementTrackerEvent &data) const override
std::pair< LocalPoint, LocalError > LocalValues
virtual bool hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &data) const =0
virtual bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, TempMeasurements &result) const =0
void clearBadRocPositions()
Clear the list of bad ROCs.