10 if (!checkPhi(plane.phiSpan()))
return false;
11 if (!checkZ(plane.zSpan()))
return false;
13 if (!checkPhi(plane.phiSpan()))
return false;
14 if (!checkR(plane.rSpan()))
return false;
25 const Range & detRRange)
const 29 const Range & detZRange)
const 35 float phi = hitDetPhiRange.mean();
36 float r = hitDetRRange.mean();
50 double ts_phi = tsDir.
phi();
51 if (! hitDetPhiRange.inside(ts_phi) ) {
52 while (ts_phi >= hitDetPhiRange.max() ) ts_phi -= 2*
M_PI;
53 while (ts_phi < hitDetPhiRange.min() ) ts_phi += 2*
M_PI;
56 double cosGamma = tsDir.
dot(planeNorm);
58 double dx1 = loc_dist( radius, ts_phi, hitDetPhiRange.min(), cosGamma);
59 double dx2 = loc_dist( radius, ts_phi, hitDetPhiRange.max(), cosGamma);
62 double dy1 = ts_z - hitDetZRange.min();
63 double dy2 = hitDetZRange.max() - ts_z;
86 double x_glob[4], y_glob[4], z_glob[4];
87 x_glob[0] = hitDetRRange.min()*
cos(hitDetPhiRange.min());
88 y_glob[0] = hitDetRRange.min()*
sin(hitDetPhiRange.min());
89 x_glob[1] = hitDetRRange.max()*
cos(hitDetPhiRange.min());
90 y_glob[1] = hitDetRRange.max()*
sin(hitDetPhiRange.min());
91 x_glob[2] = hitDetRRange.min()*
cos(hitDetPhiRange.max());
92 y_glob[2] = hitDetRRange.min()*
sin(hitDetPhiRange.max());
93 x_glob[3] = hitDetRRange.max()*
cos(hitDetPhiRange.max());
94 y_glob[3] = hitDetRRange.max()*
sin(hitDetPhiRange.max());
97 double dx_glob = x_glob[
idx] - ts.
x();
98 double dy_glob = y_glob[
idx] - ts.
y();
99 double dz_glob = -(dx_glob * planeNorm.
x() + dy_glob*planeNorm.
y()) / planeNorm.
z();
100 z_glob[
idx] = dz_glob + ts.
z();
105 x_loc =
max(x_loc, fabs(lp.
x()-ts_loc.
x()));
106 y_loc =
max(y_loc, fabs(lp.
y()-ts_loc.
y()));
114 double radius,
double ts_phi,
double range_phi,
double cosGamma)
const 116 double sinDphi =
sin(ts_phi - range_phi);
117 double cosDphi =
sqrt(1-sinDphi*sinDphi);
118 double sinGamma =
sqrt(1-cosGamma*cosGamma);
119 double sinBeta = fabs(cosDphi*cosGamma - sinDphi* sinGamma);
120 return radius * fabs(sinDphi) / sinBeta;
GlobalPoint center() const
bool operator()(const BoundPlane &plane) const
MeasurementEstimator::Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const
Sin< T >::type sin(const T &t)
Geom::Phi< T > phi() const
Global3DPoint GlobalPoint
double loc_dist(double radius, double ts_phi, double range_phi, double cosGamma) const
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
bool checkZ(const Range &detZRange) const
bool checkPhi(const OuterHitPhiPrediction::Range &detPhiRange) const
bool rangesIntersect(const Range &a, const Range &b)
Cos< T >::type cos(const T &t)
bool checkR(const Range &detRRange) const
Global3DVector GlobalVector