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;
26 const Range & detRRange)
const 30 const Range & detZRange)
const 36 float phi = hitDetPhiRange.mean();
37 float r = hitDetRRange.mean();
51 double ts_phi = tsDir.
phi();
52 if (! hitDetPhiRange.inside(ts_phi) ) {
53 while (ts_phi >= hitDetPhiRange.max() ) ts_phi -= 2*
M_PI;
54 while (ts_phi < hitDetPhiRange.min() ) ts_phi += 2*
M_PI;
57 double cosGamma = tsDir.
dot(planeNorm);
59 double dx1 = loc_dist( radius, ts_phi, hitDetPhiRange.min(), cosGamma);
60 double dx2 = loc_dist( radius, ts_phi, hitDetPhiRange.max(), cosGamma);
63 double dy1 = ts_z - hitDetZRange.min();
64 double dy2 = hitDetZRange.max() - ts_z;
87 double x_glob[4], y_glob[4], z_glob[4];
88 x_glob[0] = hitDetRRange.min()*
cos(hitDetPhiRange.min());
89 y_glob[0] = hitDetRRange.min()*
sin(hitDetPhiRange.min());
90 x_glob[1] = hitDetRRange.max()*
cos(hitDetPhiRange.min());
91 y_glob[1] = hitDetRRange.max()*
sin(hitDetPhiRange.min());
92 x_glob[2] = hitDetRRange.min()*
cos(hitDetPhiRange.max());
93 y_glob[2] = hitDetRRange.min()*
sin(hitDetPhiRange.max());
94 x_glob[3] = hitDetRRange.max()*
cos(hitDetPhiRange.max());
95 y_glob[3] = hitDetRRange.max()*
sin(hitDetPhiRange.max());
98 double dx_glob = x_glob[
idx] - ts.
x();
99 double dy_glob = y_glob[
idx] - ts.
y();
100 double dz_glob = -(dx_glob * planeNorm.
x() + dy_glob*planeNorm.
y()) / planeNorm.
z();
101 z_glob[
idx] = dz_glob + ts.
z();
106 x_loc =
max(x_loc, fabs(lp.
x()-ts_loc.
x()));
107 y_loc =
max(y_loc, fabs(lp.
y()-ts_loc.
y()));
115 double radius,
double ts_phi,
double range_phi,
double cosGamma)
const 117 double sinDphi =
sin(ts_phi - range_phi);
118 double cosDphi =
sqrt(1-sinDphi*sinDphi);
119 double sinGamma =
sqrt(1-cosGamma*cosGamma);
120 double sinBeta = fabs(cosDphi*cosGamma - sinDphi* sinGamma);
121 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
bool phiLess(float phi1, float phi2)
Global3DVector GlobalVector