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) {
58 for (std::size_t
i = 0;
i != tmps.
size(); ++
i)
72 addInvalidMeas(
result,
result.front().predictedState(), *(
result.front().recHit()->det()), layer);
75 addInvalidMeas(
result, compatDets.front().second, *(compatDets.front().first), layer);
81 void addInvalidMeas(vector<TrajectoryMeasurement>& measVec,
const DetGroup&
group,
const DetLayer& layer) {
82 if (!measVec.empty()) {
84 auto const& ts = measVec.front().predictedState();
88 measVec.front().predictedState(),
92 }
else if (!
group.empty()) {
94 auto const& ts =
group.front().trajectoryState();
95 auto toll =
group.front().det()->surface().bounds().significanceInside(ts.
localPosition(),
97 measVec.emplace_back(
group.front().trajectoryState(),
111 std::vector<BaseTrackerRecHit*>
result;
112 auto const& compatDets = layer.
compatibleDets(startingState, prop, est);
113 if (compatDets.empty())
115 for (
auto const& ds : compatDets) {
116 auto mdet = detSystem_.idToDet(ds.first->geographicalId(), data_);
128 vector<DetWithState>
const& compatDets = layer.
compatibleDets(startingState, prop, est);
130 if (!compatDets.empty())
131 return get(detSystem_, data_, layer, compatDets, startingState, prop, est);
133 vector<TrajectoryMeasurement>
result;
134 pair<bool, TrajectoryStateOnSurface> compat = layer.
compatible(startingState, prop, est);
142 LogDebug(
"LayerMeasurements") <<
"adding a missing hit.";
144 LogDebug(
"LayerMeasurements") <<
"adding not measurement.";
153 vector<TrajectoryMeasurementGroup>
result;
156 result.reserve(groups.size());
159 for (
auto& grp : groups) {
163 vector<TrajectoryMeasurement> tmpVec;
164 for (
auto const& det : grp) {
169 if (mdet.
measurements(det.trajectoryState(), est, tmps))
170 for (std::size_t
i = 0;
i != tmps.
size(); ++
i)
176 LogDebug(
"LayerMeasurements") <<
"Sorting " << tmpVec.size() <<
" measurements in this grp.";
178 addInvalidMeas(tmpVec, grp, layer);
184 pair<bool, TrajectoryStateOnSurface> compat = layer.
compatible(startingState, prop, est);
186 vector<TrajectoryMeasurement> tmVec;
187 tmVec.emplace_back(compat.second,