CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
CLHEP::HepAxisAngle Class Reference

#include <AxisAngle.h>

Public Types

typedef double Scalar
 

Public Member Functions

 HepAxisAngle ()
 
 HepAxisAngle (const Hep3Vector axis, Scalar delta)
 
Hep3Vector getAxis () const
 
Hep3Vector axis () const
 
AAsetAxis (const Hep3Vector axis)
 
double getDelta () const
 
double delta () const
 
AAsetDelta (Scalar delta)
 
AAset (const Hep3Vector axis, Scalar delta)
 
int compare (const AA &aa) const
 
bool operator== (const AA &aa) const
 
bool operator!= (const AA &aa) const
 
bool operator< (const AA &aa) const
 
bool operator<= (const AA &aa) const
 
bool operator> (const AA &aa) const
 
bool operator>= (const AA &aa) const
 
bool isNear (const AA &aa, Scalar epsilon=tolerance) const
 
double howNear (const AA &aa) const
 

Static Public Member Functions

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

Protected Types

typedef HepAxisAngle AA
 

Protected Member Functions

double distance (const HepAxisAngle &aa) const
 

Static Protected Attributes

static Scalar tolerance = Hep3Vector::ToleranceTicks * 1.0e-08
 

Friends

std::ostream & operator<< (std::ostream &os, const AA &aa)
 
std::istream & operator>> (std::istream &is, AA &aa)
 

Detailed Description

Author

Definition at line 37 of file AxisAngle.h.

Member Typedef Documentation

◆ AA

Definition at line 43 of file AxisAngle.h.

◆ Scalar

Definition at line 40 of file AxisAngle.h.

Constructor & Destructor Documentation

◆ HepAxisAngle() [1/2]

CLHEP::HepAxisAngle::HepAxisAngle ( )
inline

◆ HepAxisAngle() [2/2]

CLHEP::HepAxisAngle::HepAxisAngle ( const Hep3Vector  axis,
Scalar  delta 
)
inline

Member Function Documentation

◆ axis()

Hep3Vector CLHEP::HepAxisAngle::axis ( ) const
inline

◆ compare()

int CLHEP::HepAxisAngle::compare ( const AA aa) const
inline

◆ delta()

◆ distance()

double CLHEP::HepAxisAngle::distance ( const HepAxisAngle aa) const
protected

Definition at line 50 of file AxisAngle.cc.

50 {
51
52 double thisRep[9];
53 double aaRep[9];
54
55 ZMpvAxisAngleRep( *this, thisRep );
56 ZMpvAxisAngleRep( aa, aaRep );
57
58 double sum = 0.0;
59 for ( int i = 0; i < 9; i++ ) {
60 sum += thisRep[i] * aaRep[i];
61 }
62
63 double d = 3.0 - sum; // NaN-proofing:
64 return (d >= 0) ? d : 0; // std::sqrt(distance) is used in howNear()
65
66} // HepAxisAngle::distance()

Referenced by howNear(), and isNear().

◆ getAxis()

Hep3Vector CLHEP::HepAxisAngle::getAxis ( ) const
inline

◆ getDelta()

double CLHEP::HepAxisAngle::getDelta ( ) const
inline

◆ getTolerance()

static double CLHEP::HepAxisAngle::getTolerance ( )
inlinestatic

◆ howNear()

double CLHEP::HepAxisAngle::howNear ( const AA aa) const

Definition at line 76 of file AxisAngle.cc.

76 {
77
78 return std::sqrt( distance( aa ) );
79
80} // HepAxisAngle::howNear()
double distance(const HepAxisAngle &aa) const
Definition: AxisAngle.cc:50

◆ isNear()

bool CLHEP::HepAxisAngle::isNear ( const AA aa,
Scalar  epsilon = tolerance 
) const

Definition at line 69 of file AxisAngle.cc.

69 {
70
71 return distance( aa ) <= epsilon * epsilon;
72
73} // HepAxisAngle::isNear()

◆ operator!=()

bool CLHEP::HepAxisAngle::operator!= ( const AA aa) const
inline

◆ operator<()

bool CLHEP::HepAxisAngle::operator< ( const AA aa) const
inline

◆ operator<=()

bool CLHEP::HepAxisAngle::operator<= ( const AA aa) const
inline

◆ operator==()

bool CLHEP::HepAxisAngle::operator== ( const AA aa) const
inline

◆ operator>()

bool CLHEP::HepAxisAngle::operator> ( const AA aa) const
inline

◆ operator>=()

bool CLHEP::HepAxisAngle::operator>= ( const AA aa) const
inline

◆ set()

AA & CLHEP::HepAxisAngle::set ( const Hep3Vector  axis,
Scalar  delta 
)
inline

◆ setAxis()

AA & CLHEP::HepAxisAngle::setAxis ( const Hep3Vector  axis)
inline

◆ setDelta()

AA & CLHEP::HepAxisAngle::setDelta ( Scalar  delta)
inline

Referenced by XF::Pow::operator()().

◆ setTolerance()

static double CLHEP::HepAxisAngle::setTolerance ( Scalar  tol)
inlinestatic

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const AA aa 
)
friend

Definition at line 90 of file AxisAngle.cc.

90 {
91 os << '(' << aa.axis() << ", " << aa.delta() << ')';
92 return os;
93} // operator<<()

◆ operator>>

std::istream & operator>> ( std::istream &  is,
AA aa 
)
friend

Definition at line 100 of file AxisAngle.cc.

100 {
101 Hep3Vector axis;
102 double delta;
103 double x,y,z;
104 ZMinputAxisAngle ( is, x, y, z, delta );
105 axis.set(x,y,z);
106 aa.set ( axis, delta );
107 return is;
108} // operator>>()
void set(double x, double y, double z)
double delta() const
Hep3Vector axis() const
void ZMinputAxisAngle(std::istream &is, double &x, double &y, double &z, double &delta)
Definition: ZMinput.cc:152

Member Data Documentation

◆ tolerance

double CLHEP::HepAxisAngle::tolerance = Hep3Vector::ToleranceTicks * 1.0e-08
staticprotected

Definition at line 44 of file AxisAngle.h.


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