CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MeasurementDet.h
Go to the documentation of this file.
1 #ifndef MeasurementDet_H
2 #define MeasurementDet_H
3 
5 
9 
11 
13 class Propagator;
16 
18 public:
21 
22  MeasurementDet( const GeomDet* gdet) : theGeomDet(gdet) {}
23 
24  virtual RecHitContainer recHits( const TrajectoryStateOnSurface&, const MeasurementTrackerEvent &) const = 0;
25 
26  // use a MeasurementEstimator to filter the hits (same algo as below..)
27  // default as above
28  virtual bool recHits( const TrajectoryStateOnSurface& stateOnThisDet, const MeasurementEstimator&, const MeasurementTrackerEvent & data,
29  RecHitContainer & result, std::vector<float> &) const {
30  result = recHits(stateOnThisDet, data);
31  return !result.empty();
32  }
33 
40  std::vector<TrajectoryMeasurement>
41  fastMeasurements( const TrajectoryStateOnSurface& stateOnThisDet,
43  const Propagator&,
44  const MeasurementEstimator& est,
45  const MeasurementTrackerEvent & data) const {
46 
47  TempMeasurements tmps;
48  measurements(stateOnThisDet, est, data, tmps);
49  std::vector<TrajectoryMeasurement> result;
50  result.reserve(tmps.size());
51  int index[tmps.size()]; tmps.sortIndex(index);
52  for (std::size_t i=0; i!=tmps.size(); ++i) {
53  auto j=index[i];
54  result.emplace_back(stateOnThisDet,std::move(tmps.hits[j]),tmps.distances[j]);
55  }
56  return result;
57  }
58 
59  // return false if missing ( if inactive is true and one hit)
60  virtual bool measurements( const TrajectoryStateOnSurface& stateOnThisDet,
61  const MeasurementEstimator& est,
63  TempMeasurements & result) const =0;
64 
65 
66  const GeomDet& fastGeomDet() const { return *theGeomDet;}
67  virtual const GeomDet& geomDet() const { return *theGeomDet;}
68 
69  const Surface& surface() const {return geomDet().surface();}
70 
71  const Surface::PositionType& position() const {return geomDet().position();}
72 
73  virtual bool isActive(const MeasurementTrackerEvent & data) const=0;
74  virtual bool hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent & data) const=0;
75 
76  private:
77 
79 
80 };
81 
82 
83 #endif
const GeomDet * theGeomDet
int i
Definition: DBlmapReader.cc:9
tracking::TempMeasurements TempMeasurements
std::size_t size() const
MeasurementDet(const GeomDet *gdet)
TransientTrackingRecHit::ConstRecHitContainer RecHitContainer
virtual const GeomDet & geomDet() const
const Surface & surface() const
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
const GeomDet & fastGeomDet() const
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:41
tuple result
Definition: query.py:137
int j
Definition: DBlmapReader.cc:9
const Surface::PositionType & position() const
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
std::vector< ConstRecHitPointer > ConstRecHitContainer
void sortIndex(int *index) const
virtual bool recHits(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &, const MeasurementTrackerEvent &data, RecHitContainer &result, std::vector< float > &) const
virtual bool isActive(const MeasurementTrackerEvent &data) const =0
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
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