55 while ( _p4parent.d3mag() != 0 )
63 double theta =
Angles( _p4parent, 1 );
64 double phi =
Angles( _p4parent, 2 );
66 rp4p =
Helrotate( _p4parent, phi, theta );
81 return Angles( _p4daug, i );
88 if ( i == 0 )
return _bp4p;
89 if ( i == 1 )
return _rotatep4p;
90 if ( i == 2 )
return _rotatep4d;
91 if ( i == 3 )
return _bst;
93 std::cerr << __FILE__ <<
":" << __LINE__ <<
": should not reach here" << std::endl;
99 double cp =
cos( phi );
100 double sp =
sin( phi );
101 double ct =
cos( theta );
102 double st =
sin( theta );
103 double t =
p1.get( 0 ), x =
p1.get( 1 ), y =
p1.get( 2 ), z =
p1.get( 3 );
104 double xp = x * cp * ct + y * sp * ct - z * st, yp = -x * sp + y * cp,
105 zp = x * cp * st + y * sp * st + z * ct;
106 Rp.
set(
t, xp, yp, zp );
112 double rxy = sqrt( pow( bbst.
get( 1 ), 2. ) + pow( bbst.
get( 2 ), 2. ) );
113 if ( bbst.
d3mag() <= 1e-10 )
115 if ( i == 0 )
return 0.;
116 else if ( i == 1 )
return 0.;
117 else if ( i == 2 )
return 0.;
120 cout <<
"Angles(i): i<=2" << endl;
124 else if ( rxy <= 1e-10 )
126 if ( i == 0 )
return bbst.
d3mag();
127 if ( i == 1 )
return 0.;
128 if ( i == 2 )
return 0.;
131 cout <<
"Angles(i): i<=2" << endl;
137 double theta = acos( bbst.
get( 3 ) / bbst.
d3mag() );
138 double csphi = bbst.
get( 1 ) / bbst.
d3mag() /
sin( theta );
139 if ( fabs( csphi ) > 1.0 ) csphi = csphi / fabs( csphi );
140 double phi = acos( csphi );
141 if ( bbst.
get( 2 ) < 0.0 ) phi = 2 * 3.1415926 - phi;
142 if ( i == 0 )
return bbst.
d3mag();
143 else if ( i == 1 )
return theta;
144 else if ( i == 2 )
return phi;
147 cout <<
"Angles(i): i<=2" << endl;
153double djmn(
int j,
int m,
int n,
double theta ) {
154 int j2 = j * 2,
m2 = m * 2,
n2 =
n * 2;
159double djmn(
double j,
double m,
double n,
double theta ) {
160 int j2 = (int)( j * 2 * 1.1 ),
m2 = (int)( m * 2 * 1.1 ),
n2 = (int)(
n * 2 * 1.1 );
166 int j2 = j * 2,
m2 = m * 2,
n2 =
n * 2;
179EvtComplex Djmn(
double j,
double m,
double n,
double phi,
double theta,
double gamma ) {
180 int j2 = (int)( j * 2 * 1.1 ),
m2 = (int)( m * 2 * 1.1 ),
n2 = (int)(
n * 2 * 1.1 );
EvtComplex Djmn(int j, int m, int n, double phi, double theta, double gamma)
double djmn(int j, int m, int n, double theta)
double sin(const BesAngle a)
double cos(const BesAngle a)
EvtVector4R checkst(int i)
EvtVector4R Helrotate(EvtVector4R p1, double phi, double theta)
EvtVector4R checkparent()
double Angles(EvtVector4R, int)
void set(int i, double d)
static double d(int j, int m1, int m2, double theta)