Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
CLHEP::HepRotationY Class Reference

#include <RotationY.h>

Public Member Functions

 HepRotationY ()
 
 HepRotationY (double delta)
 
 HepRotationY (const HepRotationY &orig)
 
 HepRotationY (HepRotationY &&orig)=default
 
HepRotationYoperator= (const HepRotationY &r)
 
HepRotationYoperator= (HepRotationY &&r)=default
 
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 38 of file RotationY.h.

Constructor & Destructor Documentation

◆ HepRotationY() [1/5]

CLHEP::HepRotationY::HepRotationY ( )
inline

◆ HepRotationY() [2/5]

CLHEP::HepRotationY::HepRotationY ( double delta)

Definition at line 27 of file RotationY.cc.

27 :
28 its_d(proper(ddelta)), its_s(std::sin(ddelta)), its_c(std::cos(ddelta))
29{}
static double proper(double delta)

◆ HepRotationY() [3/5]

CLHEP::HepRotationY::HepRotationY ( const HepRotationY & orig)
inline

◆ HepRotationY() [4/5]

CLHEP::HepRotationY::HepRotationY ( HepRotationY && orig)
inlinedefault

◆ ~HepRotationY()

CLHEP::HepRotationY::~HepRotationY ( )
inline

◆ HepRotationY() [5/5]

CLHEP::HepRotationY::HepRotationY ( double dd,
double ss,
double cc )
inlineprotected

Member Function Documentation

◆ axis()

Hep3Vector CLHEP::HepRotationY::axis ( ) const
inline

◆ axisAngle()

HepAxisAngle CLHEP::HepRotationY::axisAngle ( ) const
inline

Referenced by decompose(), and decompose().

◆ col1()

HepLorentzVector CLHEP::HepRotationY::col1 ( ) const
inline

◆ col2()

HepLorentzVector CLHEP::HepRotationY::col2 ( ) const
inline

◆ col3()

HepLorentzVector CLHEP::HepRotationY::col3 ( ) const
inline

◆ col4()

HepLorentzVector CLHEP::HepRotationY::col4 ( ) const
inline

◆ colX()

Hep3Vector CLHEP::HepRotationY::colX ( ) const
inline

◆ colY()

Hep3Vector CLHEP::HepRotationY::colY ( ) const
inline

◆ colZ()

Hep3Vector CLHEP::HepRotationY::colZ ( ) const
inline

◆ compare()

int CLHEP::HepRotationY::compare ( const HepRotationY & r) const
inline

◆ decompose() [1/4]

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

Definition at line 113 of file RotationY.cc.

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

◆ decompose() [2/4]

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

Definition at line 107 of file RotationY.cc.

108 {
109 boost.set(0,0,0);
110 rotation = axisAngle();
111}

◆ decompose() [3/4]

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

Definition at line 125 of file RotationY.cc.

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

◆ decompose() [4/4]

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

Definition at line 119 of file RotationY.cc.

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

◆ delta()

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

◆ distance2() [1/4]

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

Definition at line 154 of file RotationY.cc.

154 {
155 return distance2( HepLorentzRotation(lt));
156}
double distance2(const HepRotationY &r) const
Definition RotationY.cc:131

◆ distance2() [2/4]

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

Definition at line 144 of file RotationY.cc.

144 {
145 HepAxisAngle a;
146 Hep3Vector b;
147 lt.decompose(b, a);
148 double bet = b.beta();
149 double bet2 = bet*bet;
150 HepRotation r(a);
151 return bet2/(1-bet2) + distance2(r);
152}

◆ distance2() [3/4]

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

Definition at line 136 of file RotationY.cc.

136 {
137 double sum = xx() * r.xx() + xz() * r.xz()
138 + r.yy()
139 + zx() * r.zx() + zz() * r.zz();
140 double answer = 3.0 - sum;
141 return (answer >= 0 ) ? answer : 0;
142}
double zz() const
double zx() const
double xx() const
double xz() const

◆ distance2() [4/4]

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

Definition at line 131 of file RotationY.cc.

131 {
132 double answer = 2.0 * ( 1.0 - ( its_s * r.its_s + its_c * r.its_c ) ) ;
133 return (answer >= 0) ? answer : 0;
134}

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

◆ eulerAngles()

HepEulerAngles CLHEP::HepRotationY::eulerAngles ( ) const

Definition at line 62 of file RotationY.cc.

62 {
63 return HepEulerAngles( phi(), theta(), psi() );
64} // HepRotationY::eulerAngles()
double theta() const
Definition RotationY.cc:48
double phi() const
Definition RotationY.cc:38
double psi() const
Definition RotationY.cc:52

◆ getAngleAxis()

void CLHEP::HepRotationY::getAngleAxis ( double & delta,
Hep3Vector & axis ) const
inline

◆ getAxis()

Hep3Vector CLHEP::HepRotationY::getAxis ( ) const
inline

◆ getDelta()

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

◆ getPhi()

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

◆ getPsi()

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

◆ getTheta()

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

◆ getTolerance()

static double CLHEP::HepRotationY::getTolerance ( )
inlinestatic

◆ howNear() [1/4]

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

Definition at line 164 of file RotationY.cc.

164 {
165 return std::sqrt(distance2(lt));
166}

◆ howNear() [2/4]

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

Definition at line 167 of file RotationY.cc.

167 {
168 return std::sqrt(distance2(lt));
169}

◆ howNear() [3/4]

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

Definition at line 161 of file RotationY.cc.

161 {
162 return std::sqrt(distance2(r));
163}

◆ howNear() [4/4]

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

Definition at line 158 of file RotationY.cc.

158 {
159 return std::sqrt(distance2(r));
160}

◆ inverse()

HepRotationY CLHEP::HepRotationY::inverse ( ) const
inline

◆ invert()

HepRotationY & CLHEP::HepRotationY::invert ( )
inline

◆ isIdentity()

bool CLHEP::HepRotationY::isIdentity ( ) const
inline

◆ isNear() [1/4]

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

Definition at line 176 of file RotationY.cc.

176 {
177 return (distance2(lt) <= epsilon*epsilon);
178}
G4double epsilon(G4double density, G4double temperature)

◆ isNear() [2/4]

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

Definition at line 179 of file RotationY.cc.

180 {
181 return (distance2(lt) <= epsilon*epsilon);
182}

◆ isNear() [3/4]

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

Definition at line 173 of file RotationY.cc.

173 {
174 return (distance2(r) <= epsilon*epsilon);
175}

◆ isNear() [4/4]

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

Definition at line 170 of file RotationY.cc.

170 {
171 return (distance2(r) <= epsilon*epsilon);
172}

◆ norm2()

double CLHEP::HepRotationY::norm2 ( ) const

Definition at line 184 of file RotationY.cc.

184 {
185 return 2.0 - 2.0 * its_c;
186}

◆ operator!=()

bool CLHEP::HepRotationY::operator!= ( const HepRotationY & r) const
inline

◆ operator()() [1/2]

Hep3Vector CLHEP::HepRotationY::operator() ( const Hep3Vector & p) const
inline

◆ operator()() [2/2]

HepLorentzVector CLHEP::HepRotationY::operator() ( const HepLorentzVector & w) const
inline

◆ operator*() [1/3]

Hep3Vector CLHEP::HepRotationY::operator* ( const Hep3Vector & p) const
inline

◆ operator*() [2/3]

HepLorentzVector CLHEP::HepRotationY::operator* ( const HepLorentzVector & w) const
inline

◆ operator*() [3/3]

HepRotationY CLHEP::HepRotationY::operator* ( const HepRotationY & ry) const
inline

◆ operator*=()

HepRotationY & CLHEP::HepRotationY::operator*= ( const HepRotationY & r)
inline

◆ operator<()

bool CLHEP::HepRotationY::operator< ( const HepRotationY & r) const
inline

◆ operator<=()

bool CLHEP::HepRotationY::operator<= ( const HepRotationY & r) const
inline

◆ operator=() [1/2]

HepRotationY & CLHEP::HepRotationY::operator= ( const HepRotationY & r)
inline

◆ operator=() [2/2]

HepRotationY & CLHEP::HepRotationY::operator= ( HepRotationY && r)
inlinedefault

◆ operator==()

bool CLHEP::HepRotationY::operator== ( const HepRotationY & r) const
inline

◆ operator>()

bool CLHEP::HepRotationY::operator> ( const HepRotationY & r) const
inline

◆ operator>=()

bool CLHEP::HepRotationY::operator>= ( const HepRotationY & r) const
inline

◆ phi()

double CLHEP::HepRotationY::phi ( ) const

Definition at line 38 of file RotationY.cc.

38 {
39 if ( its_d == 0 ) {
40 return 0;
41 } else if ( (its_d < 0) || (its_d == CLHEP::pi) ) {
42 return +CLHEP::halfpi;
43 } else {
44 return -CLHEP::halfpi;
45 }
46} // HepRotationY::phi()

Referenced by eulerAngles().

◆ phiX()

double CLHEP::HepRotationY::phiX ( ) const

Definition at line 74 of file RotationY.cc.

74 {
75 return (yx() == 0.0 && xx() == 0.0) ? 0.0 : std::atan2(yx(),xx());
76 // or ---- return 0;
77}
double yx() const

◆ phiY()

double CLHEP::HepRotationY::phiY ( ) const

Definition at line 79 of file RotationY.cc.

79 {
80 return (yy() == 0.0 && xy() == 0.0) ? 0.0 : std::atan2(yy(),xy());
81 // or ---- return CLHEP::halfpi;
82}
double yy() const
double xy() const

◆ phiZ()

double CLHEP::HepRotationY::phiZ ( ) const

Definition at line 84 of file RotationY.cc.

84 {
85 return (yz() == 0.0 && xz() == 0.0) ? 0.0 : std::atan2(yz(),xz());
86 // or ---- return 0;
87}
double yz() const

◆ print()

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

Definition at line 188 of file RotationY.cc.

188 {
189 os << "\nRotation about Y (" << its_d <<
190 ") [cos d = " << its_c << " sin d = " << its_s << "]\n";
191 return os;
192}

◆ proper()

static double CLHEP::HepRotationY::proper ( double delta)
inlinestaticprotected

Referenced by set().

◆ psi()

double CLHEP::HepRotationY::psi ( ) const

Definition at line 52 of file RotationY.cc.

52 {
53 if ( its_d == 0 ) {
54 return 0;
55 } else if ( (its_d < 0) || (its_d == CLHEP::pi) ) {
56 return -CLHEP::halfpi;
57 } else {
58 return +CLHEP::halfpi;
59 }
60} // HepRotationY::psi()

Referenced by eulerAngles().

◆ rectify()

void CLHEP::HepRotationY::rectify ( )
inline

◆ rep3x3()

HepRep3x3 CLHEP::HepRotationY::rep3x3 ( ) const
inline

◆ rep4x4()

HepRep4x4 CLHEP::HepRotationY::rep4x4 ( ) const
inline

◆ row1()

HepLorentzVector CLHEP::HepRotationY::row1 ( ) const
inline

◆ row2()

HepLorentzVector CLHEP::HepRotationY::row2 ( ) const
inline

◆ row3()

HepLorentzVector CLHEP::HepRotationY::row3 ( ) const
inline

◆ row4()

HepLorentzVector CLHEP::HepRotationY::row4 ( ) const
inline

◆ rowX()

Hep3Vector CLHEP::HepRotationY::rowX ( ) const
inline

◆ rowY()

Hep3Vector CLHEP::HepRotationY::rowY ( ) const
inline

◆ rowZ()

Hep3Vector CLHEP::HepRotationY::rowZ ( ) const
inline

◆ set()

HepRotationY & CLHEP::HepRotationY::set ( double delta)

Definition at line 31 of file RotationY.cc.

31 {
32 its_d = proper(ddelta);
33 its_s = std::sin(its_d);
34 its_c = std::cos(its_d);
35 return *this;
36}

Referenced by setDelta().

◆ setDelta()

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

Definition at line 103 of file RotationY.cc.

103 {
104 set(ddelta);
105}
HepRotationY & set(double delta)
Definition RotationY.cc:31

◆ setTolerance()

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

◆ theta()

double CLHEP::HepRotationY::theta ( ) const

Definition at line 48 of file RotationY.cc.

48 {
49 return std::fabs( its_d );
50} // HepRotationY::theta()

Referenced by eulerAngles().

◆ thetaX()

double CLHEP::HepRotationY::thetaX ( ) const

Definition at line 89 of file RotationY.cc.

89 {
90 return safe_acos(zx());
91}

◆ thetaY()

double CLHEP::HepRotationY::thetaY ( ) const

Definition at line 93 of file RotationY.cc.

93 {
94 return safe_acos(zy());
95 // or ---- return CLHEP::halfpi;
96}
double zy() const

◆ thetaZ()

double CLHEP::HepRotationY::thetaZ ( ) const

Definition at line 98 of file RotationY.cc.

98 {
99 return safe_acos(zz());
100 // or ---- return d;
101}

◆ transform()

HepRotationY & CLHEP::HepRotationY::transform ( const HepRotationY & r)
inline

◆ tt()

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

◆ tx()

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

◆ ty()

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

◆ tz()

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

◆ xt()

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

◆ xx()

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

Referenced by distance2(), and phiX().

◆ xy()

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

Referenced by phiY().

◆ xz()

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

Referenced by distance2(), and phiZ().

◆ yt()

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

◆ yx()

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

Referenced by phiX().

◆ yy()

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

Referenced by phiY().

◆ yz()

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

Referenced by phiZ().

◆ zt()

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

◆ zx()

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

Referenced by distance2(), and thetaX().

◆ zy()

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

Referenced by thetaY().

◆ zz()

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

Referenced by distance2(), and thetaZ().

Friends And Related Symbol Documentation

◆ inverseOf

HepRotationY inverseOf ( const HepRotationY & r)
friend

Member Data Documentation

◆ its_c

double CLHEP::HepRotationY::its_c
protected

Definition at line 261 of file RotationY.h.

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

◆ its_d

double CLHEP::HepRotationY::its_d
protected

Definition at line 257 of file RotationY.h.

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

◆ its_s

double CLHEP::HepRotationY::its_s
protected

Definition at line 260 of file RotationY.h.

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


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