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 
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  virtual bool measurements( const TrajectoryStateOnSurface& stateOnThisDet,
42  const MeasurementEstimator& est, const MeasurementTrackerEvent & dat,
43  TempMeasurements & result) const;
44 
45 
46  const PixelGeomDetUnit& specificGeomDet() const {return static_cast<PixelGeomDetUnit const &>(fastGeomDet());}
47 
49  buildRecHit( const SiPixelClusterRef & cluster,
50  const LocalTrajectoryParameters & ltp) const;
51 
53  void setActive(bool active) { conditionSet().setActive(index(), active); }
56  void setActiveThisEvent(PxMeasurementDetSet & data, bool active) const { data.setActiveThisEvent(index(), active); }
58  bool isActive(const MeasurementTrackerEvent & data) const { return data.pixelData().isActive(index()); }
59 
60  bool hasBadComponents( const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent & dat ) const ;
61 
63  void setBadRocPositions(std::vector< LocalPoint > & positions) { badRocPositions_.swap(positions); }
66 
67  int index() const { return index_; }
68  void setIndex(int i) { index_ = i; }
69 
70 private:
71  unsigned int id_;
72  std::vector< LocalPoint > badRocPositions_;
73 
74  int index_;
78 
79  const PixelClusterParameterEstimator * cpe() const { return conditionSet().pixelCPE(); }
80 
81  public:
82 
83  inline bool accept(SiPixelClusterRefNew & r, const std::vector<bool> skipClusters) const {
84 
85  if(skipClusters.empty()) return true;
86  if (r.key()>=skipClusters.size()){
87  edm::LogError("IndexMisMatch")<<r.key()<<" is larger than: "<<skipClusters.size()<<" no skipping done";
88  return true;
89  }
90  return not skipClusters[r.key()];
91  }
92 
93 };
94 
95 #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
TransientTrackingRecHit::ConstRecHitContainer RecHitContainer
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
std::pair< LocalPoint, LocalError > LocalValues
const GeomDet & fastGeomDet() const
bool empty(int i) const
PxMeasurementConditionSet & conditionSet()
edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster > SiPixelClusterRef
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;...
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 ...
TransientTrackingRecHit::RecHitPointer buildRecHit(const SiPixelClusterRef &cluster, const LocalTrajectoryParameters &ltp) const
void setActiveThisEvent(bool active)
Pixel cluster – collection of neighboring pixels above threshold.
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.