Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CLHEP::HepRotationZ Class Reference

#include <RotationZ.h>

Public Member Functions

 HepRotationZ ()
 
 HepRotationZ (double delta)
 
 HepRotationZ (const HepRotationZ &orig)
 
HepRotationZoperator= (const HepRotationZ &r)
 
HepRotationZset (double delta)
 
 ~HepRotationZ ()
 
Hep3Vector colX () const
 
Hep3Vector colY () const
 
Hep3Vector colZ () const
 
Hep3Vector rowX () const
 
Hep3Vector rowY () const
 
Hep3Vector rowZ () const
 
double xx () const
 
double xy () const
 
double xz () const
 
double yx () const
 
double yy () const
 
double yz () const
 
double zx () const
 
double zy () const
 
double zz () const
 
HepRep3x3 rep3x3 () const
 
double getPhi () const
 
double getTheta () const
 
double getPsi () const
 
double phi () const
 
double theta () const
 
double psi () const
 
HepEulerAngles eulerAngles () const
 
double getDelta () const
 
Hep3Vector getAxis () const
 
double delta () const
 
Hep3Vector axis () const
 
HepAxisAngle axisAngle () const
 
void getAngleAxis (double &delta, Hep3Vector &axis) const
 
double phiX () const
 
double phiY () const
 
double phiZ () const
 
double thetaX () const
 
double thetaY () const
 
double thetaZ () const
 
HepLorentzVector col1 () const
 
HepLorentzVector col2 () const
 
HepLorentzVector col3 () const
 
HepLorentzVector col4 () const
 
HepLorentzVector row1 () const
 
HepLorentzVector row2 () const
 
HepLorentzVector row3 () const
 
HepLorentzVector row4 () const
 
double xt () const
 
double yt () const
 
double zt () const
 
double tx () const
 
double ty () const
 
double tz () const
 
double tt () const
 
HepRep4x4 rep4x4 () const
 
void setDelta (double delta)
 
void decompose (HepAxisAngle &rotation, Hep3Vector &boost) const
 
void decompose (Hep3Vector &boost, HepAxisAngle &rotation) const
 
void decompose (HepRotation &rotation, HepBoost &boost) const
 
void decompose (HepBoost &boost, HepRotation &rotation) const
 
bool isIdentity () const
 
int compare (const HepRotationZ &r) const
 
bool operator== (const HepRotationZ &r) const
 
bool operator!= (const HepRotationZ &r) const
 
bool operator< (const HepRotationZ &r) const
 
bool operator> (const HepRotationZ &r) const
 
bool operator<= (const HepRotationZ &r) const
 
bool operator>= (const HepRotationZ &r) const
 
double distance2 (const HepRotationZ &r) const
 
double distance2 (const HepRotation &r) const
 
double howNear (const HepRotationZ &r) const
 
double howNear (const HepRotation &r) const
 
bool isNear (const HepRotationZ &r, double epsilon=Hep4RotationInterface::tolerance) const
 
bool isNear (const HepRotation &r, double epsilon=Hep4RotationInterface::tolerance) const
 
double distance2 (const HepBoost &lt) const
 
double distance2 (const HepLorentzRotation &lt) const
 
double howNear (const HepBoost &lt) const
 
double howNear (const HepLorentzRotation &lt) const
 
bool isNear (const HepBoost &lt, double epsilon=Hep4RotationInterface::tolerance) const
 
bool isNear (const HepLorentzRotation &lt, double epsilon=Hep4RotationInterface::tolerance) const
 
double norm2 () const
 
void rectify ()
 
Hep3Vector operator() (const Hep3Vector &p) const
 
Hep3Vector operator* (const Hep3Vector &p) const
 
HepLorentzVector operator() (const HepLorentzVector &w) const
 
HepLorentzVector operator* (const HepLorentzVector &w) const
 
HepRotationZ operator* (const HepRotationZ &rz) const
 
HepRotationZoperator*= (const HepRotationZ &r)
 
HepRotationZtransform (const HepRotationZ &r)
 
HepRotationZ inverse () const
 
HepRotationZinvert ()
 
std::ostream & print (std::ostream &os) const
 

Static Public Member Functions

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

Protected Member Functions

 HepRotationZ (double dd, double ss, double cc)
 

Static Protected Member Functions

static double proper (double delta)
 

Protected Attributes

double its_d
 
double its_s
 
double its_c
 

Friends

HepRotationZ inverseOf (const HepRotationZ &r)
 

Detailed Description

Author

Definition at line 42 of file RotationZ.h.

Constructor & Destructor Documentation

CLHEP::HepRotationZ::HepRotationZ ( )
inline
CLHEP::HepRotationZ::HepRotationZ ( double  delta)

Definition at line 31 of file RotationZ.cc.

31  :
32  its_d(proper(ddelta)), its_s(std::sin(ddelta)), its_c(std::cos(ddelta))
33 {}
static double proper(double delta)
CLHEP::HepRotationZ::HepRotationZ ( const HepRotationZ orig)
inline
CLHEP::HepRotationZ::~HepRotationZ ( )
inline
CLHEP::HepRotationZ::HepRotationZ ( double  dd,
double  ss,
double  cc 
)
inlineprotected

Member Function Documentation

Hep3Vector CLHEP::HepRotationZ::axis ( ) const
inline
HepAxisAngle CLHEP::HepRotationZ::axisAngle ( ) const
inline
HepLorentzVector CLHEP::HepRotationZ::col1 ( ) const
inline
HepLorentzVector CLHEP::HepRotationZ::col2 ( ) const
inline
HepLorentzVector CLHEP::HepRotationZ::col3 ( ) const
inline
HepLorentzVector CLHEP::HepRotationZ::col4 ( ) const
inline
Hep3Vector CLHEP::HepRotationZ::colX ( ) const
inline
Hep3Vector CLHEP::HepRotationZ::colY ( ) const
inline
Hep3Vector CLHEP::HepRotationZ::colZ ( ) const
inline
int CLHEP::HepRotationZ::compare ( const HepRotationZ r) const
inline
void CLHEP::HepRotationZ::decompose ( HepAxisAngle rotation,
Hep3Vector boost 
) const

Definition at line 100 of file RotationZ.cc.

100  {
101  boost.set(0,0,0);
102  rotation = axisAngle();
103 }
HepAxisAngle axisAngle() const

Here is the call graph for this function:

void CLHEP::HepRotationZ::decompose ( Hep3Vector boost,
HepAxisAngle rotation 
) const

Definition at line 106 of file RotationZ.cc.

106  {
107  boost.set(0,0,0);
108  rotation = axisAngle();
109 }
HepAxisAngle axisAngle() const

Here is the call graph for this function:

void CLHEP::HepRotationZ::decompose ( HepRotation rotation,
HepBoost boost 
) const

Definition at line 112 of file RotationZ.cc.

112  {
113  boost.set(0,0,0);
114  rotation = HepRotation(*this);
115 }

Here is the call graph for this function:

void CLHEP::HepRotationZ::decompose ( HepBoost boost,
HepRotation rotation 
) const

Definition at line 118 of file RotationZ.cc.

118  {
119  boost.set(0,0,0);
120  rotation = HepRotation(*this);
121 }

Here is the call graph for this function:

double CLHEP::HepRotationZ::delta ( ) const
inline
double CLHEP::HepRotationZ::distance2 ( const HepRotationZ r) const

Definition at line 123 of file RotationZ.cc.

123  {
124  double answer = 2.0 * ( 1.0 - ( its_s * r.its_s + its_c * r.its_c ) ) ;
125  return (answer >= 0) ? answer : 0;
126 }

Here is the caller graph for this function:

double CLHEP::HepRotationZ::distance2 ( const HepRotation r) const

Definition at line 128 of file RotationZ.cc.

128  {
129  double sum = xx() * r.xx() + xy() * r.xy()
130  + yx() * r.yx() + yy() * r.yy()
131  + r.zz();
132  double answer = 3.0 - sum;
133  return (answer >= 0 ) ? answer : 0;
134 }
double xx() const
double yy() const
double xy() const
double yx() const

Here is the call graph for this function:

double CLHEP::HepRotationZ::distance2 ( const HepBoost lt) const

Definition at line 146 of file RotationZ.cc.

146  {
147  return distance2( HepLorentzRotation(lt));
148 }
double distance2(const HepRotationZ &r) const
Definition: RotationZ.cc:123

Here is the call graph for this function:

double CLHEP::HepRotationZ::distance2 ( const HepLorentzRotation lt) const

Definition at line 136 of file RotationZ.cc.

136  {
137  HepAxisAngle a;
138  Hep3Vector b;
139  lt.decompose(b, a);
140  double bet = b.beta();
141  double bet2 = bet*bet;
142  HepRotation r(a);
143  return bet2/(1-bet2) + distance2(r);
144 }
double distance2(const HepRotationZ &r) const
Definition: RotationZ.cc:123

Here is the call graph for this function:

HepEulerAngles CLHEP::HepRotationZ::eulerAngles ( ) const

Definition at line 54 of file RotationZ.cc.

54  {
55  return HepEulerAngles( phi(), theta(), psi() );
56 } // HepRotationZ::eulerAngles()
double psi() const
Definition: RotationZ.cc:50
double theta() const
Definition: RotationZ.cc:46
double phi() const
Definition: RotationZ.cc:42

Here is the call graph for this function:

void CLHEP::HepRotationZ::getAngleAxis ( double &  delta,
Hep3Vector axis 
) const
inline
Hep3Vector CLHEP::HepRotationZ::getAxis ( ) const
inline
double CLHEP::HepRotationZ::getDelta ( ) const
inline
double CLHEP::HepRotationZ::getPhi ( ) const
inline
double CLHEP::HepRotationZ::getPsi ( ) const
inline
double CLHEP::HepRotationZ::getTheta ( ) const
inline
static double CLHEP::HepRotationZ::getTolerance ( )
inlinestatic
double CLHEP::HepRotationZ::howNear ( const HepRotationZ r) const

Definition at line 150 of file RotationZ.cc.

150  {
151  return std::sqrt(distance2(r));
152 }
double distance2(const HepRotationZ &r) const
Definition: RotationZ.cc:123

Here is the call graph for this function:

double CLHEP::HepRotationZ::howNear ( const HepRotation r) const

Definition at line 153 of file RotationZ.cc.

153  {
154  return std::sqrt(distance2(r));
155 }
double distance2(const HepRotationZ &r) const
Definition: RotationZ.cc:123

Here is the call graph for this function:

double CLHEP::HepRotationZ::howNear ( const HepBoost lt) const

Definition at line 156 of file RotationZ.cc.

156  {
157  return std::sqrt(distance2(lt));
158 }
double distance2(const HepRotationZ &r) const
Definition: RotationZ.cc:123

Here is the call graph for this function:

double CLHEP::HepRotationZ::howNear ( const HepLorentzRotation lt) const

Definition at line 159 of file RotationZ.cc.

159  {
160  return std::sqrt(distance2(lt));
161 }
double distance2(const HepRotationZ &r) const
Definition: RotationZ.cc:123

Here is the call graph for this function:

HepRotationZ CLHEP::HepRotationZ::inverse ( ) const
inline
HepRotationZ& CLHEP::HepRotationZ::invert ( )
inline
bool CLHEP::HepRotationZ::isIdentity ( ) const
inline
bool CLHEP::HepRotationZ::isNear ( const HepRotationZ r,
double  epsilon = Hep4RotationInterface::tolerance 
) const

Definition at line 162 of file RotationZ.cc.

162  {
163  return (distance2(r) <= epsilon*epsilon);
164 }
double distance2(const HepRotationZ &r) const
Definition: RotationZ.cc:123
double epsilon(double density, double temperature)

Here is the call graph for this function:

bool CLHEP::HepRotationZ::isNear ( const HepRotation r,
double  epsilon = Hep4RotationInterface::tolerance 
) const

Definition at line 165 of file RotationZ.cc.

165  {
166  return (distance2(r) <= epsilon*epsilon);
167 }
double distance2(const HepRotationZ &r) const
Definition: RotationZ.cc:123
double epsilon(double density, double temperature)

Here is the call graph for this function:

bool CLHEP::HepRotationZ::isNear ( const HepBoost lt,
double  epsilon = Hep4RotationInterface::tolerance 
) const

Definition at line 168 of file RotationZ.cc.

168  {
169  return (distance2(lt) <= epsilon*epsilon);
170 }
double distance2(const HepRotationZ &r) const
Definition: RotationZ.cc:123
double epsilon(double density, double temperature)

Here is the call graph for this function:

bool CLHEP::HepRotationZ::isNear ( const HepLorentzRotation lt,
double  epsilon = Hep4RotationInterface::tolerance 
) const

Definition at line 171 of file RotationZ.cc.

172  {
173  return (distance2(lt) <= epsilon*epsilon);
174 }
double distance2(const HepRotationZ &r) const
Definition: RotationZ.cc:123
double epsilon(double density, double temperature)

Here is the call graph for this function:

double CLHEP::HepRotationZ::norm2 ( ) const

Definition at line 176 of file RotationZ.cc.

176  {
177  return 2.0 - 2.0 * its_c;
178 }
bool CLHEP::HepRotationZ::operator!= ( const HepRotationZ r) const
inline
Hep3Vector CLHEP::HepRotationZ::operator() ( const Hep3Vector p) const
inline
HepLorentzVector CLHEP::HepRotationZ::operator() ( const HepLorentzVector w) const
inline
Hep3Vector CLHEP::HepRotationZ::operator* ( const Hep3Vector p) const
inline
HepLorentzVector CLHEP::HepRotationZ::operator* ( const HepLorentzVector w) const
inline
HepRotationZ CLHEP::HepRotationZ::operator* ( const HepRotationZ rz) const
inline
HepRotationZ& CLHEP::HepRotationZ::operator*= ( const HepRotationZ r)
inline
bool CLHEP::HepRotationZ::operator< ( const HepRotationZ r) const
inline
bool CLHEP::HepRotationZ::operator<= ( const HepRotationZ r) const
inline
HepRotationZ& CLHEP::HepRotationZ::operator= ( const HepRotationZ r)
inline
bool CLHEP::HepRotationZ::operator== ( const HepRotationZ r) const
inline
bool CLHEP::HepRotationZ::operator> ( const HepRotationZ r) const
inline
bool CLHEP::HepRotationZ::operator>= ( const HepRotationZ r) const
inline
double CLHEP::HepRotationZ::phi ( ) const

Definition at line 42 of file RotationZ.cc.

42  {
43  return - its_d/2.0;
44 } // HepRotationZ::phi()

Here is the caller graph for this function:

double CLHEP::HepRotationZ::phiX ( ) const

Definition at line 66 of file RotationZ.cc.

66  {
67  return (yx() == 0.0 && xx() == 0.0) ? 0.0 : std::atan2(yx(),xx());
68  // or ---- return d;
69 }
double xx() const
double yx() const

Here is the call graph for this function:

double CLHEP::HepRotationZ::phiY ( ) const

Definition at line 71 of file RotationZ.cc.

71  {
72  return (yy() == 0.0 && xy() == 0.0) ? 0.0 : std::atan2(yy(),xy());
73 }
double yy() const
double xy() const

Here is the call graph for this function:

double CLHEP::HepRotationZ::phiZ ( ) const

Definition at line 75 of file RotationZ.cc.

75  {
76  return (yz() == 0.0 && xz() == 0.0) ? 0.0 : std::atan2(yz(),xz());
77  // or ---- return 0.0;
78 }
double yz() const
double xz() const

Here is the call graph for this function:

std::ostream & CLHEP::HepRotationZ::print ( std::ostream &  os) const

Definition at line 180 of file RotationZ.cc.

180  {
181  os << "\nRotation about Z (" << its_d <<
182  ") [cos d = " << its_c << " sin d = " << its_s << "]\n";
183  return os;
184 }
static double CLHEP::HepRotationZ::proper ( double  delta)
inlinestaticprotected

Here is the caller graph for this function:

double CLHEP::HepRotationZ::psi ( ) const

Definition at line 50 of file RotationZ.cc.

50  {
51  return - its_d/2.0;
52 } // HepRotationZ::psi()

Here is the caller graph for this function:

void CLHEP::HepRotationZ::rectify ( )
inline
HepRep3x3 CLHEP::HepRotationZ::rep3x3 ( ) const
inline
HepRep4x4 CLHEP::HepRotationZ::rep4x4 ( ) const
inline
HepLorentzVector CLHEP::HepRotationZ::row1 ( ) const
inline
HepLorentzVector CLHEP::HepRotationZ::row2 ( ) const
inline
HepLorentzVector CLHEP::HepRotationZ::row3 ( ) const
inline
HepLorentzVector CLHEP::HepRotationZ::row4 ( ) const
inline
Hep3Vector CLHEP::HepRotationZ::rowX ( ) const
inline
Hep3Vector CLHEP::HepRotationZ::rowY ( ) const
inline
Hep3Vector CLHEP::HepRotationZ::rowZ ( ) const
inline
HepRotationZ & CLHEP::HepRotationZ::set ( double  delta)

Definition at line 35 of file RotationZ.cc.

35  {
36  its_d = proper(ddelta);
37  its_s = std::sin(its_d);
38  its_c = std::cos(its_d);
39  return *this;
40 }
static double proper(double delta)

Here is the call graph for this function:

Here is the caller graph for this function:

void CLHEP::HepRotationZ::setDelta ( double  delta)

Definition at line 95 of file RotationZ.cc.

95  {
96  set(ddelta);
97 }
HepRotationZ & set(double delta)
Definition: RotationZ.cc:35

Here is the call graph for this function:

static double CLHEP::HepRotationZ::setTolerance ( double  tol)
inlinestatic
double CLHEP::HepRotationZ::theta ( ) const

Definition at line 46 of file RotationZ.cc.

46  {
47  return 0.0 ;
48 } // HepRotationZ::theta()

Here is the caller graph for this function:

double CLHEP::HepRotationZ::thetaX ( ) const

Definition at line 80 of file RotationZ.cc.

80  {
81  return safe_acos(zx());
82  // or ---- return CLHEP::halfpi;
83 }
double zx() const
static double safe_acos(double x)
Definition: Rotation.cc:23

Here is the call graph for this function:

double CLHEP::HepRotationZ::thetaY ( ) const

Definition at line 85 of file RotationZ.cc.

85  {
86  return safe_acos(zy());
87  // or ---- return CLHEP::halfpi;
88 }
double zy() const
static double safe_acos(double x)
Definition: Rotation.cc:23

Here is the call graph for this function:

double CLHEP::HepRotationZ::thetaZ ( ) const

Definition at line 90 of file RotationZ.cc.

90  {
91  return safe_acos(zz());
92  // or ---- return 0.0;
93 }
double zz() const
static double safe_acos(double x)
Definition: Rotation.cc:23

Here is the call graph for this function:

HepRotationZ& CLHEP::HepRotationZ::transform ( const HepRotationZ r)
inline
double CLHEP::HepRotationZ::tt ( ) const
inline
double CLHEP::HepRotationZ::tx ( ) const
inline
double CLHEP::HepRotationZ::ty ( ) const
inline
double CLHEP::HepRotationZ::tz ( ) const
inline
double CLHEP::HepRotationZ::xt ( ) const
inline
double CLHEP::HepRotationZ::xx ( ) const
inline

Here is the caller graph for this function:

double CLHEP::HepRotationZ::xy ( ) const
inline

Here is the caller graph for this function:

double CLHEP::HepRotationZ::xz ( ) const
inline

Here is the caller graph for this function:

double CLHEP::HepRotationZ::yt ( ) const
inline
double CLHEP::HepRotationZ::yx ( ) const
inline

Here is the caller graph for this function:

double CLHEP::HepRotationZ::yy ( ) const
inline

Here is the caller graph for this function:

double CLHEP::HepRotationZ::yz ( ) const
inline

Here is the caller graph for this function:

double CLHEP::HepRotationZ::zt ( ) const
inline
double CLHEP::HepRotationZ::zx ( ) const
inline

Here is the caller graph for this function:

double CLHEP::HepRotationZ::zy ( ) const
inline

Here is the caller graph for this function:

double CLHEP::HepRotationZ::zz ( ) const
inline

Here is the caller graph for this function:

Friends And Related Function Documentation

HepRotationZ inverseOf ( const HepRotationZ r)
friend

Member Data Documentation

double CLHEP::HepRotationZ::its_c
protected

Definition at line 265 of file RotationZ.h.

double CLHEP::HepRotationZ::its_d
protected

Definition at line 261 of file RotationZ.h.

double CLHEP::HepRotationZ::its_s
protected

Definition at line 264 of file RotationZ.h.


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