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:
19 
21 
25 
26  TkPixelMeasurementDet( const GeomDet* gdet,
27  PxMeasurementConditionSet & conditionSet );
28 
29  void update(PxMeasurementDetSet &data, const detset & detSet ) {
30  data.update(index(), detSet);
31  data.setActiveThisEvent(index(), true);
32  }
33 
35  bool isEmpty(const PxMeasurementDetSet & data) const {return data.empty(index());}
36 
37  ~TkPixelMeasurementDet() override { }
38 
39  // all hits
40  RecHitContainer recHits( const TrajectoryStateOnSurface&, const MeasurementTrackerEvent & dat) const override;
41 
42  // only hits compatible with tsos
43  RecHitContainer compHits( const TrajectoryStateOnSurface&, const MeasurementTrackerEvent & dat, float xl, float yl ) const;
44 
45 
46 
47  // simple hits
49  const TrajectoryStateOnSurface& stateOnThisDet, const MeasurementEstimator&, const MeasurementTrackerEvent & data) const override {
50  assert("not implemented for Pixel yet"==nullptr);
51  }
52 
53 
54 
55  bool measurements( const TrajectoryStateOnSurface& stateOnThisDet,
56  const MeasurementEstimator& est, const MeasurementTrackerEvent & dat,
57  TempMeasurements & result) const override;
58 
59 
60  const PixelGeomDetUnit& specificGeomDet() const {return static_cast<PixelGeomDetUnit const &>(fastGeomDet());}
61 
63  buildRecHit( const SiPixelClusterRef & cluster,
64  const LocalTrajectoryParameters & ltp) const;
65 
67  void setActive(bool active) { conditionSet().setActive(index(), active); }
70  void setActiveThisEvent(PxMeasurementDetSet & data, bool active) const { data.setActiveThisEvent(index(), active); }
72  bool isActive(const MeasurementTrackerEvent & data) const override { return data.pixelData().isActive(index()); }
73 
74  bool hasBadComponents( const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent & dat ) const override ;
75 
77  void setBadRocPositions(std::vector< LocalPoint > & positions) { badRocPositions_.swap(positions); }
79  void clearBadRocPositions() { badRocPositions_.clear(); }
80 
82  return data.pixelData().getBadFEDChannelPositions(index());
83  }
84 
85  int index() const { return index_; }
86  void setIndex(int i) { index_ = i; }
87 
88 private:
89  unsigned int id_;
90  std::vector< LocalPoint > badRocPositions_;
91 
92  int index_;
94  PxMeasurementConditionSet & conditionSet() { return *theDetConditions; }
95  const PxMeasurementConditionSet & conditionSet() const { return *theDetConditions; }
96 
97  const PixelClusterParameterEstimator * cpe() const { return conditionSet().pixelCPE(); }
98 
99  public:
100 
101  inline bool accept(SiPixelClusterRefNew & r, const std::vector<bool> skipClusters) const {
102 
103  if(skipClusters.empty()) return true;
104  if (r.key()>=skipClusters.size()){
105  edm::LogError("IndexMisMatch")<<r.key()<<" is larger than: "<<skipClusters.size()<<" no skipping done";
106  return true;
107  }
108  return not skipClusters[r.key()];
109  }
110 
111 };
112 
113 #endif
bool isActive(const MeasurementTrackerEvent &data) const override
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
bool recHits(SimpleHitContainer &result, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &, const MeasurementTrackerEvent &data) const override
#define dso_hidden
std::vector< LocalPoint > badRocPositions_
const PixelClusterParameterEstimator * cpe() 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:30
key_type key() const
Accessor for product key.
Definition: Ref.h:265
std::vector< std::pair< LocalPoint, LocalPoint > > BadFEDChannelPositions
const BadFEDChannelPositions * getBadFEDChannelPositions(int i) const
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
const GeomDet & fastGeomDet() const
bool empty(int i) const
PxMeasurementConditionSet & conditionSet()
std::pair< LocalPoint, LocalError > LocalValues
edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster > SiPixelClusterRef
const PxMeasurementDetSet & pixelData() const
bool isActive(int i) const
const PxMeasurementConditionSet & conditionSet() const
bool accept(SiPixelClusterRefNew &r, const std::vector< bool > skipClusters) const
virtual bool hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &data) const =0
void update(int i, const PixelDetSet &detSet)
std::shared_ptr< TrackingRecHit const > RecHitPointer
void setEmpty(PxMeasurementDetSet &data)
PixelClusterParameterEstimator::LocalValues LocalValues
detset::const_iterator const_iterator
void update(PxMeasurementDetSet &data, const detset &detSet)
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 ...
void setActiveThisEvent(bool active)
TrackingRecHit::ConstRecHitContainer RecHitContainer
Pixel cluster – collection of neighboring pixels above threshold.
std::vector< BaseTrackerRecHit * > SimpleHitContainer
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const PixelGeomDetUnit & specificGeomDet() const
virtual bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, TempMeasurements &result) const =0
PxMeasurementConditionSet * theDetConditions
void setBadRocPositions(std::vector< LocalPoint > &positions)
Sets the list of bad ROCs, identified by the positions of their centers in the local coordinate frame...
edmNew::DetSet< SiPixelCluster > detset
bool isEmpty(const PxMeasurementDetSet &data) const
void clearBadRocPositions()
Clear the list of bad ROCs.