|
|
Go to the documentation of this file. 1 #ifndef GeometryVector_Basic3DVectorLD_h
2 #define GeometryVector_Basic3DVectorLD_h
5 #pragma clang diagnostic push
6 #pragma clang diagnostic ignored "-Wunused-private-field"
14 typedef long double T;
46 template <
class OtherPo
int>
134 return ret *= my_mag;
187 return x() *
v.x() +
y() *
v.y() +
z() *
v.z();
203 y() *
v.z() -
v.y() *
z(),
z() *
v.x() -
v.z() *
x(),
x() *
v.y() -
v.x() *
y());
220 return RT(
a.x() +
b.x(),
a.y() +
b.y(),
a.z() +
b.z());
224 return RT(
a.x() -
b.x(),
a.y() -
b.y(),
a.z() -
b.z());
231 return RT(
a.x() +
b.x(),
a.y() +
b.y(),
a.z() +
b.z());
238 return RT(
a.x() +
b.x(),
a.y() +
b.y(),
a.z() +
b.z());
245 return RT(
a.x() -
b.x(),
a.y() -
b.y(),
a.z() -
b.z());
252 return RT(
a.x() -
b.x(),
a.y() -
b.y(),
a.z() -
b.z());
265 return v1.
x() * v2.
x() + v1.
y() * v2.
y() + v1.
z() * v2.
z();
271 return v1.
x() * v2.
x() + v1.
y() * v2.
y() + v1.
z() * v2.
z();
288 template <
typename S>
290 return static_cast<long double>(
t) *
v;
293 template <
typename S>
295 return static_cast<long double>(
t) *
v;
301 template <
typename S>
303 long double t = 1 /
s;
310 #pragma clang diagnostic pop
313 #endif // GeometryVector_Basic3DVectorLD_h
Basic3DVector(const Geom::Theta< U > &theta, const Geom::Phi< U > &phi, const T &r)
ret
prodAgent to be discontinued
class Basic3DVector< long double > __attribute__((aligned(16)))
Geom::Theta< T > theta() const
T z() const
Cartesian z coordinate.
T transverse() const
Another name for perp()
Basic3DVector< typename PreciseFloatType< T, U >::Type > cross(const Basic3DVector< U > &v) const
Basic3DVector< long double > Basic3DVectorLD
Basic3DVector(const OtherPoint &p)
T perp2() const
Squared magnitude of transverse component.
T perp2() const
Squared magnitude of transverse component.
Basic3DVector operator-() const
Unary minus, returns a vector with components (-x(),-y(),-z())
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Basic3DVector & operator+=(const Basic3DVector< U > &p)
T y() const
Cartesian y coordinate.
Basic3DVector(const Basic3DVector< U > &p)
Copy constructor and implicit conversion from Basic3DVector of different precision.
Basic3DVector< long double > operator+(const Basic3DVector< long double > &a, const Basic3DVector< long double > &b)
vector sum and subtraction of vectors of possibly different precision
long double operator*(const Basic3DVector< long double > &v1, const Basic3DVector< long double > &v2)
scalar product of vectors of same precision
Geom::Cylindrical2Cartesian< T > Cylindrical
Geom::Phi< T > phi() const
T y() const
Cartesian y coordinate.
Basic3DVector & operator*=(T t)
Scaling by a scalar value (multiplication)
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
Basic3DVector< T > MathVector
Basic3DVector cross(const Basic3DVector &v) const
Vector product, or "cross" product, with a vector of same type.
Basic3DVector< long double > operator/(const Basic3DVector< long double > &v, S s)
Geom::Spherical2Cartesian< T > Spherical
PreciseFloatType< T, U >::Type dot(const Basic3DVector< U > &v) const
Basic3DVector & operator-=(const Basic3DVector< U > &p)
Basic3DVector(const Basic3DVector &p)
Copy constructor from same type. Should not be needed but for gcc bug 12685.
bool operator==(const Basic3DVector &rh) const
Basic3DVector(const T &x, const T &y, const T &z)
construct from cartesian coordinates
Basic2DVector< T > xy() const
T perp() const
Magnitude of transverse component.
T dot(const Basic3DVector &v) const
Scalar product, or "dot" product, with a vector of same type.
T x() const
Cartesian x coordinate.
T perp() const
Magnitude of transverse component.
Basic3DVector unit() const
Basic3DVector(const Basic2DVector< T > &p)
constructor from 2D vector (X and Y from 2D vector, z set to zero)
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
Geom::Phi< T > phi() const
Basic3DVector operator-() const
Unary minus, returns a vector with components (-x(),-y(),-z())
Basic3DVector & operator/=(T t)
Scaling by a scalar value (division)