31 edm::LogError(
"MTDDetLayers") <<
"temporary dummy implementation of MTDDetTray::components()!!";
32 static const vector<const GeometricSearchDet*>
result;
51 vector<DetWithState>
result;
54 pair<bool, TrajectoryStateOnSurface> compat =
compatible(startingState, prop, est);
57 LogTrace(
"MTDDetLayers") <<
" MTDDetTray::compatibleDets: not compatible"
58 <<
" (should not have been selected!)";
67 LogTrace(
"MTDDetLayers") <<
" MTDDetTray::compatibleDets, closest det: " << closest
68 <<
" pos: " << dets[closest]->surface().position() <<
" impact " << startPos;
72 add(closest, result, tsos, prop, est);
75 int nclosest = result.size();
81 if (!result.empty()) {
86 float detHalfLen = closestPlane.bounds().length() / 2.;
88 for (
unsigned int idet = closest + 1; idet < dets.size(); idet++) {
90 if (fabs(nextPos.
y()) < detHalfLen + maxDistance.
y()) {
92 LogTrace(
"MTDDetLayers") <<
" negativeZ: det:" << idet <<
" pos " << nextPos.
y() <<
" maxDistance "
96 if (!
add(idet, result, tsos, prop, est))
103 for (
int idet = closest - 1; idet >= 0; idet--) {
105 if (fabs(nextPos.
y()) < detHalfLen + maxDistance.
y()) {
107 LogTrace(
"MTDDetLayers") <<
" positiveZ: det:" << idet <<
" pos " << nextPos.
y() <<
" maxDistance "
111 if (!
add(idet, result, tsos, prop, est))
120 LogTrace(
"MTDDetLayers") <<
" MTDDetTray::compatibleDets, size: " << result.size() <<
" on closest: " << nclosest
121 <<
" # checked dets: " << nnextdet + 1;
122 if (result.empty()) {
123 LogTrace(
"MTDDetLayers") <<
" ***Rod not compatible---should have been discarded before!!!";
133 edm::LogError(
"MTDDetLayers") <<
"dummy implementation of MTDDetTray::groupedCompatibleDets()";
GenericBinFinderInZ< float, GeomDet > BinFinderType
const std::vector< const GeometricSearchDet * > & components() const override
Returns basic components, if any.
const BoundSurface & surface() const final
The surface of the GeometricSearchDet.
Geom::Phi< T > phi() const
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const =0
GlobalPoint globalPosition() const
std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const override
bool add(int idet, std::vector< DetWithState > &result, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
Query detector idet for compatible and add the output to result.
Log< level::Error, false > LogError
int binIndex(T z) const override
returns an index in the valid range for the bin closest to Z
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
const std::vector< const GeomDet * > & basicComponents() const override
virtual const Plane & specificSurface() const final
Return the rod surface as a Plane.
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &prop, const MeasurementEstimator &est) const override
BinFinderType theBinFinder
MTDDetTray(std::vector< const GeomDet * >::const_iterator first, std::vector< const GeomDet * >::const_iterator last)
Construct from iterators on GeomDet*.
~MTDDetTray() override
Destructor.
const PositionType & position() const
std::vector< DetGroup > groupedCompatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const override