Logo ROOT   6.10/09
Reference Guide
Namespaces | Functions
VectorUtil.h File Reference
#include "Math/Math.h"
#include "Math/GenVector/Boost.h"
Include dependency graph for VectorUtil.h:
This graph shows which files directly or indirectly include this file:

Namespaces

 ROOT
 Namespace for new ROOT classes and functions.
 
 ROOT::Math
 
 ROOT::Math::VectorUtil
 Global Helper functions for generic Vector classes.
 

Functions

template<class Vector1 , class Vector2 >
double ROOT::Math::VectorUtil::Angle (const Vector1 &v1, const Vector2 &v2)
 Find Angle between two vectors. More...
 
template<class LVector , class BoostVector >
LVector ROOT::Math::VectorUtil::boost (const LVector &v, const BoostVector &b)
 Boost a generic Lorentz Vector class using a generic 3D Vector class describing the boost The only requirement on the vector is that implements the X(), Y(), Z(), T() and SetXYZT methods. More...
 
template<class LVector , class T >
LVector ROOT::Math::VectorUtil::boostX (const LVector &v, T beta)
 Boost a generic Lorentz Vector class along the X direction with a factor beta The only requirement on the vector is that implements the X(), Y(), Z(), T() and SetXYZT methods. More...
 
template<class LVector >
LVector ROOT::Math::VectorUtil::boostY (const LVector &v, double beta)
 Boost a generic Lorentz Vector class along the Y direction with a factor beta The only requirement on the vector is that implements the X(), Y(), Z(), T() methods and be constructed from x,y,z,t values The beta of the boost must be <= 1 or a nul Lorentz Vector will be returned. More...
 
template<class LVector >
LVector ROOT::Math::VectorUtil::boostZ (const LVector &v, double beta)
 Boost a generic Lorentz Vector class along the Z direction with a factor beta The only requirement on the vector is that implements the X(), Y(), Z(), T() methods and be constructed from x,y,z,t values The beta of the boost must be <= 1 or a nul Lorentz Vector will be returned. More...
 
template<class Vector1 , class Vector2 >
double ROOT::Math::VectorUtil::CosTheta (const Vector1 &v1, const Vector2 &v2)
 Find CosTheta Angle between two generic 3D vectors pre-requisite: vectors implement the X(), Y() and Z() More...
 
template<class Vector1 , class Vector2 >
Vector1::Scalar ROOT::Math::VectorUtil::DeltaPhi (const Vector1 &v1, const Vector2 &v2)
 Find aximutal Angle difference between two generic vectors ( v2.Phi() - v1.Phi() ) The only requirements on the Vector classes is that they implement the Phi() method. More...
 
template<class Vector1 , class Vector2 >
Vector1::Scalar ROOT::Math::VectorUtil::DeltaR (const Vector1 &v1, const Vector2 &v2)
 Find difference in pseudorapidity (Eta) and Phi betwen two generic vectors The only requirements on the Vector classes is that they implement the Phi() and Eta() method. More...
 
template<class Vector1 , class Vector2 >
Vector1::Scalar ROOT::Math::VectorUtil::DeltaR2 (const Vector1 &v1, const Vector2 &v2)
 Find square of the difference in pseudorapidity (Eta) and Phi betwen two generic vectors The only requirements on the Vector classes is that they implement the Phi() and Eta() method. More...
 
template<class Vector1 , class Vector2 >
Vector1::Scalar ROOT::Math::VectorUtil::InvariantMass (const Vector1 &v1, const Vector2 &v2)
 return the invariant mass of two LorentzVector The only requirement on the LorentzVector is that they need to implement the X() , Y(), Z() and E() methods. More...
 
template<class Vector1 , class Vector2 >
Vector1::Scalar ROOT::Math::VectorUtil::InvariantMass2 (const Vector1 &v1, const Vector2 &v2)
 
template<class Matrix , class CoordSystem , class U >
DisplacementVector3D< CoordSystem, U > ROOT::Math::VectorUtil::Mult (const Matrix &m, const DisplacementVector3D< CoordSystem, U > &v)
 Multiplications of a generic matrices with a DisplacementVector3D of any coordinate system. More...
 
template<class Matrix , class CoordSystem , class U >
PositionVector3D< CoordSystem, U > ROOT::Math::VectorUtil::Mult (const Matrix &m, const PositionVector3D< CoordSystem, U > &p)
 Multiplications of a generic matrices with a generic PositionVector Assume that the matrix implements the operator( i,j) and that it has at least 3 columns and 3 rows. More...
 
template<class CoordSystem , class Matrix >
LorentzVector< CoordSystem > ROOT::Math::VectorUtil::Mult (const Matrix &m, const LorentzVector< CoordSystem > &v)
 Multiplications of a generic matrices with a LorentzVector described in any coordinate system. More...
 
template<class Vector1 , class Vector2 >
double ROOT::Math::VectorUtil::Perp (const Vector1 &v, const Vector2 &u)
 Find the magnitude of the vector component of v perpendicular to the given direction of u. More...
 
template<class Vector1 , class Vector2 >
double ROOT::Math::VectorUtil::Perp2 (const Vector1 &v, const Vector2 &u)
 Find the magnitude square of the vector component of v perpendicular to the given direction of u. More...
 
template<class Vector1 , class Vector2 >
Vector1 ROOT::Math::VectorUtil::PerpVector (const Vector1 &v, const Vector2 &u)
 Find the vector component of v perpendicular to the given direction of u. More...
 
double ROOT::Math::VectorUtil::Phi_0_2pi (double phi)
 Return a phi angle in the interval (0,2*PI]. More...
 
double ROOT::Math::VectorUtil::Phi_mpi_pi (double phi)
 Returns phi angle in the interval (-PI,PI]. More...
 
template<class Vector1 , class Vector2 >
Vector1 ROOT::Math::VectorUtil::ProjVector (const Vector1 &v, const Vector2 &u)
 Find the projection of v along the given direction u. More...
 
template<class Vector , class RotationMatrix >
Vector ROOT::Math::VectorUtil::Rotate (const Vector &v, const RotationMatrix &rot)
 rotation on a generic vector using a generic rotation class. More...
 
template<class Vector >
Vector ROOT::Math::VectorUtil::RotateX (const Vector &v, double alpha)
 rotation along X axis for a generic vector by an Angle alpha returning a new vector. More...
 
template<class Vector >
Vector ROOT::Math::VectorUtil::RotateY (const Vector &v, double alpha)
 rotation along Y axis for a generic vector by an Angle alpha returning a new vector. More...
 
template<class Vector >
Vector ROOT::Math::VectorUtil::RotateZ (const Vector &v, double alpha)
 rotation along Z axis for a generic vector by an Angle alpha returning a new vector. More...