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  return mdet().recHits(tsos, data());
25  }
26 
27  // use a MeasurementEstimator to filter the hits (same algo as below..)
28  // default as above
29  bool recHits( const TrajectoryStateOnSurface& stateOnThisDet, const MeasurementEstimator & me, RecHitContainer & result, std::vector<float> & out) const {
30  return mdet().recHits(stateOnThisDet, me, data(), result, out);
31  }
32 
39  std::vector<TrajectoryMeasurement>
40  fastMeasurements( const TrajectoryStateOnSurface& stateOnThisDet,
41  const TrajectoryStateOnSurface& tsos2,
42  const Propagator& prop,
43  const MeasurementEstimator& est) const {
44  return mdet().fastMeasurements(stateOnThisDet, tsos2, prop, est, data());
45  }
46 
47  // return false if missing (if inactive is true and one hit)
48  bool measurements( const TrajectoryStateOnSurface& stateOnThisDet,
49  const MeasurementEstimator& est,
50  TempMeasurements & result) const {
51  return mdet().measurements(stateOnThisDet, est, data(), result);
52  }
53 
54 
55  // forward methods which don't actually depend on data
56  const GeomDet& fastGeomDet() const { return mdet().fastGeomDet(); }
57  const GeomDet& geomDet() const { return mdet().geomDet(); }
58  const Surface& surface() const { return mdet().geomDet().surface(); }
59  const Surface::PositionType& position() const { return mdet().geomDet().position(); }
60 
61  // these instead potentially depend on the data
62  bool isActive() const { return mdet().isActive(data()); }
63  bool hasBadComponents(const TrajectoryStateOnSurface &tsos) const { return mdet().hasBadComponents(tsos, data()); }
64 
65  private:
66  const MeasurementTrackerEvent & data() const { return *data_; }
69 };
70 
71 #endif
bool hasBadComponents(const TrajectoryStateOnSurface &tsos) const
MeasurementDet::RecHitContainer RecHitContainer
const Surface::PositionType & position() const
TransientTrackingRecHit::ConstRecHitContainer RecHitContainer
virtual const GeomDet & geomDet() const
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
const GeomDet & fastGeomDet() const
const Surface & surface() 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:41
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_
tuple result
Definition: query.py:137
const MeasurementDet & mdet() const
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
tuple out
Definition: dbtoconf.py:99
const GeomDet & geomDet() const
virtual bool isActive(const MeasurementTrackerEvent &data) const =0
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