27 inline void addInvalidMeas(std::vector<TrajectoryMeasurement>&
result,
51 return xa < 1
e3 and ya < 1
e3 and za < 12e2;
64 std::vector<DetWithState>
const& compatDets,
68 std::vector<TrajectoryMeasurement>
result;
73 for (
auto const& ds : compatDets) {
74 if (not layerIsCompatibleWithTSOS(layer, ds.second))
83 for (std::size_t
i = 0;
i != tmps.
size(); ++
i)
97 addInvalidMeas(
result,
result.front().predictedState(), *(
result.front().recHit()->det()), layer);
100 addInvalidMeas(
result, compatDets.front().second, *(compatDets.front().first), layer);
106 void addInvalidMeas(vector<TrajectoryMeasurement>& measVec,
const DetGroup&
group,
const DetLayer& layer) {
107 if (!measVec.empty()) {
109 auto const& ts = measVec.front().predictedState();
110 auto toll = measVec.front().recHitR().det()->surface().bounds().significanceInside(
111 ts.localPosition(), ts.localError().positionError());
112 measVec.emplace_back(
113 measVec.front().predictedState(),
117 }
else if (!
group.empty()) {
119 auto const& ts =
group.front().trajectoryState();
120 auto toll =
group.front().det()->surface().bounds().significanceInside(ts.localPosition(),
121 ts.localError().positionError());
122 measVec.emplace_back(
group.front().trajectoryState(),
136 std::vector<BaseTrackerRecHit*>
result;
137 auto const& compatDets = layer.compatibleDets(startingState, prop, est);
138 if (compatDets.empty())
140 for (
auto const& ds : compatDets) {
141 if (not layerIsCompatibleWithTSOS(layer, ds.second))
144 auto mdet = detSystem_.idToDet(ds.first->geographicalId(), data_);
156 vector<DetWithState>
const& compatDets = layer.compatibleDets(startingState, prop, est);
158 if (!compatDets.empty())
159 return get(detSystem_, data_, layer, compatDets, startingState, prop, est);
161 vector<TrajectoryMeasurement>
result;
162 pair<bool, TrajectoryStateOnSurface> compat = layer.compatible(startingState, prop, est);
164 if (compat.first and layerIsCompatibleWithTSOS(layer, compat.second)) {
170 LogDebug(
"LayerMeasurements") <<
"adding a missing hit.";
172 LogDebug(
"LayerMeasurements") <<
"adding not measurement.";
181 vector<TrajectoryMeasurementGroup>
result;
183 vector<DetGroup>&& groups = layer.groupedCompatibleDets(startingState, prop, est);
184 result.reserve(groups.size());
187 for (
auto& grp : groups) {
191 vector<TrajectoryMeasurement> tmpVec;
192 for (
auto const& det : grp) {
193 auto const& detTS = det.trajectoryState();
195 if (not layerIsCompatibleWithTSOS(layer, detTS))
203 for (std::size_t
i = 0;
i != tmps.
size(); ++
i)
209 LogDebug(
"LayerMeasurements") <<
"Sorting " << tmpVec.size() <<
" measurements in this grp.";
211 addInvalidMeas(tmpVec, grp, layer);
217 pair<bool, TrajectoryStateOnSurface> compat = layer.compatible(startingState, prop, est);
218 if (compat.first and layerIsCompatibleWithTSOS(layer, compat.second)) {
219 vector<TrajectoryMeasurement> tmVec;
220 tmVec.emplace_back(compat.second,
bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, TempMeasurements &result) const
GlobalPoint globalPosition() const
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
Abs< T >::type abs(const T &t)
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