26 inline void addInvalidMeas(std::vector<TrajectoryMeasurement>&
result,
43 std::vector<DetWithState>
const& compatDets,
47 std::vector<TrajectoryMeasurement>
result;
52 for (
auto const& ds : compatDets) {
59 for (std::size_t
i = 0;
i != tmps.
size(); ++
i)
73 addInvalidMeas(
result,
result.front().predictedState(), *(
result.front().recHit()->det()), layer);
76 addInvalidMeas(
result, compatDets.front().second, *(compatDets.front().first), layer);
82 void addInvalidMeas(vector<TrajectoryMeasurement>& measVec,
const DetGroup&
group,
const DetLayer& layer) {
83 if (!measVec.empty()) {
85 auto const& ts = measVec.front().predictedState();
86 auto toll = measVec.front().recHitR().det()->surface().bounds().significanceInside(
87 ts.localPosition(), ts.localError().positionError());
89 measVec.front().predictedState(),
93 }
else if (!
group.empty()) {
95 auto const& ts =
group.front().trajectoryState();
96 auto toll =
group.front().det()->surface().bounds().significanceInside(ts.localPosition(),
97 ts.localError().positionError());
98 measVec.emplace_back(
group.front().trajectoryState(),
112 std::vector<BaseTrackerRecHit*>
result;
113 auto const& compatDets = layer.compatibleDets(startingState, prop, est);
114 if (compatDets.empty())
116 for (
auto const& ds : compatDets) {
117 auto mdet = detSystem_.idToDet(ds.first->geographicalId(), data_);
129 vector<DetWithState>
const& compatDets = layer.compatibleDets(startingState, prop, est);
131 if (!compatDets.empty())
132 return get(detSystem_, data_, layer, compatDets, startingState, prop, est);
134 vector<TrajectoryMeasurement>
result;
135 pair<bool, TrajectoryStateOnSurface> compat = layer.compatible(startingState, prop, est);
143 LogDebug(
"LayerMeasurements") <<
"adding a missing hit.";
145 LogDebug(
"LayerMeasurements") <<
"adding not measurement.";
154 vector<TrajectoryMeasurementGroup>
result;
156 vector<DetGroup>&& groups = layer.groupedCompatibleDets(startingState, prop, est);
157 result.reserve(groups.size());
160 for (
auto& grp : groups) {
164 vector<TrajectoryMeasurement> tmpVec;
165 for (
auto const& det : grp) {
170 if (mdet.
measurements(det.trajectoryState(), est, tmps))
171 for (std::size_t
i = 0;
i != tmps.
size(); ++
i)
177 LogDebug(
"LayerMeasurements") <<
"Sorting " << tmpVec.size() <<
" measurements in this grp.";
179 addInvalidMeas(tmpVec, grp, layer);
185 pair<bool, TrajectoryStateOnSurface> compat = layer.compatible(startingState, prop, est);
187 vector<TrajectoryMeasurement> tmVec;
188 tmVec.emplace_back(compat.second,
bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, TempMeasurements &result) const
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
RecHitContainer recHits(const TrajectoryStateOnSurface &tsos) const
DetId geographicalId() const
The label of this GeomDet.
char data[epos_bytes_allocation]
std::vector< BaseTrackerRecHit * > recHits(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
std::vector< TrajectoryMeasurement > measurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
std::vector< TrajectoryMeasurementGroup > groupedMeasurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const