45 double rho1 ( r1*std::sin(theta1));
46 setZ(r1 * std::cos(theta1));
47 setY(rho1 * std::sin (phi1));
48 setX(rho1 * std::cos (phi1));
62 setY(rho1 * std::sin (phi1));
63 setX(rho1 * std::cos (phi1));
72 std::cerr <<
"Hep3Vector::setRhoPhiTheta() - "
73 <<
"Attempt set vector components rho, phi, theta with zero rho -- "
74 <<
"zero vector is returned, ignoring theta and phi" << std::endl;
88 setZ(rho1 / std::tan (theta1));
89 setY(rho1 * std::sin (phi1));
90 setX(rho1 * std::cos (phi1));
99 std::cerr <<
"Hep3Vector::setRhoPhiEta() - "
100 <<
"Attempt set vector components rho, phi, eta with zero rho -- "
101 <<
"zero vector is returned, ignoring eta and phi" << std::endl;
105 double theta1 (2 * std::atan ( std::exp (-eta1) ));
106 setZ(rho1 / std::tan (theta1));
107 setY(rho1 * std::sin (phi1));
108 setX(rho1 * std::cos (phi1));
121 }
else if (
z() < v.
z() ) {
123 }
else if (
y() > v.
y() ) {
125 }
else if (
y() < v.
y() ) {
127 }
else if (
x() > v.
x() ) {
129 }
else if (
x() < v.
x() ) {
166 double v1v2 = std::fabs(
dot(v));
169 return ( (
mag2() == 0) && (v.
mag2() == 0) ) ? 0 : 1;
172 double abscross = v1Xv2.
mag();
173 if ( abscross >= v1v2 ) {
176 return abscross/v1v2;
185 static const double TOOBIG = std::pow(2.0,507);
186 static const double SCALE = std::pow(2.0,-507);
187 double v1v2 = std::fabs(
dot(v));
189 return ( (
mag2() == 0) && (v.
mag2() == 0) );
191 if ( v1v2 >= TOOBIG ) {
195 double x2 = sv1Xsv2.
mag2();
196 double limit = v1v2*SCALE*SCALE;
198 return ( x2 <= limit );
204 if ( (std::fabs (v1Xv2.
x()) > TOOBIG) ||
205 (std::fabs (v1Xv2.
y()) > TOOBIG) ||
206 (std::fabs (v1Xv2.
z()) > TOOBIG) ) {
218 double v1v2 = std::fabs(
dot(v));
224 double abscross = v1Xv2.
mag();
225 if ( v1v2 >= abscross ) {
228 return v1v2/abscross;
238 static const double TOOBIG = std::pow(2.0,507);
239 static const double SCALE = std::pow(2.0,-507);
240 double v1v2 = std::fabs(
dot(v));
242 if ( v1v2 >= TOOBIG ) {
246 double x2 = sv1Xsv2.
mag2();
248 double y2 = v1v2*SCALE*SCALE;
249 return ( y2*y2 <= limit );
255 if ( (std::fabs (eps_v1Xv2.
x()) > TOOBIG) ||
256 (std::fabs (eps_v1Xv2.
y()) > TOOBIG) ||
257 (std::fabs (eps_v1Xv2.
z()) > TOOBIG) ) {
263 return ( v1v2*v1v2 <= eps_v1Xv2.
mag2() );
293 for (k=0; k<8; k++) {
294 value.u.i[k] = negOne.u.i[k] | posTwo.u.i[k];
double epsilon(double density, double temperature)
void setRhoPhiEta(double rho, double phi, double eta)
bool operator>=(const Hep3Vector &v) const
static DLL_API double tolerance
void setSpherical(double r, double theta, double phi)
Hep3Vector cross(const Hep3Vector &) const
double dot(const Hep3Vector &) const
bool operator>(const Hep3Vector &v) const
bool isOrthogonal(const Hep3Vector &v, double epsilon=tolerance) const
double negativeInfinity() const
static double setTolerance(double tol)
bool operator<=(const Hep3Vector &v) const
void setCylindrical(double r, double phi, double z)
void set(double x, double y, double z)
int compare(const Hep3Vector &v) const
double howParallel(const Hep3Vector &v) const
double howOrthogonal(const Hep3Vector &v) const
void setRhoPhiTheta(double rho, double phi, double theta)
bool operator<(const Hep3Vector &v) const
bool isParallel(const Hep3Vector &v, double epsilon=tolerance) const