
alex
By: a guest on
Mar 5th, 2009 | syntax:
C++ | size: 0.48 KB | hits: 108 | expires: Never
void vtest(void) {
Double_t theta;
Double_t phi;
TVector3 v(1,2,3);
theta = v.Theta();
phi = v.Phi();
cout << "theta = " << theta << ", phi = " << phi << "\n";
v.SetTheta(-0.1);
theta = v.Theta();
phi = v.Phi();
cout << "theta = " << theta << ", phi = " << phi << " <- Why is theta positive?\n";
v.SetPhi(-0.1);
theta = v.Theta();
phi = v.Phi();
cout << "theta = " << theta << ", phi = " << phi << " <- Setting phi seems to work\n";
}