18 vector<const GeomDet*>::const_iterator
last) :
41 const vector<const GeometricSearchDet*>&
44 cout <<
"temporary dummy implementation of MuDetRing::components()!!" << endl;
45 static const vector<const GeometricSearchDet*>
result;
50 pair<bool, TrajectoryStateOnSurface>
57 LogTrace(metname) <<
"MuDetRing::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) <<
"MuDetRing::compatibleDets, Surface at Z: "
91 vector<DetWithState>
result;
94 pair<bool, TrajectoryStateOnSurface> compat =
97 LogTrace(metname) <<
" MuDetRing::compatibleDets: not compatible"
98 <<
" (should not have been selected!)";
107 LogTrace(metname) <<
" MuDetRing::compatibleDets, closest det: " << closest
108 <<
" Phi: " << dets[closest]->surface().position().phi()
109 <<
" impactPhi " << startPos.
phi();
113 add(closest, result, tsos, prop, est);
115 int nclosest = result.size();
int nnextdet=0;
119 if (!result.empty()) {
121 if (result.back().second.hasError()) {
123 atan(
sqrt(result.back().second.localError().positionError().xx())/
124 result.back().second.globalPosition().perp());
127 LogTrace(metname) <<
" MuDetRing::compatibleDets, closest not compatible!";
131 for (
int idet=closest+1; idet < closest+int(dets.size())/4+1; idet++){
136 LogTrace(metname) <<
" next det:" << idetp
137 <<
" at Z: " << dets[idetp]->position().z()
138 <<
" phi: " << dets[idetp]->position().phi()
139 <<
" FTS phi " << startPos.
phi()
140 <<
" max dphi " << dphi;
142 if ( !
add(idetp, result, tsos, prop, est))
break;
146 for (
int idet=closest-1; idet > closest-int(dets.size())/4-1; idet--){
151 LogTrace(metname) <<
" previous det:" << idetp <<
" " << idet <<
" " << closest-dets.size()/4-1
152 <<
" at Z: " << dets[idetp]->position().z()
153 <<
" phi: " << dets[idetp]->position().phi()
154 <<
" FTS phi " << startPos.
phi()
155 <<
" max dphi" << dphi;
157 if ( !
add(idetp, result, tsos, prop, est))
break;
161 LogTrace(metname) <<
" MuDetRing::compatibleDets, size: " << result.size()
162 <<
" on closest: " << nclosest <<
" # checked dets: " << nnextdet+1;
164 if (result.size()==0) {
165 LogTrace(metname) <<
" ***Ring not compatible,should have been discarded before!!!";
178 cout <<
"dummy implementation of MuDetRod::groupedCompatibleDets()" << endl;
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TransientTrackingRecHit &hit) const =0
const std::string metname
LocalPoint localPosition() const
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
Geom::Phi< T > phi() const
GlobalPoint globalPosition() const
virtual int binIndex(T phi) const
returns an index in the valid range for the bin that contains phi
PeriodicBinFinderInPhi< float > BinFinderType
virtual std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &prop, const MeasurementEstimator &est) const
virtual const std::vector< const GeomDet * > & basicComponents() const
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
virtual std::vector< DetGroup > groupedCompatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
virtual const Surface::PositionType & position() const
Returns position of the surface.
virtual const std::vector< const GeometricSearchDet * > & components() const
Returns basic components, if any.
MuDetRing(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 &tsos, const Propagator &prop, const MeasurementEstimator &est) const
const PositionType & position() const
const BoundDisk & specificSurface() const
Return the ring surface as a BoundDisk.
tuple size
Write out results.
BinFinderType theBinFinder
virtual const BoundSurface & surface() const GCC11_FINAL
The surface of the GeometricSearchDet.