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