boca::Vector3< Value_ > Class Template Reference

Three dimensionial vector. More...

#include <PseudoJet.hh>

Inheritance diagram for boca::Vector3< Value_ >:
[legend]
Collaboration diagram for boca::Vector3< Value_ >:
[legend]

Public Member Functions

Constructor
constexpr Vector3 ()
 Default constructor. More...
 
constexpr Vector3 (Value_ x, Value_ y, Value_ z)
 Constructor accepting three scalars. More...
 
 Vector3 (Value_ value, Dim3 dim_3)
 Constructor accepting one scalar and its direction. More...
 
constexpr Vector3 (Vector2< Value_ > const &transversal, Value_ z)
 Constructor accepting a two vector and a scalar. More...
 
template<typename Value_2_ >
constexpr Vector3 (Vector3< Value_2_ > const &vector)
 Constructor accepting a vector. More...
 
constexpr Vector3 (TVector3 const &vector)
 Constructor accepting a root::TVector3. More...
 
Setter
void SetUniform (Value_ value)
 Set x, y, z according to value. More...
 
void SetMag (Value_ magnitude)
 Set the magnitude keeping theta and phi constant. More...
 
void SetPerp (Value_ perp)
 Set the transverse component keeping phi and z constant. More...
 
void SetPhi (boca::Angle const &phi)
 Set phi keeping the magnitue and theta constant. More...
 
void SetMagThetaPhi (Value_ mag, boca::Angle const &theta, boca::Angle const &phi)
 Set mag, theta, phi. More...
 
void SetTheta (boca::Angle const &theta)
 Set theta keeping mag and phi constant. More...
 
void SetPerpThetaPhi (Value_ perp, boca::Angle const &theta, boca::Angle const &phi)
 Set Perpendicular, Theta and Phi. More...
 
void SetPerpEtaPhi (Value_ const &perp, boca::Angle const &eta, boca::Angle const &phi)
 Set Perpendicular, Eta and Phi. More...
 
Accessors and Getters
constexpr Value_ const & X () const
 Getter for X. More...
 
constexpr Value_ const & Y () const
 Getter for Y. More...
 
constexpr Value_ const & Z () const
 Getter for Z. More...
 
constexpr Vector2< Value_ > Transversal () const
 Transversal vector \((x, y)\). More...
 
Value_ & X ()
 Accessor for X. More...
 
Value_ & Y ()
 Accessor for Y. More...
 
Value_ & Z ()
 Accessor for Z. More...
 
Vector2< Value_ > & Transversal ()
 Transversal vector \((x, y)\). More...
 
Angles
boca::Angle Phi () const
 The azimuth angle \(\phi\) restricted to \([-\pi,\pi]\). More...
 
boca::Angle Theta () const
 The polar angle \(\theta\). More...
 
double CosTheta () const
 Cosine of the polar angle \(\cos \theta\). More...
 
double SinTheta2 () const
 Square of the sine of the polar angle \(\sin^2 \theta\). More...
 
double SinTheta () const
 Sine of the polar angle \(\sin \theta\). More...
 
template<typename Value_2_ >
boca::Angle DeltaPhiTo (Vector3< Value_2_ > const &vector) const
 Difference to vector in azimuth \(\Delta\phi\) restricted to \([-\pi,\pi]\). More...
 
template<typename Value_2_ >
boca::Angle DeltaEtaTo (Vector3< Value_2_ > const &vector) const
 Difference to vector in PseudoRapidity \(\Delta\eta\). More...
 
template<typename Value_2_ >
boca::Angle DeltaRTo (Vector3< Value_2_ > const &vector) const
 Difference to vector in \(\Delta R = \sqrt{(\Delta \eta)^2 + (\Delta \phi)^2}\). More...
 
boca::Angle Angle (Vector3 const &vector) const
 The angle to vector. More...
 
double Tan2 (Vector3 const &vector)
 Square of the tangent of the polar angle \(\tan(\theta)^2\) to a vector. More...
 
boca::Angle PseudoRapidity () const
 Pseudorapidity \(\eta = -\ln(\tan(\frac{\theta}{2}))\). More...
 
boca::Angle Eta () const
 The azimuth angle \(\phi\) restricted to \([-\pi,\pi]\). More...
 
Magnitudes
constexpr ValueSquare Mag2 () const
 The magnitude squared \(r^2 = x^2 + y^2 + z^2\). More...
 
constexpr Value_ Mag () const
 The magnitude \(r = \sqrt{x^2 + y^2 + z^2}\). More...
 
constexpr ValueSquare Perp2 () const
 The transverse component squared \(\rho^2 = x^2 + y^2\). More...
 
constexpr Value_ Perp () const
 The transverse component \(\rho = \sqrt{x^2 + y^2}\). More...
 
template<typename Value_2_ >
constexpr ValueSquare Perp2 (Vector3< Value_2_ > const &vector) const
 The transverse component \(x^2 + y^2\) to a vector. More...
 
template<typename Value_2_ >
constexpr Value_ Perp (Vector3< Value_2_ > const &vector) const
 The transverse component \(\sqrt{x^2 + y^2}\) to a vector. More...
 
Rotations
Vector3Rotate (boca::Angle const &phi, Dim3 dim_1, Dim3 dim_2)
 Rotate by phi in (dim_1, dim_2) plain. More...
 
Vector3Rotate (boca::Angle const &phi, Dim3 dim)
 Rotate by phi around axis dim. More...
 
template<typename Value_2_ >
auto & Rotate (boca::Angle angle, Vector3< Value_2_ > const &axis)
 Rotates around the axis specified by another vector. More...
 
template<typename Value_2_ >
auto & Transform (Matrix3< Value_2_ > const &matrix)
 Transformation with a Rotation matrix. More...
 
template<typename Value_2_ >
constexpr void RotateUz (Vector3< Value_2_ > const &vector)
 Rotates reference frame from \(U_z\) to \(U_z^\prime\). More...
 
Vectors
Vector3< double > Unit () const
 Unit vector parallel to this. More...
 
Vector3 Orthogonal () const
 Vector orthogonal to this. More...
 
Vector2< boca::AngleEtaPhiVector () const
 Angluar vector ( \(\eta\), \(\phi\)) More...
 
Products
template<typename Value_2_ >
constexpr Vector3< ValueProduct< Value_2_ > > Scale (Value_2_ const &scalar) const
 Scale vector with a scalar. More...
 
template<typename Value_2_ >
constexpr ValueProduct< Value_2_ > Dot (Vector3< Value_2_ > const &vector) const
 Dot product between two vector. More...
 
template<typename Value_2_ >
constexpr Vector3< ValueProduct< Value_2_ > > Cross (Vector3< Value_2_ > const &vector) const
 Cross product between two vector. More...
 
template<typename Value_2_ , typename Value_3 >
constexpr ValueCubed< Value_2_, Value_3 > Triple (Vector3< Value_2_ > const &vector_1, Vector3< Value_3 > const &vector_2) const
 Triple product between three vectors. More...
 

Operators

constexpr bool operator< (Vector3 const &vector) const
 Less than comparison. More...
 
constexpr bool operator== (Vector3 const &vector) const
 Equality comparison. More...
 
template<typename Value_2_ , typename = OnlyIfNotOrSameQuantity<Value_2_>>
Vector3operator+= (Vector3< Value_2_ > const &vector)
 Sum of two vectors. More...
 
template<typename Value_2_ , typename = OnlyIfNotOrSameQuantity<Value_2_>>
Vector3operator-= (Vector3< Value_2_ > const &vector)
 Difference of two vectors. More...
 
template<typename Value_2_ , typename = OnlyIfNotQuantity<Value_2_>>
Vector3operator*= (Value_2_ scalar)
 Scaling with real numbers. More...
 
template<typename Value_2_ >
auto & operator*= (Matrix3< Value_2_ > const &matrix)
 Multiplication with a matrix. More...
 
template<typename Value_2_ , typename = OnlyIfNotQuantity<Value_2_>>
Vector3operator/= (Value_2_ scalar)
 division by scalar More...
 
constexpr Vector3 operator- () const
 Unary minus. More...
 
Value_ const & operator[] (Dim3 dim_3) const
 Components by index. More...
 
Value_ & operator[] (Dim3 dim_3)
 Components by index. More...
 
template<typename Value_2_ >
constexpr friend Vector3< ValueProduct< Value_2_ > > operator^ (Vector3 const &vector_1, Vector3< Value_2_ > const &vector_2)
 Cross product. More...
 
template<typename Value_2_ >
constexpr friend Vector3< ValueQuotient< Value_2_ > > operator/ (Vector3 const &vector, Value_2_ const &scalar)
 division by scalar More...
 
auto & operator<< (std::ostream &stream, Vector3< Value_ > const &vector)
 Output stream operator. More...
 

Iterators

using Dimension = Dim3
 Const begin. More...
 
constexpr ConstIterator< boca::Vector3, Value_ > begin () const
 Const begin. More...
 
constexpr ConstIterator< boca::Vector3, Value_ > end () const
 Const end. More...
 
Iterator< boca::Vector3, Value_ > begin ()
 begin More...
 
Iterator< boca::Vector3, Value_ > end ()
 end More...
 

Detailed Description

template<class Value_>
class boca::Vector3< Value_ >

Three dimensionial vector.

Member Typedef Documentation

template<class Value_>
using boca::Vector3< Value_ >::Dimension = Dim3

Const begin.

Constructor & Destructor Documentation

template<class Value_>
constexpr boca::Vector3< Value_ >::Vector3 ( )
inline

Default constructor.

template<class Value_>
constexpr boca::Vector3< Value_ >::Vector3 ( Value_  x,
Value_  y,
Value_  z 
)
inline

Constructor accepting three scalars.

template<class Value_>
boca::Vector3< Value_ >::Vector3 ( Value_  value,
Dim3  dim_3 
)
inline

Constructor accepting one scalar and its direction.

template<class Value_>
constexpr boca::Vector3< Value_ >::Vector3 ( Vector2< Value_ > const &  transversal,
Value_  z 
)
inline

Constructor accepting a two vector and a scalar.

template<class Value_>
template<typename Value_2_ >
constexpr boca::Vector3< Value_ >::Vector3 ( Vector3< Value_2_ > const &  vector)
inline

Constructor accepting a vector.

template<class Value_>
constexpr boca::Vector3< Value_ >::Vector3 ( TVector3< Value_ > const &  vector)
inline

Constructor accepting a root::TVector3.

Member Function Documentation

template<class Value_>
boca::Angle boca::Vector3< Value_ >::Angle ( Vector3< Value_ > const &  vector) const
inline

The angle to vector.

template<class Value_>
constexpr ConstIterator<boca::Vector3, Value_> boca::Vector3< Value_ >::begin ( ) const
inline

Const begin.

template<class Value_>
Iterator<boca::Vector3, Value_> boca::Vector3< Value_ >::begin ( )
inline

begin

template<class Value_>
double boca::Vector3< Value_ >::CosTheta ( ) const
inline

Cosine of the polar angle \(\cos \theta\).

template<class Value_>
template<typename Value_2_ >
constexpr Vector3<ValueProduct<Value_2_> > boca::Vector3< Value_ >::Cross ( Vector3< Value_2_ > const &  vector) const
inline

Cross product between two vector.

template<class Value_>
template<typename Value_2_ >
boca::Angle boca::Vector3< Value_ >::DeltaEtaTo ( Vector3< Value_2_ > const &  vector) const
inline

Difference to vector in PseudoRapidity \(\Delta\eta\).

template<class Value_>
template<typename Value_2_ >
boca::Angle boca::Vector3< Value_ >::DeltaPhiTo ( Vector3< Value_2_ > const &  vector) const
inline

Difference to vector in azimuth \(\Delta\phi\) restricted to \([-\pi,\pi]\).

template<class Value_>
template<typename Value_2_ >
boca::Angle boca::Vector3< Value_ >::DeltaRTo ( Vector3< Value_2_ > const &  vector) const
inline

Difference to vector in \(\Delta R = \sqrt{(\Delta \eta)^2 + (\Delta \phi)^2}\).

template<class Value_>
template<typename Value_2_ >
constexpr ValueProduct<Value_2_> boca::Vector3< Value_ >::Dot ( Vector3< Value_2_ > const &  vector) const
inline

Dot product between two vector.

template<class Value_>
constexpr ConstIterator<boca::Vector3, Value_> boca::Vector3< Value_ >::end ( ) const
inline

Const end.

template<class Value_>
Iterator<boca::Vector3, Value_> boca::Vector3< Value_ >::end ( )
inline

end

template<class Value_>
boca::Angle boca::Vector3< Value_ >::Eta ( ) const
inline

The azimuth angle \(\phi\) restricted to \([-\pi,\pi]\).

template<class Value_>
Vector2<boca::Angle> boca::Vector3< Value_ >::EtaPhiVector ( ) const
inline

Angluar vector ( \(\eta\), \(\phi\))

template<class Value_>
constexpr Value_ boca::Vector3< Value_ >::Mag ( ) const
inline

The magnitude \(r = \sqrt{x^2 + y^2 + z^2}\).

template<class Value_>
constexpr ValueSquare boca::Vector3< Value_ >::Mag2 ( ) const
inline

The magnitude squared \(r^2 = x^2 + y^2 + z^2\).

template<class Value_>
template<typename Value_2_ , typename = OnlyIfNotQuantity<Value_2_>>
Vector3& boca::Vector3< Value_ >::operator*= ( Value_2_  scalar)
inline

Scaling with real numbers.

template<typename Value_1_ >
template<typename Value_2_ >
auto & boca::Vector3< Value_1_ >::operator*= ( Matrix3< Value_2_ > const &  matrix)

Multiplication with a matrix.

template<class Value_>
template<typename Value_2_ , typename = OnlyIfNotOrSameQuantity<Value_2_>>
Vector3& boca::Vector3< Value_ >::operator+= ( Vector3< Value_2_ > const &  vector)
inline

Sum of two vectors.

template<class Value_>
constexpr Vector3 boca::Vector3< Value_ >::operator- ( ) const
inline

Unary minus.

template<class Value_>
template<typename Value_2_ , typename = OnlyIfNotOrSameQuantity<Value_2_>>
Vector3& boca::Vector3< Value_ >::operator-= ( Vector3< Value_2_ > const &  vector)
inline

Difference of two vectors.

template<class Value_>
template<typename Value_2_ , typename = OnlyIfNotQuantity<Value_2_>>
Vector3& boca::Vector3< Value_ >::operator/= ( Value_2_  scalar)
inline

division by scalar

template<class Value_>
constexpr bool boca::Vector3< Value_ >::operator< ( Vector3< Value_ > const &  vector) const
inline

Less than comparison.

template<class Value_>
constexpr bool boca::Vector3< Value_ >::operator== ( Vector3< Value_ > const &  vector) const
inline

Equality comparison.

template<class Value_>
Value_ const& boca::Vector3< Value_ >::operator[] ( Dim3  dim_3) const
inline

Components by index.

template<class Value_>
Value_& boca::Vector3< Value_ >::operator[] ( Dim3  dim_3)
inline

Components by index.

template<class Value_>
Vector3 boca::Vector3< Value_ >::Orthogonal ( ) const
inline

Vector orthogonal to this.

template<class Value_>
constexpr Value_ boca::Vector3< Value_ >::Perp ( ) const
inline

The transverse component \(\rho = \sqrt{x^2 + y^2}\).

template<class Value_>
template<typename Value_2_ >
constexpr Value_ boca::Vector3< Value_ >::Perp ( Vector3< Value_2_ > const &  vector) const
inline

The transverse component \(\sqrt{x^2 + y^2}\) to a vector.

template<class Value_>
constexpr ValueSquare boca::Vector3< Value_ >::Perp2 ( ) const
inline

The transverse component squared \(\rho^2 = x^2 + y^2\).

template<class Value_>
template<typename Value_2_ >
constexpr ValueSquare boca::Vector3< Value_ >::Perp2 ( Vector3< Value_2_ > const &  vector) const
inline

The transverse component \(x^2 + y^2\) to a vector.

template<class Value_>
boca::Angle boca::Vector3< Value_ >::Phi ( ) const
inline

The azimuth angle \(\phi\) restricted to \([-\pi,\pi]\).

template<class Value_>
boca::Angle boca::Vector3< Value_ >::PseudoRapidity ( ) const
inline

Pseudorapidity \(\eta = -\ln(\tan(\frac{\theta}{2}))\).

template<class Value_>
Vector3& boca::Vector3< Value_ >::Rotate ( boca::Angle const &  phi,
Dim3  dim_1,
Dim3  dim_2 
)
inline

Rotate by phi in (dim_1, dim_2) plain.

template<class Value_>
Vector3& boca::Vector3< Value_ >::Rotate ( boca::Angle const &  phi,
Dim3  dim 
)
inline

Rotate by phi around axis dim.

template<typename Value_1_ >
template<typename Value_2_ >
auto & boca::Vector3< Value_1_ >::Rotate ( boca::Angle  angle,
Vector3< Value_2_ > const &  axis 
)

Rotates around the axis specified by another vector.

template<class Value_>
template<typename Value_2_ >
constexpr void boca::Vector3< Value_ >::RotateUz ( Vector3< Value_2_ > const &  vector)
inline

Rotates reference frame from \(U_z\) to \(U_z^\prime\).

template<class Value_>
template<typename Value_2_ >
constexpr Vector3<ValueProduct<Value_2_> > boca::Vector3< Value_ >::Scale ( Value_2_ const &  scalar) const
inline

Scale vector with a scalar.

template<class Value_>
void boca::Vector3< Value_ >::SetMag ( Value_  magnitude)
inline

Set the magnitude keeping theta and phi constant.

template<class Value_>
void boca::Vector3< Value_ >::SetMagThetaPhi ( Value_  mag,
boca::Angle const &  theta,
boca::Angle const &  phi 
)
inline

Set mag, theta, phi.

template<class Value_>
void boca::Vector3< Value_ >::SetPerp ( Value_  perp)
inline

Set the transverse component keeping phi and z constant.

template<class Value_>
void boca::Vector3< Value_ >::SetPerpEtaPhi ( Value_ const &  perp,
boca::Angle const &  eta,
boca::Angle const &  phi 
)
inline

Set Perpendicular, Eta and Phi.

template<class Value_>
void boca::Vector3< Value_ >::SetPerpThetaPhi ( Value_  perp,
boca::Angle const &  theta,
boca::Angle const &  phi 
)
inline

Set Perpendicular, Theta and Phi.

template<class Value_>
void boca::Vector3< Value_ >::SetPhi ( boca::Angle const &  phi)
inline

Set phi keeping the magnitue and theta constant.

template<class Value_>
void boca::Vector3< Value_ >::SetTheta ( boca::Angle const &  theta)
inline

Set theta keeping mag and phi constant.

template<class Value_>
void boca::Vector3< Value_ >::SetUniform ( Value_  value)
inline

Set x, y, z according to value.

template<class Value_>
double boca::Vector3< Value_ >::SinTheta ( ) const
inline

Sine of the polar angle \(\sin \theta\).

template<class Value_>
double boca::Vector3< Value_ >::SinTheta2 ( ) const
inline

Square of the sine of the polar angle \(\sin^2 \theta\).

template<class Value_>
double boca::Vector3< Value_ >::Tan2 ( Vector3< Value_ > const &  vector)
inline

Square of the tangent of the polar angle \(\tan(\theta)^2\) to a vector.

usign \(\frac{(a \times b)^2}{(a \cdot b)^2}\)

template<class Value_>
boca::Angle boca::Vector3< Value_ >::Theta ( ) const
inline

The polar angle \(\theta\).

template<typename Value_1_ >
template<typename Value_2_ >
auto & boca::Vector3< Value_1_ >::Transform ( Matrix3< Value_2_ > const &  matrix)

Transformation with a Rotation matrix.

template<class Value_>
constexpr Vector2<Value_> boca::Vector3< Value_ >::Transversal ( ) const
inline

Transversal vector \((x, y)\).

template<class Value_>
Vector2<Value_>& boca::Vector3< Value_ >::Transversal ( )
inline

Transversal vector \((x, y)\).

template<class Value_>
template<typename Value_2_ , typename Value_3 >
constexpr ValueCubed<Value_2_, Value_3> boca::Vector3< Value_ >::Triple ( Vector3< Value_2_ > const &  vector_1,
Vector3< Value_3 > const &  vector_2 
) const
inline

Triple product between three vectors.

template<class Value_>
Vector3<double> boca::Vector3< Value_ >::Unit ( ) const
inline

Unit vector parallel to this.

template<class Value_>
constexpr Value_ const& boca::Vector3< Value_ >::X ( ) const
inline

Getter for X.

template<class Value_>
Value_& boca::Vector3< Value_ >::X ( )
inline

Accessor for X.

template<class Value_>
constexpr Value_ const& boca::Vector3< Value_ >::Y ( ) const
inline

Getter for Y.

template<class Value_>
Value_& boca::Vector3< Value_ >::Y ( )
inline

Accessor for Y.

template<class Value_>
constexpr Value_ const& boca::Vector3< Value_ >::Z ( ) const
inline

Getter for Z.

template<class Value_>
Value_& boca::Vector3< Value_ >::Z ( )
inline

Accessor for Z.

Friends And Related Function Documentation

template<class Value_>
template<typename Value_2_ >
constexpr friend Vector3<ValueQuotient<Value_2_> > operator/ ( Vector3< Value_ > const &  vector,
Value_2_ const &  scalar 
)
friend

division by scalar

template<class Value_>
auto& operator<< ( std::ostream &  stream,
Vector3< Value_ > const &  vector 
)
friend

Output stream operator.

template<class Value_>
template<typename Value_2_ >
constexpr friend Vector3<ValueProduct<Value_2_> > operator^ ( Vector3< Value_ > const &  vector_1,
Vector3< Value_2_ > const &  vector_2 
)
friend

Cross product.


The documentation for this class was generated from the following files: