27 theComponents(theRings.
begin(),theRings.
end()),
35 float theRmin = rings.front()->basicComponents().front()->position().perp();
36 float theRmax = theRmin;
37 float theZmin = rings.front()->position().z();
38 float theZmax = theZmin;
42 for (vector<const ForwardDetRing*>::const_iterator it=rings.begin();
43 it!=rings.end(); it++) {
44 vector<const GeomDet*> tmp2 = (*it)->basicComponents();
47 theRmin =
min( theRmin, (*it)->specificSurface().innerRadius());
48 theRmax =
max( theRmax, (*it)->specificSurface().outerRadius());
49 float halfThick = (*it)->surface().bounds().thickness()/2.;
50 float zCenter = (*it)->surface().position().z();
51 theZmin =
min( theZmin, zCenter-halfThick);
52 theZmax =
max( theZmax, zCenter+halfThick);
61 float zPos = (theZmax+theZmin)/2.;
67 theZmin-zPos, theZmax-zPos)));
71 LogTrace(metname) <<
"Constructing MuRingForwardLayer: " 74 <<
" Z: " << specificSurface().position().z()
75 <<
" R1: " << specificSurface().innerRadius()
76 <<
" R2: " << specificSurface().outerRadius()
84 for (vector <const ForwardDetRing*>::iterator
i =
theRings.begin();
89 vector<GeometricSearchDet::DetWithState>
95 vector<DetWithState>
result;
98 LogTrace(metname) <<
"MuRingForwardLayer::compatibleDets," 99 <<
" R1 " << specificSurface().innerRadius()
100 <<
" R2: " << specificSurface().outerRadius()
103 pair<bool, TrajectoryStateOnSurface> compat =
104 compatible(startingState, prop, est);
108 LogTrace(metname) <<
" MuRingForwardLayer::compatibleDets: not compatible" 109 <<
" (should not have been selected!)";
121 LogTrace(metname) <<
" MuRingForwardLayer::fastCompatibleDets, closestRing: " 135 int nclosest = result.size();
int nnextdet=0;
149 for (
unsigned int idet=closest+1; idet <
theRings.size(); idet++) {
154 inside=
theRings[idet]->specificSurface().bounds().inside(nextPos);
157 LogTrace(metname) <<
" MuRingForwardLayer::fastCompatibleDets:NextRing" << idet
158 <<
" R1 " <<
theRings[idet]->specificSurface().innerRadius()
159 <<
" R2: " <<
theRings[idet]->specificSurface().outerRadius()
160 <<
" FTS R " << nextPos.
perp();
162 vector<DetWithState> nextRodDets =
163 theRings[idet]->compatibleDets(tsos, prop, est);
164 if (nextRodDets.size()!=0) {
165 result.insert( result.end(),
166 nextRodDets.begin(), nextRodDets.end());
173 for (
int idet=closest-1; idet >= 0; idet--) {
178 inside=
theRings[idet]->specificSurface().bounds().inside(nextPos);
181 LogTrace(metname) <<
" MuRingForwardLayer::fastCompatibleDets:PreviousRing:" << idet
182 <<
" R1 " <<
theRings[idet]->specificSurface().innerRadius()
183 <<
" R2: " <<
theRings[idet]->specificSurface().outerRadius()
184 <<
" FTS R " << nextPos.
perp();
186 vector<DetWithState> nextRodDets =
187 theRings[idet]->compatibleDets(tsos, prop, est);
188 if (nextRodDets.size()!=0) {
189 result.insert( result.end(),
190 nextRodDets.begin(), nextRodDets.end());
197 LogTrace(metname) <<
" MuRingForwardLayer::fastCompatibleDets: found: " 199 <<
" on closest: " << nclosest
200 <<
" # checked rings: " << 1 + nnextdet;
211 cout <<
"dummy implementation of MuRingForwardLayer::groupedCompatibleDets()" << endl;
212 return vector<DetGroup>();
221 const vector<const GeometricSearchDet*> &
TkRotation< Scalar > RotationType
virtual int binIndex(T pos) const =0
Return the index of bin at given position.
const std::string metname
virtual std::vector< DetGroup > groupedCompatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
MuRingForwardLayer(const std::vector< const ForwardDetRing * > &rings)
Constructor, takes ownership of pointers.
virtual ~MuRingForwardLayer()
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
GlobalPoint globalPosition() const
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
std::vector< const ForwardDetRing * > theRings
LocalError positionError() const
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
Point3DBase< Scalar, GlobalTag > PositionType
const LocalTrajectoryError & localError() const
std::vector< const GeometricSearchDet * > theComponents
virtual const std::vector< const GeomDet * > & basicComponents() const
virtual SubDetector subDetector() const
BaseBinFinder< double > * theBinFinder
virtual const std::vector< const GeometricSearchDet * > & components() const
bool isRPeriodic() const
Returns true if the Dets are periodic in R.
const BoundDisk & specificSurface() const
Return the ring surface as a BoundDisk.
bool isROverlapping() const
Returns true if any 2 of the Det overlap in R.
std::vector< const GeomDet * > theBasicComps