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

#include <RotationY.h>

Public Member Functions

 HepRotationY ()
 
 HepRotationY (double delta)
 
 HepRotationY (const HepRotationY &orig)
 
HepRotationYoperator= (const HepRotationY &r)
 
HepRotationYset (double delta)
 
 ~HepRotationY ()
 
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 HepRotationY &r) const
 
bool operator== (const HepRotationY &r) const
 
bool operator!= (const HepRotationY &r) const
 
bool operator< (const HepRotationY &r) const
 
bool operator> (const HepRotationY &r) const
 
bool operator<= (const HepRotationY &r) const
 
bool operator>= (const HepRotationY &r) const
 
double distance2 (const HepRotationY &r) const
 
double distance2 (const HepRotation &r) const
 
double howNear (const HepRotationY &r) const
 
double howNear (const HepRotation &r) const
 
bool isNear (const HepRotationY &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
 
HepRotationY operator* (const HepRotationY &ry) const
 
HepRotationYoperator*= (const HepRotationY &r)
 
HepRotationYtransform (const HepRotationY &r)
 
HepRotationY inverse () const
 
HepRotationYinvert ()
 
std::ostream & print (std::ostream &os) const
 

Static Public Member Functions

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

Protected Member Functions

 HepRotationY (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

HepRotationY inverseOf (const HepRotationY &r)
 

Detailed Description

Author

Definition at line 42 of file RotationY.h.

Constructor & Destructor Documentation

CLHEP::HepRotationY::HepRotationY ( )
inline
CLHEP::HepRotationY::HepRotationY ( double  delta)

Definition at line 31 of file RotationY.cc.

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

Member Function Documentation

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

Definition at line 112 of file RotationY.cc.

112  {
113  boost.set(0,0,0);
114  rotation = axisAngle();
115 }
HepAxisAngle axisAngle() const

Here is the call graph for this function:

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

Definition at line 118 of file RotationY.cc.

118  {
119  boost.set(0,0,0);
120  rotation = axisAngle();
121 }
HepAxisAngle axisAngle() const

Here is the call graph for this function:

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

Definition at line 124 of file RotationY.cc.

124  {
125  boost.set(0,0,0);
126  rotation = HepRotation(*this);
127 }

Here is the call graph for this function:

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

Definition at line 130 of file RotationY.cc.

130  {
131  boost.set(0,0,0);
132  rotation = HepRotation(*this);
133 }

Here is the call graph for this function:

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

Definition at line 135 of file RotationY.cc.

135  {
136  double answer = 2.0 * ( 1.0 - ( its_s * r.its_s + its_c * r.its_c ) ) ;
137  return (answer >= 0) ? answer : 0;
138 }

Here is the caller graph for this function:

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

Definition at line 140 of file RotationY.cc.

140  {
141  double sum = xx() * r.xx() + xz() * r.xz()
142  + r.yy()
143  + zx() * r.zx() + zz() * r.zz();
144  double answer = 3.0 - sum;
145  return (answer >= 0 ) ? answer : 0;
146 }
double xx() const
double xz() const
double zx() const
double zz() const

Here is the call graph for this function:

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

Definition at line 158 of file RotationY.cc.

158  {
159  return distance2( HepLorentzRotation(lt));
160 }
double distance2(const HepRotationY &r) const
Definition: RotationY.cc:135

Here is the call graph for this function:

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

Definition at line 148 of file RotationY.cc.

148  {
149  HepAxisAngle a;
150  Hep3Vector b;
151  lt.decompose(b, a);
152  double bet = b.beta();
153  double bet2 = bet*bet;
154  HepRotation r(a);
155  return bet2/(1-bet2) + distance2(r);
156 }
double distance2(const HepRotationY &r) const
Definition: RotationY.cc:135

Here is the call graph for this function:

HepEulerAngles CLHEP::HepRotationY::eulerAngles ( ) const

Definition at line 66 of file RotationY.cc.

66  {
67  return HepEulerAngles( phi(), theta(), psi() );
68 } // HepRotationY::eulerAngles()
double phi() const
Definition: RotationY.cc:42
double psi() const
Definition: RotationY.cc:56
double theta() const
Definition: RotationY.cc:52

Here is the call graph for this function:

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

Definition at line 162 of file RotationY.cc.

162  {
163  return std::sqrt(distance2(r));
164 }
double distance2(const HepRotationY &r) const
Definition: RotationY.cc:135

Here is the call graph for this function:

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

Definition at line 165 of file RotationY.cc.

165  {
166  return std::sqrt(distance2(r));
167 }
double distance2(const HepRotationY &r) const
Definition: RotationY.cc:135

Here is the call graph for this function:

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

Definition at line 168 of file RotationY.cc.

168  {
169  return std::sqrt(distance2(lt));
170 }
double distance2(const HepRotationY &r) const
Definition: RotationY.cc:135

Here is the call graph for this function:

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

Definition at line 171 of file RotationY.cc.

171  {
172  return std::sqrt(distance2(lt));
173 }
double distance2(const HepRotationY &r) const
Definition: RotationY.cc:135

Here is the call graph for this function:

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

Definition at line 174 of file RotationY.cc.

174  {
175  return (distance2(r) <= epsilon*epsilon);
176 }
double distance2(const HepRotationY &r) const
Definition: RotationY.cc:135
double epsilon(double density, double temperature)

Here is the call graph for this function:

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

Definition at line 177 of file RotationY.cc.

177  {
178  return (distance2(r) <= epsilon*epsilon);
179 }
double distance2(const HepRotationY &r) const
Definition: RotationY.cc:135
double epsilon(double density, double temperature)

Here is the call graph for this function:

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

Definition at line 180 of file RotationY.cc.

180  {
181  return (distance2(lt) <= epsilon*epsilon);
182 }
double distance2(const HepRotationY &r) const
Definition: RotationY.cc:135
double epsilon(double density, double temperature)

Here is the call graph for this function:

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

Definition at line 183 of file RotationY.cc.

184  {
185  return (distance2(lt) <= epsilon*epsilon);
186 }
double distance2(const HepRotationY &r) const
Definition: RotationY.cc:135
double epsilon(double density, double temperature)

Here is the call graph for this function:

double CLHEP::HepRotationY::norm2 ( ) const

Definition at line 188 of file RotationY.cc.

188  {
189  return 2.0 - 2.0 * its_c;
190 }
bool CLHEP::HepRotationY::operator!= ( const HepRotationY r) const
inline
Hep3Vector CLHEP::HepRotationY::operator() ( const Hep3Vector p) const
inline
HepLorentzVector CLHEP::HepRotationY::operator() ( const HepLorentzVector w) const
inline
Hep3Vector CLHEP::HepRotationY::operator* ( const Hep3Vector p) const
inline
HepLorentzVector CLHEP::HepRotationY::operator* ( const HepLorentzVector w) const
inline
HepRotationY CLHEP::HepRotationY::operator* ( const HepRotationY ry) const
inline
HepRotationY& CLHEP::HepRotationY::operator*= ( const HepRotationY r)
inline
bool CLHEP::HepRotationY::operator< ( const HepRotationY r) const
inline
bool CLHEP::HepRotationY::operator<= ( const HepRotationY r) const
inline
HepRotationY& CLHEP::HepRotationY::operator= ( const HepRotationY r)
inline
bool CLHEP::HepRotationY::operator== ( const HepRotationY r) const
inline
bool CLHEP::HepRotationY::operator> ( const HepRotationY r) const
inline
bool CLHEP::HepRotationY::operator>= ( const HepRotationY r) const
inline
double CLHEP::HepRotationY::phi ( ) const

Definition at line 42 of file RotationY.cc.

42  {
43  if ( its_d == 0 ) {
44  return 0;
45  } else if ( (its_d < 0) || (its_d == CLHEP::pi) ) {
46  return +CLHEP::halfpi;
47  } else {
48  return -CLHEP::halfpi;
49  }
50 } // HepRotationY::phi()
static constexpr double halfpi
Definition: SystemOfUnits.h:56
static constexpr double pi
Definition: SystemOfUnits.h:54

Here is the caller graph for this function:

double CLHEP::HepRotationY::phiX ( ) const

Definition at line 78 of file RotationY.cc.

78  {
79  return (yx() == 0.0 && xx() == 0.0) ? 0.0 : std::atan2(yx(),xx());
80  // or ---- return 0;
81 }
double xx() const
double yx() const

Here is the call graph for this function:

double CLHEP::HepRotationY::phiY ( ) const

Definition at line 83 of file RotationY.cc.

83  {
84  return (yy() == 0.0 && xy() == 0.0) ? 0.0 : std::atan2(yy(),xy());
85  // or ---- return CLHEP::halfpi;
86 }
double xy() const
double yy() const

Here is the call graph for this function:

double CLHEP::HepRotationY::phiZ ( ) const

Definition at line 88 of file RotationY.cc.

88  {
89  return (yz() == 0.0 && xz() == 0.0) ? 0.0 : std::atan2(yz(),xz());
90  // or ---- return 0;
91 }
double xz() const
double yz() const

Here is the call graph for this function:

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

Definition at line 192 of file RotationY.cc.

192  {
193  os << "\nRotation about Y (" << its_d <<
194  ") [cos d = " << its_c << " sin d = " << its_s << "]\n";
195  return os;
196 }
static double CLHEP::HepRotationY::proper ( double  delta)
inlinestaticprotected

Here is the caller graph for this function:

double CLHEP::HepRotationY::psi ( ) const

Definition at line 56 of file RotationY.cc.

56  {
57  if ( its_d == 0 ) {
58  return 0;
59  } else if ( (its_d < 0) || (its_d == CLHEP::pi) ) {
60  return -CLHEP::halfpi;
61  } else {
62  return +CLHEP::halfpi;
63  }
64 } // HepRotationY::psi()
static constexpr double halfpi
Definition: SystemOfUnits.h:56
static constexpr double pi
Definition: SystemOfUnits.h:54

Here is the caller graph for this function:

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

Definition at line 35 of file RotationY.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::HepRotationY::setDelta ( double  delta)

Definition at line 107 of file RotationY.cc.

107  {
108  set(ddelta);
109 }
HepRotationY & set(double delta)
Definition: RotationY.cc:35

Here is the call graph for this function:

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

Definition at line 52 of file RotationY.cc.

52  {
53  return std::fabs( its_d );
54 } // HepRotationY::theta()

Here is the caller graph for this function:

double CLHEP::HepRotationY::thetaX ( ) const

Definition at line 93 of file RotationY.cc.

93  {
94  return safe_acos(zx());
95 }
static double safe_acos(double x)
Definition: Rotation.cc:23
double zx() const

Here is the call graph for this function:

double CLHEP::HepRotationY::thetaY ( ) const

Definition at line 97 of file RotationY.cc.

97  {
98  return safe_acos(zy());
99  // or ---- return CLHEP::halfpi;
100 }
double zy() const
static double safe_acos(double x)
Definition: Rotation.cc:23

Here is the call graph for this function:

double CLHEP::HepRotationY::thetaZ ( ) const

Definition at line 102 of file RotationY.cc.

102  {
103  return safe_acos(zz());
104  // or ---- return d;
105 }
static double safe_acos(double x)
Definition: Rotation.cc:23
double zz() const

Here is the call graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

Friends And Related Function Documentation

HepRotationY inverseOf ( const HepRotationY r)
friend

Member Data Documentation

double CLHEP::HepRotationY::its_c
protected

Definition at line 263 of file RotationY.h.

double CLHEP::HepRotationY::its_d
protected

Definition at line 259 of file RotationY.h.

double CLHEP::HepRotationY::its_s
protected

Definition at line 262 of file RotationY.h.


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