CMS 3D CMS Logo

Functions
approx_asin.h File Reference
#include <cmath>

Go to the source code of this file.

Functions

template<int DEGREE>
float approx_asin_P (float z)
 
template<>
float approx_asin_P< 11 > (float z)
 
template<>
float approx_asin_P< 3 > (float z)
 
template<>
float approx_asin_P< 5 > (float z)
 
template<>
float approx_asin_P< 7 > (float z)
 
template<>
float approx_asin_P< 9 > (float z)
 
template<int DEGREE>
float unsafe_acos (float x)
 
template<int DEGREE>
float unsafe_acos07 (float x)
 
template<int DEGREE>
float unsafe_acos71 (float x)
 
template<int DEGREE>
float unsafe_asin (float x)
 
template<int DEGREE>
float unsafe_asin07 (float x)
 
template<int DEGREE>
float unsafe_asin71 (float x)
 

Function Documentation

template<int DEGREE>
float approx_asin_P ( float  z)
inline
template<>
float approx_asin_P< 11 > ( float  z)
inline

Definition at line 26 of file approx_asin.h.

References f, and detailsBasic3DVector::z.

26  {
27  return 1.f + z * (0.1668075025081634521484375f + z * (7.20207393169403076171875e-2f + z * (6.607978045940399169921875e-2f + z * ((-3.6048568785190582275390625e-2f) + z * 0.10574872791767120361328125f))));
28 }
float float float z
double f[11][100]
template<>
float approx_asin_P< 3 > ( float  z)
inline

Definition at line 10 of file approx_asin.h.

References detailsBasic3DVector::z.

10  {
11  return 1.f + z * 0.2133004963397979736328125f;
12 }
float float float z
template<>
float approx_asin_P< 5 > ( float  z)
inline

Definition at line 14 of file approx_asin.h.

References detailsBasic3DVector::z.

14  {
15  return 1.f + z * (0.154711246490478515625f + z * 0.1322681009769439697265625f);
16 }
float float float z
template<>
float approx_asin_P< 7 > ( float  z)
inline

Definition at line 18 of file approx_asin.h.

References f, and detailsBasic3DVector::z.

Referenced by ThirdHitPredictionFromCircle::transverseIP().

18  {
19  return 1.f + z * (0.169519245624542236328125f + z * (4.9031913280487060546875e-2f + z * 0.10941398143768310546875));
20 }
float float float z
double f[11][100]
template<>
float approx_asin_P< 9 > ( float  z)
inline

Definition at line 22 of file approx_asin.h.

References f, and detailsBasic3DVector::z.

22  {
23  return 1.f + z * (0.166020572185516357421875f + z * (8.44048559665679931640625e-2f + z * (1.11602735705673694610595703125e-3f + z * 0.103476583957672119140625f)));
24 }
float float float z
double f[11][100]
template<int DEGREE>
float unsafe_acos ( float  x)
inline

Definition at line 90 of file approx_asin.h.

References funct::abs(), f, and vertices_cff::x.

90  {
91  return (std::abs(x)<0.71f) ? unsafe_acos07<DEGREE>(x) : unsafe_acos71<DEGREE>(x);
92 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
template<int DEGREE>
float unsafe_acos07 ( float  x)
inline

Definition at line 63 of file approx_asin.h.

References constexpr, M_PI, and vertices_cff::x.

63  {
64  constexpr float pihalf = M_PI/2;
65  return pihalf - unsafe_asin07<DEGREE>(x);
66 }
#define constexpr
#define M_PI
template<int DEGREE>
float unsafe_acos71 ( float  x)
inline

Definition at line 71 of file approx_asin.h.

References constexpr, M_PI, pi, mathSSE::sqrt(), vertices_cff::x, and detailsBasic3DVector::z.

71  {
72  constexpr float pi = M_PI;
73  auto z=1.f-x*x;
74  z= std::sqrt(z)*approx_asin_P<DEGREE>(z);
75  return x>0 ? z : pi-z;
76 }
#define constexpr
float float float z
const Double_t pi
T sqrt(T t)
Definition: SSEVec.h:18
#define M_PI
template<int DEGREE>
float unsafe_asin ( float  x)
inline

Definition at line 85 of file approx_asin.h.

References funct::abs(), f, and vertices_cff::x.

85  {
86  return (std::abs(x)<0.71f) ? unsafe_asin07<DEGREE>(x) : unsafe_asin71<DEGREE>(x);
87 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
template<int DEGREE>
float unsafe_asin07 ( float  x)
inline

Definition at line 57 of file approx_asin.h.

References vertices_cff::x, and detailsBasic3DVector::z.

57  {
58  auto z=x*x;
59  return x*approx_asin_P<DEGREE>(z);
60 }
float float float z
template<int DEGREE>
float unsafe_asin71 ( float  x)
inline

Definition at line 79 of file approx_asin.h.

References constexpr, M_PI, and vertices_cff::x.

79  {
80  constexpr float pihalf = M_PI/2;
81  return pihalf - unsafe_acos71<DEGREE>(x);
82 }
#define constexpr
#define M_PI