19 const double PI = 2.0 * acos(0.);
25 inline double phi(
double x,
double y);
27 inline double phi(
double xy1[2],
double xy2[2]);
28 inline double phi(
float xy1[2],
float xy2[2]);
31 inline double theta(
double x,
double y,
double z);
33 inline double theta(
double xyz1[3],
double xyz2[3]);
34 inline double theta(
float xyz1[3],
float xyz2[3]);
36 inline double theta(
double etap);
39 inline double eta(
double x,
double y,
double z);
41 inline double eta(
double xyz1[3],
double xyz2[3]);
42 inline double eta(
float xyz1[3],
float xyz2[3]);
44 inline double eta(
double th);
47 inline double y(
double E,
double pz);
50 inline double delta_phi(
double ph11,
double phi2);
57 inline double delta_R(
double eta1,
double phi1,
double eta2,
double phi2);
60 inline void uvectors(
double u[3],
double xyz1[3],
double xyz2[3]);
61 inline void uvectors(
float u[3],
float xyz1[3],
float xyz2[3]);
73 double dxy1[2] = {xy1[0], xy1[1]};
74 double dxy2[2] = {xy2[0], xy2[1]};
75 return phi(dxy1, dxy2);
79 double x = xy2[0] - xy1[0];
80 double y = xy2[1] - xy1[1];
85 double PHI = fabs(phi1 - phi2);
98 double dphi = phia - phib;
109 return sqrt(deta * deta + dphi * dphi);
113 double x = xyz2[0] - xyz1[0];
114 double y = xyz2[1] - xyz1[1];
115 double z = xyz2[2] - xyz1[2];
120 double dxyz1[3] = {xyz1[0], xyz1[1], xyz1[2]};
121 double dxyz2[3] = {xyz2[0], xyz2[1], xyz2[2]};
122 return theta(dxyz1, dxyz2);
130 double x = xyz2[0] - xyz1[0];
131 double y = xyz2[1] - xyz1[1];
132 double z = xyz2[2] - xyz1[2];
137 double dxyz1[3] = {xyz1[0], xyz1[1], xyz1[2]};
138 double dxyz2[3] = {xyz2[0], xyz2[1], xyz2[2]};
139 return eta(dxyz1, dxyz2);
149 if (th >=
PI - 0.0001)
151 return -
log(
tan(th / 2.0));
157 double xdiff = xyz2[0] - xyz1[0];
158 double ydiff = xyz2[1] - xyz1[1];
159 double zdiff = xyz2[2] - xyz1[2];
160 double s =
sqrt(xdiff * xdiff + ydiff * ydiff + zdiff * zdiff);
174 double dxyz1[3] = {xyz1[0], xyz1[1], xyz1[2]};
175 double dxyz2[3] = {xyz2[0], xyz2[1], xyz2[2]};
186 #endif // INC_ANGLESUTIL
double theta(double x, double y, double z)
double delta_eta(double eta1, double eta2)
double tanl_from_theta(double theta)
double theta(double etap)
double theta_from_tanl(double tanl)
double signed_delta_phi(double ph11, double phi2)
double phi(float xy1[2], float xy2[2])
Tan< T >::type tan(const T &t)
double delta_R(double eta1, double phi1, double eta2, double phi2)
double delta_phi(double ph11, double phi2)
void uvectors(float u[3], float xyz1[3], float xyz2[3])
double phi(double x, double y)
double y(double E, double pz)
double eta(double x, double y, double z)
void uvectors(double u[3], double xyz1[3], double xyz2[3])
MPlex< T, D1, D2, N > atan2(const MPlex< T, D1, D2, N > &y, const MPlex< T, D1, D2, N > &x)