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

28 :
29 its_d(proper(ddelta)), its_s(std::sin(ddelta)), its_c(std::cos(ddelta))
30{}
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().

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

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

◆ decompose() [2/4]

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

Definition at line 108 of file RotationY.cc.

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

◆ decompose() [3/4]

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

Definition at line 126 of file RotationY.cc.

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

◆ decompose() [4/4]

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

Definition at line 120 of file RotationY.cc.

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

◆ delta()

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

◆ distance2() [1/4]

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

Definition at line 155 of file RotationY.cc.

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

◆ distance2() [2/4]

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

Definition at line 145 of file RotationY.cc.

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

◆ distance2() [3/4]

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

Definition at line 137 of file RotationY.cc.

137 {
138 double sum = xx() * r.xx() + xz() * r.xz()
139 + r.yy()
140 + zx() * r.zx() + zz() * r.zz();
141 double answer = 3.0 - sum;
142 return (answer >= 0 ) ? answer : 0;
143}
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 132 of file RotationY.cc.

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

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

◆ eulerAngles()

HepEulerAngles CLHEP::HepRotationY::eulerAngles ( ) const

Definition at line 63 of file RotationY.cc.

63 {
64 return HepEulerAngles( phi(), theta(), psi() );
65} // HepRotationY::eulerAngles()
double theta() const
Definition: RotationY.cc:49
double phi() const
Definition: RotationY.cc:39
double psi() const
Definition: RotationY.cc:53

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

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

◆ howNear() [2/4]

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

Definition at line 168 of file RotationY.cc.

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

◆ howNear() [3/4]

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

Definition at line 162 of file RotationY.cc.

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

◆ howNear() [4/4]

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

Definition at line 159 of file RotationY.cc.

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

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

177 {
178 return (distance2(lt) <= epsilon*epsilon);
179}

◆ isNear() [2/4]

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

Definition at line 180 of file RotationY.cc.

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

◆ isNear() [3/4]

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

Definition at line 174 of file RotationY.cc.

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

◆ isNear() [4/4]

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

Definition at line 171 of file RotationY.cc.

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

◆ norm2()

double CLHEP::HepRotationY::norm2 ( ) const

Definition at line 185 of file RotationY.cc.

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

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

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

Referenced by eulerAngles().

◆ phiX()

double CLHEP::HepRotationY::phiX ( ) const

Definition at line 75 of file RotationY.cc.

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

◆ phiY()

double CLHEP::HepRotationY::phiY ( ) const

Definition at line 80 of file RotationY.cc.

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

◆ phiZ()

double CLHEP::HepRotationY::phiZ ( ) const

Definition at line 85 of file RotationY.cc.

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

◆ print()

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

Definition at line 189 of file RotationY.cc.

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

◆ proper()

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

Referenced by set().

◆ psi()

double CLHEP::HepRotationY::psi ( ) const

Definition at line 53 of file RotationY.cc.

53 {
54 if ( its_d == 0 ) {
55 return 0;
56 } else if ( (its_d < 0) || (its_d == CLHEP::pi) ) {
57 return -CLHEP::halfpi;
58 } else {
59 return +CLHEP::halfpi;
60 }
61} // 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 32 of file RotationY.cc.

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

Referenced by setDelta().

◆ setDelta()

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

Definition at line 104 of file RotationY.cc.

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

◆ setTolerance()

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

◆ theta()

double CLHEP::HepRotationY::theta ( ) const

Definition at line 49 of file RotationY.cc.

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

Referenced by eulerAngles().

◆ thetaX()

double CLHEP::HepRotationY::thetaX ( ) const

Definition at line 90 of file RotationY.cc.

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

◆ thetaY()

double CLHEP::HepRotationY::thetaY ( ) const

Definition at line 94 of file RotationY.cc.

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

◆ thetaZ()

double CLHEP::HepRotationY::thetaZ ( ) const

Definition at line 99 of file RotationY.cc.

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

◆ 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 262 of file RotationY.h.

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

◆ its_d

double CLHEP::HepRotationY::its_d
protected

Definition at line 258 of file RotationY.h.

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

◆ its_s

double CLHEP::HepRotationY::its_s
protected

Definition at line 261 of file RotationY.h.

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


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