17#ifndef ROOT_Math_GenVector_PositionVector3D
18#define ROOT_Math_GenVector_PositionVector3D 1
52 template <
class CoordSystem,
class Tag = DefaultCoordinateSystemTag >
96 template <
class ForeignVector>
109 template <
class LAVector>
122 template <
class OtherCoords>
132 template <
class OtherCoords>
143 template <
class ForeignVector>
158 template <
class LAVector>
189 { IT
a = begin; IT
b = ++begin; IT
c = ++begin;
191 assert (++begin==end);
213 { IT
a = begin; IT
b = ++begin; IT
c = ++begin;
215 assert (++begin==end);
361 template<
class OtherCoords >
363 return X()*
v.x() +
Y()*
v.y() +
Z()*
v.z();
371 template<
class OtherCoords >
375 Z()*
v.x() -
v.z()*
X(),
376 X()*
v.y() -
v.x()*
Y() );
390 template <
class OtherCoords>
400 template <
class OtherCoords>
464 template <
class OtherCoords,
class OtherTag>
467 template <
class OtherCoords,
class OtherTag>
470 template <
class OtherCoords,
class OtherTag>
473 template <
class OtherCoords,
class OtherTag>
476 template <
class OtherCoords,
class OtherTag>
479 template <
class OtherCoords,
class OtherTag>
504 template <
class CoordSystem,
class U>
521 template <
class CoordSystem1,
class CoordSystem2,
class U>
523 DisplacementVector3D<CoordSystem1,U>
536 template <
class CoordSystem1,
class CoordSystem2,
class U>
538 PositionVector3D<CoordSystem2,U>
549 template <
class CoordSystem1,
class CoordSystem2,
class U>
551 PositionVector3D<CoordSystem2,U>
562 template <
class CoordSystem1,
class CoordSystem2,
class U>
564 PositionVector3D<CoordSystem2,U>
575 class char_t,
class traits_t,
class T,
class U,
577 std::basic_ostream<char_t, traits_t> &
operator<<(std::basic_ostream<char_t, traits_t> &os,
578 PositionVector3D<T, U>
const &
v)
585 v.GetCoordinates(
a,
b,
c);
589 typedef GenVector_detail::BitReproducible BR;
602 class char_t,
class traits_t,
class T,
class U,
604 std::basic_ostream<char_t, traits_t> &
operator<<(std::basic_ostream<char_t, traits_t> &os,
605 PositionVector3D<T, U>
const &
v)
610 os <<
"(" <<
v.x()[i] <<
"," <<
v.y()[i] <<
"," <<
v.z()[i] <<
") ";
617 template<
class char_t,
class traits_t,
class T,
class U >
619 std::basic_istream<char_t,traits_t> &
643 v.SetCoordinates(
a,
b,
c);
typedef void((*Func_t)())
Class describing a 3D cartesian coordinate system (x, y, z coordinates)
Class describing a generic displacement vector in 3 dimensions.
Class describing a generic position vector (point) in 3 dimensions.
PositionVector3D & operator+=(const DisplacementVector3D< OtherCoords, Tag > &v)
Self Addition with a displacement vector.
PositionVector3D(const PositionVector3D< OtherCoords, OtherTag > &)
PositionVector3D< CoordSystem, Tag > & SetZ(Scalar zz)
Change Z - Cartesian3D coordinates only.
Scalar Y() const
Cartesian Y, converting if necessary from internal coordinate system.
PositionVector3D(const DisplacementVector3D< OtherCoords, OtherTag > &)
PositionVector3D(const ForeignVector &v)
Construct from a foreign 3D vector type, for example, Hep3Vector Precondition: v must implement metho...
Scalar Z() const
Cartesian Z, converting if necessary from internal coordinate system.
PositionVector3D< CoordSystem, Tag > & SetR(Scalar rr)
Change R - Polar3D coordinates only.
bool operator!=(const PositionVector3D &rhs) const
void GetCoordinates(Scalar dest[]) const
get internal data into a C-style array of 3 Scalar numbers
PositionVector3D< CoordSystem, Tag > & SetEta(Scalar etaval)
Change Eta - CylindricalEta3D coordinates only.
void GetCoordinates(IT begin, IT end) const
get internal data into 3 Scalars at *begin to *end (3 past begin)
CoordSystem CoordinateType
PositionVector3D & operator-=(const DisplacementVector3D< OtherCoords, OtherTag > &)
PositionVector3D< CoordSystem, Tag > & SetPhi(Scalar ang)
Change Phi - Polar3D or CylindricalEta3D coordinates.
Scalar X() const
Cartesian X, converting if necessary from internal coordinate system.
PositionVector3D & operator-=(const DisplacementVector3D< OtherCoords, Tag > &v)
Self Difference with a displacement vector.
PositionVector3D< CoordSystem, Tag > & SetRho(Scalar rr)
Change Rho - CylindricalEta3D coordinates only.
PositionVector3D operator*(Scalar a) const
Multiply a vector by a real number.
PositionVector3D & operator=(const DisplacementVector3D< OtherCoords, OtherTag > &)
PositionVector3D & operator=(const PositionVector3D< OtherCoords, Tag > &v)
Assignment operator from a position vector of arbitrary type.
PositionVector3D< CoordSystem, Tag > & SetCoordinates(const Scalar src[])
Set internal data based on a C-style array of 3 Scalar numbers.
PositionVector3D & operator+=(const DisplacementVector3D< OtherCoords, OtherTag > &)
PositionVector3D< CoordSystem, Tag > & SetY(Scalar yy)
Change Y - Cartesian3D coordinates only.
PositionVector3D & operator/=(Scalar a)
divide this vector by a scalar quantity
Scalar Theta() const
Polar theta, converting if necessary from internal coordinate system.
CoordSystem::Scalar Scalar
PositionVector3D< CoordSystem, Tag > & SetXYZ(Scalar a, Scalar b, Scalar c)
set the values of the vector from the cartesian components (x,y,z) (if the vector is held in polar or...
PositionVector3D operator/(Scalar a) const
Division of a vector with a real number.
bool operator==(const PositionVector3D &rhs) const
Exact equality.
Scalar Phi() const
Polar phi, converting if necessary from internal coordinate system.
void GetCoordinates(Scalar &a, Scalar &b, Scalar &c) const
get internal data into 3 Scalar numbers
PositionVector3D< CoordSystem, Tag > & SetCoordinates(Scalar a, Scalar b, Scalar c)
Set internal data based on 3 Scalar numbers.
PositionVector3D(const DisplacementVector3D< T, Tag > &p)
Construct from an arbitrary displacement vector.
Scalar Rho() const
Cylindrical transverse component rho.
PositionVector3D Cross(const DisplacementVector3D< OtherCoords, Tag > &v) const
Return vector (Cross) product of this point with a displacement, as a point vector in this coordinate...
PositionVector3D & operator=(const PositionVector3D< OtherCoords, OtherTag > &)
Scalar Perp2() const
Transverse component squared (rho^2 in cylindrical coordinates.
Scalar Mag2() const
Magnitute squared ( r^2 in spherical coordinate)
PositionVector3D< CoordSystem, Tag > & SetTheta(Scalar ang)
Change Theta - Polar3D coordinates only.
PositionVector3D & operator*=(Scalar a)
multiply this vector by a scalar quantity
PositionVector3D()
Default constructor.
Scalar Eta() const
Polar eta, converting if necessary from internal coordinate system.
Scalar Dot(const DisplacementVector3D< OtherCoords, Tag > &v) const
Return the scalar (Dot) product of this with a displacement vector in any coordinate system,...
PositionVector3D< CoordSystem, Tag > & SetCoordinates(IT begin, IT end)
Set internal data based on 3 Scalars at *begin to *end.
PositionVector3D(const Scalar &a, const Scalar &b, const Scalar &c)
Construct from three values of type Scalar.
PositionVector3D< CoordSystem, Tag > & SetX(Scalar xx)
Change X - Cartesian3D coordinates only.
void GetCoordinates(IT begin) const
get internal data into 3 Scalars at *begin
PositionVector3D(const PositionVector3D< T, Tag > &v)
Construct from a position vector expressed in different coordinates, or using a different Scalar type...
const CoordSystem & Coordinates() const
Retrieve a copy of the coordinates object.
Scalar R() const
Polar R, converting if necessary from internal coordinate system.
Namespace for new Math classes and functions.
char_t get_manip(std::basic_ios< char_t, traits_t > &ios, manip_t m)
std::basic_istream< char_t, traits_t > & require_delim(std::basic_istream< char_t, traits_t > &is, manip_t m)
void set_manip(std::basic_ios< char_t, traits_t > &ios, manip_t m, char_t ch)
std::ostream & operator<<(std::ostream &os, const AxisAngle &a)
Stream Output and Input.
std::basic_istream< char_t, traits_t > & operator>>(std::basic_istream< char_t, traits_t > &is, DisplacementVector2D< T, U > &v)
DisplacementVector2D< CoordSystem1, U > operator+(DisplacementVector2D< CoordSystem1, U > v1, const DisplacementVector2D< CoordSystem2, U > &v2)
Addition of DisplacementVector2D vectors.
DisplacementVector2D< CoordSystem1, U > operator-(DisplacementVector2D< CoordSystem1, U > v1, DisplacementVector2D< CoordSystem2, U > const &v2)
Difference between two DisplacementVector2D vectors.
AxisAngle operator*(RotationX const &r1, AxisAngle const &r2)
Multiplication of an axial rotation by an AxisAngle.
Rotation3D::Scalar Scalar
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
#define dest(otri, vertexptr)