22 const vector<const ForwardDetRing*>& backRings) :
24 theFrontLayer(frontRings),
25 theBackLayer(backRings),
31 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuRingForwardDoubleLayer";
38 for (vector<const ForwardDetRing*>::const_iterator it=
theRings.begin();
40 vector<const GeomDet*> tmp2 = (*it)->basicComponents();
46 LogTrace(metname) <<
"Constructing MuRingForwardDoubleLayer: "
62 float rmin =
min( frontDisk.innerRadius(), backDisk.innerRadius() );
63 float rmax =
max( frontDisk.outerRadius(), backDisk.outerRadius() );
64 float zmin = frontDisk.position().z();
65 float halfThickness = frontDisk.bounds().thickness()/2.;
66 zmin = (zmin > 0) ? zmin-halfThickness : zmin+halfThickness;
67 float zmax = backDisk.position().z();
68 halfThickness = backDisk.bounds().thickness()/2.;
69 zmax = (zmax > 0) ? zmax+halfThickness : zmax-halfThickness;
76 zmin-zPos, zmax-zPos));
87 std::pair<bool, TrajectoryStateOnSurface>
93 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuRingForwardDoubleLayer";
97 LogTrace(
"Muon|RecoMuon|RecoMuonDetLayers|MuRingForwardDoubleLayer")
98 <<
"MuRingForwardDoubleLayer::compatible is assuming inside-out direction: "<<
insideOut;
110 if ( !myState.
isValid())
return make_pair(
false, myState);
117 const float nSigma = 3.;
121 deltaR += nSigma *
sqrt(err.
xx() + err.
yy());
128 return make_pair( tmp.inside(myState.
localPosition()), myState);
132 vector<GeometricSearchDet::DetWithState>
136 vector<DetWithState>
result;
137 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuRingForwardDoubleLayer";
138 pair<bool, TrajectoryStateOnSurface> compat =
143 LogTrace(metname) <<
" MuRingForwardDoubleLayer::compatibleDets: not compatible"
144 <<
" (should not have been selected!)";
156 for(vector<DetGroup>::const_iterator itDG=vectorGroups.begin();
157 itDG!=vectorGroups.end();itDG++){
158 for(vector<DetGroupElement>::const_iterator itDGE=itDG->begin();
159 itDGE!=itDG->end();itDGE++){
160 result.push_back(
DetWithState(itDGE->det(),itDGE->trajectoryState()));
172 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuRingForwardDoubleLayer";
173 vector<GeometricSearchDet::DetWithState> detWithStates1, detWithStates2;
175 LogTrace(metname) <<
"groupedCompatibleDets are currently given always in inside-out order";
184 if(!detWithStates1.empty()) result.push_back(
DetGroup(detWithStates1) );
185 if(!detWithStates2.empty()) result.push_back(
DetGroup(detWithStates2) );
186 LogTrace(metname) <<
"DoubleLayer Compatible dets: " << result.size();
193 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuRingForwardDoubleLayer";
196 double r = gp.
perp();
198 if(backRings.size() > 1)
202 assert(innerRing && outerRing);
205 LogTrace(metname) <<
"In a crack:" << crackInner <<
" " << r <<
" " << crackOuter;
206 if(r > crackInner && r < crackOuter)
return true;
219 std::vector<const GeomDet*>::const_iterator frontItr = frontDets.begin(),
220 lastFront = frontDets.end(),
221 backItr = backDets.begin(),
222 lastBack = backDets.end();
225 for( ; frontItr != lastFront; ++frontItr)
227 float frontz = fabs( (**frontItr).surface().position().z() );
228 for( ; backItr != lastBack; ++backItr)
230 float backz = fabs( (**backItr).surface().position().z() );
231 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.