Geant4 9.6.0
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)
 
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

◆ HepRotationY() [1/4]

CLHEP::HepRotationY::HepRotationY ( )
inline

◆ HepRotationY() [2/4]

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)

◆ HepRotationY() [3/4]

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

◆ ~HepRotationY()

CLHEP::HepRotationY::~HepRotationY ( )
inline

◆ HepRotationY() [4/4]

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

◆ 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 117 of file RotationY.cc.

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

◆ decompose() [2/4]

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

Definition at line 111 of file RotationY.cc.

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

◆ decompose() [3/4]

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

Definition at line 129 of file RotationY.cc.

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

◆ decompose() [4/4]

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

Definition at line 123 of file RotationY.cc.

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

◆ delta()

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

◆ distance2() [1/4]

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

◆ distance2() [2/4]

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}

◆ distance2() [3/4]

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

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

◆ eulerAngles()

HepEulerAngles CLHEP::HepRotationY::eulerAngles ( ) const

Definition at line 66 of file RotationY.cc.

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

◆ 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 168 of file RotationY.cc.

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

◆ howNear() [2/4]

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

Definition at line 171 of file RotationY.cc.

171 {
172 return std::sqrt(distance2(lt));
173}

◆ howNear() [3/4]

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

Definition at line 165 of file RotationY.cc.

165 {
166 return std::sqrt(distance2(r));
167}

◆ howNear() [4/4]

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

Definition at line 162 of file RotationY.cc.

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

◆ 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 180 of file RotationY.cc.

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

◆ isNear() [2/4]

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}

◆ isNear() [3/4]

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}

◆ isNear() [4/4]

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}

◆ norm2()

double CLHEP::HepRotationY::norm2 ( ) const

Definition at line 188 of file RotationY.cc.

188 {
189 return 2.0 - 2.0 * its_c;
190}

◆ 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=()

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>=()

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

◆ phi()

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

Referenced by eulerAngles().

◆ phiX()

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 yx() const

◆ phiY()

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 yy() const
double xy() const

◆ phiZ()

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 yz() const

◆ print()

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}

◆ proper()

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

Referenced by set().

◆ psi()

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

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

Referenced by setDelta().

◆ setDelta()

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

◆ setTolerance()

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

◆ theta()

double CLHEP::HepRotationY::theta ( ) const

Definition at line 52 of file RotationY.cc.

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

Referenced by eulerAngles().

◆ thetaX()

double CLHEP::HepRotationY::thetaX ( ) const

Definition at line 93 of file RotationY.cc.

93 {
94 return safe_acos(zx());
95}

◆ thetaY()

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

◆ thetaZ()

double CLHEP::HepRotationY::thetaZ ( ) const

Definition at line 102 of file RotationY.cc.

102 {
103 return safe_acos(zz());
104 // or ---- return d;
105}

◆ 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 Function Documentation

◆ inverseOf

HepRotationY inverseOf ( const HepRotationY r)
friend

Member Data Documentation

◆ its_c

double CLHEP::HepRotationY::its_c
protected

Definition at line 263 of file RotationY.h.

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

◆ its_d

double CLHEP::HepRotationY::its_d
protected

Definition at line 259 of file RotationY.h.

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

◆ its_s

double CLHEP::HepRotationY::its_s
protected

Definition at line 262 of file RotationY.h.

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


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