ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CLHEP::Hep2Vector Class Reference

#include <geant4/tree/geant4-10.6-release/source/externals/clhep/include/CLHEP/Vector/TwoVector.h>

Public Types

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

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)
 

Private Attributes

double dx
 
double dy
 

Static Private Attributes

static double tolerance = Hep2Vector::ZMpvToleranceTicks * 2.22045e-16
 

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 48 of file TwoVector.h.

View newest version in sPHENIX GitHub at line 48 of file TwoVector.h

Member Enumeration Documentation

anonymous enum
Enumerator:
X 
Y 
NUM_COORDINATES 
SIZE 

Definition at line 52 of file TwoVector.h.

View newest version in sPHENIX GitHub at line 52 of file TwoVector.h

anonymous enum
Enumerator:
ZMpvToleranceTicks 

Definition at line 197 of file TwoVector.h.

View newest version in sPHENIX GitHub at line 197 of file TwoVector.h

Constructor & Destructor Documentation

CLHEP::Hep2Vector::Hep2Vector ( double  x = 0.0,
double  y = 0.0 
)
inline
CLHEP::Hep2Vector::Hep2Vector ( const Hep2Vector p)
inline
CLHEP::Hep2Vector::Hep2Vector ( Hep2Vector &&  p)
inlinedefault
CLHEP::Hep2Vector::Hep2Vector ( const Hep3Vector )
explicit
CLHEP::Hep2Vector::~Hep2Vector ( )
inline

Member Function Documentation

double CLHEP::Hep2Vector::angle ( const Hep2Vector ) const
inline
int CLHEP::Hep2Vector::compare ( const Hep2Vector v) const

Definition at line 88 of file TwoVector.cc.

View newest version in sPHENIX GitHub at line 88 of file TwoVector.cc

References dx, and dy.

Referenced by operator<(), operator<=(), operator>(), and operator>=().

+ Here is the caller graph for this function:

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

Referenced by howNear(), howOrthogonal(), howParallel(), G4TessellatedGeometryAlgorithms::IntersectLineAndLineSegment2D(), isNear(), isOrthogonal(), and isParallel().

+ Here is the caller graph for this function:

static double CLHEP::Hep2Vector::getTolerance ( )
inlinestatic
double CLHEP::Hep2Vector::howNear ( const Hep2Vector p) const

Definition at line 121 of file TwoVector.cc.

View newest version in sPHENIX GitHub at line 121 of file TwoVector.cc

References d, dot(), and mag2().

+ Here is the call graph for this function:

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

Definition at line 162 of file TwoVector.cc.

View newest version in sPHENIX GitHub at line 162 of file TwoVector.cc

References dot(), dx, dy, x(), and y().

+ Here is the call graph for this function:

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

Definition at line 133 of file TwoVector.cc.

View newest version in sPHENIX GitHub at line 133 of file TwoVector.cc

References dot(), dx, dy, mag2(), x(), and y().

+ Here is the call graph for this function:

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

Definition at line 116 of file TwoVector.cc.

View newest version in sPHENIX GitHub at line 116 of file TwoVector.cc

References dot(), epsilon(), and mag2().

+ Here is the call graph for this function:

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

Definition at line 177 of file TwoVector.cc.

View newest version in sPHENIX GitHub at line 177 of file TwoVector.cc

References dot(), dx, dy, x(), and y().

+ Here is the call graph for this function:

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

Definition at line 149 of file TwoVector.cc.

View newest version in sPHENIX GitHub at line 149 of file TwoVector.cc

References dot(), dx, dy, mag2(), x(), and y().

+ Here is the call graph for this function:

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

Referenced by G4TriangularFacet::Intersect().

+ Here is the caller graph for this function:

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

Referenced by howNear(), howParallel(), G4TessellatedGeometryAlgorithms::IntersectLineAndLineSegment2D(), isNear(), isParallel(), and G4GeomTools::RemoveRedundantVertices().

+ Here is the caller graph for this function:

CLHEP::Hep2Vector::operator Hep3Vector ( ) const

Definition at line 84 of file TwoVector.cc.

View newest version in sPHENIX GitHub at line 84 of file TwoVector.cc

References dx, and dy.

bool CLHEP::Hep2Vector::operator!= ( const Hep2Vector v) const
inline
double CLHEP::Hep2Vector::operator() ( int  i) const

Definition at line 27 of file TwoVector.cc.

View newest version in sPHENIX GitHub at line 27 of file TwoVector.cc

References x(), and y().

+ Here is the call graph for this function:

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

Definition at line 39 of file TwoVector.cc.

View newest version in sPHENIX GitHub at line 39 of file TwoVector.cc

References dx, dy, X, and Y.

Hep2Vector& CLHEP::Hep2Vector::operator*= ( double  a)
inline
Hep2Vector& CLHEP::Hep2Vector::operator+= ( const Hep2Vector p)
inline
Hep2Vector CLHEP::Hep2Vector::operator- ( ) const
inline
Hep2Vector& CLHEP::Hep2Vector::operator-= ( const Hep2Vector p)
inline
bool CLHEP::Hep2Vector::operator< ( const Hep2Vector v) const

Definition at line 106 of file TwoVector.cc.

View newest version in sPHENIX GitHub at line 106 of file TwoVector.cc

References compare().

+ Here is the call graph for this function:

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

Definition at line 112 of file TwoVector.cc.

View newest version in sPHENIX GitHub at line 112 of file TwoVector.cc

References compare().

+ Here is the call graph for this function:

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

Definition at line 103 of file TwoVector.cc.

View newest version in sPHENIX GitHub at line 103 of file TwoVector.cc

References compare().

+ Here is the call graph for this function:

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

Definition at line 109 of file TwoVector.cc.

View newest version in sPHENIX GitHub at line 109 of file TwoVector.cc

References compare().

+ Here is the call graph for this function:

double CLHEP::Hep2Vector::operator[] ( int  i) const
inline
double& CLHEP::Hep2Vector::operator[] ( int  i)
inline
Hep2Vector CLHEP::Hep2Vector::orthogonal ( ) const
inline
double CLHEP::Hep2Vector::phi ( ) const
inline
double CLHEP::Hep2Vector::r ( ) const
inline
void CLHEP::Hep2Vector::rotate ( double  aangle)

Definition at line 53 of file TwoVector.cc.

View newest version in sPHENIX GitHub at line 53 of file TwoVector.cc

References dx, dy, and xx.

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

Referenced by G4Orb::CalculateExtent(), G4Torus::CalculateExtent(), G4GeomTools::DiskExtent(), and CLHEP::operator>>().

+ Here is the caller graph for this function:

void CLHEP::Hep2Vector::setMag ( double  r)
inline
void CLHEP::Hep2Vector::setPhi ( double  phi)
inline
void CLHEP::Hep2Vector::setPolar ( double  r,
double  phi 
)
inline
void CLHEP::Hep2Vector::setR ( double  r)
inline
double CLHEP::Hep2Vector::setTolerance ( double  tol)
static

Definition at line 20 of file TwoVector.cc.

View newest version in sPHENIX GitHub at line 20 of file TwoVector.cc

References tolerance.

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

Referenced by G4GDMLReadSolids::SectionRead(), and G4GDMLReadSolids::TwoDimVertexRead().

+ Here is the caller graph for this function:

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

Referenced by G4GDMLReadSolids::SectionRead(), and G4GDMLReadSolids::TwoDimVertexRead().

+ Here is the caller graph for this function:

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

Friends And Related Function Documentation

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

Member Data Documentation

double CLHEP::Hep2Vector::dx
private

Definition at line 201 of file TwoVector.h.

View newest version in sPHENIX GitHub at line 201 of file TwoVector.h

Referenced by compare(), howOrthogonal(), howParallel(), isOrthogonal(), isParallel(), operator()(), and rotate().

double CLHEP::Hep2Vector::dy
private

Definition at line 202 of file TwoVector.h.

View newest version in sPHENIX GitHub at line 202 of file TwoVector.h

Referenced by compare(), howOrthogonal(), howParallel(), isOrthogonal(), isParallel(), operator()(), and rotate().

double CLHEP::Hep2Vector::tolerance = Hep2Vector::ZMpvToleranceTicks * 2.22045e-16
staticprivate

Definition at line 205 of file TwoVector.h.

View newest version in sPHENIX GitHub at line 205 of file TwoVector.h

Referenced by setTolerance().


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