CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
CLHEP::HepBoostZ Class Reference

#include <BoostZ.h>

Public Member Functions

 HepBoostZ ()
 
 HepBoostZ (const HepBoostZ &b)
 
 HepBoostZ (HepBoostZ &&b)=default
 
HepBoostZoperator= (const HepBoostZ &m)
 
HepBoostZoperator= (HepBoostZ &&m)=default
 
HepBoostZset (double beta)
 
 HepBoostZ (double beta)
 
double beta () const
 
double gamma () const
 
Hep3Vector boostVector () const
 
Hep3Vector getDirection () const
 
double xx () const
 
double xy () const
 
double xz () const
 
double xt () const
 
double yx () const
 
double yy () const
 
double yz () const
 
double yt () const
 
double zx () const
 
double zy () const
 
double zz () const
 
double zt () const
 
double tx () const
 
double ty () const
 
double tz () const
 
double tt () 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
 
HepRep4x4 rep4x4 () const
 
HepRep4x4Symmetric rep4x4Symmetric () const
 
void decompose (HepRotation &rotation, HepBoost &boost) const
 
void decompose (HepAxisAngle &rotation, Hep3Vector &boost) const
 
void decompose (HepBoost &boost, HepRotation &rotation) const
 
void decompose (Hep3Vector &boost, HepAxisAngle &rotation) const
 
int compare (const HepBoostZ &b) const
 
bool operator== (const HepBoostZ &b) const
 
bool operator!= (const HepBoostZ &b) const
 
bool operator<= (const HepBoostZ &b) const
 
bool operator>= (const HepBoostZ &b) const
 
bool operator< (const HepBoostZ &b) const
 
bool operator> (const HepBoostZ &b) const
 
bool isIdentity () const
 
double distance2 (const HepBoostZ &b) const
 
double distance2 (const HepBoost &b) const
 
double distance2 (const HepRotation &r) const
 
double distance2 (const HepLorentzRotation &lt) const
 
double howNear (const HepBoostZ &b) const
 
double howNear (const HepBoost &b) const
 
double howNear (const HepRotation &r) const
 
double howNear (const HepLorentzRotation &lt) const
 
bool isNear (const HepBoostZ &b, double epsilon=Hep4RotationInterface::tolerance) const
 
bool isNear (const HepBoost &b, double epsilon=Hep4RotationInterface::tolerance) const
 
bool isNear (const HepRotation &r, double epsilon=Hep4RotationInterface::tolerance) const
 
bool isNear (const HepLorentzRotation &lt, double epsilon=Hep4RotationInterface::tolerance) const
 
double norm2 () const
 
void rectify ()
 
HepLorentzVector operator() (const HepLorentzVector &w) const
 
HepLorentzVector operator* (const HepLorentzVector &w) const
 
HepBoostZ operator* (const HepBoostZ &b) const
 
HepLorentzRotation operator* (const HepBoost &b) const
 
HepLorentzRotation operator* (const HepRotation &r) const
 
HepLorentzRotation operator* (const HepLorentzRotation &lt) const
 
HepBoostZ inverse () const
 
HepBoostZinvert ()
 
std::ostream & print (std::ostream &os) const
 

Static Public Member Functions

static double getTolerance ()
 
static double setTolerance (double tol)
 

Protected Member Functions

HepLorentzVector vectorMultiplication (const HepLorentzVector &w) const
 
HepLorentzRotation matrixMultiplication (const HepRep4x4 &m) const
 
HepLorentzRotation matrixMultiplication (const HepRep4x4Symmetric &m) const
 
 HepBoostZ (double beta, double gamma)
 

Protected Attributes

double beta_
 
double gamma_
 

Friends

HepBoostZ inverseOf (const HepBoostZ &b)
 

Detailed Description

Author

Definition at line 38 of file BoostZ.h.

Constructor & Destructor Documentation

◆ HepBoostZ() [1/5]

CLHEP::HepBoostZ::HepBoostZ ( )
inline

Referenced by operator*().

◆ HepBoostZ() [2/5]

CLHEP::HepBoostZ::HepBoostZ ( const HepBoostZ b)
inline

◆ HepBoostZ() [3/5]

CLHEP::HepBoostZ::HepBoostZ ( HepBoostZ &&  b)
inlinedefault

◆ HepBoostZ() [4/5]

CLHEP::HepBoostZ::HepBoostZ ( double  beta)
inline

◆ HepBoostZ() [5/5]

CLHEP::HepBoostZ::HepBoostZ ( double  beta,
double  gamma 
)
inlineprotected

Member Function Documentation

◆ beta()

double CLHEP::HepBoostZ::beta ( ) const
inline

Referenced by operator*().

◆ boostVector()

Hep3Vector CLHEP::HepBoostZ::boostVector ( ) const
inline

Referenced by decompose().

◆ col1()

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

◆ col2()

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

◆ col3()

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

◆ col4()

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

◆ compare()

int CLHEP::HepBoostZ::compare ( const HepBoostZ b) const
inline

◆ decompose() [1/4]

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

Definition at line 76 of file BoostZ.cc.

76 {
77 rotation = HepAxisAngle();
78 boost = boostVector();
79}
Hep3Vector boostVector() const

◆ decompose() [2/4]

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

Definition at line 64 of file BoostZ.cc.

64 {
65 rotation = HepAxisAngle();
66 boost = boostVector();
67}

◆ decompose() [3/4]

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

Definition at line 69 of file BoostZ.cc.

69 {
70 HepAxisAngle vdelta = HepAxisAngle();
71 rotation = HepRotation(vdelta);
72 Hep3Vector bbeta = boostVector();
73 boost = HepBoost(bbeta);
74}

◆ decompose() [4/4]

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

Definition at line 57 of file BoostZ.cc.

57 {
58 HepAxisAngle vdelta = HepAxisAngle();
59 rotation = HepRotation(vdelta);
60 Hep3Vector bbeta = boostVector();
61 boost = HepBoost(bbeta);
62}

◆ distance2() [1/4]

double CLHEP::HepBoostZ::distance2 ( const HepBoost b) const

Definition at line 83 of file BoostZ.cc.

83 {
84 return b.distance2(*this);
85}

◆ distance2() [2/4]

double CLHEP::HepBoostZ::distance2 ( const HepBoostZ b) const
inline

Referenced by distance2(), and isNear().

◆ distance2() [3/4]

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

Definition at line 93 of file BoostZ.cc.

93 {
94 HepBoost b1;
95 HepRotation r1;
96 lt.decompose(b1,r1);
97 double db2 = distance2(b1);
98 double dr2 = r1.norm2();
99 return (db2 + dr2);
100}
double distance2(const HepBoostZ &b) const

◆ distance2() [4/4]

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

Definition at line 87 of file BoostZ.cc.

87 {
88 double db2 = norm2();
89 double dr2 = r.norm2();
90 return (db2 + dr2);
91}
double norm2() const

◆ gamma()

double CLHEP::HepBoostZ::gamma ( ) const
inline

◆ getDirection()

Hep3Vector CLHEP::HepBoostZ::getDirection ( ) const
inline

◆ getTolerance()

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

◆ howNear() [1/4]

double CLHEP::HepBoostZ::howNear ( const HepBoost b) const
inline

◆ howNear() [2/4]

double CLHEP::HepBoostZ::howNear ( const HepBoostZ b) const
inline

◆ howNear() [3/4]

double CLHEP::HepBoostZ::howNear ( const HepLorentzRotation lt) const
inline

◆ howNear() [4/4]

double CLHEP::HepBoostZ::howNear ( const HepRotation r) const
inline

◆ inverse()

HepBoostZ CLHEP::HepBoostZ::inverse ( ) const
inline

◆ invert()

HepBoostZ & CLHEP::HepBoostZ::invert ( )
inline

◆ isIdentity()

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

◆ isNear() [1/4]

bool CLHEP::HepBoostZ::isNear ( const HepBoost b,
double  epsilon = Hep4RotationInterface::tolerance 
) const
inline

◆ isNear() [2/4]

bool CLHEP::HepBoostZ::isNear ( const HepBoostZ b,
double  epsilon = Hep4RotationInterface::tolerance 
) const
inline

◆ isNear() [3/4]

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

Definition at line 109 of file BoostZ.cc.

110 {
111 HepBoost b1;
112 HepRotation r1;
113 double db2 = distance2(b1);
114 lt.decompose(b1,r1);
115 if (db2 > epsilon*epsilon) return false;
116 double dr2 = r1.norm2();
117 return (db2 + dr2);
118}

◆ isNear() [4/4]

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

Definition at line 102 of file BoostZ.cc.

102 {
103 double db2 = norm2();
104 if (db2 > epsilon*epsilon) return false;
105 double dr2 = r.norm2();
106 return (db2+dr2 <= epsilon*epsilon);
107}

◆ matrixMultiplication() [1/2]

HepLorentzRotation CLHEP::HepBoostZ::matrixMultiplication ( const HepRep4x4 m) const
protected

◆ matrixMultiplication() [2/2]

HepLorentzRotation CLHEP::HepBoostZ::matrixMultiplication ( const HepRep4x4Symmetric m) const
protected

◆ norm2()

double CLHEP::HepBoostZ::norm2 ( ) const
inline

Referenced by distance2(), and isNear().

◆ operator!=()

bool CLHEP::HepBoostZ::operator!= ( const HepBoostZ b) const
inline

◆ operator()()

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

◆ operator*() [1/5]

HepLorentzRotation CLHEP::HepBoostZ::operator* ( const HepBoost b) const

Definition at line 142 of file BoostZ.cc.

142 {
143 HepLorentzRotation me (*this);
144 return me*b;
145}

◆ operator*() [2/5]

HepBoostZ CLHEP::HepBoostZ::operator* ( const HepBoostZ b) const

Definition at line 139 of file BoostZ.cc.

139 {
140 return HepBoostZ ( (beta()+b.beta()) / (1+beta()*b.beta()) );
141}
double beta() const

◆ operator*() [3/5]

HepLorentzRotation CLHEP::HepBoostZ::operator* ( const HepLorentzRotation lt) const

Definition at line 150 of file BoostZ.cc.

150 {
151 HepLorentzRotation me (*this);
152 return me*lt;
153}

◆ operator*() [4/5]

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

◆ operator*() [5/5]

HepLorentzRotation CLHEP::HepBoostZ::operator* ( const HepRotation r) const

Definition at line 146 of file BoostZ.cc.

146 {
147 HepLorentzRotation me (*this);
148 return me*r;
149}

◆ operator<()

bool CLHEP::HepBoostZ::operator< ( const HepBoostZ b) const
inline

◆ operator<=()

bool CLHEP::HepBoostZ::operator<= ( const HepBoostZ b) const
inline

◆ operator=() [1/2]

HepBoostZ & CLHEP::HepBoostZ::operator= ( const HepBoostZ m)
inline

◆ operator=() [2/2]

HepBoostZ & CLHEP::HepBoostZ::operator= ( HepBoostZ &&  m)
inlinedefault

◆ operator==()

bool CLHEP::HepBoostZ::operator== ( const HepBoostZ b) const
inline

◆ operator>()

bool CLHEP::HepBoostZ::operator> ( const HepBoostZ b) const
inline

◆ operator>=()

bool CLHEP::HepBoostZ::operator>= ( const HepBoostZ b) const
inline

◆ print()

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

Definition at line 157 of file BoostZ.cc.

157 {
158 os << "Boost in Z direction (beta = " << beta_
159 << ", gamma = " << gamma_ << ") ";
160 return os;
161}
double beta_
Definition: BoostZ.h:207
double gamma_
Definition: BoostZ.h:208

◆ rectify()

void CLHEP::HepBoostZ::rectify ( )

Definition at line 122 of file BoostZ.cc.

122 {
123 // Assuming the representation of this is close to a true pure boost,
124 // but may have drifted due to round-off error from many operations,
125 // this forms an "exact" pure BoostZ matrix for again.
126
127 double b2 = beta_*beta_;
128 if (b2 >= 1) {
129 beta_ = 1.0 - 1.0e-8; // NaN-proofing
130 b2 = beta_*beta_;
131 }
132 gamma_ = 1.0 / std::sqrt(1.0 - b2);
133}

◆ rep4x4()

HepRep4x4 CLHEP::HepBoostZ::rep4x4 ( ) const

Definition at line 39 of file BoostZ.cc.

39 {
40 double bg = beta_*gamma_;
41 return HepRep4x4( 1, 0, 0, 0,
42 0, 1, 0, 0,
43 0, 0, gamma_, bg,
44 0, 0, bg, gamma_ );
45}

◆ rep4x4Symmetric()

HepRep4x4Symmetric CLHEP::HepBoostZ::rep4x4Symmetric ( ) const

Definition at line 47 of file BoostZ.cc.

47 {
48 double bg = beta_*gamma_;
49 return HepRep4x4Symmetric( 1, 0, 0, 0,
50 1, 0, 0,
51 gamma_, bg,
52 gamma_ );
53}

◆ row1()

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

◆ row2()

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

◆ row3()

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

◆ row4()

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

◆ set()

HepBoostZ & CLHEP::HepBoostZ::set ( double  beta)

Definition at line 23 of file BoostZ.cc.

23 {
24 double b2 = bbeta*bbeta;
25 if (b2 >= 1) {
26 ZMthrowA (ZMxpvTachyonic(
27 "Beta supplied to set HepBoostZ represents speed >= c."));
28 beta_ = 1.0 - 1.0E-8; // NaN-proofing
29 gamma_ = 1.0 / std::sqrt(1.0 - b2);
30 return *this;
31 }
32 beta_ = bbeta;
33 gamma_ = 1.0 / std::sqrt(1.0 - b2);
34 return *this;
35}
#define ZMthrowA(A)
Definition: ZMxpv.h:128

◆ setTolerance()

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

◆ tt()

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

◆ tx()

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

◆ ty()

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

◆ tz()

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

◆ vectorMultiplication()

HepLorentzVector CLHEP::HepBoostZ::vectorMultiplication ( const HepLorentzVector w) const
inlineprotected

◆ xt()

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

◆ xx()

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

◆ xy()

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

◆ xz()

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

◆ yt()

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

◆ yx()

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

◆ yy()

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

◆ yz()

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

◆ zt()

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

◆ zx()

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

◆ zy()

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

◆ zz()

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

Friends And Related Function Documentation

◆ inverseOf

HepBoostZ inverseOf ( const HepBoostZ b)
friend

Member Data Documentation

◆ beta_

double CLHEP::HepBoostZ::beta_
protected

Definition at line 207 of file BoostZ.h.

Referenced by print(), rectify(), rep4x4(), rep4x4Symmetric(), and set().

◆ gamma_

double CLHEP::HepBoostZ::gamma_
protected

Definition at line 208 of file BoostZ.h.

Referenced by print(), rectify(), rep4x4(), rep4x4Symmetric(), and set().


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