9 #include <vdt/vdtMath.h> 18 Stat(
const char*
in) :
name(in){};
20 std::cout <<
name <<
": atan0 calls tot/large/over1: " << natan <<
"/" << nlarge <<
"/" << over1 << std::endl;
44 return x * (
T(1) + (x *
x) * (
T(0.33331906795501708984375) + (x *
x) *
T(0.135160386562347412109375)));
49 inline float atan0(
float t) {
55 (((8.05374449538e-2
f * z2 - 1.38776856032E-1
f) * z2 + 1.99777106478E-1
f) * z2 - 3.33329491539E-1
f) * z2 * z + z;
60 inline float atanClip(
float t) {
61 constexpr float tanPi8 = 0.4142135623730950;
62 constexpr float pio8 = 3.141592653589793238 / 8;
64 return std::copysign((at < tanPi8) ? atan0(at) : pio8, t);
70 : theNumberOfStrips(ns),
72 theAWidthInverse(1.
f / aw),
75 theCentreToIntersection(r),
76 theYAxisOrientation(yAx),
78 theRadialSigma(
std::
pow(dh, 2.
f) * (1.
f / 12.
f)) {
85 LogTrace(
"TkRadialStripTopology") <<
"TkRadialStripTopology: constructed with" 86 <<
" strips = " << ns <<
" width = " << aw <<
" rad " 87 <<
" det_height = " << dh <<
" ctoi = " << r <<
" phi_edge = " <<
thePhiOfOneEdge 131 auto t = (y2 * x1 -
y1 *
x2) / (
y1 * y2 + x1 *
x2);
162 const float phi = atanClip(t);
169 const double t1(tan15(phi)),
201 cs(t / (1 + t * t)),
s2(t *
cs), c2(1 -
s2),
207 uu((c2 * e.
xx() - 2 * cs * e.
xy() +
s2 * e.
yy()) * T2), vv((
s2 * e.
xx() + 2 * cs * e.
xy() + c2 * e.
yy()) * R2),
Point3DBase< Scalar, LocalTag > LocalPoint
int nstrips() const override
float yAxisOrientation() const override
float strip(const LocalPoint &) const override
float yDistanceToIntersection(float y) const override
ret
prodAgent to be discontinued
unique_ptr< ClusterSequence > cs
TkRadialStripTopology(int ns, float aw, float dh, float r, int yAx=1, float yMid=0.)
Sin< T >::type sin(const T &t)
float localStripLength(const LocalPoint &) const override
float localPitch(const LocalPoint &) const override
float stripAngle(float strip) const override
float angularWidth() const override
float coveredStrips(const LocalPoint &lp1, const LocalPoint &lp2) const override
LocalPoint localPosition(float strip) const override
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
int nearestStrip(const LocalPoint &) const override
LocalError localError(float strip, float stripErr2) const override
Cos< T >::type cos(const T &t)
float centreToIntersection() const override
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
float yCentreOfStripPlane() const override
MeasurementPoint measurementPosition(const LocalPoint &) const override
float phiOfOneEdge() const override
float originToIntersection() const override
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
float xOfStrip(int strip, float y) const override
MeasurementError measurementError(const LocalPoint &, const LocalError &) const override
float detHeight() const override
int channel(const LocalPoint &) const override
float theYAxisOrientation
Power< A, B >::type pow(const A &a, const B &b)