CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
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 39 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 28 of file RotationZ.cc.

28 :
29 its_d(proper(dddelta)), its_s(std::sin(dddelta)), its_c(std::cos(dddelta))
30{}
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 102 of file RotationZ.cc.

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

◆ decompose() [2/4]

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

Definition at line 96 of file RotationZ.cc.

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

◆ decompose() [3/4]

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

Definition at line 114 of file RotationZ.cc.

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

◆ decompose() [4/4]

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

Definition at line 108 of file RotationZ.cc.

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

◆ delta()

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

◆ distance2() [1/4]

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

Definition at line 143 of file RotationZ.cc.

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

◆ distance2() [2/4]

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

Definition at line 133 of file RotationZ.cc.

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

◆ distance2() [3/4]

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

Definition at line 125 of file RotationZ.cc.

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

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

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

◆ eulerAngles()

HepEulerAngles CLHEP::HepRotationZ::eulerAngles ( ) const

Definition at line 51 of file RotationZ.cc.

51 {
52 return HepEulerAngles( phi(), theta(), psi() );
53} // HepRotationZ::eulerAngles()
double psi() const
Definition: RotationZ.cc:47
double phi() const
Definition: RotationZ.cc:39
double theta() const
Definition: RotationZ.cc:43

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

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

◆ howNear() [2/4]

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

Definition at line 156 of file RotationZ.cc.

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

◆ howNear() [3/4]

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

Definition at line 150 of file RotationZ.cc.

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

◆ howNear() [4/4]

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

Definition at line 147 of file RotationZ.cc.

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

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

165 {
166 return (distance2(lt) <= epsilon*epsilon);
167}

◆ isNear() [2/4]

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

Definition at line 168 of file RotationZ.cc.

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

◆ isNear() [3/4]

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

Definition at line 162 of file RotationZ.cc.

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

◆ isNear() [4/4]

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

Definition at line 159 of file RotationZ.cc.

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

◆ norm2()

double CLHEP::HepRotationZ::norm2 ( ) const

Definition at line 173 of file RotationZ.cc.

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

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

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

Referenced by eulerAngles().

◆ phiX()

double CLHEP::HepRotationZ::phiX ( ) const

Definition at line 63 of file RotationZ.cc.

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

◆ phiY()

double CLHEP::HepRotationZ::phiY ( ) const

Definition at line 68 of file RotationZ.cc.

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

◆ phiZ()

double CLHEP::HepRotationZ::phiZ ( ) const

Definition at line 72 of file RotationZ.cc.

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

◆ print()

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

Definition at line 177 of file RotationZ.cc.

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

◆ proper()

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

Referenced by set().

◆ psi()

double CLHEP::HepRotationZ::psi ( ) const

Definition at line 47 of file RotationZ.cc.

47 {
48 return - its_d/2.0;
49} // 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 32 of file RotationZ.cc.

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

Referenced by setDelta().

◆ setDelta()

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

Definition at line 92 of file RotationZ.cc.

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

◆ setTolerance()

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

◆ theta()

double CLHEP::HepRotationZ::theta ( ) const

Definition at line 43 of file RotationZ.cc.

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

Referenced by eulerAngles().

◆ thetaX()

double CLHEP::HepRotationZ::thetaX ( ) const

Definition at line 77 of file RotationZ.cc.

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

◆ thetaY()

double CLHEP::HepRotationZ::thetaY ( ) const

Definition at line 82 of file RotationZ.cc.

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

◆ thetaZ()

double CLHEP::HepRotationZ::thetaZ ( ) const

Definition at line 87 of file RotationZ.cc.

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

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

◆ its_d

double CLHEP::HepRotationZ::its_d
protected

Definition at line 260 of file RotationZ.h.

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

◆ its_s

double CLHEP::HepRotationZ::its_s
protected

Definition at line 263 of file RotationZ.h.

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


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