Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Math::Impl::Translation3D< T > Class Template Reference

template<typename T = double>
class ROOT::Math::Impl::Translation3D< T >

Class describing a 3 dimensional translation.

It can be combined (using the operator *) with the ROOT::Math::Rotation3D classes and ROOT::Math::Transform3D to obtained combined transformations and to operate on points and vectors. Note that a the translation applied to a Vector object (DisplacementVector3D and LorentzVector classes) performes a noop, i.e. it returns the same vector. A translation can be applied only to the Point objects (PositionVector3D classes).

See also
Overview of the physics vector library

Definition at line 53 of file Translation3D.h.

Public Types

typedef T Scalar
 
typedef DisplacementVector3D< Cartesian3D< T >, DefaultCoordinateSystemTagVector
 

Public Member Functions

 Translation3D ()
 Default constructor ( zero translation )
 
template<class CoordSystem , class Tag >
 Translation3D (const DisplacementVector3D< CoordSystem, Tag > &v)
 Construct from any Displacement vector in ant tag and coordinate system.
 
template<class CoordSystem , class Tag >
 Translation3D (const PositionVector3D< CoordSystem, Tag > &p1, const PositionVector3D< CoordSystem, Tag > &p2)
 Construct transformation from one coordinate system defined one point (the origin) to a new coordinate system defined by other point (origin )
 
template<class IT >
 Translation3D (IT begin, IT end)
 Construct given a pair of pointers or iterators defining the beginning and end of an array of 3 Scalars representing the z,y,z of the translation vector.
 
 Translation3D (T dx, T dy, T dz)
 Construct from x,y,z values representing the translation.
 
template<class IT >
void GetComponents (IT begin) const
 Get the 3 matrix components into data specified by an iterator begin.
 
template<class IT >
void GetComponents (IT begin, IT end) const
 Get the 3 components into data specified by an iterator begin and another to the end of the desired data (12 past start).
 
void GetComponents (T &dx, T &dy, T &dz) const
 Get the components into 3 scalars.
 
Translation3D< T > Inverse () const
 Return the inverse of the transformation.
 
void Invert ()
 Invert the transformation in place.
 
bool operator!= (const Translation3D< T > &rhs) const
 
template<class CoordSystem , class Tag >
DisplacementVector3D< CoordSystem, Tag > operator() (const DisplacementVector3D< CoordSystem, Tag > &v) const
 Transformation operation for Displacement Vector in any coordinate system and default tag For the Displacement Vectors no translation apply so return the vector itself.
 
template<class CoordSystem >
LorentzVector< CoordSystem > operator() (const LorentzVector< CoordSystem > &q) const
 Transformation operation for a Lorentz Vector in any coordinate system A LorentzVector contains a displacement vector so no translation applies as well.
 
Plane3D< T > operator() (const Plane3D< T > &plane) const
 Transformation on a 3D plane.
 
template<class CoordSystem , class Tag >
PositionVector3D< CoordSystem, Tag > operator() (const PositionVector3D< CoordSystem, Tag > &p) const
 Transformation operation for Position Vector in any coordinate system and default tag.
 
template<class CoordSystem , class Tag >
DisplacementVector3D< CoordSystem, Tag > operator* (const DisplacementVector3D< CoordSystem, Tag > &v) const
 Transformation operation.
 
template<class CoordSystem >
LorentzVector< CoordSystem > operator* (const LorentzVector< CoordSystem > &q) const
 Transformation operation.
 
template<class CoordSystem , class Tag >
PositionVector3D< CoordSystem, Tag > operator* (const PositionVector3D< CoordSystem, Tag > &v) const
 Transformation operation.
 
Translation3D< T > operator* (const Translation3D< T > &t) const
 multiply (combine) two transformations
 
Translation3D< T > & operator*= (const Translation3D< T > &t)
 multiply (combine) with another transformation in place
 
bool operator== (const Translation3D< T > &rhs) const
 Equality/inequality operators.
 
template<class IT >
void SetComponents (IT begin, IT end)
 Set the 3 components given an iterator to the start of the desired data, and another to the end (3 past start).
 
void SetComponents (T dx, T dy, T dz)
 Set the components from 3 scalars.
 
void SetXYZ (T dx, T dy, T dz)
 Set the XYZ vector components from 3 scalars.
 
template<class CoordSystem , class Tag1 , class Tag2 >
void Transform (const DisplacementVector3D< CoordSystem, Tag1 > &v1, DisplacementVector3D< CoordSystem, Tag2 > &v2) const
 Transformation operation for Displacement Vector of different coordinate systems.
 
template<class CoordSystem , class Tag1 , class Tag2 >
void Transform (const PositionVector3D< CoordSystem, Tag1 > &p1, PositionVector3D< CoordSystem, Tag2 > &p2) const
 Transformation operation for points between different coordinate system tags.
 
const VectorVect () const
 return a const reference to the underline vector representing the translation
 

Private Attributes

Vector fVect
 

#include <Math/GenVector/Translation3D.h>

Member Typedef Documentation

◆ Scalar

template<typename T = double>
typedef T ROOT::Math::Impl::Translation3D< T >::Scalar

Definition at line 56 of file Translation3D.h.

◆ Vector

template<typename T = double>
typedef DisplacementVector3D<Cartesian3D<T>, DefaultCoordinateSystemTag> ROOT::Math::Impl::Translation3D< T >::Vector

Definition at line 58 of file Translation3D.h.

Constructor & Destructor Documentation

◆ Translation3D() [1/5]

template<typename T = double>
ROOT::Math::Impl::Translation3D< T >::Translation3D ( )
inline

Default constructor ( zero translation )

Definition at line 63 of file Translation3D.h.

◆ Translation3D() [2/5]

template<typename T = double>
template<class IT >
ROOT::Math::Impl::Translation3D< T >::Translation3D ( IT  begin,
IT  end 
)
inline

Construct given a pair of pointers or iterators defining the beginning and end of an array of 3 Scalars representing the z,y,z of the translation vector.

Definition at line 70 of file Translation3D.h.

◆ Translation3D() [3/5]

template<typename T = double>
ROOT::Math::Impl::Translation3D< T >::Translation3D ( dx,
dy,
dz 
)
inline

Construct from x,y,z values representing the translation.

Definition at line 78 of file Translation3D.h.

◆ Translation3D() [4/5]

template<typename T = double>
template<class CoordSystem , class Tag >
ROOT::Math::Impl::Translation3D< T >::Translation3D ( const DisplacementVector3D< CoordSystem, Tag > &  v)
inlineexplicit

Construct from any Displacement vector in ant tag and coordinate system.

Definition at line 84 of file Translation3D.h.

◆ Translation3D() [5/5]

template<typename T = double>
template<class CoordSystem , class Tag >
ROOT::Math::Impl::Translation3D< T >::Translation3D ( const PositionVector3D< CoordSystem, Tag > &  p1,
const PositionVector3D< CoordSystem, Tag > &  p2 
)
inline

Construct transformation from one coordinate system defined one point (the origin) to a new coordinate system defined by other point (origin )

Parameters
p1point defining origin of original reference system
p2point defining origin of transformed reference system

Definition at line 97 of file Translation3D.h.

Member Function Documentation

◆ GetComponents() [1/3]

template<typename T = double>
template<class IT >
void ROOT::Math::Impl::Translation3D< T >::GetComponents ( IT  begin) const
inline

Get the 3 matrix components into data specified by an iterator begin.

Definition at line 134 of file Translation3D.h.

◆ GetComponents() [2/3]

template<typename T = double>
template<class IT >
void ROOT::Math::Impl::Translation3D< T >::GetComponents ( IT  begin,
IT  end 
) const
inline

Get the 3 components into data specified by an iterator begin and another to the end of the desired data (12 past start).

Definition at line 126 of file Translation3D.h.

◆ GetComponents() [3/3]

template<typename T = double>
void ROOT::Math::Impl::Translation3D< T >::GetComponents ( T &  dx,
T &  dy,
T &  dz 
) const
inline

Get the components into 3 scalars.

Definition at line 147 of file Translation3D.h.

◆ Inverse()

template<typename T = double>
Translation3D< T > ROOT::Math::Impl::Translation3D< T >::Inverse ( ) const
inline

Return the inverse of the transformation.

Definition at line 266 of file Translation3D.h.

◆ Invert()

template<typename T = double>
void ROOT::Math::Impl::Translation3D< T >::Invert ( )
inline

Invert the transformation in place.

Definition at line 259 of file Translation3D.h.

◆ operator!=()

template<typename T = double>
bool ROOT::Math::Impl::Translation3D< T >::operator!= ( const Translation3D< T > &  rhs) const
inline

Definition at line 277 of file Translation3D.h.

◆ operator()() [1/4]

template<typename T = double>
template<class CoordSystem , class Tag >
DisplacementVector3D< CoordSystem, Tag > ROOT::Math::Impl::Translation3D< T >::operator() ( const DisplacementVector3D< CoordSystem, Tag > &  v) const
inline

Transformation operation for Displacement Vector in any coordinate system and default tag For the Displacement Vectors no translation apply so return the vector itself.

Definition at line 178 of file Translation3D.h.

◆ operator()() [2/4]

template<typename T = double>
template<class CoordSystem >
LorentzVector< CoordSystem > ROOT::Math::Impl::Translation3D< T >::operator() ( const LorentzVector< CoordSystem > &  q) const
inline

Transformation operation for a Lorentz Vector in any coordinate system A LorentzVector contains a displacement vector so no translation applies as well.

Definition at line 215 of file Translation3D.h.

◆ operator()() [3/4]

template<typename T = double>
Plane3D< T > ROOT::Math::Impl::Translation3D< T >::operator() ( const Plane3D< T > &  plane) const
inline

Transformation on a 3D plane.

Definition at line 231 of file Translation3D.h.

◆ operator()() [4/4]

template<typename T = double>
template<class CoordSystem , class Tag >
PositionVector3D< CoordSystem, Tag > ROOT::Math::Impl::Translation3D< T >::operator() ( const PositionVector3D< CoordSystem, Tag > &  p) const
inline

Transformation operation for Position Vector in any coordinate system and default tag.

Definition at line 161 of file Translation3D.h.

◆ operator*() [1/4]

template<typename T = double>
template<class CoordSystem , class Tag >
DisplacementVector3D< CoordSystem, Tag > ROOT::Math::Impl::Translation3D< T >::operator* ( const DisplacementVector3D< CoordSystem, Tag > &  v) const
inline

Transformation operation.

Definition at line 185 of file Translation3D.h.

◆ operator*() [2/4]

template<typename T = double>
template<class CoordSystem >
LorentzVector< CoordSystem > ROOT::Math::Impl::Translation3D< T >::operator* ( const LorentzVector< CoordSystem > &  q) const
inline

Transformation operation.

Definition at line 223 of file Translation3D.h.

◆ operator*() [3/4]

template<typename T = double>
template<class CoordSystem , class Tag >
PositionVector3D< CoordSystem, Tag > ROOT::Math::Impl::Translation3D< T >::operator* ( const PositionVector3D< CoordSystem, Tag > &  v) const
inline

Transformation operation.

Definition at line 168 of file Translation3D.h.

◆ operator*() [4/4]

template<typename T = double>
Translation3D< T > ROOT::Math::Impl::Translation3D< T >::operator* ( const Translation3D< T > &  t) const
inline

multiply (combine) two transformations

Definition at line 254 of file Translation3D.h.

◆ operator*=()

template<typename T = double>
Translation3D< T > & ROOT::Math::Impl::Translation3D< T >::operator*= ( const Translation3D< T > &  t)
inline

multiply (combine) with another transformation in place

Definition at line 245 of file Translation3D.h.

◆ operator==()

template<typename T = double>
bool ROOT::Math::Impl::Translation3D< T >::operator== ( const Translation3D< T > &  rhs) const
inline

Equality/inequality operators.

Definition at line 271 of file Translation3D.h.

◆ SetComponents() [1/2]

template<typename T = double>
template<class IT >
void ROOT::Math::Impl::Translation3D< T >::SetComponents ( IT  begin,
IT  end 
)
inline

Set the 3 components given an iterator to the start of the desired data, and another to the end (3 past start).

Definition at line 117 of file Translation3D.h.

◆ SetComponents() [2/2]

template<typename T = double>
void ROOT::Math::Impl::Translation3D< T >::SetComponents ( dx,
dy,
dz 
)
inline

Set the components from 3 scalars.

Definition at line 142 of file Translation3D.h.

◆ SetXYZ()

template<typename T = double>
void ROOT::Math::Impl::Translation3D< T >::SetXYZ ( dx,
dy,
dz 
)
inline

Set the XYZ vector components from 3 scalars.

Definition at line 152 of file Translation3D.h.

◆ Transform() [1/2]

template<typename T = double>
template<class CoordSystem , class Tag1 , class Tag2 >
void ROOT::Math::Impl::Translation3D< T >::Transform ( const DisplacementVector3D< CoordSystem, Tag1 > &  v1,
DisplacementVector3D< CoordSystem, Tag2 > &  v2 
) const
inline

Transformation operation for Displacement Vector of different coordinate systems.

Definition at line 204 of file Translation3D.h.

◆ Transform() [2/2]

template<typename T = double>
template<class CoordSystem , class Tag1 , class Tag2 >
void ROOT::Math::Impl::Translation3D< T >::Transform ( const PositionVector3D< CoordSystem, Tag1 > &  p1,
PositionVector3D< CoordSystem, Tag2 > &  p2 
) const
inline

Transformation operation for points between different coordinate system tags.

Definition at line 194 of file Translation3D.h.

◆ Vect()

template<typename T = double>
const Vector & ROOT::Math::Impl::Translation3D< T >::Vect ( ) const
inline

return a const reference to the underline vector representing the translation

Definition at line 110 of file Translation3D.h.

Member Data Documentation

◆ fVect

template<typename T = double>
Vector ROOT::Math::Impl::Translation3D< T >::fVect
private

Definition at line 281 of file Translation3D.h.

  • math/genvector/inc/Math/GenVector/Translation3D.h