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: " 49 <<
" Z: " << specificSurface().position().z()
50 <<
" R1: " << specificSurface().innerRadius()
51 <<
" R2: " << specificSurface().outerRadius();
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;
70 float zPos = (zmax+zmin)/2.;
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);
113 float deltaR = surface().bounds().thickness()/2. *
121 deltaR += nSigma *
sqrt(err.
xx() + err.
yy());
124 float zPos = (zmax()+zmin())/2.;
126 zmin()-zPos, zmax()-zPos);
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);
TkRotation< Scalar > RotationType
virtual std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &, const Propagator &, const MeasurementEstimator &) const
virtual bool inside(const Local3DPoint &p) const
Determine if the point is inside the bounds.
const std::string metname
virtual const std::vector< const GeomDet * > & basicComponents() const
LocalVector localDirection() const
LocalPoint localPosition() const
std::vector< const GeomDet * > theBasicComponents
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
GlobalPoint globalPosition() const
std::vector< const ForwardDetRing * > theRings
LocalError positionError() const
Geom::Theta< T > theta() const
Point3DBase< Scalar, GlobalTag > PositionType
virtual const std::vector< const ForwardDetRing * > & rings() const
Return the vector of rings.
virtual std::vector< DetGroup > groupedCompatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
Tan< T >::type tan(const T &t)
const LocalTrajectoryError & localError() const
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
bool isCrack(const GlobalPoint &gp) const
MuRingForwardLayer theFrontLayer
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
double deltaR(double eta1, double eta2, double phi1, double phi2)
virtual const std::vector< const GeomDet * > & basicComponents() const
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
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.
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.