CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MeasurementDetWithData.h
Go to the documentation of this file.
1 #ifndef MeasurementDetWithData_H
2 #define MeasurementDetWithData_H
3 
5 
7 public:
9  det_(0), data_(0) {}
10 
12  det_(&det), data_(&data) {}
13 
14  bool isValid() const { return det_ != 0; }
15  bool isNull() const { return det_ == 0; }
16 
17  const MeasurementDet & mdet() const { return *det_; }
18 
19  // duplicate interface of MeasurementDet
22 
24 
26  return mdet().recHits(tsos, data());
27  }
28 
29  // use a MeasurementEstimator to filter the hits (same algo as below..)
30  // default as above
31  bool recHits( const TrajectoryStateOnSurface& stateOnThisDet, const MeasurementEstimator & me, RecHitContainer & result, std::vector<float> & out) const {
32  return mdet().recHits(stateOnThisDet, me, data(), result, out);
33  }
34 
36  const TrajectoryStateOnSurface& stateOnThisDet, const MeasurementEstimator& me) const{
37  return mdet().recHits(result,stateOnThisDet, me, data());
38  }
39 
46  std::vector<TrajectoryMeasurement>
47  fastMeasurements( const TrajectoryStateOnSurface& stateOnThisDet,
48  const TrajectoryStateOnSurface& tsos2,
49  const Propagator& prop,
50  const MeasurementEstimator& est) const {
51  return mdet().fastMeasurements(stateOnThisDet, tsos2, prop, est, data());
52  }
53 
54  // return false if missing (if inactive is true and one hit)
55  bool measurements( const TrajectoryStateOnSurface& stateOnThisDet,
56  const MeasurementEstimator& est,
57  TempMeasurements & result) const {
58  return mdet().measurements(stateOnThisDet, est, data(), result);
59  }
60 
61 
62  // forward methods which don't actually depend on data
63  const GeomDet& fastGeomDet() const { return mdet().fastGeomDet(); }
64  const GeomDet& geomDet() const { return mdet().geomDet(); }
65  const Surface& surface() const { return mdet().geomDet().surface(); }
66  const Surface::PositionType& position() const { return mdet().geomDet().position(); }
67 
68  // these instead potentially depend on the data
69  bool isActive() const { return mdet().isActive(data()); }
70  bool hasBadComponents(const TrajectoryStateOnSurface &tsos) const { return mdet().hasBadComponents(tsos, data()); }
71 
72  private:
73  const MeasurementTrackerEvent & data() const { return *data_; }
76 };
77 
78 #endif
bool hasBadComponents(const TrajectoryStateOnSurface &tsos) const
MeasurementDet::RecHitContainer RecHitContainer
const Surface::PositionType & position() const
virtual const GeomDet & geomDet() const
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:40
const GeomDet & fastGeomDet() const
const Surface & surface() const
tuple result
Definition: mps_fire.py:95
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:46
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_
const MeasurementDet & mdet() const
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
MeasurementDet::SimpleHitContainer SimpleHitContainer
const GeomDet & geomDet() const
TrackingRecHit::ConstRecHitContainer RecHitContainer
virtual bool isActive(const MeasurementTrackerEvent &data) 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
virtual bool hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &data) const =0
virtual bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, TempMeasurements &result) const =0