#include <TwoVector.h>
- Author
Definition at line 48 of file TwoVector.h.
Enumerator |
---|
X |
|
Y |
|
NUM_COORDINATES |
|
SIZE |
|
Definition at line 52 of file TwoVector.h.
Enumerator |
---|
ZMpvToleranceTicks |
|
Definition at line 195 of file TwoVector.h.
CLHEP::Hep2Vector::Hep2Vector |
( |
double |
x = 0.0 , |
|
|
double |
y = 0.0 |
|
) |
| |
|
inline |
CLHEP::Hep2Vector::Hep2Vector |
( |
const Hep2Vector & |
p | ) |
|
|
inline |
CLHEP::Hep2Vector::Hep2Vector |
( |
const Hep3Vector & |
| ) |
|
|
explicit |
CLHEP::Hep2Vector::~Hep2Vector |
( |
| ) |
|
|
inline |
double CLHEP::Hep2Vector::angle |
( |
const Hep2Vector & |
| ) |
const |
|
inline |
Definition at line 88 of file TwoVector.cc.
91 }
else if ( dy < v.dy ) {
93 }
else if ( dx > v.dx ) {
95 }
else if ( dx < v.dx ) {
double CLHEP::Hep2Vector::dot |
( |
const Hep2Vector & |
p | ) |
const |
|
inline |
static double CLHEP::Hep2Vector::getTolerance |
( |
| ) |
|
|
inlinestatic |
double CLHEP::Hep2Vector::howNear |
( |
const Hep2Vector & |
p | ) |
const |
Definition at line 121 of file TwoVector.cc.
122 double d = (*
this -
p).
mag2();
124 if ( (pdp > 0) && (d < pdp) ) {
125 return std::sqrt (d/pdp);
126 }
else if ( (pdp == 0) && (d == 0) ) {
double dot(const Hep2Vector &p) const
double CLHEP::Hep2Vector::howOrthogonal |
( |
const Hep2Vector & |
p | ) |
const |
Definition at line 162 of file TwoVector.cc.
165 double v1v2 = std::fabs(
dot(v));
169 double abscross = std::fabs ( dx * v.y() - dy - v.x() );
170 if ( v1v2 >= abscross ) {
173 return v1v2/abscross;
double dot(const Hep2Vector &p) const
double CLHEP::Hep2Vector::howParallel |
( |
const Hep2Vector & |
p | ) |
const |
Definition at line 133 of file TwoVector.cc.
136 double v1v2 = std::fabs(
dot(v));
139 return ( (
mag2() == 0) && (v.mag2() == 0) ) ? 0 : 1;
141 double abscross = std::fabs ( dx * v.y() - dy - v.x() );
142 if ( abscross >= v1v2 ) {
145 return abscross/v1v2;
double dot(const Hep2Vector &p) const
bool CLHEP::Hep2Vector::isNear |
( |
const Hep2Vector & |
p, |
|
|
double |
epsilon = tolerance |
|
) |
| const |
Definition at line 116 of file TwoVector.cc.
118 return ( (*
this -
p).
mag2() <= limit );
double dot(const Hep2Vector &p) const
double epsilon(double density, double temperature)
bool CLHEP::Hep2Vector::isOrthogonal |
( |
const Hep2Vector & |
p, |
|
|
double |
epsilon = tolerance |
|
) |
| const |
Definition at line 177 of file TwoVector.cc.
181 double v1v2 = std::fabs(
dot(v));
182 double abscross = std::fabs ( dx * v.y() - dy - v.x() );
183 return ( v1v2 <=
epsilon * abscross );
double dot(const Hep2Vector &p) const
double epsilon(double density, double temperature)
bool CLHEP::Hep2Vector::isParallel |
( |
const Hep2Vector & |
p, |
|
|
double |
epsilon = tolerance |
|
) |
| const |
Definition at line 149 of file TwoVector.cc.
153 double v1v2 = std::fabs(
dot(v));
156 return ( (
mag2() == 0) && (v.mag2() == 0) );
158 double abscross = std::fabs ( dx * v.y() - dy - v.x() );
159 return ( abscross <=
epsilon * v1v2 );
double dot(const Hep2Vector &p) const
double epsilon(double density, double temperature)
double CLHEP::Hep2Vector::mag |
( |
| ) |
const |
|
inline |
double CLHEP::Hep2Vector::mag2 |
( |
| ) |
const |
|
inline |
Definition at line 84 of file TwoVector.cc.
85 return Hep3Vector ( dx, dy, 0.0 );
bool CLHEP::Hep2Vector::operator!= |
( |
const Hep2Vector & |
v | ) |
const |
|
inline |
double CLHEP::Hep2Vector::operator() |
( |
int |
i | ) |
const |
double & CLHEP::Hep2Vector::operator() |
( |
int |
i | ) |
|
Hep2Vector& CLHEP::Hep2Vector::operator*= |
( |
double |
a | ) |
|
|
inline |
bool CLHEP::Hep2Vector::operator< |
( |
const Hep2Vector & |
v | ) |
const |
Definition at line 106 of file TwoVector.cc.
int compare(const Hep2Vector &v) const
bool CLHEP::Hep2Vector::operator<= |
( |
const Hep2Vector & |
v | ) |
const |
Definition at line 112 of file TwoVector.cc.
int compare(const Hep2Vector &v) const
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.
int compare(const Hep2Vector &v) const
bool CLHEP::Hep2Vector::operator>= |
( |
const Hep2Vector & |
v | ) |
const |
Definition at line 109 of file TwoVector.cc.
int compare(const Hep2Vector &v) const
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.
54 double ss = std::sin(aangle);
55 double cc = std::cos(aangle);
void CLHEP::Hep2Vector::set |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
|
inline |
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.
22 double oldTolerance (tolerance);
void CLHEP::Hep2Vector::setX |
( |
double |
x | ) |
|
|
inline |
void CLHEP::Hep2Vector::setY |
( |
double |
y | ) |
|
|
inline |
double CLHEP::Hep2Vector::x |
( |
| ) |
const |
|
inline |
double CLHEP::Hep2Vector::y |
( |
| ) |
const |
|
inline |
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const Hep2Vector & |
q |
|
) |
| |
|
friend |
The documentation for this class was generated from the following files:
- geant4.10.03.p01/source/externals/clhep/include/CLHEP/Vector/TwoVector.h
- geant4.10.03.p01/source/externals/clhep/src/TwoVector.cc