20 const double PI=2.0*acos(0.);
26 inline double phi(
double x,
double y);
28 inline double phi(
double xy1[2],
double xy2[2]);
29 inline double phi(
float xy1[2],
float xy2[2]);
32 inline double theta(
double x,
double y,
double z);
34 inline double theta(
double xyz1[3],
double xyz2[3]);
35 inline double theta(
float xyz1[3],
float xyz2[3]);
37 inline double theta(
double etap);
40 inline double eta(
double x,
double y,
double z);
42 inline double eta(
double xyz1[3],
double xyz2[3]);
43 inline double eta(
float xyz1[3],
float xyz2[3]);
45 inline double eta(
double th);
48 inline double y(
double E,
double pz);
51 inline double delta_phi(
double ph11,
double phi2);
55 inline double delta_eta(
double eta1,
double eta2);
58 inline double delta_R(
double eta1,
double phi1,
double eta2,
double phi2);
61 inline void uvectors(
double u[3],
double xyz1[3],
double xyz2[3]);
62 inline void uvectors(
float u[3],
float xyz1[3],
float xyz2[3]);
71 double PHI=atan2(y, x);
77 double dxy1[2]={xy1[0],xy1[1]};
78 double dxy2[2]={xy2[0],xy2[1]};
79 return phi(dxy1,dxy2);
85 double x=xy2[0]-xy1[0];
86 double y=xy2[1]-xy1[1];
93 double PHI=fabs(phi1-phi2);
110 double dphi=phia-phib;
118 double deta = eta1-eta2;
120 return sqrt(deta*deta + dphi*dphi);
126 double x=xyz2[0]-xyz1[0];
127 double y=xyz2[1]-xyz1[1];
128 double z=xyz2[2]-xyz1[2];
129 return theta(x, y, z);
134 double dxyz1[3]={xyz1[0],xyz1[1],xyz1[2]};
135 double dxyz2[3]={xyz2[0],xyz2[1],xyz2[2]};
136 return theta(dxyz1,dxyz2);
142 return atan2(
sqrt(x*x + y*y), z);
148 return 2.0*atan(
exp(-etap));
154 double x=xyz2[0]-xyz1[0];
155 double y=xyz2[1]-xyz1[1];
156 double z=xyz2[2]-xyz1[2];
162 double dxyz1[3]={xyz1[0],xyz1[1],xyz1[2]};
163 double dxyz2[3]={xyz2[0],xyz2[1],xyz2[2]};
164 return eta(dxyz1,dxyz2);
190 double xdiff=xyz2[0]-xyz1[0];
191 double ydiff=xyz2[1]-xyz1[1];
192 double zdiff=xyz2[2]-xyz1[2];
193 double s=
sqrt(xdiff*xdiff+ydiff*ydiff+zdiff*zdiff);
208 double dxyz1[3]={xyz1[0],xyz1[1],xyz1[2]};
209 double dxyz2[3]={xyz2[0],xyz2[1],xyz2[2]};
218 return tan(
PI/2.0 - theta);
223 return PI/2.0 - atan(tanl);
226 #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_from_tanl(double tanl)
double signed_delta_phi(double ph11, double phi2)
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)
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])