Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
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 36 of file AxisAngle.h.

Member Typedef Documentation

◆ AA

Definition at line 42 of file AxisAngle.h.

◆ Scalar

Definition at line 39 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()

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

◆ distance()

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

Definition at line 49 of file AxisAngle.cc.

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

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

◆ isNear()

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

Definition at line 68 of file AxisAngle.cc.

68 {
69
70 return distance( aa ) <= epsilon * epsilon;
71
72} // HepAxisAngle::isNear()
G4double epsilon(G4double density, G4double temperature)

◆ 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

◆ setTolerance()

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

Friends And Related Symbol Documentation

◆ operator<<

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

Definition at line 89 of file AxisAngle.cc.

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

◆ operator>>

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

Definition at line 99 of file AxisAngle.cc.

99 {
100 Hep3Vector axis;
101 double delta;
102 double x,y,z;
103 ZMinputAxisAngle ( is, x, y, z, delta );
104 axis.set(x,y,z);
105 aa.set ( axis, delta );
106 return is;
107} // 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:156

Member Data Documentation

◆ tolerance

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

Definition at line 43 of file AxisAngle.h.


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