28 theComponents(theRings.
begin(),theRings.
end()),
33 const std::string
metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuRingForwardLayer";
36 float theRmin = rings.front()->basicComponents().front()->position().perp();
37 float theRmax = theRmin;
38 float theZmin = rings.front()->position().z();
39 float theZmax = theZmin;
43 for (vector<const ForwardDetRing*>::const_iterator it=rings.begin();
44 it!=rings.end(); it++) {
45 vector<const GeomDet*> tmp2 = (*it)->basicComponents();
48 theRmin =
min( theRmin, (*it)->specificSurface().innerRadius());
49 theRmax =
max( theRmax, (*it)->specificSurface().outerRadius());
50 float halfThick = (*it)->surface().bounds().thickness()/2.;
51 float zCenter = (*it)->surface().position().z();
52 theZmin =
min( theZmin, zCenter-halfThick);
53 theZmax =
max( theZmax, zCenter+halfThick);
62 float zPos = (theZmax+theZmin)/2.;
68 theZmin-zPos, theZmax-zPos)));
72 LogTrace(metname) <<
"Constructing MuRingForwardLayer: "
85 for (vector <const ForwardDetRing*>::iterator
i =
theRings.begin();
90 vector<GeometricSearchDet::DetWithState>
95 const std::string
metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuRingForwardLayer";
96 vector<DetWithState>
result;
99 LogTrace(metname) <<
"MuRingForwardLayer::compatibleDets,"
104 pair<bool, TrajectoryStateOnSurface> compat =
109 LogTrace(metname) <<
" MuRingForwardLayer::compatibleDets: not compatible"
110 <<
" (should not have been selected!)";
122 LogTrace(metname) <<
" MuRingForwardLayer::fastCompatibleDets, closestRing: "
136 int nclosest = result.size();
int nnextdet=0;
150 for (
unsigned int idet=closest+1; idet <
theRings.size(); idet++) {
155 inside=
theRings[idet]->specificSurface().bounds().inside(nextPos);
158 LogTrace(metname) <<
" MuRingForwardLayer::fastCompatibleDets:NextRing" << idet
159 <<
" R1 " <<
theRings[idet]->specificSurface().innerRadius()
160 <<
" R2: " <<
theRings[idet]->specificSurface().outerRadius()
161 <<
" FTS R " << nextPos.
perp();
163 vector<DetWithState> nextRodDets =
164 theRings[idet]->compatibleDets(tsos, prop, est);
165 if (nextRodDets.size()!=0) {
166 result.insert( result.end(),
167 nextRodDets.begin(), nextRodDets.end());
174 for (
int idet=closest-1; idet >= 0; idet--) {
179 inside=
theRings[idet]->specificSurface().bounds().inside(nextPos);
182 LogTrace(metname) <<
" MuRingForwardLayer::fastCompatibleDets:PreviousRing:" << idet
183 <<
" R1 " <<
theRings[idet]->specificSurface().innerRadius()
184 <<
" R2: " <<
theRings[idet]->specificSurface().outerRadius()
185 <<
" FTS R " << nextPos.
perp();
187 vector<DetWithState> nextRodDets =
188 theRings[idet]->compatibleDets(tsos, prop, est);
189 if (nextRodDets.size()!=0) {
190 result.insert( result.end(),
191 nextRodDets.begin(), nextRodDets.end());
198 LogTrace(metname) <<
" MuRingForwardLayer::fastCompatibleDets: found: "
200 <<
" on closest: " << nclosest
201 <<
" # checked rings: " << 1 + nnextdet;
212 cout <<
"dummy implementation of MuRingForwardLayer::groupedCompatibleDets()" << endl;
213 return vector<DetGroup>();
227 const vector<const GeometricSearchDet*> &
virtual bool hasGroups() const
const std::string metname
virtual std::vector< DetGroup > groupedCompatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
virtual const BoundSurface & surface() const
The surface of the GeometricSearchDet.
void setSurface(BoundDisk *cp)
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
virtual int binIndex(T pos) const =0
Return the index of bin at given position.
GlobalPoint globalPosition() const
std::vector< const ForwardDetRing * > theRings
LocalError positionError() const
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
const T & max(const T &a, const T &b)
virtual const BoundDisk & specificSurface() const
const LocalTrajectoryError & localError() const
std::vector< const GeometricSearchDet * > theComponents
virtual const std::vector< const GeomDet * > & basicComponents() const
virtual SubDetector subDetector() const
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
BaseBinFinder< double > * theBinFinder
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
virtual std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &, const Propagator &, const MeasurementEstimator &) const
float outerRadius() const
The outer radius of the disk.
virtual const std::vector< const GeometricSearchDet * > & components() const
Returns basic components, if any.
float innerRadius() const
The inner radius of the disk.
bool isRPeriodic() const
Returns true if the Dets are periodic in R.
const PositionType & position() const
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