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 MTDRingForwardLayer: " 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) <<
"MTDRingForwardLayer::compatibleDets," 99 <<
" R1 " << specificSurface().innerRadius()
100 <<
" R2: " << specificSurface().outerRadius()
103 pair<bool, TrajectoryStateOnSurface> compat =
104 compatible(startingState, prop, est);
108 LogTrace(metname) <<
" MTDRingForwardLayer::compatibleDets: not compatible" 109 <<
" (should not have been selected!)";
121 LogTrace(metname) <<
" MTDRingForwardLayer::fastCompatibleDets, closestRing: " 136 int nclosest = result.size();
int nnextdet=0;
151 for (
unsigned int idet=closest+1; idet <
theRings.size(); idet++) {
156 inside=
theRings[idet]->specificSurface().bounds().inside(nextPos);
159 LogTrace(metname) <<
" MTDRingForwardLayer::fastCompatibleDets:NextRing" << idet
160 <<
" R1 " <<
theRings[idet]->specificSurface().innerRadius()
161 <<
" R2: " <<
theRings[idet]->specificSurface().outerRadius()
162 <<
" FTS R " << nextPos.
perp();
166 vector<DetWithState> nextRodDets =
167 theRings[idet]->compatibleDets(tsos, prop, est);
168 if (!nextRodDets.empty()) {
169 result.insert( result.end(),
170 nextRodDets.begin(), nextRodDets.end());
177 for (
int idet=closest-1; idet >= 0; idet--) {
182 inside=
theRings[idet]->specificSurface().bounds().inside(nextPos);
185 LogTrace(metname) <<
" MTDRingForwardLayer::fastCompatibleDets:PreviousRing:" << idet
186 <<
" R1 " <<
theRings[idet]->specificSurface().innerRadius()
187 <<
" R2: " <<
theRings[idet]->specificSurface().outerRadius()
188 <<
" FTS R " << nextPos.
perp();
192 vector<DetWithState> nextRodDets =
193 theRings[idet]->compatibleDets(tsos, prop, est);
194 if (!nextRodDets.empty()) {
195 result.insert( result.end(),
196 nextRodDets.begin(), nextRodDets.end());
204 LogTrace(metname) <<
" MTDRingForwardLayer::fastCompatibleDets: found: " 206 <<
" on closest: " << nclosest
207 <<
" # checked rings: " << 1 + nnextdet;
219 cout <<
"dummy implementation of MTDRingForwardLayer::groupedCompatibleDets()" << endl;
220 return vector<DetGroup>();
229 const vector<const GeometricSearchDet*> &
TkRotation< Scalar > RotationType
const std::vector< const GeomDet * > & basicComponents() const override
virtual int binIndex(T pos) const =0
Return the index of bin at given position.
std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const override
const std::string metname
~MTDRingForwardLayer() override
std::vector< const ForwardDetRing * > theRings
GlobalPoint globalPosition() const
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
LocalError positionError() const
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
Point3DBase< Scalar, GlobalTag > PositionType
std::vector< DetGroup > groupedCompatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const override
BaseBinFinder< double > * theBinFinder
const LocalTrajectoryError & localError() const
SubDetector subDetector() const override
MTDRingForwardLayer(const std::vector< const ForwardDetRing * > &rings)
Constructor, takes ownership of pointers.
std::vector< const GeometricSearchDet * > theComponents
const std::vector< const GeometricSearchDet * > & components() const override
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