13 if (!checkPhi(detRange.
phiRange()))
return 0;
14 if (!checkZ(detRange.
zRange()))
return 0;
17 if (!checkPhi(detRange.
phiRange()))
return 0;
18 if (!checkR(detRange.
rRange()))
return 0;
29 const Range & detRRange)
const
33 const Range & detZRange)
const
39 float phi = hitDetPhiRange.mean();
40 float r = hitDetRRange.mean();
54 double ts_phi = tsDir.
phi();
55 if (! hitDetPhiRange.inside(ts_phi) ) {
56 while (ts_phi >= hitDetPhiRange.max() ) ts_phi -= 2*
M_PI;
57 while (ts_phi < hitDetPhiRange.min() ) ts_phi += 2*
M_PI;
60 double cosGamma = tsDir.
dot(planeNorm);
62 double dx1 = loc_dist( radius, ts_phi, hitDetPhiRange.min(), cosGamma);
63 double dx2 = loc_dist( radius, ts_phi, hitDetPhiRange.max(), cosGamma);
66 double dy1 = ts_z - hitDetZRange.min();
67 double dy2 = hitDetZRange.max() - ts_z;
90 double x_glob[4], y_glob[4], z_glob[4];
91 x_glob[0] = hitDetRRange.min()*
cos(hitDetPhiRange.min());
92 y_glob[0] = hitDetRRange.min()*
sin(hitDetPhiRange.min());
93 x_glob[1] = hitDetRRange.max()*
cos(hitDetPhiRange.min());
94 y_glob[1] = hitDetRRange.max()*
sin(hitDetPhiRange.min());
95 x_glob[2] = hitDetRRange.min()*
cos(hitDetPhiRange.max());
96 y_glob[2] = hitDetRRange.min()*
sin(hitDetPhiRange.max());
97 x_glob[3] = hitDetRRange.max()*
cos(hitDetPhiRange.max());
98 y_glob[3] = hitDetRRange.max()*
sin(hitDetPhiRange.max());
101 double dx_glob = x_glob[
idx] - ts.
x();
102 double dy_glob = y_glob[
idx] - ts.
y();
103 double dz_glob = -(dx_glob * planeNorm.
x() + dy_glob*planeNorm.
y()) / planeNorm.
z();
104 z_glob[
idx] = dz_glob + ts.
z();
109 x_loc =
max(x_loc, fabs(lp.
x()-ts_loc.
x()));
110 y_loc =
max(y_loc, fabs(lp.
y()-ts_loc.
y()));
118 double radius,
double ts_phi,
double range_phi,
double cosGamma)
const
120 double sinDphi =
sin(ts_phi - range_phi);
121 double cosDphi =
sqrt(1-sinDphi*sinDphi);
122 double sinGamma =
sqrt(1-cosGamma*cosGamma);
123 double sinBeta = fabs(cosDphi*cosGamma - sinDphi* sinGamma);
124 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
const T & max(const T &a, const T &b)
bool rangesIntersect(const Range &a, const Range &b)
Cos< T >::type cos(const T &t)
bool checkR(const Range &detRRange) const
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
Global3DVector GlobalVector