24 const vector<const ForwardDetRing*>& backRings) :
26 theFrontLayer(frontRings),
27 theBackLayer(backRings),
33 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuRingForwardDoubleLayer";
40 for (vector<const ForwardDetRing*>::const_iterator it=
theRings.begin();
42 vector<const GeomDet*> tmp2 = (*it)->basicComponents();
48 LogTrace(metname) <<
"Constructing MuRingForwardDoubleLayer: "
64 float rmin =
min( frontDisk.innerRadius(), backDisk.innerRadius() );
65 float rmax =
max( frontDisk.outerRadius(), backDisk.outerRadius() );
66 float zmin = frontDisk.position().z();
67 float halfThickness = frontDisk.bounds().thickness()/2.;
68 zmin = (zmin > 0) ? zmin-halfThickness : zmin+halfThickness;
69 float zmax = backDisk.position().z();
70 halfThickness = backDisk.bounds().thickness()/2.;
71 zmax = (zmax > 0) ? zmax+halfThickness : zmax-halfThickness;
78 zmin-zPos, zmax-zPos));
89 std::pair<bool, TrajectoryStateOnSurface>
95 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuRingForwardDoubleLayer";
99 LogTrace(
"Muon|RecoMuon|RecoMuonDetLayers|MuRingForwardDoubleLayer")
100 <<
"MuRingForwardDoubleLayer::compatible is assuming inside-out direction: "<<
insideOut;
112 if ( !myState.
isValid())
return make_pair(
false, myState);
119 const float nSigma = 3.;
123 deltaR += nSigma *
sqrt(err.
xx() + err.
yy());
130 return make_pair( tmp.inside(myState.
localPosition()), myState);
134 vector<GeometricSearchDet::DetWithState>
138 vector<DetWithState>
result;
139 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuRingForwardDoubleLayer";
140 pair<bool, TrajectoryStateOnSurface> compat =
145 LogTrace(metname) <<
" MuRingForwardDoubleLayer::compatibleDets: not compatible"
146 <<
" (should not have been selected!)";
158 for(vector<DetGroup>::const_iterator itDG=vectorGroups.begin();
159 itDG!=vectorGroups.end();itDG++){
160 for(vector<DetGroupElement>::const_iterator itDGE=itDG->begin();
161 itDGE!=itDG->end();itDGE++){
162 result.push_back(
DetWithState(itDGE->det(),itDGE->trajectoryState()));
174 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuRingForwardDoubleLayer";
175 vector<GeometricSearchDet::DetWithState> detWithStates1, detWithStates2;
177 LogTrace(metname) <<
"groupedCompatibleDets are currently given always in inside-out order";
186 if(!detWithStates1.empty()) result.push_back(
DetGroup(detWithStates1) );
187 if(!detWithStates2.empty()) result.push_back(
DetGroup(detWithStates2) );
188 LogTrace(metname) <<
"DoubleLayer Compatible dets: " << result.size();
195 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuRingForwardDoubleLayer";
198 double r = gp.
perp();
200 if(backRings.size() > 1)
204 assert(innerRing && outerRing);
207 LogTrace(metname) <<
"In a crack:" << crackInner <<
" " << r <<
" " << crackOuter;
208 if(r > crackInner && r < crackOuter)
return true;
221 std::vector<const GeomDet*>::const_iterator frontItr = frontDets.begin(),
222 lastFront = frontDets.end(),
223 backItr = backDets.begin(),
224 lastBack = backDets.end();
227 for( ; frontItr != lastFront; ++frontItr)
229 float frontz = fabs( (**frontItr).surface().position().z() );
230 for( ; backItr != lastBack; ++backItr)
232 float backz = fabs( (**backItr).surface().position().z() );
233 assert(frontz < backz);
virtual std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &, const Propagator &, const MeasurementEstimator &) const
const std::string metname
virtual const std::vector< const GeomDet * > & basicComponents() const
LocalVector localDirection() const
LocalPoint localPosition() const
void setSurface(BoundDisk *cp)
std::vector< const GeomDet * > theBasicComponents
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
GlobalPoint globalPosition() const
const Bounds & bounds() const
std::vector< const ForwardDetRing * > theRings
LocalError positionError() const
Geom::Theta< T > theta() const
virtual float thickness() const =0
virtual const std::vector< const ForwardDetRing * > & rings() const
Return the vector of rings.
const T & max(const T &a, const T &b)
virtual std::vector< DetGroup > groupedCompatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
virtual const BoundSurface & surface() const GCC11_FINAL
The surface of the GeometricSearchDet.
Tan< T >::type tan(const T &t)
const LocalTrajectoryError & localError() const
bool isCrack(const GlobalPoint &gp) const
MuRingForwardLayer theFrontLayer
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
double deltaR(double eta1, double eta2, double phi1, double phi2)
virtual const std::vector< const GeomDet * > & basicComponents() const
virtual const BoundDisk & specificSurface() const GCC11_FINAL
virtual BoundDisk * computeSurface()
std::vector< std::vector< double > > tmp
std::vector< const GeometricSearchDet * > theComponents
bool isInsideOut(const TrajectoryStateOnSurface &tsos) const
GlobalVector globalMomentum() const
MuRingForwardDoubleLayer(const std::vector< const ForwardDetRing * > &frontRings, const std::vector< const ForwardDetRing * > &backRings)
Constructor, takes ownership of pointers.
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
MuRingForwardLayer theBackLayer
const BasicVectorType & basicVector() const
const BoundDisk & specificSurface() const
Return the ring surface as a BoundDisk.
T dot(const Basic3DVector &rh) const
Scalar product, or "dot" product, with a vector of same type.