9 if (!checkPhi(plane.phiSpan()))
11 if (!checkZ(plane.zSpan()))
14 if (!checkPhi(plane.phiSpan()))
16 if (!checkR(plane.rSpan()))
31 float phi = hitDetPhiRange.mean();
32 float r = hitDetRRange.mean();
44 double ts_phi = tsDir.
phi();
45 if (!hitDetPhiRange.inside(ts_phi)) {
46 while (ts_phi >= hitDetPhiRange.max())
48 while (ts_phi < hitDetPhiRange.min())
50 if (!hitDetPhiRange.inside(ts_phi))
53 double cosGamma = tsDir.
dot(planeNorm);
55 double dx1 = loc_dist(radius, ts_phi, hitDetPhiRange.min(), cosGamma);
56 double dx2 = loc_dist(radius, ts_phi, hitDetPhiRange.max(), cosGamma);
59 double dy1 = ts_z - hitDetZRange.min();
60 double dy2 = hitDetZRange.max() - ts_z;
62 x_loc =
max(dx1, dx2);
63 y_loc =
max(dy1, dy2);
82 double x_glob[4], y_glob[4], z_glob[4];
83 x_glob[0] = hitDetRRange.min() *
cos(hitDetPhiRange.min());
84 y_glob[0] = hitDetRRange.min() *
sin(hitDetPhiRange.min());
85 x_glob[1] = hitDetRRange.max() *
cos(hitDetPhiRange.min());
86 y_glob[1] = hitDetRRange.max() *
sin(hitDetPhiRange.min());
87 x_glob[2] = hitDetRRange.min() *
cos(hitDetPhiRange.max());
88 y_glob[2] = hitDetRRange.min() *
sin(hitDetPhiRange.max());
89 x_glob[3] = hitDetRRange.max() *
cos(hitDetPhiRange.max());
90 y_glob[3] = hitDetRRange.max() *
sin(hitDetPhiRange.max());
92 for (
int idx = 0; idx < 4; idx++) {
93 double dx_glob = x_glob[idx] - ts.
x();
94 double dy_glob = y_glob[idx] - ts.
y();
95 double dz_glob = -(dx_glob * planeNorm.
x() + dy_glob * planeNorm.
y()) / planeNorm.
z();
96 z_glob[idx] = dz_glob + ts.
z();
99 for (
int idx = 0; idx < 4; idx++) {
101 x_loc =
max(x_loc, fabs(lp.
x() - ts_loc.
x()));
102 y_loc =
max(y_loc, fabs(lp.
y() - ts_loc.
y()));
110 double sinDphi =
sin(ts_phi - range_phi);
111 double cosDphi =
sqrt(1 - sinDphi * sinDphi);
112 double sinGamma =
sqrt(1 - cosGamma * cosGamma);
113 double sinBeta = fabs(cosDphi * cosGamma - sinDphi * sinGamma);
114 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
Cos< T >::type cos(const T &t)
bool checkR(const Range &detRRange) const
bool phiLess(float phi1, float phi2)
Vector3DBase unit() const
bool rangesIntersect(const Range &a, const Range &b)
Global3DVector GlobalVector