Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends
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.

References CLHEP::Hep3Vector::set().

100  {
101  boost.set(0,0,0);
102  rotation = axisAngle();
103 }
HepAxisAngle axisAngle() const
void CLHEP::HepRotationZ::decompose ( Hep3Vector boost,
HepAxisAngle rotation 
) const

Definition at line 106 of file RotationZ.cc.

References CLHEP::Hep3Vector::set().

106  {
107  boost.set(0,0,0);
108  rotation = axisAngle();
109 }
HepAxisAngle axisAngle() const
void CLHEP::HepRotationZ::decompose ( HepRotation rotation,
HepBoost boost 
) const

Definition at line 112 of file RotationZ.cc.

References CLHEP::HepBoost::set().

112  {
113  boost.set(0,0,0);
114  rotation = HepRotation(*this);
115 }
void CLHEP::HepRotationZ::decompose ( HepBoost boost,
HepRotation rotation 
) const

Definition at line 118 of file RotationZ.cc.

References CLHEP::HepBoost::set().

118  {
119  boost.set(0,0,0);
120  rotation = HepRotation(*this);
121 }
double CLHEP::HepRotationZ::delta ( ) const
inline
double CLHEP::HepRotationZ::distance2 ( const HepRotationZ r) const

Definition at line 123 of file RotationZ.cc.

References its_c, and its_s.

Referenced by distance2(), howNear(), and isNear().

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 }
double CLHEP::HepRotationZ::distance2 ( const HepRotation r) const

Definition at line 128 of file RotationZ.cc.

References xx(), CLHEP::HepRotation::xx(), xy(), CLHEP::HepRotation::xy(), yx(), CLHEP::HepRotation::yx(), yy(), CLHEP::HepRotation::yy(), and CLHEP::HepRotation::zz().

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
double CLHEP::HepRotationZ::distance2 ( const HepBoost lt) const

Definition at line 146 of file RotationZ.cc.

References distance2().

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

Definition at line 136 of file RotationZ.cc.

References test::a, test::b, CLHEP::Hep3Vector::beta(), CLHEP::HepLorentzRotation::decompose(), and distance2().

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
HepEulerAngles CLHEP::HepRotationZ::eulerAngles ( ) const

Definition at line 54 of file RotationZ.cc.

References phi(), psi(), and theta().

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
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.

References distance2().

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

Definition at line 153 of file RotationZ.cc.

References distance2().

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

Definition at line 156 of file RotationZ.cc.

References distance2().

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

Definition at line 159 of file RotationZ.cc.

References distance2().

159  {
160  return std::sqrt(distance2(lt));
161 }
double distance2(const HepRotationZ &r) const
Definition: RotationZ.cc:123
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.

References distance2().

162  {
163  return (distance2(r) <= epsilon*epsilon);
164 }
double distance2(const HepRotationZ &r) const
Definition: RotationZ.cc:123
bool CLHEP::HepRotationZ::isNear ( const HepRotation r,
double  epsilon = Hep4RotationInterface::tolerance 
) const

Definition at line 165 of file RotationZ.cc.

References distance2().

165  {
166  return (distance2(r) <= epsilon*epsilon);
167 }
double distance2(const HepRotationZ &r) const
Definition: RotationZ.cc:123
bool CLHEP::HepRotationZ::isNear ( const HepBoost lt,
double  epsilon = Hep4RotationInterface::tolerance 
) const

Definition at line 168 of file RotationZ.cc.

References distance2().

168  {
169  return (distance2(lt) <= epsilon*epsilon);
170 }
double distance2(const HepRotationZ &r) const
Definition: RotationZ.cc:123
bool CLHEP::HepRotationZ::isNear ( const HepLorentzRotation lt,
double  epsilon = Hep4RotationInterface::tolerance 
) const

Definition at line 171 of file RotationZ.cc.

References distance2().

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

Definition at line 176 of file RotationZ.cc.

References its_c.

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.

References its_d.

Referenced by eulerAngles().

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

Definition at line 66 of file RotationZ.cc.

References xx(), and yx().

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
double CLHEP::HepRotationZ::phiY ( ) const

Definition at line 71 of file RotationZ.cc.

References xy(), and yy().

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

Definition at line 75 of file RotationZ.cc.

References xz(), and yz().

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
std::ostream & CLHEP::HepRotationZ::print ( std::ostream &  os) const

Definition at line 180 of file RotationZ.cc.

References its_c, its_d, and its_s.

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

Referenced by set().

double CLHEP::HepRotationZ::psi ( ) const

Definition at line 50 of file RotationZ.cc.

References its_d.

Referenced by eulerAngles().

50  {
51  return - its_d/2.0;
52 } // HepRotationZ::psi()
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.

References its_c, its_d, its_s, and proper().

Referenced by setDelta().

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)
void CLHEP::HepRotationZ::setDelta ( double  delta)

Definition at line 95 of file RotationZ.cc.

References set().

95  {
96  set(ddelta);
97 }
HepRotationZ & set(double delta)
Definition: RotationZ.cc:35
static double CLHEP::HepRotationZ::setTolerance ( double  tol)
inlinestatic
double CLHEP::HepRotationZ::theta ( ) const

Definition at line 46 of file RotationZ.cc.

Referenced by eulerAngles().

46  {
47  return 0.0 ;
48 } // HepRotationZ::theta()
double CLHEP::HepRotationZ::thetaX ( ) const

Definition at line 80 of file RotationZ.cc.

References zx().

80  {
81  return safe_acos(zx());
82  // or ---- return CLHEP::halfpi;
83 }
double zx() const
double CLHEP::HepRotationZ::thetaY ( ) const

Definition at line 85 of file RotationZ.cc.

References zy().

85  {
86  return safe_acos(zy());
87  // or ---- return CLHEP::halfpi;
88 }
double zy() const
double CLHEP::HepRotationZ::thetaZ ( ) const

Definition at line 90 of file RotationZ.cc.

References zz().

90  {
91  return safe_acos(zz());
92  // or ---- return 0.0;
93 }
double zz() const
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

Referenced by distance2(), and phiX().

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

Referenced by distance2(), and phiY().

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

Referenced by phiZ().

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

Referenced by distance2(), and phiX().

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

Referenced by distance2(), and phiY().

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

Referenced by phiZ().

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

Referenced by thetaX().

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

Referenced by thetaY().

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

Referenced by thetaZ().

Friends And Related Function Documentation

HepRotationZ inverseOf ( const HepRotationZ r)
friend

Field Documentation

double CLHEP::HepRotationZ::its_c
protected

Definition at line 265 of file RotationZ.h.

Referenced by distance2(), norm2(), print(), and set().

double CLHEP::HepRotationZ::its_d
protected

Definition at line 261 of file RotationZ.h.

Referenced by phi(), print(), psi(), and set().

double CLHEP::HepRotationZ::its_s
protected

Definition at line 264 of file RotationZ.h.

Referenced by distance2(), print(), and set().


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