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  virtual ~TkPixelMeasurementDet() { }
38 
39  // all hits
40  virtual 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 {
50  assert("not implemented for Pixel yet"==nullptr);
51  }
52 
53 
54 
55  virtual bool measurements( const TrajectoryStateOnSurface& stateOnThisDet,
56  const MeasurementEstimator& est, const MeasurementTrackerEvent & dat,
57  TempMeasurements & result) const;
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 { return data.pixelData().isActive(index()); }
73 
74  bool hasBadComponents( const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent & dat ) const ;
75 
77  void setBadRocPositions(std::vector< LocalPoint > & positions) { badRocPositions_.swap(positions); }
79  void clearBadRocPositions() { badRocPositions_.clear(); }
80 
81  int index() const { return index_; }
82  void setIndex(int i) { index_ = i; }
83 
84 private:
85  unsigned int id_;
86  std::vector< LocalPoint > badRocPositions_;
87 
88  int index_;
90  PxMeasurementConditionSet & conditionSet() { return *theDetConditions; }
91  const PxMeasurementConditionSet & conditionSet() const { return *theDetConditions; }
92 
93  const PixelClusterParameterEstimator * cpe() const { return conditionSet().pixelCPE(); }
94 
95  public:
96 
97  inline bool accept(SiPixelClusterRefNew & r, const std::vector<bool> skipClusters) const {
98 
99  if(skipClusters.empty()) return true;
100  if (r.key()>=skipClusters.size()){
101  edm::LogError("IndexMisMatch")<<r.key()<<" is larger than: "<<skipClusters.size()<<" no skipping done";
102  return true;
103  }
104  return not skipClusters[r.key()];
105  }
106 
107 };
108 
109 #endif
#define dso_hidden
std::vector< LocalPoint > badRocPositions_
const PixelClusterParameterEstimator * cpe() 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
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
virtual bool recHits(SimpleHitContainer &result, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &, const MeasurementTrackerEvent &data) const
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)
bool isActive(const MeasurementTrackerEvent &data) const
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
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.