1 #ifndef GeometryVector_Basic3DVectorLD_h
2 #define GeometryVector_Basic3DVectorLD_h
5 #pragma clang diagnostic push
6 #pragma clang diagnostic ignored "-Wunused-private-field"
15 typedef long double T;
50 template <
class OtherPo
int>
98 return x()==rh.
x() &&
y()==rh.
y() &&
z()==rh.
z();
143 if (my_mag==0)
return *
this;
191 return x()*v.
x() +
y()*v.
y() +
z()*v.
z();
201 return x()*v.
x() +
y()*v.
y() +
z()*v.
z();
207 z()*v.
x() - v.
z()*
x(),
208 x()*v.
y() - v.
x()*
y());
221 z()*v.
x() - v.
z()*
x(),
222 x()*v.
y() - v.
x()*
y());
241 return RT(a.
x()+b.
x(), a.
y()+b.
y(), a.
z()+b.
z());
246 return RT(a.
x()-b.
x(), a.
y()-b.
y(), a.
z()-b.
z());
255 return RT(a.
x()+b.
x(), a.
y()+b.
y(), a.
z()+b.
z());
262 return RT(a.
x()+b.
x(), a.
y()+b.
y(), a.
z()+b.
z());
270 return RT(a.
x()-b.
x(), a.
y()-b.
y(), a.
z()-b.
z());
277 return RT(a.
x()-b.
x(), a.
y()-b.
y(), a.
z()-b.
z());
290 return v1.
x()*v2.
x() + v1.
y()*v2.
y() + v1.
z()*v2.
z();
296 return v1.
x()*v2.
x() + v1.
y()*v2.
y() + v1.
z()*v2.
z();
314 template <
typename S>
316 return static_cast<long double>(
t)*v;
319 template <
typename S>
321 return static_cast<long double>(
t)*v;
328 template <
typename S>
338 #pragma clang diagnostic pop
341 #endif // GeometryVector_Basic3DVectorLD_h
tuple ret
prodAgent to be discontinued
Basic2DVector< T > xy() const
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
Geom::Phi< T > phi() const
Basic3DVector cross(const Basic3DVector &v) const
Vector product, or "cross" product, with a vector of same type.
MatrixMeschach operator+(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
T perp2() const
Squared magnitude of transverse component.
Geom::Spherical2Cartesian< T > Spherical
Geom::Theta< T > theta() const
MatrixMeschach operator-(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
T x() const
Cartesian x coordinate.
T dot(const Basic3DVector &v) const
Scalar product, or "dot" product, with a vector of same type.
Geom::Phi< T > phi() const
Basic3DVector(const Basic3DVector< U > &p)
Copy constructor and implicit conversion from Basic3DVector of different precision.
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
T transverse() const
Another name for perp()
Basic3DVector< long double > operator/(const Basic3DVector< long double > &v, S s)
bool operator==(const Basic3DVector &rh) const
Basic3DVector & operator/=(T t)
Scaling by a scalar value (division)
T z() const
Cartesian z coordinate.
Basic3DVector(const Geom::Theta< U > &theta, const Geom::Phi< U > &phi, const T &r)
Basic3DVector & operator*=(T t)
Scaling by a scalar value (multiplication)
Basic3DVector< T > MathVector
Basic3DVector & operator+=(const Basic3DVector< U > &p)
Basic3DVector< typename PreciseFloatType< T, U >::Type > cross(const Basic3DVector< U > &v) const
Basic3DVector(const OtherPoint &p)
T perp() const
Magnitude of transverse component.
Basic3DVector & operator-=(const Basic3DVector< U > &p)
Basic3DVector< long double > Basic3DVectorLD
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
T value() const
Explicit access to value in case implicit conversion not OK.
T value() const
Explicit access to value in case implicit conversion not OK.
T perp() const
Magnitude of transverse component.
float __attribute__((vector_size(8))) float32x2_t
Basic3DVector(const Basic2DVector< T > &p)
constructor from 2D vector (X and Y from 2D vector, z set to zero)
T perp2() const
Squared magnitude of transverse component.
double S(const TLorentzVector &, const TLorentzVector &)
PreciseFloatType< T, U >::Type dot(const Basic3DVector< U > &v) const
Basic3DVector(const T &x, const T &y, const T &z)
construct from cartesian coordinates
T y() const
Cartesian y coordinate.
MatrixMeschach operator*(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
T z() const
Cartesian z coordinate.
Geom::Cylindrical2Cartesian< T > Cylindrical
Basic3DVector operator-() const
Unary minus, returns a vector with components (-x(),-y(),-z())
Basic3DVector unit() const
Basic3DVector(const Basic3DVector &p)
Copy constructor from same type. Should not be needed but for gcc bug 12685.
Geom::Theta< T > theta() const
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)