28 void addInvalidMeas( std::vector<TrajectoryMeasurement>&
result,
43 std::vector<TrajectoryMeasurement>
46 std::vector<DetWithState>
const& compatDets,
50 std::vector<TrajectoryMeasurement>
result;
55 for (
auto const & ds : compatDets) {
56 const MeasurementDet* mdet = theDetSystem->idToDet(ds.first->geographicalId());
62 for (std::size_t
i=0;
i!=tmps.
size(); ++
i)
63 result.emplace_back(ds.second,std::move(tmps.
hits[
i]),tmps.
distances[
i],&layer);
70 if ( result.size() > 1) {
75 if ( !result.empty()) {
77 addInvalidMeas( result, result.front().predictedState(), result.front().recHit()->det(),layer);
81 addInvalidMeas( result, compatDets.front().second, compatDets.front().first,layer);
89 vector<TrajectoryMeasurement>
97 vector<DetWithState>
const & compatDets = layer.
compatibleDets( startingState, prop, est);
99 if (!compatDets.empty())
return get(theDetSystem, layer, compatDets, startingState, prop, est);
101 vector<TrajectoryMeasurement>
result;
102 pair<bool, TrajectoryStateOnSurface> compat = layer.
compatible( startingState, prop, est);
108 LogDebug(
"LayerMeasurements")<<
"adding a missing hit.";
109 }
else LogDebug(
"LayerMeasurements")<<
"adding not measurement.";
117 vector<TrajectoryMeasurementGroup>
122 vector<TrajectoryMeasurementGroup>
result;
125 result.reserve(groups.size());
128 for (
auto& grp : groups) {
129 if ( grp.empty() )
continue;
131 vector<TrajectoryMeasurement> tmpVec;
132 for (
auto const & det : grp) {
137 if (mdet->
measurements( det.trajectoryState(), est,tmps))
138 for (std::size_t
i=0;
i!=tmps.
size(); ++
i)
139 tmpVec.emplace_back(det.trajectoryState(),std::move(tmps.
hits[
i]),tmps.
distances[
i],&layer);
145 addInvalidMeas( tmpVec, grp,layer);
146 result.emplace_back(std::move(tmpVec), std::move(grp));
151 if (result.empty()) {
152 pair<bool, TrajectoryStateOnSurface> compat = layer.
compatible( startingState, prop, est);
154 vector<TrajectoryMeasurement> tmVec;
156 result.emplace_back(std::move(tmVec),
DetGroup());
166 if (!measVec.empty()) {
168 measVec.emplace_back(measVec.front().predictedState(),
172 else if (!group.empty()) {
174 measVec.emplace_back(group.front().trajectoryState(),
virtual std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const =0
std::vector< TrajectoryMeasurement > measurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
virtual std::vector< DetGroup > groupedCompatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
DetId geographicalId() const
The label of this GeomDet.
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
void addInvalidMeas(std::vector< TrajectoryMeasurement > &measVec, const DetGroup &group, const DetLayer &layer) const
std::vector< TrajectoryMeasurementGroup > groupedMeasurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
virtual bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, TempMeasurements &result) const =0