CLHEP 2.4.7.1
C++ Class Library for High Energy Physics
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
CLHEP::Hep3Vector Class Reference

#include <CLHEP/Vector/ThreeVector.h>

Public Types

enum  {
  X =0 , Y =1 , Z =2 , NUM_COORDINATES =3 ,
  SIZE =NUM_COORDINATES
}
 

Public Member Functions

 Hep3Vector ()
 
 Hep3Vector (double x)
 
 Hep3Vector (double x, double y)
 
 Hep3Vector (double x, double y, double z)
 
 Hep3Vector (const Hep3Vector &)
 
 Hep3Vector (Hep3Vector &&)=default
 
 ~Hep3Vector ()
 
double operator() (int) const
 
double operator[] (int) const
 
double & operator() (int)
 
double & operator[] (int)
 
double x () const
 
double y () const
 
double z () const
 
void setX (double)
 
void setY (double)
 
void setZ (double)
 
void set (double x, double y, double z)
 
double phi () const
 
double theta () const
 
double cosTheta () const
 
double cos2Theta () const
 
double mag2 () const
 
double mag () const
 
void setPhi (double)
 
void setTheta (double)
 
void setMag (double)
 
double perp2 () const
 
double perp () const
 
void setPerp (double)
 
void setCylTheta (double)
 
double perp2 (const Hep3Vector &) const
 
double perp (const Hep3Vector &) const
 
Hep3Vectoroperator= (const Hep3Vector &)
 
Hep3Vectoroperator= (Hep3Vector &&)=default
 
bool operator== (const Hep3Vector &) const
 
bool operator!= (const Hep3Vector &) const
 
bool isNear (const Hep3Vector &, double epsilon=tolerance) const
 
double howNear (const Hep3Vector &v) const
 
double deltaR (const Hep3Vector &v) const
 
Hep3Vectoroperator+= (const Hep3Vector &)
 
Hep3Vectoroperator-= (const Hep3Vector &)
 
Hep3Vector operator- () const
 
Hep3Vectoroperator*= (double)
 
Hep3Vectoroperator/= (double)
 
Hep3Vector unit () const
 
Hep3Vector orthogonal () const
 
double dot (const Hep3Vector &) const
 
Hep3Vector cross (const Hep3Vector &) const
 
double angle (const Hep3Vector &) const
 
double pseudoRapidity () const
 
void setEta (double p)
 
void setCylEta (double p)
 
Hep3VectorrotateX (double)
 
Hep3VectorrotateY (double)
 
Hep3VectorrotateZ (double)
 
Hep3VectorrotateUz (const Hep3Vector &)
 
Hep3Vectorrotate (double, const Hep3Vector &)
 
Hep3Vectoroperator*= (const HepRotation &)
 
Hep3Vectortransform (const HepRotation &)
 
void setRThetaPhi (double r, double theta, double phi)
 
void setREtaPhi (double r, double eta, double phi)
 
void setRhoPhiZ (double rho, double phi, double z)
 
void setRhoPhiTheta (double rho, double phi, double theta)
 
void setRhoPhiEta (double rho, double phi, double eta)
 
double getX () const
 
double getY () const
 
double getZ () const
 
double getR () const
 
double getTheta () const
 
double getPhi () const
 
double r () const
 
double rho () const
 
double getRho () const
 
double eta () const
 
double getEta () const
 
void setR (double s)
 
void setRho (double s)
 
int compare (const Hep3Vector &v) const
 
bool operator> (const Hep3Vector &v) const
 
bool operator< (const Hep3Vector &v) const
 
bool operator>= (const Hep3Vector &v) const
 
bool operator<= (const Hep3Vector &v) const
 
double diff2 (const Hep3Vector &v) const
 
bool isParallel (const Hep3Vector &v, double epsilon=tolerance) const
 
bool isOrthogonal (const Hep3Vector &v, double epsilon=tolerance) const
 
double howParallel (const Hep3Vector &v) const
 
double howOrthogonal (const Hep3Vector &v) const
 
double beta () const
 
double gamma () const
 
double coLinearRapidity () const
 
double angle () const
 
double theta (const Hep3Vector &v2) const
 
double cosTheta (const Hep3Vector &v2) const
 
double cos2Theta (const Hep3Vector &v2) const
 
Hep3Vector project () const
 
Hep3Vector project (const Hep3Vector &v2) const
 
Hep3Vector perpPart () const
 
Hep3Vector perpPart (const Hep3Vector &v2) const
 
double rapidity () const
 
double rapidity (const Hep3Vector &v2) const
 
double eta (const Hep3Vector &v2) const
 
double polarAngle (const Hep3Vector &v2) const
 
double deltaPhi (const Hep3Vector &v2) const
 
double azimAngle (const Hep3Vector &v2) const
 
double polarAngle (const Hep3Vector &v2, const Hep3Vector &ref) const
 
double azimAngle (const Hep3Vector &v2, const Hep3Vector &ref) const
 
Hep3Vectorrotate (const Hep3Vector &axis, double delta)
 
Hep3Vectorrotate (const HepAxisAngle &ax)
 
Hep3Vectorrotate (const HepEulerAngles &e)
 
Hep3Vectorrotate (double phi, double theta, double psi)
 

Static Public Member Functions

static double setTolerance (double tol)
 
static double getTolerance ()
 

Static Public Attributes

static const int ToleranceTicks = 100
 

Protected Member Functions

void setSpherical (double r, double theta, double phi)
 
void setCylindrical (double r, double phi, double z)
 
double negativeInfinity () const
 

Protected Attributes

double data [3]
 

Static Protected Attributes

static double tolerance
 

Detailed Description

Author

Definition at line 36 of file ThreeVector.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
NUM_COORDINATES 
SIZE 

Definition at line 42 of file ThreeVector.h.

Constructor & Destructor Documentation

◆ Hep3Vector() [1/6]

CLHEP::Hep3Vector::Hep3Vector ( )
inline

Definition at line 96 of file ThreeVector.icc.

Referenced by cross(), operator-(), orthogonal(), perpPart(), and project().

◆ Hep3Vector() [2/6]

CLHEP::Hep3Vector::Hep3Vector ( double x)
inlineexplicit

Definition at line 98 of file ThreeVector.icc.

◆ Hep3Vector() [3/6]

CLHEP::Hep3Vector::Hep3Vector ( double x,
double y )
inline

Definition at line 100 of file ThreeVector.icc.

◆ Hep3Vector() [4/6]

CLHEP::Hep3Vector::Hep3Vector ( double x,
double y,
double z )
inline

Definition at line 102 of file ThreeVector.icc.

◆ Hep3Vector() [5/6]

CLHEP::Hep3Vector::Hep3Vector ( const Hep3Vector & p)
inline

Definition at line 105 of file ThreeVector.icc.

◆ Hep3Vector() [6/6]

CLHEP::Hep3Vector::Hep3Vector ( Hep3Vector && )
inlinedefault

◆ ~Hep3Vector()

CLHEP::Hep3Vector::~Hep3Vector ( )
inline

Definition at line 108 of file ThreeVector.icc.

Member Function Documentation

◆ angle() [1/2]

double CLHEP::Hep3Vector::angle ( ) const
inline

Definition at line 135 of file ThreeVector.icc.

References theta().

Referenced by theta().

◆ angle() [2/2]

double CLHEP::Hep3Vector::angle ( const Hep3Vector & q) const
inline

Definition at line 264 of file ThreeVector.icc.

References cosTheta().

Referenced by CLHEP::HepLorentzVector::angle().

◆ azimAngle() [1/2]

double CLHEP::Hep3Vector::azimAngle ( const Hep3Vector & v2) const
inline

Definition at line 272 of file ThreeVector.icc.

References deltaPhi().

◆ azimAngle() [2/2]

double CLHEP::Hep3Vector::azimAngle ( const Hep3Vector & v2,
const Hep3Vector & ref ) const

◆ beta()

double CLHEP::Hep3Vector::beta ( ) const

◆ coLinearRapidity()

double CLHEP::Hep3Vector::coLinearRapidity ( ) const

◆ compare()

int CLHEP::Hep3Vector::compare ( const Hep3Vector & v) const

◆ cos2Theta() [1/2]

double CLHEP::Hep3Vector::cos2Theta ( ) const
inline

Definition at line 142 of file ThreeVector.icc.

References mag2(), and z().

◆ cos2Theta() [2/2]

double CLHEP::Hep3Vector::cos2Theta ( const Hep3Vector & v2) const

◆ cosTheta() [1/2]

double CLHEP::Hep3Vector::cosTheta ( ) const
inline

Definition at line 137 of file ThreeVector.icc.

References mag(), and z().

Referenced by angle(), and CLHEP::HepLorentzVector::cosTheta().

◆ cosTheta() [2/2]

double CLHEP::Hep3Vector::cosTheta ( const Hep3Vector & v2) const

◆ cross()

Hep3Vector CLHEP::Hep3Vector::cross ( const Hep3Vector & p) const
inline

Definition at line 239 of file ThreeVector.icc.

References Hep3Vector(), x(), y(), and z().

◆ deltaPhi()

double CLHEP::Hep3Vector::deltaPhi ( const Hep3Vector & v2) const

Referenced by azimAngle().

◆ deltaR()

double CLHEP::Hep3Vector::deltaR ( const Hep3Vector & v) const

◆ diff2()

double CLHEP::Hep3Vector::diff2 ( const Hep3Vector & v) const
inline

Definition at line 231 of file ThreeVector.icc.

References mag2().

◆ dot()

double CLHEP::Hep3Vector::dot ( const Hep3Vector & p) const
inline

Definition at line 235 of file ThreeVector.icc.

References x(), y(), and z().

Referenced by CLHEP::HepLorentzVector::et2(), CLHEP::operator*(), and perp2().

◆ eta() [1/2]

double CLHEP::Hep3Vector::eta ( ) const
inline

Definition at line 168 of file ThreeVector.icc.

References pseudoRapidity().

Referenced by CLHEP::HepLorentzVector::eta().

◆ eta() [2/2]

double CLHEP::Hep3Vector::eta ( const Hep3Vector & v2) const

◆ gamma()

double CLHEP::Hep3Vector::gamma ( ) const

◆ getEta()

double CLHEP::Hep3Vector::getEta ( ) const
inline

Definition at line 171 of file ThreeVector.icc.

References pseudoRapidity().

◆ getPhi()

double CLHEP::Hep3Vector::getPhi ( ) const
inline

Definition at line 134 of file ThreeVector.icc.

References phi().

◆ getR()

double CLHEP::Hep3Vector::getR ( ) const
inline

Definition at line 132 of file ThreeVector.icc.

References mag().

◆ getRho()

double CLHEP::Hep3Vector::getRho ( ) const
inline

Definition at line 170 of file ThreeVector.icc.

References perp().

◆ getTheta()

double CLHEP::Hep3Vector::getTheta ( ) const
inline

Definition at line 133 of file ThreeVector.icc.

References theta().

◆ getTolerance()

double CLHEP::Hep3Vector::getTolerance ( )
inlinestatic

Definition at line 194 of file ThreeVector.icc.

References tolerance.

◆ getX()

double CLHEP::Hep3Vector::getX ( ) const
inline

Definition at line 27 of file ThreeVector.icc.

References X.

◆ getY()

double CLHEP::Hep3Vector::getY ( ) const
inline

Definition at line 28 of file ThreeVector.icc.

References Y.

◆ getZ()

double CLHEP::Hep3Vector::getZ ( ) const
inline

Definition at line 29 of file ThreeVector.icc.

References Z.

◆ howNear()

double CLHEP::Hep3Vector::howNear ( const Hep3Vector & v) const

◆ howOrthogonal()

double CLHEP::Hep3Vector::howOrthogonal ( const Hep3Vector & v) const

◆ howParallel()

double CLHEP::Hep3Vector::howParallel ( const Hep3Vector & v) const

◆ isNear()

bool CLHEP::Hep3Vector::isNear ( const Hep3Vector & ,
double epsilon = tolerance ) const

◆ isOrthogonal()

bool CLHEP::Hep3Vector::isOrthogonal ( const Hep3Vector & v,
double epsilon = tolerance ) const

◆ isParallel()

bool CLHEP::Hep3Vector::isParallel ( const Hep3Vector & v,
double epsilon = tolerance ) const

◆ mag()

double CLHEP::Hep3Vector::mag ( ) const
inline

Definition at line 122 of file ThreeVector.icc.

References mag2().

Referenced by cosTheta(), getR(), CLHEP::HepBoost::HepBoost(), r(), CLHEP::HepLorentzVector::rho(), and setTheta().

◆ mag2()

double CLHEP::Hep3Vector::mag2 ( ) const
inline

◆ negativeInfinity()

double CLHEP::Hep3Vector::negativeInfinity ( ) const
protected

◆ operator!=()

bool CLHEP::Hep3Vector::operator!= ( const Hep3Vector & v) const
inline

Definition at line 190 of file ThreeVector.icc.

References x(), y(), and z().

◆ operator()() [1/2]

double & CLHEP::Hep3Vector::operator() ( int i)
inline

Definition at line 45 of file ThreeVector.icc.

References data.

◆ operator()() [2/2]

double CLHEP::Hep3Vector::operator() ( int i) const
inline

Definition at line 41 of file ThreeVector.icc.

References data.

◆ operator*=() [1/2]

Hep3Vector & CLHEP::Hep3Vector::operator*= ( const HepRotation & )

◆ operator*=() [2/2]

Hep3Vector & CLHEP::Hep3Vector::operator*= ( double a)
inline

Definition at line 220 of file ThreeVector.icc.

References X, Y, and Z.

◆ operator+=()

Hep3Vector & CLHEP::Hep3Vector::operator+= ( const Hep3Vector & p)
inline

Definition at line 202 of file ThreeVector.icc.

References X, x(), Y, y(), Z, and z().

◆ operator-()

Hep3Vector CLHEP::Hep3Vector::operator- ( ) const
inline

Definition at line 216 of file ThreeVector.icc.

References Hep3Vector(), x(), y(), and z().

◆ operator-=()

Hep3Vector & CLHEP::Hep3Vector::operator-= ( const Hep3Vector & p)
inline

Definition at line 209 of file ThreeVector.icc.

References X, x(), Y, y(), Z, and z().

◆ operator/=()

Hep3Vector & CLHEP::Hep3Vector::operator/= ( double )

◆ operator<()

bool CLHEP::Hep3Vector::operator< ( const Hep3Vector & v) const

◆ operator<=()

bool CLHEP::Hep3Vector::operator<= ( const Hep3Vector & v) const

◆ operator=() [1/2]

Hep3Vector & CLHEP::Hep3Vector::operator= ( const Hep3Vector & p)
inline

Definition at line 110 of file ThreeVector.icc.

References set(), x(), y(), and z().

◆ operator=() [2/2]

Hep3Vector & CLHEP::Hep3Vector::operator= ( Hep3Vector && )
inlinedefault

◆ operator==()

bool CLHEP::Hep3Vector::operator== ( const Hep3Vector & v) const
inline

Definition at line 186 of file ThreeVector.icc.

References x(), y(), and z().

◆ operator>()

bool CLHEP::Hep3Vector::operator> ( const Hep3Vector & v) const

◆ operator>=()

bool CLHEP::Hep3Vector::operator>= ( const Hep3Vector & v) const

◆ operator[]() [1/2]

double & CLHEP::Hep3Vector::operator[] ( int i)
inline

Definition at line 20 of file ThreeVector.icc.

References data.

◆ operator[]() [2/2]

double CLHEP::Hep3Vector::operator[] ( int i) const
inline

Definition at line 21 of file ThreeVector.icc.

References data.

◆ orthogonal()

Hep3Vector CLHEP::Hep3Vector::orthogonal ( ) const
inline

Definition at line 286 of file ThreeVector.icc.

References Hep3Vector(), x(), y(), and z().

◆ perp() [1/2]

double CLHEP::Hep3Vector::perp ( ) const
inline

◆ perp() [2/2]

double CLHEP::Hep3Vector::perp ( const Hep3Vector & p) const
inline

Definition at line 249 of file ThreeVector.icc.

References perp2().

◆ perp2() [1/2]

double CLHEP::Hep3Vector::perp2 ( ) const
inline

◆ perp2() [2/2]

double CLHEP::Hep3Vector::perp2 ( const Hep3Vector & p) const
inline

Definition at line 243 of file ThreeVector.icc.

References dot(), and mag2().

◆ perpPart() [1/2]

Hep3Vector CLHEP::Hep3Vector::perpPart ( ) const
inline

Definition at line 253 of file ThreeVector.icc.

References Hep3Vector(), x(), and y().

◆ perpPart() [2/2]

Hep3Vector CLHEP::Hep3Vector::perpPart ( const Hep3Vector & v2) const
inline

Definition at line 260 of file ThreeVector.icc.

References project().

◆ phi()

double CLHEP::Hep3Vector::phi ( ) const
inline

Definition at line 128 of file ThreeVector.icc.

References x(), and y().

Referenced by getPhi(), CLHEP::HepLorentzVector::phi(), and setTheta().

◆ polarAngle() [1/2]

double CLHEP::Hep3Vector::polarAngle ( const Hep3Vector & v2) const

◆ polarAngle() [2/2]

double CLHEP::Hep3Vector::polarAngle ( const Hep3Vector & v2,
const Hep3Vector & ref ) const

◆ project() [1/2]

Hep3Vector CLHEP::Hep3Vector::project ( ) const
inline

Definition at line 256 of file ThreeVector.icc.

References Hep3Vector(), and z().

Referenced by perpPart().

◆ project() [2/2]

Hep3Vector CLHEP::Hep3Vector::project ( const Hep3Vector & v2) const

◆ pseudoRapidity()

double CLHEP::Hep3Vector::pseudoRapidity ( ) const

◆ r()

double CLHEP::Hep3Vector::r ( ) const
inline

Definition at line 123 of file ThreeVector.icc.

References mag().

◆ rapidity() [1/2]

double CLHEP::Hep3Vector::rapidity ( ) const

◆ rapidity() [2/2]

double CLHEP::Hep3Vector::rapidity ( const Hep3Vector & v2) const

◆ rho()

double CLHEP::Hep3Vector::rho ( ) const
inline

Definition at line 167 of file ThreeVector.icc.

References perp().

◆ rotate() [1/5]

Hep3Vector & CLHEP::Hep3Vector::rotate ( const Hep3Vector & axis,
double delta )

◆ rotate() [2/5]

Hep3Vector & CLHEP::Hep3Vector::rotate ( const HepAxisAngle & ax)

◆ rotate() [3/5]

Hep3Vector & CLHEP::Hep3Vector::rotate ( const HepEulerAngles & e)

◆ rotate() [4/5]

Hep3Vector & CLHEP::Hep3Vector::rotate ( double phi,
double theta,
double psi )

◆ rotate() [5/5]

Hep3Vector & CLHEP::Hep3Vector::rotate ( double ,
const Hep3Vector &  )

◆ rotateUz()

Hep3Vector & CLHEP::Hep3Vector::rotateUz ( const Hep3Vector & )

◆ rotateX()

Hep3Vector & CLHEP::Hep3Vector::rotateX ( double )

◆ rotateY()

Hep3Vector & CLHEP::Hep3Vector::rotateY ( double )

◆ rotateZ()

Hep3Vector & CLHEP::Hep3Vector::rotateZ ( double )

◆ set()

void CLHEP::Hep3Vector::set ( double x,
double y,
double z )
inline

◆ setCylEta()

void CLHEP::Hep3Vector::setCylEta ( double p)

◆ setCylindrical()

void CLHEP::Hep3Vector::setCylindrical ( double r,
double phi,
double z )
protected

Referenced by setRhoPhiZ().

◆ setCylTheta()

void CLHEP::Hep3Vector::setCylTheta ( double )

◆ setEta()

void CLHEP::Hep3Vector::setEta ( double p)

◆ setMag()

void CLHEP::Hep3Vector::setMag ( double )

◆ setPerp()

void CLHEP::Hep3Vector::setPerp ( double r1)
inline

Definition at line 173 of file ThreeVector.icc.

References perp(), X, and Y.

Referenced by CLHEP::HepLorentzVector::setPerp(), and setRho().

◆ setPhi()

void CLHEP::Hep3Vector::setPhi ( double ph)
inline

Definition at line 157 of file ThreeVector.icc.

References perp(), setX(), and setY().

Referenced by CLHEP::HepLorentzVector::setPhi().

◆ setR()

void CLHEP::Hep3Vector::setR ( double s)
inline

Definition at line 147 of file ThreeVector.icc.

References setMag().

◆ setREtaPhi()

void CLHEP::Hep3Vector::setREtaPhi ( double r,
double eta,
double phi )
inline

Definition at line 82 of file ThreeVector.icc.

References setSpherical().

Referenced by CLHEP::HepLorentzVector::setREtaPhi().

◆ setRho()

void CLHEP::Hep3Vector::setRho ( double s)
inline

Definition at line 180 of file ThreeVector.icc.

References setPerp().

◆ setRhoPhiEta()

void CLHEP::Hep3Vector::setRhoPhiEta ( double rho,
double phi,
double eta )

◆ setRhoPhiTheta()

void CLHEP::Hep3Vector::setRhoPhiTheta ( double rho,
double phi,
double theta )

◆ setRhoPhiZ()

void CLHEP::Hep3Vector::setRhoPhiZ ( double rho,
double phi,
double z )
inline

Definition at line 87 of file ThreeVector.icc.

References setCylindrical().

Referenced by CLHEP::HepLorentzVector::setRhoPhiZ().

◆ setRThetaPhi()

void CLHEP::Hep3Vector::setRThetaPhi ( double r,
double theta,
double phi )
inline

Definition at line 77 of file ThreeVector.icc.

References setSpherical().

Referenced by CLHEP::HepLorentzVector::setRThetaPhi().

◆ setSpherical()

void CLHEP::Hep3Vector::setSpherical ( double r,
double theta,
double phi )
protected

Referenced by setREtaPhi(), and setRThetaPhi().

◆ setTheta()

void CLHEP::Hep3Vector::setTheta ( double th)
inline

Definition at line 149 of file ThreeVector.icc.

References mag(), phi(), setX(), setY(), and setZ().

Referenced by CLHEP::HepLorentzVector::setTheta().

◆ setTolerance()

static double CLHEP::Hep3Vector::setTolerance ( double tol)
static

◆ setX()

void CLHEP::Hep3Vector::setX ( double x)
inline

Definition at line 31 of file ThreeVector.icc.

References X, and x().

Referenced by setPhi(), CLHEP::HepLorentzVector::setPx(), setTheta(), and CLHEP::HepLorentzVector::setX().

◆ setY()

void CLHEP::Hep3Vector::setY ( double y)
inline

Definition at line 32 of file ThreeVector.icc.

References Y, and y().

Referenced by setPhi(), CLHEP::HepLorentzVector::setPy(), setTheta(), and CLHEP::HepLorentzVector::setY().

◆ setZ()

void CLHEP::Hep3Vector::setZ ( double z)
inline

Definition at line 33 of file ThreeVector.icc.

References Z, and z().

Referenced by CLHEP::HepLorentzVector::setPz(), setTheta(), and CLHEP::HepLorentzVector::setZ().

◆ theta() [1/2]

double CLHEP::Hep3Vector::theta ( ) const
inline

Definition at line 125 of file ThreeVector.icc.

References perp(), x(), y(), and z().

Referenced by angle(), getTheta(), and CLHEP::HepLorentzVector::theta().

◆ theta() [2/2]

double CLHEP::Hep3Vector::theta ( const Hep3Vector & v2) const
inline

Definition at line 268 of file ThreeVector.icc.

References angle().

◆ transform()

Hep3Vector & CLHEP::Hep3Vector::transform ( const HepRotation & )

◆ unit()

Hep3Vector CLHEP::Hep3Vector::unit ( ) const
inline

◆ x()

double CLHEP::Hep3Vector::x ( ) const
inline

◆ y()

double CLHEP::Hep3Vector::y ( ) const
inline

◆ z()

double CLHEP::Hep3Vector::z ( ) const
inline

Member Data Documentation

◆ data

double CLHEP::Hep3Vector::data[3]
protected

Definition at line 391 of file ThreeVector.h.

Referenced by operator()(), operator()(), operator[](), and operator[]().

◆ tolerance

double CLHEP::Hep3Vector::tolerance
staticprotected

Definition at line 394 of file ThreeVector.h.

Referenced by getTolerance().

◆ ToleranceTicks

const int CLHEP::Hep3Vector::ToleranceTicks = 100
static

Definition at line 295 of file ThreeVector.h.


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