28 void addInvalidMeas( std::vector<TrajectoryMeasurement>&
result,
43 std::vector<TrajectoryMeasurement>
47 std::vector<DetWithState>
const& compatDets,
51 std::vector<TrajectoryMeasurement>
result;
56 for (
auto const & ds : compatDets) {
63 for (std::size_t
i=0;
i!=tmps.
size(); ++
i)
71 if ( result.size() > 1) {
76 if ( !result.empty()) {
78 addInvalidMeas( result, result.front().predictedState(), result.front().recHit()->det(),layer);
82 addInvalidMeas( result, compatDets.front().second, compatDets.front().first,layer);
98 auto const & compatDets = layer.
compatibleDets( startingState, prop, est);
99 if (compatDets.empty())
return false;
101 for (
auto const & ds : compatDets) {
102 auto mdet = theDetSystem->idToDet(ds.first->geographicalId(), *theData);
103 ret |=mdet.
recHits(result,ds.second,est);
109 vector<TrajectoryMeasurement>
117 vector<DetWithState>
const & compatDets = layer.
compatibleDets( startingState, prop, est);
119 if (!compatDets.empty())
return get(theDetSystem, theData, layer, compatDets, startingState, prop, est);
121 vector<TrajectoryMeasurement>
result;
122 pair<bool, TrajectoryStateOnSurface> compat = layer.
compatible( startingState, prop, est);
128 LogDebug(
"LayerMeasurements")<<
"adding a missing hit.";
129 }
else LogDebug(
"LayerMeasurements")<<
"adding not measurement.";
137 vector<TrajectoryMeasurementGroup>
142 vector<TrajectoryMeasurementGroup>
result;
145 result.reserve(groups.size());
148 for (
auto& grp : groups) {
149 if ( grp.empty() )
continue;
151 vector<TrajectoryMeasurement> tmpVec;
152 for (
auto const & det : grp) {
157 if (mdet.
measurements( det.trajectoryState(), est,tmps))
158 for (std::size_t
i=0;
i!=tmps.
size(); ++
i)
164 LogDebug(
"LayerMeasurements")<<
"Sorting " << tmpVec.size() <<
" measurements in this grp.";
166 addInvalidMeas( tmpVec, grp,layer);
172 if (result.empty()) {
173 pair<bool, TrajectoryStateOnSurface> compat = layer.
compatible( startingState, prop, est);
175 vector<TrajectoryMeasurement> tmVec;
187 if (!measVec.empty()) {
189 auto const & ts = measVec.front().predictedState();
190 auto toll = measVec.front().recHitR().det()->surface().bounds().significanceInside(ts.localPosition(),ts.localError().positionError());
191 measVec.emplace_back(measVec.front().predictedState(),
195 else if (!group.empty()) {
197 auto const & ts = group.front().trajectoryState();
198 auto toll = group.front().det()->surface().bounds().significanceInside(ts.localPosition(),ts.localError().positionError());
199 measVec.emplace_back(group.front().trajectoryState(),
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
std::vector< BaseTrackerRecHit * > SimpleHitContainer
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
bool recHits(SimpleHitContainer &result, const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
RecHitContainer recHits(const TrajectoryStateOnSurface &tsos) const
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
DetId geographicalId() const
The label of this GeomDet.
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
virtual std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const =0
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)
bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, TempMeasurements &result) const