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 
10 
12 
14 class Propagator;
17 
19 public:
22 
23  using SimpleHitContainer=std::vector<BaseTrackerRecHit *>;
24 
25 
26  MeasurementDet( const GeomDet* gdet) :
27  theGeomDet(gdet),
29  theInactiveHit(std::make_shared<InvalidTrackingRecHit>(fastGeomDet(),TrackingRecHit::inactive)){}
30 
31  virtual RecHitContainer recHits( const TrajectoryStateOnSurface&, const MeasurementTrackerEvent &) const = 0;
32 
33  // use a MeasurementEstimator to filter the hits (same algo as below..)
34  // default as above
35  virtual bool recHits( const TrajectoryStateOnSurface& stateOnThisDet, const MeasurementEstimator&, const MeasurementTrackerEvent & data,
36  RecHitContainer & result, std::vector<float> &) const {
37  result = recHits(stateOnThisDet, data);
38  return !result.empty();
39  }
40 
41  // default for non-tracker dets...
43  const TrajectoryStateOnSurface& stateOnThisDet, const MeasurementEstimator&, const MeasurementTrackerEvent & data) const { return false;}
44 
51  std::vector<TrajectoryMeasurement>
52  fastMeasurements( const TrajectoryStateOnSurface& stateOnThisDet,
54  const Propagator&,
55  const MeasurementEstimator& est,
56  const MeasurementTrackerEvent & data) const {
57 
58  TempMeasurements tmps;
59  measurements(stateOnThisDet, est, data, tmps);
60  std::vector<TrajectoryMeasurement> result;
61  result.reserve(tmps.size());
62  int index[tmps.size()]; tmps.sortIndex(index);
63  for (std::size_t i=0; i!=tmps.size(); ++i) {
64  auto j=index[i];
65  result.emplace_back(stateOnThisDet,std::move(tmps.hits[j]),tmps.distances[j]);
66  }
67  return result;
68  }
69 
70  // return false if missing ( if inactive is true and one hit)
71  virtual bool measurements( const TrajectoryStateOnSurface& stateOnThisDet,
72  const MeasurementEstimator& est,
74  TempMeasurements & result) const =0;
75 
76 
77  const GeomDet& fastGeomDet() const { return *theGeomDet;}
78  virtual const GeomDet& geomDet() const { return *theGeomDet;}
79 
80  const Surface& surface() const {return geomDet().surface();}
81 
82  const Surface::PositionType& position() const {return geomDet().position();}
83 
84  virtual bool isActive(const MeasurementTrackerEvent & data) const=0;
85  virtual bool hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent & data) const=0;
86 
87  private:
88 
90 protected:
93 
94 };
95 
96 
97 #endif
const GeomDet * theGeomDet
dictionary missing
Definition: combine.py:4
int i
Definition: DBlmapReader.cc:9
tracking::TempMeasurements TempMeasurements
std::size_t size() const
MeasurementDet(const GeomDet *gdet)
virtual const GeomDet & geomDet() const
const Surface & surface() const
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:40
TrackingRecHit::ConstRecHitPointer theMissingHit
const GeomDet & fastGeomDet() const
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:46
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
tuple result
Definition: query.py:137
def move
Definition: eostools.py:510
int j
Definition: DBlmapReader.cc:9
const Surface::PositionType & position() const
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
std::vector< ConstRecHitPointer > ConstRecHitContainer
virtual bool recHits(SimpleHitContainer &result, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &, const MeasurementTrackerEvent &data) const
TrackingRecHit::ConstRecHitPointer theInactiveHit
void sortIndex(int *index) const
virtual bool recHits(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &, const MeasurementTrackerEvent &data, RecHitContainer &result, std::vector< float > &) const
TrackingRecHit::ConstRecHitContainer RecHitContainer
virtual bool isActive(const MeasurementTrackerEvent &data) const =0
std::vector< BaseTrackerRecHit * > SimpleHitContainer
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