CMS 3D CMS Logo

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:
20 
24 
25  TkPixelMeasurementDet(const GeomDet* gdet, PxMeasurementConditionSet& conditionSet);
26 
27  void update(PxMeasurementDetSet& data, const detset& detSet) {
28  data.update(index(), detSet);
29  data.setActiveThisEvent(index(), true);
30  }
31 
32  void setEmpty(PxMeasurementDetSet& data) { data.setEmpty(index()); }
33  bool isEmpty(const PxMeasurementDetSet& data) const { return data.empty(index()); }
34 
35  ~TkPixelMeasurementDet() override {}
36 
37  // all hits
38  RecHitContainer recHits(const TrajectoryStateOnSurface&, const MeasurementTrackerEvent& dat) const override;
39 
40  // only hits compatible with tsos
41  RecHitContainer compHits(const TrajectoryStateOnSurface&,
42  const MeasurementTrackerEvent& dat,
43  float xl,
44  float yl) const;
45 
46  // simple hits
48  const TrajectoryStateOnSurface& stateOnThisDet,
49  const MeasurementEstimator&,
50  const MeasurementTrackerEvent& data) const override {
51  assert("not implemented for Pixel yet" == nullptr);
52  }
53 
54  bool measurements(const TrajectoryStateOnSurface& stateOnThisDet,
55  const MeasurementEstimator& est,
56  const MeasurementTrackerEvent& dat,
57  TempMeasurements& result) const override;
58 
59  const PixelGeomDetUnit& specificGeomDet() const { return static_cast<PixelGeomDetUnit const&>(fastGeomDet()); }
60 
61  TrackingRecHit::RecHitPointer buildRecHit(const SiPixelClusterRef& cluster,
62  const LocalTrajectoryParameters& ltp) const;
63 
65  void setActive(bool active) { conditionSet().setActive(index(), active); }
68  void setActiveThisEvent(PxMeasurementDetSet& data, bool active) const { data.setActiveThisEvent(index(), active); }
70  bool isActive(const MeasurementTrackerEvent& data) const override { return data.pixelData().isActive(index()); }
71 
72  bool hasBadComponents(const TrajectoryStateOnSurface& tsos, const MeasurementTrackerEvent& dat) const override;
73 
75  void setBadRocPositions(std::vector<LocalPoint>& positions) { badRocPositions_.swap(positions); }
77  void clearBadRocPositions() { badRocPositions_.clear(); }
78 
80  const MeasurementTrackerEvent& data) const {
81  return data.pixelData().getBadFEDChannelPositions(index());
82  }
83 
84  int index() const { return index_; }
85  void setIndex(int i) { index_ = i; }
86 
87 private:
88  unsigned int id_;
89  std::vector<LocalPoint> badRocPositions_;
90 
91  int index_;
93  PxMeasurementConditionSet& conditionSet() { return *theDetConditions; }
94  const PxMeasurementConditionSet& conditionSet() const { return *theDetConditions; }
95 
96  const PixelClusterParameterEstimator* cpe() const { return conditionSet().pixelCPE(); }
97 
98 public:
99  inline bool accept(SiPixelClusterRefNew& r, const std::vector<bool> skipClusters) const {
100  if (skipClusters.empty())
101  return true;
102  if (r.key() >= skipClusters.size()) {
103  edm::LogError("IndexMisMatch") << r.key() << " is larger than: " << skipClusters.size() << " no skipping done";
104  return true;
105  }
106  return not skipClusters[r.key()];
107  }
108 };
109 
110 #endif
PxMeasurementConditionSet
Definition: TkMeasurementDetSet.h:295
TkPixelMeasurementDet::badRocPositions_
std::vector< LocalPoint > badRocPositions_
Definition: TkPixelMeasurementDet.h:89
MeasurementEstimator
Definition: MeasurementEstimator.h:19
PixelClusterParameterEstimator
Definition: PixelClusterParameterEstimator.h:15
Handle.h
mps_fire.i
i
Definition: mps_fire.py:428
MeasurementTrackerEvent.h
TkPixelMeasurementDet::setActive
void setActive(bool active)
Turn on/off the module for reconstruction, for the full run or lumi (using info from DB,...
Definition: TkPixelMeasurementDet.h:65
GeomDet
Definition: GeomDet.h:27
TkPixelMeasurementDet::setBadRocPositions
void setBadRocPositions(std::vector< LocalPoint > &positions)
Sets the list of bad ROCs, identified by the positions of their centers in the local coordinate frame...
Definition: TkPixelMeasurementDet.h:75
PixelClusterParameterEstimator.h
MeasurementDet::hasBadComponents
virtual bool hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &data) const =0
SiPixelCluster.h
TkMeasurementDetSet.h
TkPixelMeasurementDet::specificGeomDet
const PixelGeomDetUnit & specificGeomDet() const
Definition: TkPixelMeasurementDet.h:59
TkPixelMeasurementDet::accept
bool accept(SiPixelClusterRefNew &r, const std::vector< bool > skipClusters) const
Definition: TkPixelMeasurementDet.h:99
TkPixelMeasurementDet::SiPixelClusterRef
edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster > SiPixelClusterRef
Definition: TkPixelMeasurementDet.h:19
cms::cuda::assert
assert(be >=bs)
TkPixelMeasurementDet::conditionSet
PxMeasurementConditionSet & conditionSet()
Definition: TkPixelMeasurementDet.h:93
TkPixelMeasurementDet::isEmpty
bool isEmpty(const PxMeasurementDetSet &data) const
Definition: TkPixelMeasurementDet.h:33
MeasurementDet
Definition: MeasurementDet.h:16
SiPixelCluster
Pixel cluster – collection of neighboring pixels above threshold.
Definition: SiPixelCluster.h:28
MeasurementDet::measurements
virtual bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, TempMeasurements &result) const =0
TrackingRecHit::RecHitPointer
std::shared_ptr< TrackingRecHit const > RecHitPointer
Definition: TrackingRecHit.h:24
edm::Ref
Definition: AssociativeIterator.h:58
TkPixelMeasurementDet::getBadFEDChannelPositions
const PxMeasurementDetSet::BadFEDChannelPositions * getBadFEDChannelPositions(const MeasurementTrackerEvent &data) const
Definition: TkPixelMeasurementDet.h:79
TkPixelMeasurementDet::setActiveThisEvent
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 ...
Definition: TkPixelMeasurementDet.h:68
LocalTrajectoryParameters
Definition: LocalTrajectoryParameters.h:25
TkPixelMeasurementDet::update
void update(PxMeasurementDetSet &data, const detset &detSet)
Definition: TkPixelMeasurementDet.h:27
TkPixelMeasurementDet::setEmpty
void setEmpty(PxMeasurementDetSet &data)
Definition: TkPixelMeasurementDet.h:32
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
TkPixelMeasurementDet::~TkPixelMeasurementDet
~TkPixelMeasurementDet() override
Definition: TkPixelMeasurementDet.h:35
HLTSiStripMonitoring_cff.skipClusters
skipClusters
Definition: HLTSiStripMonitoring_cff.py:177
PixelGeomDetUnit
Definition: PixelGeomDetUnit.h:15
TkPixelMeasurementDet::theDetConditions
PxMeasurementConditionSet * theDetConditions
Definition: TkPixelMeasurementDet.h:92
edmNew::DetSet
Definition: DetSetNew.h:22
TkPixelMeasurementDet::recHits
bool recHits(SimpleHitContainer &result, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &, const MeasurementTrackerEvent &data) const override
Definition: TkPixelMeasurementDet.h:47
dso_hidden
#define dso_hidden
Definition: Visibility.h:12
PxMeasurementDetSet
Definition: TkMeasurementDetSet.h:323
TkPixelMeasurementDet::LocalValues
PixelClusterParameterEstimator::LocalValues LocalValues
Definition: TkPixelMeasurementDet.h:23
PxMeasurementDetSet::BadFEDChannelPositions
std::vector< std::pair< LocalPoint, LocalPoint > > BadFEDChannelPositions
Definition: TkMeasurementDetSet.h:327
MeasurementTrackerEvent
Definition: MeasurementTrackerEvent.h:16
MeasurementDet::SimpleHitContainer
std::vector< BaseTrackerRecHit * > SimpleHitContainer
Definition: MeasurementDet.h:21
TkPixelMeasurementDet::isActive
bool isActive(const MeasurementTrackerEvent &data) const override
Is this module active in reconstruction? It must be both 'setActiveThisEvent' and 'setActive'.
Definition: TkPixelMeasurementDet.h:70
DetSetVector.h
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
TkPixelMeasurementDet::cpe
const PixelClusterParameterEstimator * cpe() const
Definition: TkPixelMeasurementDet.h:96
TrackingRecHit
Definition: TrackingRecHit.h:21
alignCSCRings.r
r
Definition: alignCSCRings.py:93
TkPixelMeasurementDet::detset
edmNew::DetSet< SiPixelCluster > detset
Definition: TkPixelMeasurementDet.h:21
TkPixelMeasurementDet::setIndex
void setIndex(int i)
Definition: TkPixelMeasurementDet.h:85
TkPixelMeasurementDet::conditionSet
const PxMeasurementConditionSet & conditionSet() const
Definition: TkPixelMeasurementDet.h:94
TkPixelMeasurementDet::index_
int index_
Definition: TkPixelMeasurementDet.h:91
PixelGeomDetUnit.h
TkPixelMeasurementDet::const_iterator
detset::const_iterator const_iterator
Definition: TkPixelMeasurementDet.h:22
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
mps_fire.result
result
Definition: mps_fire.py:311
MeasurementDet::fastGeomDet
const GeomDet & fastGeomDet() const
Definition: MeasurementDet.h:80
TkPixelMeasurementDet::clearBadRocPositions
void clearBadRocPositions()
Clear the list of bad ROCs.
Definition: TkPixelMeasurementDet.h:77
TkPixelMeasurementDet::id_
unsigned int id_
Definition: TkPixelMeasurementDet.h:88
PixelClusterParameterEstimator::LocalValues
std::pair< LocalPoint, LocalError > LocalValues
Definition: PixelClusterParameterEstimator.h:19
TkPixelMeasurementDet
Definition: TkPixelMeasurementDet.h:17
TkPixelMeasurementDet::index
int index() const
Definition: TkPixelMeasurementDet.h:84
MeasurementDet.h
MeasurementDet::recHits
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
edmNew::DetSet::const_iterator
const data_type * const_iterator
Definition: DetSetNew.h:31