18 vector<const GeomDet*>::const_iterator
last)
36 const vector<const GeometricSearchDet*>&
40 edm::LogError(
"MTDDetTray") <<
"temporary dummy implementation of MTDDetTray::components()!!" << endl;
41 static const vector<const GeometricSearchDet*>
result;
45 pair<bool, TrajectoryStateOnSurface>
51 else return make_pair(
false, ms);
55 vector<GeometricSearchDet::DetWithState>
61 LogTrace(metname) <<
"MTDDetTray::compatibleDets, Surface at R,phi: " 68 vector<DetWithState>
result;
71 pair<bool, TrajectoryStateOnSurface> compat =
75 LogTrace(metname) <<
" MTDDetTray::compatibleDets: not compatible" 76 <<
" (should not have been selected!)";
85 LogTrace(metname) <<
" MTDDetTray::compatibleDets, closest det: " << closest
86 <<
" pos: " << dets[closest]->surface().position()
87 <<
" impact " << startPos;
91 add(closest, result, tsos, prop, est);
94 int nclosest = result.size();
int nnextdet=0;
99 if (!result.empty()) {
105 float detHalfLen = closestPlane.bounds().length()/2.;
107 for (
unsigned int idet=closest+1; idet < dets.size(); idet++) {
109 if (fabs(nextPos.
y()) < detHalfLen + maxDistance.
y()) {
110 LogTrace(metname) <<
" negativeZ: det:" << idet
111 <<
" pos " << nextPos.
y()
112 <<
" maxDistance " << maxDistance.
y();
116 if ( !
add(idet, result, tsos, prop, est))
break;
122 for (
int idet=closest-1; idet >= 0; idet--) {
124 if (fabs(nextPos.
y()) < detHalfLen + maxDistance.
y()) {
125 LogTrace(metname) <<
" positiveZ: det:" << idet
126 <<
" pos " << nextPos.
y()
127 <<
" maxDistance " << maxDistance.
y();
131 if ( !
add(idet, result, tsos, prop, est))
break;
139 LogTrace(metname) <<
" MTDDetTray::compatibleDets, size: " << result.size()
140 <<
" on closest: " << nclosest
141 <<
" # checked dets: " << nnextdet+1;
143 if (result.empty()) {
144 LogTrace(metname) <<
" ***Rod not compatible---should have been discarded before!!!";
155 cout <<
"dummy implementation of MTDDetTray::groupedCompatibleDets()" << endl;
GenericBinFinderInZ< float, GeomDet > BinFinderType
const BoundSurface & surface() const final
The surface of the GeometricSearchDet.
const std::string metname
const std::vector< const GeometricSearchDet * > & components() const override
Returns basic components, if any.
Geom::Phi< T > phi() const
std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const override
GlobalPoint globalPosition() const
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.
std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &prop, const MeasurementEstimator &est) const override
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
std::vector< DetGroup > groupedCompatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const override
int binIndex(T z) const override
returns an index in the valid range for the bin closest to Z
virtual const Plane & specificSurface() const final
Return the rod surface as a Plane.
const std::vector< const GeomDet * > & basicComponents() const override
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
BinFinderType theBinFinder
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const =0
MTDDetTray(std::vector< const GeomDet * >::const_iterator first, std::vector< const GeomDet * >::const_iterator last)
Construct from iterators on GeomDet*.
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
~MTDDetTray() override
Destructor.
const PositionType & position() const