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 std::vector<TrajectoryMeasurement>
44  fastMeasurements( const TrajectoryStateOnSurface& stateOnThisDet,
45  const TrajectoryStateOnSurface& startingState,
46  const Propagator&,
47  const MeasurementEstimator&) const;
48 
49  const PixelGeomDetUnit& specificGeomDet() const {return static_cast<PixelGeomDetUnit const &>(fastGeomDet());}
50 
52  buildRecHit( const SiPixelClusterRef & cluster,
53  const LocalTrajectoryParameters & ltp) const;
54 
57  void setActive(bool active) { activeThisPeriod_ = active; activeThisEvent_ = true; if (!active) empty = true; }
60  void setActiveThisEvent(bool active) { activeThisEvent_ = active; if (!active) empty = true; }
62  bool isActive() const { return activeThisEvent_ && activeThisPeriod_; }
63 
64  bool hasBadComponents( const TrajectoryStateOnSurface &tsos ) const ;
65 
67  void setBadRocPositions(std::vector< LocalPoint > & positions) { badRocPositions_.swap(positions); }
70 private:
71 
75  std::vector< LocalPoint > badRocPositions_;
76  const std::vector<bool>* skipClusters_;
77  unsigned int id_;
78  bool empty;
80 
81  public:
82 
83  inline bool accept(SiPixelClusterRefNew & r) const {
84 
85  if(0==skipClusters_ || 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  void setClusterToSkip(const std::vector<bool>*skip ){
95  }
96 };
97 
98 #endif
bool isActive() const
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
virtual std::vector< TrajectoryMeasurement > fastMeasurements(const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &startingState, const Propagator &, const MeasurementEstimator &) const
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
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.