22 float sinTheta = sqrt(1.0-cosTheta*cosTheta);
23 v.z = magnitude*cosTheta;
24 v.y = magnitude*sinTheta*
sin(phi);
25 v.x = magnitude*sinTheta*
cos(phi);
32 return sqrt(
v.x*
v.x+
v.y*
v.y+
v.z*
v.z);
38 return v.x*
v.x+
v.y*
v.y+
v.z*
v.z;
44 return v1.
x*v2.
x+v1.
y*v2.
y+v1.
z*v2.
z;
52 v.x = v1.
y*v2.
z - v1.
z*v2.
y;
53 v.y = v1.
z*v2.
x - v1.
x*v2.
z;
54 v.z = v1.
x*v2.
y - v1.
y*v2.
x;
133const float pi = 3.1415926536;
134const float rad = 57.29578;
147 s.r = sqrt(
v.x*
v.x+
v.y*
v.y+
v.z*
v.z);
152 s.theta = acos(
v.z/
s.r);
155 rxy = sqrt(
v.x*
v.x+
v.y*
v.y);
160 if(
v.y>=0.0)
s.phi = acos(
v.x/rxy);
162 s.phi = 2.0*
pi-acos(
v.x/rxy);
float Dot(vector3 v1, vector3 v2)
vector3 TransformTo(vector3 v, vector3 ux, vector3 uy, vector3 uz)
vector3 TransformFrom(vector3 v, vector3 ux, vector3 uy, vector3 uz)
vector3 InitV1(float phi, float cosTheta, float magnitude)
vector3 AddV(vector3 v1, vector3 v2)
vector3 Intersection(float z0, vector3 vec, vector3 pos)
polar XYZ2Polar(vector3 v)
vector3 TimesA(float a, vector3 v)
vector3 SubV(vector3 v1, vector3 v2)
vector3 Cross(vector3 v1, vector3 v2)
vector3 InitV(float x, float y, float z)
double sin(const BesAngle a)
double cos(const BesAngle a)
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v