CMS 3D CMS Logo

MeasurementDetWithData.h
Go to the documentation of this file.
1 #ifndef MeasurementDetWithData_H
2 #define MeasurementDetWithData_H
3 
5 
7 public:
9 
11 
12  bool isValid() const { return det_ != nullptr; }
13  bool isNull() const { return det_ == nullptr; }
14 
15  const MeasurementDet& mdet() const { return *det_; }
16 
17  // duplicate interface of MeasurementDet
20 
22 
23  RecHitContainer recHits(const TrajectoryStateOnSurface& tsos) const { return mdet().recHits(tsos, data()); }
24 
25  // use a MeasurementEstimator to filter the hits (same algo as below..)
26  // default as above
27  bool recHits(const TrajectoryStateOnSurface& stateOnThisDet,
28  const MeasurementEstimator& me,
29  RecHitContainer& result,
30  std::vector<float>& out) const {
31  return mdet().recHits(stateOnThisDet, me, data(), result, out);
32  }
33 
35  const TrajectoryStateOnSurface& stateOnThisDet,
36  const MeasurementEstimator& me) const {
37  return mdet().recHits(result, stateOnThisDet, me, data());
38  }
39 
46  std::vector<TrajectoryMeasurement> fastMeasurements(const TrajectoryStateOnSurface& stateOnThisDet,
47  const TrajectoryStateOnSurface& tsos2,
48  const Propagator& prop,
49  const MeasurementEstimator& est) const {
50  return mdet().fastMeasurements(stateOnThisDet, tsos2, prop, est, data());
51  }
52 
53  // return false if missing (if inactive is true and one hit)
54  bool measurements(const TrajectoryStateOnSurface& stateOnThisDet,
55  const MeasurementEstimator& est,
56  TempMeasurements& result) const {
57  return mdet().measurements(stateOnThisDet, est, data(), result);
58  }
59 
60  // forward methods which don't actually depend on data
61  const GeomDet& fastGeomDet() const { return mdet().fastGeomDet(); }
62  const GeomDet& geomDet() const { return mdet().geomDet(); }
63  const Surface& surface() const { return mdet().geomDet().surface(); }
64  const Surface::PositionType& position() const { return mdet().geomDet().position(); }
65 
66  // these instead potentially depend on the data
67  bool isActive() const { return mdet().isActive(data()); }
68  bool hasBadComponents(const TrajectoryStateOnSurface& tsos) const { return mdet().hasBadComponents(tsos, data()); }
69 
70 private:
71  const MeasurementTrackerEvent& data() const { return *data_; }
74 };
75 
76 #endif
bool hasBadComponents(const TrajectoryStateOnSurface &tsos) const
MeasurementDet::RecHitContainer RecHitContainer
const Surface::PositionType & position() const
#define nullptr
virtual const GeomDet & geomDet() const
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
const GeomDet & fastGeomDet() const
const Surface & surface() const
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
bool recHits(SimpleHitContainer &result, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &me) const
const GeomDet & fastGeomDet() const
RecHitContainer recHits(const TrajectoryStateOnSurface &tsos) const
const MeasurementDet * det_
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
MeasurementDet::TempMeasurements TempMeasurements
const MeasurementTrackerEvent & data() const
MeasurementDetWithData(const MeasurementDet &det, const MeasurementTrackerEvent &data)
std::vector< TrajectoryMeasurement > fastMeasurements(const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &tsos2, const Propagator &prop, const MeasurementEstimator &est) const
bool recHits(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &me, RecHitContainer &result, std::vector< float > &out) const
const MeasurementTrackerEvent * data_
virtual bool hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &data) const =0
virtual bool isActive(const MeasurementTrackerEvent &data) const =0
const MeasurementDet & mdet() const
MeasurementDet::SimpleHitContainer SimpleHitContainer
const GeomDet & geomDet() const
TrackingRecHit::ConstRecHitContainer RecHitContainer
virtual bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, TempMeasurements &result) const =0
std::vector< BaseTrackerRecHit * > SimpleHitContainer
bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, TempMeasurements &result) const
std::vector< TrajectoryMeasurement > fastMeasurements(const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &, const Propagator &, const MeasurementEstimator &est, const MeasurementTrackerEvent &data) const