18 vector<const GeomDet*>::const_iterator
last) :
41 const vector<const GeometricSearchDet*>&
44 edm::LogError(
"MTDDetRing") <<
"temporary dummy implementation of MTDDetRing::components()!!" << endl;
45 static const vector<const GeometricSearchDet*>
result;
50 pair<bool, TrajectoryStateOnSurface>
57 LogTrace(metname) <<
"MTDDetRing::compatible, Surface at Z: " 69 LogTrace(metname) <<
" DEST: not valid" <<endl;
73 else return make_pair(
false, ms);
77 vector<GeometricSearchDet::DetWithState>
84 LogTrace(metname) <<
"MTDDetRing::compatibleDets, Surface at Z: " 91 vector<DetWithState>
result;
94 pair<bool, TrajectoryStateOnSurface> compat =
97 LogTrace(metname) <<
" MTDDetRing::compatibleDets: not compatible" 98 <<
" (should not have been selected!)";
107 LogTrace(metname) <<
" MTDDetRing::compatibleDets, closest det: " << closest
108 <<
" Phi: " << dets[closest]->surface().position().phi()
109 <<
" impactPhi " << startPos.
phi();
113 add(closest, result, tsos, prop, est);
116 int nclosest = result.size();
int nnextdet=0;
121 if (!result.empty()) {
123 if (result.back().second.hasError()) {
125 atan(
sqrt(result.back().second.localError().positionError().xx())/
126 result.back().second.globalPosition().perp());
129 LogTrace(metname) <<
" MTDDetRing::compatibleDets, closest not compatible!";
133 for (
int idet=closest+1; idet < closest+
int(dets.size())/4+1; idet++){
138 LogTrace(metname) <<
" next det:" << idetp
139 <<
" at Z: " << dets[idetp]->position().z()
140 <<
" phi: " << dets[idetp]->position().phi()
141 <<
" FTS phi " << startPos.
phi()
142 <<
" max dphi " << dphi;
146 if ( !
add(idetp, result, tsos, prop, est))
break;
150 for (
int idet=closest-1; idet > closest-
int(dets.size())/4-1; idet--){
155 LogTrace(metname) <<
" previous det:" << idetp <<
" " << idet <<
" " << closest-dets.size()/4-1
156 <<
" at Z: " << dets[idetp]->position().z()
157 <<
" phi: " << dets[idetp]->position().phi()
158 <<
" FTS phi " << startPos.
phi()
159 <<
" max dphi" << dphi;
163 if ( !
add(idetp, result, tsos, prop, est))
break;
168 LogTrace(metname) <<
" MTDDetRing::compatibleDets, size: " << result.size()
169 <<
" on closest: " << nclosest <<
" # checked dets: " << nnextdet+1;
172 if (result.empty()) {
173 LogTrace(metname) <<
" ***Ring not compatible,should have been discarded before!!!";
186 cout <<
"dummy implementation of MTDDetRod::groupedCompatibleDets()" << endl;
BinFinderType theBinFinder
const std::string metname
LocalPoint localPosition() const
Geom::Phi< T > phi() const
int binIndex(T phi) const override
returns an index in the valid range for the bin that contains phi
GlobalPoint globalPosition() const
MTDDetRing(std::vector< const GeomDet * >::const_iterator first, std::vector< const GeomDet * >::const_iterator last)
Construct from iterators on GeomDet*.
const BoundSurface & surface() const final
The surface of the GeometricSearchDet.
const std::vector< const GeometricSearchDet * > & components() const override
Returns basic components, if any.
std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const override
std::vector< DetGroup > groupedCompatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const override
virtual const Surface::PositionType & position() const
Returns position of the surface.
const std::vector< const GeomDet * > & basicComponents() const override
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
PeriodicBinFinderInPhi< float > BinFinderType
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
bool add(int idet, std::vector< DetWithState > &result, const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est) const
const PositionType & position() const
const BoundDisk & specificSurface() const
Return the ring surface as a BoundDisk.
std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &prop, const MeasurementEstimator &est) const override