20 vector<const GeomDet*>::const_iterator
last)
38 const vector<const GeometricSearchDet*>&
42 cout <<
"temporary dummy implementation of MuDetRod::components()!!" << endl;
43 static vector<const GeometricSearchDet*>
result;
47 pair<bool, TrajectoryStateOnSurface>
53 else return make_pair(
false, ms);
57 vector<GeometricSearchDet::DetWithState>
61 const std::string
metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuDetRod";
63 LogTrace(metname) <<
"MuDetRod::compatibleDets, Surface at R,phi: "
70 vector<DetWithState>
result;
73 pair<bool, TrajectoryStateOnSurface> compat =
77 LogTrace(metname) <<
" MuDetRod::compatibleDets: not compatible"
78 <<
" (should not have been selected!)";
87 LogTrace(metname) <<
" MuDetRod::compatibleDets, closest det: " << closest
88 <<
" pos: " << dets[closest]->surface().position()
89 <<
" impact " << startPos;
93 add(closest, result, tsos, prop, est);
95 int nclosest = result.size();
int nnextdet=0;
99 if (!result.empty()) {
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();
114 if ( !
add(idet, result, tsos, prop, est))
break;
120 for (
int idet=closest-1; idet >= 0; idet--) {
122 if (fabs(nextPos.
y()) < detHalfLen + maxDistance.
y()) {
123 LogTrace(metname) <<
" positiveZ: det:" << idet
124 <<
" pos " << nextPos.
y()
125 <<
" maxDistance " << maxDistance.
y();
127 if ( !
add(idet, result, tsos, prop, est))
break;
134 LogTrace(metname) <<
" MuDetRod::compatibleDets, size: " << result.size()
135 <<
" on closest: " << nclosest
136 <<
" # checked dets: " << nnextdet+1;
137 if (result.size()==0) {
138 LogTrace(metname) <<
" ***Rod not compatible---should have been discarded before!!!";
149 cout <<
"dummy implementation of MuDetRod::groupedCompatibleDets()" << endl;
virtual float length() const =0
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TransientTrackingRecHit &hit) const =0
const std::string metname
Geom::Phi< T > phi() const
virtual const BoundPlane & specificSurface() const
Return the rod surface as a BoundPlane.
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 Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const
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
GenericBinFinderInZ< float, GeomDet > BinFinderType
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
const Bounds & bounds() const
virtual const BoundSurface & surface() const
The surface of the GeometricSearchDet.
BinFinderType theBinFinder
virtual int binIndex(T z) const
returns an index in the valid range for the bin closest to Z
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.