Geant4 11.1.1
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)
 
 HepRotationZ (HepRotationZ &&orig)=default
 
HepRotationZoperator= (const HepRotationZ &r)
 
HepRotationZoperator= (HepRotationZ &&r)=default
 
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 38 of file RotationZ.h.

Constructor & Destructor Documentation

◆ HepRotationZ() [1/5]

CLHEP::HepRotationZ::HepRotationZ ( )
inline

◆ HepRotationZ() [2/5]

CLHEP::HepRotationZ::HepRotationZ ( double  delta)

Definition at line 27 of file RotationZ.cc.

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

◆ HepRotationZ() [3/5]

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

◆ HepRotationZ() [4/5]

CLHEP::HepRotationZ::HepRotationZ ( HepRotationZ &&  orig)
inlinedefault

◆ ~HepRotationZ()

CLHEP::HepRotationZ::~HepRotationZ ( )
inline

◆ HepRotationZ() [5/5]

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 101 of file RotationZ.cc.

102 {
103 boost.set(0,0,0);
104 rotation = axisAngle();
105}
HepAxisAngle axisAngle() const

◆ decompose() [2/4]

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

Definition at line 95 of file RotationZ.cc.

96 {
97 boost.set(0,0,0);
98 rotation = axisAngle();
99}

◆ decompose() [3/4]

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

Definition at line 113 of file RotationZ.cc.

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

◆ decompose() [4/4]

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

Definition at line 107 of file RotationZ.cc.

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

◆ delta()

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

◆ distance2() [1/4]

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

Definition at line 142 of file RotationZ.cc.

142 {
143 return distance2( HepLorentzRotation(lt));
144}
double distance2(const HepRotationZ &r) const
Definition: RotationZ.cc:119

◆ distance2() [2/4]

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

Definition at line 132 of file RotationZ.cc.

132 {
133 HepAxisAngle a;
134 Hep3Vector b;
135 lt.decompose(b, a);
136 double bet = b.beta();
137 double bet2 = bet*bet;
138 HepRotation r(a);
139 return bet2/(1-bet2) + distance2(r);
140}

◆ distance2() [3/4]

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

Definition at line 124 of file RotationZ.cc.

124 {
125 double sum = xx() * r.xx() + xy() * r.xy()
126 + yx() * r.yx() + yy() * r.yy()
127 + r.zz();
128 double answer = 3.0 - sum;
129 return (answer >= 0 ) ? answer : 0;
130}
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 119 of file RotationZ.cc.

119 {
120 double answer = 2.0 * ( 1.0 - ( its_s * r.its_s + its_c * r.its_c ) ) ;
121 return (answer >= 0) ? answer : 0;
122}

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

◆ eulerAngles()

HepEulerAngles CLHEP::HepRotationZ::eulerAngles ( ) const

Definition at line 50 of file RotationZ.cc.

50 {
51 return HepEulerAngles( phi(), theta(), psi() );
52} // HepRotationZ::eulerAngles()
double psi() const
Definition: RotationZ.cc:46
double phi() const
Definition: RotationZ.cc:38
double theta() const
Definition: RotationZ.cc:42

◆ 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 152 of file RotationZ.cc.

152 {
153 return std::sqrt(distance2(lt));
154}

◆ howNear() [2/4]

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

Definition at line 155 of file RotationZ.cc.

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

◆ howNear() [3/4]

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

Definition at line 149 of file RotationZ.cc.

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

◆ howNear() [4/4]

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

Definition at line 146 of file RotationZ.cc.

146 {
147 return std::sqrt(distance2(r));
148}

◆ 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 164 of file RotationZ.cc.

164 {
165 return (distance2(lt) <= epsilon*epsilon);
166}
G4double epsilon(G4double density, G4double temperature)

◆ isNear() [2/4]

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

Definition at line 167 of file RotationZ.cc.

168 {
169 return (distance2(lt) <= epsilon*epsilon);
170}

◆ isNear() [3/4]

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

Definition at line 161 of file RotationZ.cc.

161 {
162 return (distance2(r) <= epsilon*epsilon);
163}

◆ isNear() [4/4]

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

Definition at line 158 of file RotationZ.cc.

158 {
159 return (distance2(r) <= epsilon*epsilon);
160}

◆ norm2()

double CLHEP::HepRotationZ::norm2 ( ) const

Definition at line 172 of file RotationZ.cc.

172 {
173 return 2.0 - 2.0 * its_c;
174}

◆ 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=() [1/2]

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

◆ operator=() [2/2]

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

◆ 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 38 of file RotationZ.cc.

38 {
39 return - its_d/2.0;
40} // HepRotationZ::phi()

Referenced by eulerAngles().

◆ phiX()

double CLHEP::HepRotationZ::phiX ( ) const

Definition at line 62 of file RotationZ.cc.

62 {
63 return (yx() == 0.0 && xx() == 0.0) ? 0.0 : std::atan2(yx(),xx());
64 // or ---- return d;
65}

◆ phiY()

double CLHEP::HepRotationZ::phiY ( ) const

Definition at line 67 of file RotationZ.cc.

67 {
68 return (yy() == 0.0 && xy() == 0.0) ? 0.0 : std::atan2(yy(),xy());
69}

◆ phiZ()

double CLHEP::HepRotationZ::phiZ ( ) const

Definition at line 71 of file RotationZ.cc.

71 {
72 return (yz() == 0.0 && xz() == 0.0) ? 0.0 : std::atan2(yz(),xz());
73 // or ---- return 0.0;
74}
double yz() const
double xz() const

◆ print()

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

Definition at line 176 of file RotationZ.cc.

176 {
177 os << "\nRotation about Z (" << its_d <<
178 ") [cos d = " << its_c << " sin d = " << its_s << "]\n";
179 return os;
180}

◆ proper()

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

Referenced by set().

◆ psi()

double CLHEP::HepRotationZ::psi ( ) const

Definition at line 46 of file RotationZ.cc.

46 {
47 return - its_d/2.0;
48} // 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 31 of file RotationZ.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::HepRotationZ::setDelta ( double  delta)

Definition at line 91 of file RotationZ.cc.

91 {
92 set(ddelta);
93}
HepRotationZ & set(double delta)
Definition: RotationZ.cc:31

◆ setTolerance()

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

◆ theta()

double CLHEP::HepRotationZ::theta ( ) const

Definition at line 42 of file RotationZ.cc.

42 {
43 return 0.0 ;
44} // HepRotationZ::theta()

Referenced by eulerAngles().

◆ thetaX()

double CLHEP::HepRotationZ::thetaX ( ) const

Definition at line 76 of file RotationZ.cc.

76 {
77 return safe_acos(zx());
78 // or ---- return CLHEP::halfpi;
79}
double zx() const

◆ thetaY()

double CLHEP::HepRotationZ::thetaY ( ) const

Definition at line 81 of file RotationZ.cc.

81 {
82 return safe_acos(zy());
83 // or ---- return CLHEP::halfpi;
84}
double zy() const

◆ thetaZ()

double CLHEP::HepRotationZ::thetaZ ( ) const

Definition at line 86 of file RotationZ.cc.

86 {
87 return safe_acos(zz());
88 // or ---- return 0.0;
89}
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 263 of file RotationZ.h.

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

◆ its_d

double CLHEP::HepRotationZ::its_d
protected

Definition at line 259 of file RotationZ.h.

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

◆ its_s

double CLHEP::HepRotationZ::its_s
protected

Definition at line 262 of file RotationZ.h.

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


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