CMS 3D CMS Logo

MeasurementDet.h
Go to the documentation of this file.
1 #ifndef MeasurementDet_H
2 #define MeasurementDet_H
3 
5 
10 
12 class Propagator;
15 
17 public:
20 
21  using SimpleHitContainer = std::vector<BaseTrackerRecHit*>;
22 
23  MeasurementDet(const GeomDet* gdet)
24  : theGeomDet(gdet),
26  theInactiveHit(std::make_shared<InvalidTrackingRecHit>(fastGeomDet(), TrackingRecHit::inactive)) {}
27 
28  virtual ~MeasurementDet() = default;
30 
31  // use a MeasurementEstimator to filter the hits (same algo as below..)
32  // default as above
33  virtual bool recHits(const TrajectoryStateOnSurface& stateOnThisDet,
34  const MeasurementEstimator&,
37  std::vector<float>&) const {
38  result = recHits(stateOnThisDet, data);
39  return !result.empty();
40  }
41 
42  // default for non-tracker dets...
44  const TrajectoryStateOnSurface& stateOnThisDet,
45  const MeasurementEstimator&,
46  const MeasurementTrackerEvent& data) const {
47  return false;
48  }
49 
56  std::vector<TrajectoryMeasurement> fastMeasurements(const TrajectoryStateOnSurface& stateOnThisDet,
58  const Propagator&,
59  const MeasurementEstimator& est,
60  const MeasurementTrackerEvent& data) const {
61  TempMeasurements tmps;
62  measurements(stateOnThisDet, est, data, tmps);
63  std::vector<TrajectoryMeasurement> result;
64  result.reserve(tmps.size());
65  int index[tmps.size()];
66  tmps.sortIndex(index);
67  for (std::size_t i = 0; i != tmps.size(); ++i) {
68  auto j = index[i];
69  result.emplace_back(stateOnThisDet, std::move(tmps.hits[j]), tmps.distances[j]);
70  }
71  return result;
72  }
73 
74  // return false if missing ( if inactive is true and one hit)
75  virtual bool measurements(const TrajectoryStateOnSurface& stateOnThisDet,
76  const MeasurementEstimator& est,
78  TempMeasurements& result) const = 0;
79 
80  const GeomDet& fastGeomDet() const { return *theGeomDet; }
81  virtual const GeomDet& geomDet() const { return *theGeomDet; }
82 
83  const Surface& surface() const { return geomDet().surface(); }
84 
85  const Surface::PositionType& position() const { return geomDet().position(); }
86 
87  virtual bool isActive(const MeasurementTrackerEvent& data) const = 0;
88  virtual bool hasBadComponents(const TrajectoryStateOnSurface& tsos, const MeasurementTrackerEvent& data) const = 0;
89 
90 private:
92 
93 protected:
96 };
97 
98 #endif
GeomDet::position
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
MeasurementEstimator
Definition: MeasurementEstimator.h:19
mps_fire.i
i
Definition: mps_fire.py:428
MeasurementDet::fastMeasurements
std::vector< TrajectoryMeasurement > fastMeasurements(const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &, const Propagator &, const MeasurementEstimator &est, const MeasurementTrackerEvent &data) const
Definition: MeasurementDet.h:56
GeomDet
Definition: GeomDet.h:27
InvalidTrackingRecHit
Definition: InvalidTrackingRecHit.h:8
MeasurementDet::RecHitContainer
TrackingRecHit::ConstRecHitContainer RecHitContainer
Definition: MeasurementDet.h:19
MeasurementDet::MeasurementDet
MeasurementDet(const GeomDet *gdet)
Definition: MeasurementDet.h:23
tracking::TempMeasurements::size
std::size_t size() const
Definition: TempMeasurements.h:20
MeasurementDet::hasBadComponents
virtual bool hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &data) const =0
Surface
Definition: Surface.h:36
TrajectoryMeasurement.h
MeasurementDet
Definition: MeasurementDet.h:16
MeasurementDet::measurements
virtual bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, TempMeasurements &result) const =0
tracking::TempMeasurements
Definition: TempMeasurements.h:10
MeasurementDet::recHits
virtual bool recHits(SimpleHitContainer &result, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &, const MeasurementTrackerEvent &data) const
Definition: MeasurementDet.h:43
MeasurementDet::position
const Surface::PositionType & position() const
Definition: MeasurementDet.h:85
Propagator
Definition: Propagator.h:44
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
MeasurementDet::~MeasurementDet
virtual ~MeasurementDet()=default
Point3DBase< float, GlobalTag >
MeasurementDet::surface
const Surface & surface() const
Definition: MeasurementDet.h:83
tracking::TempMeasurements::sortIndex
void sortIndex(int *index) const
Definition: TempMeasurements.h:22
MeasurementTrackerEvent
Definition: MeasurementTrackerEvent.h:16
MeasurementDet::isActive
virtual bool isActive(const MeasurementTrackerEvent &data) const =0
TrackingRecHit::ConstRecHitContainer
std::vector< ConstRecHitPointer > ConstRecHitContainer
Definition: TrackingRecHit.h:32
MeasurementDet::recHits
virtual bool recHits(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &, const MeasurementTrackerEvent &data, RecHitContainer &result, std::vector< float > &) const
Definition: MeasurementDet.h:33
MeasurementDet::SimpleHitContainer
std::vector< BaseTrackerRecHit * > SimpleHitContainer
Definition: MeasurementDet.h:21
TrackingRecHit::ConstRecHitPointer
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
Definition: TrackingRecHit.h:25
TrackingRecHit
Definition: TrackingRecHit.h:21
BaseTrackerRecHit.h
GeomDet.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
MeasurementDet::theInactiveHit
TrackingRecHit::ConstRecHitPointer theInactiveHit
Definition: MeasurementDet.h:95
MeasurementDet::theGeomDet
const GeomDet * theGeomDet
Definition: MeasurementDet.h:91
TempMeasurements.h
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
mps_fire.result
result
Definition: mps_fire.py:311
combine.missing
missing
Definition: combine.py:5
InvalidTrackingRecHit.h
MeasurementDet::TempMeasurements
tracking::TempMeasurements TempMeasurements
Definition: MeasurementDet.h:18
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
MeasurementDet::fastGeomDet
const GeomDet & fastGeomDet() const
Definition: MeasurementDet.h:80
tracking::TempMeasurements::distances
Distances distances
Definition: TempMeasurements.h:41
MeasurementDet::theMissingHit
TrackingRecHit::ConstRecHitPointer theMissingHit
Definition: MeasurementDet.h:94
MeasurementDet::recHits
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
tracking::TempMeasurements::hits
RecHitContainer hits
Definition: TempMeasurements.h:40
MeasurementDet::geomDet
virtual const GeomDet & geomDet() const
Definition: MeasurementDet.h:81