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

#include <CLHEP/Vector/TwoVector.h>

Public Types

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

Public Member Functions

 Hep2Vector (double x=0.0, double y=0.0)
 
 Hep2Vector (const Hep2Vector &p)
 
 Hep2Vector (Hep2Vector &&p)=default
 
 Hep2Vector (const Hep3Vector &)
 
 ~Hep2Vector ()
 
double x () const
 
double y () const
 
double operator() (int i) const
 
double operator[] (int i) const
 
double & operator() (int i)
 
double & operator[] (int i)
 
void setX (double x)
 
void setY (double y)
 
void set (double x, double y)
 
double phi () const
 
double mag2 () const
 
double mag () const
 
double r () const
 
void setPhi (double phi)
 
void setMag (double r)
 
void setR (double r)
 
void setPolar (double r, double phi)
 
Hep2Vectoroperator= (const Hep2Vector &p)
 
Hep2Vectoroperator= (Hep2Vector &&p)=default
 
bool operator== (const Hep2Vector &v) const
 
bool operator!= (const Hep2Vector &v) const
 
int compare (const Hep2Vector &v) const
 
bool operator> (const Hep2Vector &v) const
 
bool operator< (const Hep2Vector &v) const
 
bool operator>= (const Hep2Vector &v) const
 
bool operator<= (const Hep2Vector &v) const
 
double howNear (const Hep2Vector &p) const
 
bool isNear (const Hep2Vector &p, double epsilon=tolerance) const
 
double howParallel (const Hep2Vector &p) const
 
bool isParallel (const Hep2Vector &p, double epsilon=tolerance) const
 
double howOrthogonal (const Hep2Vector &p) const
 
bool isOrthogonal (const Hep2Vector &p, double epsilon=tolerance) const
 
Hep2Vectoroperator+= (const Hep2Vector &p)
 
Hep2Vectoroperator-= (const Hep2Vector &p)
 
Hep2Vector operator- () const
 
Hep2Vectoroperator*= (double a)
 
Hep2Vector unit () const
 
Hep2Vector orthogonal () const
 
double dot (const Hep2Vector &p) const
 
double angle (const Hep2Vector &) const
 
void rotate (double)
 
 operator Hep3Vector () const
 

Static Public Member Functions

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

Static Public Attributes

static const int ZMpvToleranceTicks = 100
 

Friends

std::ostream & operator<< (std::ostream &, const Hep2Vector &)
 
double operator* (const Hep2Vector &a, const Hep2Vector &b)
 
Hep2Vector operator* (const Hep2Vector &p, double a)
 
Hep2Vector operator* (double a, const Hep2Vector &p)
 
Hep2Vector operator/ (const Hep2Vector &p, double a)
 
Hep2Vector operator+ (const Hep2Vector &a, const Hep2Vector &b)
 
Hep2Vector operator- (const Hep2Vector &a, const Hep2Vector &b)
 

Detailed Description

Author

Definition at line 45 of file TwoVector.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
NUM_COORDINATES 
SIZE 

Definition at line 49 of file TwoVector.h.

Constructor & Destructor Documentation

◆ Hep2Vector() [1/4]

CLHEP::Hep2Vector::Hep2Vector ( double x = 0.0,
double y = 0.0 )
inline

Definition at line 22 of file TwoVector.icc.

Referenced by operator-(), orthogonal(), and unit().

◆ Hep2Vector() [2/4]

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

Definition at line 44 of file TwoVector.icc.

◆ Hep2Vector() [3/4]

CLHEP::Hep2Vector::Hep2Vector ( Hep2Vector && p)
inlinedefault

◆ Hep2Vector() [4/4]

CLHEP::Hep2Vector::Hep2Vector ( const Hep3Vector & v3)
inlineexplicit

Definition at line 25 of file TwoVector.icc.

◆ ~Hep2Vector()

CLHEP::Hep2Vector::~Hep2Vector ( )
inline

Definition at line 47 of file TwoVector.icc.

Member Function Documentation

◆ angle()

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

Definition at line 120 of file TwoVector.icc.

References dot(), and mag2().

◆ compare()

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

◆ dot()

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

Definition at line 85 of file TwoVector.icc.

References x(), and y().

Referenced by angle().

◆ getTolerance()

double CLHEP::Hep2Vector::getTolerance ( )
inlinestatic

Definition at line 166 of file TwoVector.icc.

◆ howNear()

double CLHEP::Hep2Vector::howNear ( const Hep2Vector & p) const

◆ howOrthogonal()

double CLHEP::Hep2Vector::howOrthogonal ( const Hep2Vector & p) const

◆ howParallel()

double CLHEP::Hep2Vector::howParallel ( const Hep2Vector & p) const

◆ isNear()

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

◆ isOrthogonal()

bool CLHEP::Hep2Vector::isOrthogonal ( const Hep2Vector & p,
double epsilon = tolerance ) const

◆ isParallel()

bool CLHEP::Hep2Vector::isParallel ( const Hep2Vector & p,
double epsilon = tolerance ) const

◆ mag()

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

Definition at line 93 of file TwoVector.icc.

References mag2().

Referenced by setPhi().

◆ mag2()

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

Definition at line 89 of file TwoVector.icc.

Referenced by angle(), mag(), r(), and unit().

◆ operator Hep3Vector()

CLHEP::Hep2Vector::operator Hep3Vector ( ) const

◆ operator!=()

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

Definition at line 59 of file TwoVector.icc.

References x(), and y().

◆ operator()() [1/2]

double & CLHEP::Hep2Vector::operator() ( int i)

◆ operator()() [2/2]

double CLHEP::Hep2Vector::operator() ( int i) const

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

◆ operator*=()

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

Definition at line 79 of file TwoVector.icc.

◆ operator+=()

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

Definition at line 63 of file TwoVector.icc.

References x(), and y().

◆ operator-()

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

Definition at line 75 of file TwoVector.icc.

References Hep2Vector().

◆ operator-=()

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

Definition at line 69 of file TwoVector.icc.

References x(), and y().

◆ operator<()

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

◆ operator<=()

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

◆ operator=() [1/2]

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

Definition at line 49 of file TwoVector.icc.

References x(), and y().

◆ operator=() [2/2]

Hep2Vector & CLHEP::Hep2Vector::operator= ( Hep2Vector && p)
inlinedefault

◆ operator==()

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

Definition at line 55 of file TwoVector.icc.

References x(), and y().

◆ operator>()

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

◆ operator>=()

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

◆ operator[]() [1/2]

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

Definition at line 41 of file TwoVector.icc.

References operator()().

◆ operator[]() [2/2]

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

Definition at line 42 of file TwoVector.icc.

References operator()().

◆ orthogonal()

Hep2Vector CLHEP::Hep2Vector::orthogonal ( ) const
inline

Definition at line 107 of file TwoVector.icc.

References Hep2Vector().

◆ phi()

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

Definition at line 116 of file TwoVector.icc.

Referenced by setMag().

◆ r()

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

Definition at line 97 of file TwoVector.icc.

References mag2().

◆ rotate()

void CLHEP::Hep2Vector::rotate ( double )

◆ set()

void CLHEP::Hep2Vector::set ( double x,
double y )
inline

Definition at line 36 of file TwoVector.icc.

◆ setMag()

void CLHEP::Hep2Vector::setMag ( double r)
inline

Definition at line 125 of file TwoVector.icc.

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

Referenced by setR().

◆ setPhi()

void CLHEP::Hep2Vector::setPhi ( double phi)
inline

Definition at line 135 of file TwoVector.icc.

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

◆ setPolar()

void CLHEP::Hep2Vector::setPolar ( double r,
double phi )
inline

Definition at line 141 of file TwoVector.icc.

References setX(), and setY().

◆ setR()

void CLHEP::Hep2Vector::setR ( double r)
inline

Definition at line 131 of file TwoVector.icc.

References setMag().

◆ setTolerance()

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

◆ setX()

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

Definition at line 28 of file TwoVector.icc.

Referenced by setMag(), setPhi(), and setPolar().

◆ setY()

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

Definition at line 32 of file TwoVector.icc.

Referenced by setMag(), setPhi(), and setPolar().

◆ unit()

Hep2Vector CLHEP::Hep2Vector::unit ( ) const
inline

Definition at line 101 of file TwoVector.icc.

References Hep2Vector(), and mag2().

◆ x()

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

Definition at line 14 of file TwoVector.icc.

Referenced by dot(), operator!=(), operator+=(), operator-=(), operator=(), and operator==().

◆ y()

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

Definition at line 18 of file TwoVector.icc.

Referenced by dot(), operator!=(), operator+=(), operator-=(), operator=(), and operator==().

Friends And Related Symbol Documentation

◆ operator* [1/3]

double operator* ( const Hep2Vector & a,
const Hep2Vector & b )
friend

Definition at line 162 of file TwoVector.icc.

◆ operator* [2/3]

Hep2Vector operator* ( const Hep2Vector & p,
double a )
friend

Definition at line 154 of file TwoVector.icc.

◆ operator* [3/3]

Hep2Vector operator* ( double a,
const Hep2Vector & p )
friend

Definition at line 158 of file TwoVector.icc.

◆ operator+

Hep2Vector operator+ ( const Hep2Vector & a,
const Hep2Vector & b )
friend

Definition at line 146 of file TwoVector.icc.

◆ operator-

Hep2Vector operator- ( const Hep2Vector & a,
const Hep2Vector & b )
friend

Definition at line 150 of file TwoVector.icc.

◆ operator/

Hep2Vector operator/ ( const Hep2Vector & p,
double a )
friend

◆ operator<<

std::ostream & operator<< ( std::ostream & ,
const Hep2Vector &  )
friend

Member Data Documentation

◆ ZMpvToleranceTicks

const int CLHEP::Hep2Vector::ZMpvToleranceTicks = 100
static

Definition at line 194 of file TwoVector.h.


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