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"
11 
14 
16 public:
17 
19 
23 
24  TkPixelMeasurementDet( const GeomDet* gdet,
26 
27  void update( const detset & detSet,
29  unsigned int id ) {
30  detSet_ = detSet;
31  handle_ = h;
32  id_ = id;
33  empty = false;
34  activeThisEvent_ = true;
35  }
36 
37  void setEmpty(){empty = true; activeThisEvent_ = true; }
38 
39  virtual ~TkPixelMeasurementDet() { }
40 
41  virtual RecHitContainer recHits( const TrajectoryStateOnSurface& ) const;
42 
43  virtual bool measurements( const TrajectoryStateOnSurface& stateOnThisDet,
44  const MeasurementEstimator& est,
45  TempMeasurements & result) const;
46 
47 
48  const PixelGeomDetUnit& specificGeomDet() const {return static_cast<PixelGeomDetUnit const &>(fastGeomDet());}
49 
51  buildRecHit( const SiPixelClusterRef & cluster,
52  const LocalTrajectoryParameters & ltp) const;
53 
56  void setActive(bool active) { activeThisPeriod_ = active; activeThisEvent_ = true; if (!active) empty = true; }
59  void setActiveThisEvent(bool active) { activeThisEvent_ = active; if (!active) empty = true; }
61  bool isActive() const { return activeThisEvent_ && activeThisPeriod_; }
62 
63  bool hasBadComponents( const TrajectoryStateOnSurface &tsos ) const ;
64 
66  void setBadRocPositions(std::vector< LocalPoint > & positions) { badRocPositions_.swap(positions); }
69 private:
70 
74  std::vector< LocalPoint > badRocPositions_;
75  const std::vector<bool>* skipClusters_;
76  unsigned int id_;
77  bool empty;
79 
80  public:
81 
82  inline bool accept(SiPixelClusterRefNew & r) const {
83 
84  if(0==skipClusters_ || skipClusters_->empty()) return true;
85  if (r.key()>=skipClusters_->size()){
86  edm::LogError("IndexMisMatch")<<r.key()<<" is larger than: "<<skipClusters_->size()<<" no skipping done";
87  return true;
88  }
89  return not (*skipClusters_)[r.key()];
90  }
91 
92  void setClusterToSkip(const std::vector<bool>*skip ){
94  }
95 };
96 
97 #endif
bool isActive() const
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
tracking::TempMeasurements TempMeasurements
std::vector< LocalPoint > badRocPositions_
TransientTrackingRecHit::ConstRecHitContainer RecHitContainer
bool accept(SiPixelClusterRefNew &r) const
const std::vector< bool > * skipClusters_
void setClusterToSkip(const std::vector< bool > *skip)
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:25
TkPixelMeasurementDet(const GeomDet *gdet, const PixelClusterParameterEstimator *cpe)
std::pair< LocalPoint, LocalError > LocalValues
const GeomDet & fastGeomDet() const
edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster > SiPixelClusterRef
virtual bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, TempMeasurements &result) const
tuple result
Definition: query.py:137
void update(const detset &detSet, const edm::Handle< edmNew::DetSetVector< SiPixelCluster > > &h, unsigned int id)
PixelClusterParameterEstimator::LocalValues LocalValues
void setActiveThisEvent(bool active)
Turn on/off the module for reconstruction for one events. This per-event flag is cleared by any call ...
detset::const_iterator const_iterator
edm::Handle< edmNew::DetSetVector< SiPixelCluster > > handle_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
key_type key() const
Accessor for product key.
Definition: Ref.h:266
bool hasBadComponents(const TrajectoryStateOnSurface &tsos) const
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &) const
TransientTrackingRecHit::RecHitPointer buildRecHit(const SiPixelClusterRef &cluster, const LocalTrajectoryParameters &ltp) const
Pixel cluster – collection of neighboring pixels above threshold.
const PixelGeomDetUnit & specificGeomDet() 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...
edmNew::DetSet< SiPixelCluster > detset
const PixelClusterParameterEstimator * theCPE
void clearBadRocPositions()
Clear the list of bad ROCs.