26 theComponents(theRings.
begin(),theRings.
end()),
34 float theRmin = rings.front()->basicComponents().front()->position().perp();
35 float theRmax = theRmin;
36 float theZmin = rings.front()->position().z();
37 float theZmax = theZmin;
41 for (vector<const ForwardDetRing*>::const_iterator it=rings.begin();
42 it!=rings.end(); it++) {
43 vector<const GeomDet*> tmp2 = (*it)->basicComponents();
46 theRmin =
min( theRmin, (*it)->specificSurface().innerRadius());
47 theRmax =
max( theRmax, (*it)->specificSurface().outerRadius());
48 float halfThick = (*it)->surface().bounds().thickness()/2.;
49 float zCenter = (*it)->surface().position().z();
50 theZmin =
min( theZmin, zCenter-halfThick);
51 theZmax =
max( theZmax, zCenter+halfThick);
60 float zPos = (theZmax+theZmin)/2.;
66 theZmin-zPos, theZmax-zPos)));
70 LogTrace(metname) <<
"Constructing MuRingForwardLayer: "
83 for (vector <const ForwardDetRing*>::iterator
i =
theRings.begin();
88 vector<GeometricSearchDet::DetWithState>
94 vector<DetWithState>
result;
97 LogTrace(metname) <<
"MuRingForwardLayer::compatibleDets,"
102 pair<bool, TrajectoryStateOnSurface> compat =
107 LogTrace(metname) <<
" MuRingForwardLayer::compatibleDets: not compatible"
108 <<
" (should not have been selected!)";
120 LogTrace(metname) <<
" MuRingForwardLayer::fastCompatibleDets, closestRing: "
134 int nclosest = result.size();
int nnextdet=0;
148 for (
unsigned int idet=closest+1; idet <
theRings.size(); idet++) {
153 inside=
theRings[idet]->specificSurface().bounds().inside(nextPos);
156 LogTrace(metname) <<
" MuRingForwardLayer::fastCompatibleDets:NextRing" << idet
157 <<
" R1 " <<
theRings[idet]->specificSurface().innerRadius()
158 <<
" R2: " <<
theRings[idet]->specificSurface().outerRadius()
159 <<
" FTS R " << nextPos.
perp();
161 vector<DetWithState> nextRodDets =
162 theRings[idet]->compatibleDets(tsos, prop, est);
163 if (nextRodDets.size()!=0) {
164 result.insert( result.end(),
165 nextRodDets.begin(), nextRodDets.end());
172 for (
int idet=closest-1; idet >= 0; idet--) {
177 inside=
theRings[idet]->specificSurface().bounds().inside(nextPos);
180 LogTrace(metname) <<
" MuRingForwardLayer::fastCompatibleDets:PreviousRing:" << idet
181 <<
" R1 " <<
theRings[idet]->specificSurface().innerRadius()
182 <<
" R2: " <<
theRings[idet]->specificSurface().outerRadius()
183 <<
" FTS R " << nextPos.
perp();
185 vector<DetWithState> nextRodDets =
186 theRings[idet]->compatibleDets(tsos, prop, est);
187 if (nextRodDets.size()!=0) {
188 result.insert( result.end(),
189 nextRodDets.begin(), nextRodDets.end());
196 LogTrace(metname) <<
" MuRingForwardLayer::fastCompatibleDets: found: "
198 <<
" on closest: " << nclosest
199 <<
" # checked rings: " << 1 + nnextdet;
210 cout <<
"dummy implementation of MuRingForwardLayer::groupedCompatibleDets()" << endl;
211 return vector<DetGroup>();
225 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
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
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
const T & max(const T &a, const T &b)
virtual const BoundSurface & surface() const GCC11_FINAL
The surface of the GeometricSearchDet.
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
virtual const BoundDisk & specificSurface() const GCC11_FINAL
virtual std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &, const Propagator &, const MeasurementEstimator &) const
virtual const std::vector< const GeometricSearchDet * > & components() const
Returns basic components, if any.
bool isRPeriodic() const
Returns true if the Dets are periodic in R.
volatile std::atomic< bool > shutdown_flag false
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