CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual RecHitContainer recHits( const TrajectoryStateOnSurface&, const MeasurementTrackerEvent & dat ) const;
40 
41  // simple hits
43  const TrajectoryStateOnSurface& stateOnThisDet, const MeasurementEstimator&, const MeasurementTrackerEvent & data) const {
44  assert("not implemented for Pixel yet"==nullptr);
45  }
46 
47 
48 
49  virtual bool measurements( const TrajectoryStateOnSurface& stateOnThisDet,
50  const MeasurementEstimator& est, const MeasurementTrackerEvent & dat,
51  TempMeasurements & result) const;
52 
53 
54  const PixelGeomDetUnit& specificGeomDet() const {return static_cast<PixelGeomDetUnit const &>(fastGeomDet());}
55 
57  buildRecHit( const SiPixelClusterRef & cluster,
58  const LocalTrajectoryParameters & ltp) const;
59 
61  void setActive(bool active) { conditionSet().setActive(index(), active); }
64  void setActiveThisEvent(PxMeasurementDetSet & data, bool active) const { data.setActiveThisEvent(index(), active); }
66  bool isActive(const MeasurementTrackerEvent & data) const { return data.pixelData().isActive(index()); }
67 
68  bool hasBadComponents( const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent & dat ) const ;
69 
71  void setBadRocPositions(std::vector< LocalPoint > & positions) { badRocPositions_.swap(positions); }
73  void clearBadRocPositions() { badRocPositions_.clear(); }
74 
75  int index() const { return index_; }
76  void setIndex(int i) { index_ = i; }
77 
78 private:
79  unsigned int id_;
80  std::vector< LocalPoint > badRocPositions_;
81 
82  int index_;
84  PxMeasurementConditionSet & conditionSet() { return *theDetConditions; }
85  const PxMeasurementConditionSet & conditionSet() const { return *theDetConditions; }
86 
87  const PixelClusterParameterEstimator * cpe() const { return conditionSet().pixelCPE(); }
88 
89  public:
90 
91  inline bool accept(SiPixelClusterRefNew & r, const std::vector<bool> skipClusters) const {
92 
93  if(skipClusters.empty()) return true;
94  if (r.key()>=skipClusters.size()){
95  edm::LogError("IndexMisMatch")<<r.key()<<" is larger than: "<<skipClusters.size()<<" no skipping done";
96  return true;
97  }
98  return not skipClusters[r.key()];
99  }
100 
101 };
102 
103 #endif
#define dso_hidden
int i
Definition: DBlmapReader.cc:9
std::vector< LocalPoint > badRocPositions_
const PixelClusterParameterEstimator * cpe() const
assert(m_qm.get())
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:264
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
tuple result
Definition: query.py:137
const PxMeasurementConditionSet & conditionSet() const
bool accept(SiPixelClusterRefNew &r, const std::vector< bool > skipClusters) const
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
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
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 ...
tuple skipClusters
void setActiveThisEvent(bool active)
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
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
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.