Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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

◆ HepRotationZ() [1/4]

CLHEP::HepRotationZ::HepRotationZ ( )
inline

◆ HepRotationZ() [2/4]

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)

◆ HepRotationZ() [3/4]

CLHEP::HepRotationZ::HepRotationZ ( const HepRotationZ orig)
inline

◆ ~HepRotationZ()

CLHEP::HepRotationZ::~HepRotationZ ( )
inline

◆ HepRotationZ() [4/4]

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

Member Function Documentation

◆ axis()

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

◆ axisAngle()

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

Referenced by decompose().

◆ col1()

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

◆ col2()

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

◆ col3()

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

◆ col4()

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

◆ colX()

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

◆ colY()

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

◆ colZ()

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

◆ compare()

int CLHEP::HepRotationZ::compare ( const HepRotationZ r) const
inline

◆ decompose() [1/4]

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

Definition at line 105 of file RotationZ.cc.

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

◆ decompose() [2/4]

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

Definition at line 99 of file RotationZ.cc.

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

◆ decompose() [3/4]

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

Definition at line 117 of file RotationZ.cc.

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

◆ decompose() [4/4]

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

Definition at line 111 of file RotationZ.cc.

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

◆ delta()

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

◆ distance2() [1/4]

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

◆ distance2() [2/4]

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}

◆ distance2() [3/4]

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

◆ distance2() [4/4]

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}

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

◆ eulerAngles()

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 phi() const
Definition: RotationZ.cc:42
double theta() const
Definition: RotationZ.cc:46

◆ getAngleAxis()

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

◆ getAxis()

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

◆ getDelta()

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

◆ getPhi()

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

◆ getPsi()

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

◆ getTheta()

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

◆ getTolerance()

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

◆ howNear() [1/4]

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

Definition at line 156 of file RotationZ.cc.

156 {
157 return std::sqrt(distance2(lt));
158}

◆ howNear() [2/4]

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

Definition at line 159 of file RotationZ.cc.

159 {
160 return std::sqrt(distance2(lt));
161}

◆ howNear() [3/4]

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

Definition at line 153 of file RotationZ.cc.

153 {
154 return std::sqrt(distance2(r));
155}

◆ howNear() [4/4]

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

Definition at line 150 of file RotationZ.cc.

150 {
151 return std::sqrt(distance2(r));
152}

◆ inverse()

HepRotationZ CLHEP::HepRotationZ::inverse ( ) const
inline

◆ invert()

HepRotationZ & CLHEP::HepRotationZ::invert ( )
inline

◆ isIdentity()

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

◆ isNear() [1/4]

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}

◆ isNear() [2/4]

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}

◆ isNear() [3/4]

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}

◆ isNear() [4/4]

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}

◆ norm2()

double CLHEP::HepRotationZ::norm2 ( ) const

Definition at line 176 of file RotationZ.cc.

176 {
177 return 2.0 - 2.0 * its_c;
178}

◆ operator!=()

bool CLHEP::HepRotationZ::operator!= ( const HepRotationZ r) const
inline

◆ operator()() [1/2]

Hep3Vector CLHEP::HepRotationZ::operator() ( const Hep3Vector p) const
inline

◆ operator()() [2/2]

HepLorentzVector CLHEP::HepRotationZ::operator() ( const HepLorentzVector w) const
inline

◆ operator*() [1/3]

Hep3Vector CLHEP::HepRotationZ::operator* ( const Hep3Vector p) const
inline

◆ operator*() [2/3]

HepLorentzVector CLHEP::HepRotationZ::operator* ( const HepLorentzVector w) const
inline

◆ operator*() [3/3]

HepRotationZ CLHEP::HepRotationZ::operator* ( const HepRotationZ rz) const
inline

◆ operator*=()

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

◆ operator<()

bool CLHEP::HepRotationZ::operator< ( const HepRotationZ r) const
inline

◆ operator<=()

bool CLHEP::HepRotationZ::operator<= ( const HepRotationZ r) const
inline

◆ operator=()

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

◆ operator==()

bool CLHEP::HepRotationZ::operator== ( const HepRotationZ r) const
inline

◆ operator>()

bool CLHEP::HepRotationZ::operator> ( const HepRotationZ r) const
inline

◆ operator>=()

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

◆ phi()

double CLHEP::HepRotationZ::phi ( ) const

Definition at line 42 of file RotationZ.cc.

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

Referenced by eulerAngles().

◆ phiX()

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}

◆ phiY()

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}

◆ phiZ()

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

◆ print()

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}

◆ proper()

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

Referenced by set().

◆ psi()

double CLHEP::HepRotationZ::psi ( ) const

Definition at line 50 of file RotationZ.cc.

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

Referenced by eulerAngles().

◆ rectify()

void CLHEP::HepRotationZ::rectify ( )
inline

◆ rep3x3()

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

◆ rep4x4()

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

◆ row1()

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

◆ row2()

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

◆ row3()

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

◆ row4()

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

◆ rowX()

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

◆ rowY()

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

◆ rowZ()

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

◆ set()

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}

Referenced by setDelta().

◆ setDelta()

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

◆ setTolerance()

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

◆ theta()

double CLHEP::HepRotationZ::theta ( ) const

Definition at line 46 of file RotationZ.cc.

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

Referenced by eulerAngles().

◆ thetaX()

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

◆ thetaY()

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

◆ thetaZ()

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

◆ transform()

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

◆ tt()

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

◆ tx()

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

◆ ty()

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

◆ tz()

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

◆ xt()

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

◆ xx()

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

Referenced by distance2(), and phiX().

◆ xy()

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

Referenced by distance2(), and phiY().

◆ xz()

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

Referenced by phiZ().

◆ yt()

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

◆ yx()

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

Referenced by distance2(), and phiX().

◆ yy()

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

Referenced by distance2(), and phiY().

◆ yz()

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

Referenced by phiZ().

◆ zt()

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

◆ zx()

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

Referenced by thetaX().

◆ zy()

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

Referenced by thetaY().

◆ zz()

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

Referenced by thetaZ().

Friends And Related Function Documentation

◆ inverseOf

HepRotationZ inverseOf ( const HepRotationZ r)
friend

Member Data Documentation

◆ its_c

double CLHEP::HepRotationZ::its_c
protected

Definition at line 265 of file RotationZ.h.

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

◆ its_d

double CLHEP::HepRotationZ::its_d
protected

Definition at line 261 of file RotationZ.h.

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

◆ its_s

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: