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

#include <BoostX.h>

Public Member Functions

 HepBoostX ()
 
 HepBoostX (const HepBoostX &b)
 
 HepBoostX (HepBoostX &&b)=default
 
HepBoostXoperator= (const HepBoostX &m)
 
HepBoostXoperator= (HepBoostX &&m)=default
 
HepBoostXset (double beta)
 
 HepBoostX (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 HepBoostX &b) const
 
bool operator== (const HepBoostX &b) const
 
bool operator!= (const HepBoostX &b) const
 
bool operator<= (const HepBoostX &b) const
 
bool operator>= (const HepBoostX &b) const
 
bool operator< (const HepBoostX &b) const
 
bool operator> (const HepBoostX &b) const
 
bool isIdentity () const
 
double distance2 (const HepBoostX &b) const
 
double distance2 (const HepBoost &b) const
 
double distance2 (const HepRotation &r) const
 
double distance2 (const HepLorentzRotation &lt) const
 
double howNear (const HepBoostX &b) const
 
double howNear (const HepBoost &b) const
 
double howNear (const HepRotation &r) const
 
double howNear (const HepLorentzRotation &lt) const
 
bool isNear (const HepBoostX &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
 
HepBoostX operator* (const HepBoostX &b) const
 
HepLorentzRotation operator* (const HepBoost &b) const
 
HepLorentzRotation operator* (const HepRotation &r) const
 
HepLorentzRotation operator* (const HepLorentzRotation &lt) const
 
HepBoostX inverse () const
 
HepBoostXinvert ()
 
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
 
 HepBoostX (double beta, double gamma)
 

Protected Attributes

double beta_
 
double gamma_
 

Friends

HepBoostX inverseOf (const HepBoostX &b)
 

Detailed Description

Author

Definition at line 38 of file BoostX.h.

Constructor & Destructor Documentation

◆ HepBoostX() [1/5]

CLHEP::HepBoostX::HepBoostX ( )
inline

Referenced by operator*().

◆ HepBoostX() [2/5]

CLHEP::HepBoostX::HepBoostX ( const HepBoostX b)
inline

◆ HepBoostX() [3/5]

CLHEP::HepBoostX::HepBoostX ( HepBoostX &&  b)
inlinedefault

◆ HepBoostX() [4/5]

CLHEP::HepBoostX::HepBoostX ( double  beta)
inline

◆ HepBoostX() [5/5]

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

Member Function Documentation

◆ beta()

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

Referenced by operator*().

◆ boostVector()

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

Referenced by decompose().

◆ col1()

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

◆ col2()

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

◆ col3()

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

◆ col4()

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

◆ compare()

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

◆ decompose() [1/4]

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

Definition at line 77 of file BoostX.cc.

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

◆ decompose() [2/4]

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

Definition at line 65 of file BoostX.cc.

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

◆ decompose() [3/4]

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

Definition at line 70 of file BoostX.cc.

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

◆ decompose() [4/4]

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

Definition at line 58 of file BoostX.cc.

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

◆ distance2() [1/4]

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

Definition at line 84 of file BoostX.cc.

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

◆ distance2() [2/4]

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

Referenced by distance2(), and isNear().

◆ distance2() [3/4]

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

Definition at line 94 of file BoostX.cc.

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

◆ distance2() [4/4]

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

Definition at line 88 of file BoostX.cc.

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

◆ gamma()

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

◆ getDirection()

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

◆ getTolerance()

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

◆ howNear() [1/4]

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

◆ howNear() [2/4]

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

◆ howNear() [3/4]

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

◆ howNear() [4/4]

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

◆ inverse()

HepBoostX CLHEP::HepBoostX::inverse ( ) const
inline

◆ invert()

HepBoostX & CLHEP::HepBoostX::invert ( )
inline

◆ isIdentity()

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

◆ isNear() [1/4]

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

◆ isNear() [2/4]

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

◆ isNear() [3/4]

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

Definition at line 110 of file BoostX.cc.

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

◆ isNear() [4/4]

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

Definition at line 103 of file BoostX.cc.

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

◆ matrixMultiplication() [1/2]

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

◆ matrixMultiplication() [2/2]

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

◆ norm2()

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

Referenced by distance2(), and isNear().

◆ operator!=()

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

◆ operator()()

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

◆ operator*() [1/5]

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

Definition at line 143 of file BoostX.cc.

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

◆ operator*() [2/5]

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

Definition at line 140 of file BoostX.cc.

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

◆ operator*() [3/5]

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

Definition at line 151 of file BoostX.cc.

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

◆ operator*() [4/5]

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

◆ operator*() [5/5]

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

Definition at line 147 of file BoostX.cc.

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

◆ operator<()

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

◆ operator<=()

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ operator==()

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

◆ operator>()

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

◆ operator>=()

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

◆ print()

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

Definition at line 158 of file BoostX.cc.

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

◆ rectify()

void CLHEP::HepBoostX::rectify ( )

Definition at line 123 of file BoostX.cc.

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

◆ rep4x4()

HepRep4x4 CLHEP::HepBoostX::rep4x4 ( ) const

Definition at line 40 of file BoostX.cc.

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

◆ rep4x4Symmetric()

HepRep4x4Symmetric CLHEP::HepBoostX::rep4x4Symmetric ( ) const

Definition at line 48 of file BoostX.cc.

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

◆ row1()

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

◆ row2()

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

◆ row3()

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

◆ row4()

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

◆ set()

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

Definition at line 24 of file BoostX.cc.

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

◆ setTolerance()

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

◆ tt()

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

◆ tx()

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

◆ ty()

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

◆ tz()

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

◆ vectorMultiplication()

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

◆ xt()

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

◆ xx()

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

◆ xy()

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

◆ xz()

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

◆ yt()

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

◆ yx()

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

◆ yy()

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

◆ yz()

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

◆ zt()

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

◆ zx()

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

◆ zy()

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

◆ zz()

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

Friends And Related Function Documentation

◆ inverseOf

HepBoostX inverseOf ( const HepBoostX b)
friend

Member Data Documentation

◆ beta_

double CLHEP::HepBoostX::beta_
protected

Definition at line 207 of file BoostX.h.

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

◆ gamma_

double CLHEP::HepBoostX::gamma_
protected

Definition at line 208 of file BoostX.h.

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


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