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,
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); }
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_;
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
int i
Definition: DBlmapReader.cc:9
virtual bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &dat, TempMeasurements &result) const
tracking::TempMeasurements TempMeasurements
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...
bool hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &dat) const
data_type const * const_iterator
Definition: DetSetNew.h:30
TrackingRecHit::RecHitPointer buildRecHit(const SiPixelClusterRef &cluster, const LocalTrajectoryParameters &ltp) const
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
TkPixelMeasurementDet(const GeomDet *gdet, PxMeasurementConditionSet &conditionSet)
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
void setEmpty(PxMeasurementDetSet &data)
PixelClusterParameterEstimator::LocalValues LocalValues
detset::const_iterator const_iterator
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &dat) const
void update(PxMeasurementDetSet &data, const detset &detSet)
key_type key() const
Accessor for product key.
Definition: Ref.h:266
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
PxMeasurementConditionSet * theDetConditions
const PixelClusterParameterEstimator * pixelCPE() 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...
void setActive(int i, bool active)
Turn on/off the module for reconstruction, for the full run or lumi (using info from DB...
edmNew::DetSet< SiPixelCluster > detset
bool isEmpty(const PxMeasurementDetSet &data) const
void clearBadRocPositions()
Clear the list of bad ROCs.