Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
CLHEP::HepBoostY Class Reference

#include <BoostY.h>

Public Member Functions

 HepBoostY ()
 
 HepBoostY (const HepBoostY &b)
 
HepBoostYoperator= (const HepBoostY &m)
 
HepBoostYset (double beta)
 
 HepBoostY (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 HepBoostY &b) const
 
bool operator== (const HepBoostY &b) const
 
bool operator!= (const HepBoostY &b) const
 
bool operator<= (const HepBoostY &b) const
 
bool operator>= (const HepBoostY &b) const
 
bool operator< (const HepBoostY &b) const
 
bool operator> (const HepBoostY &b) const
 
bool isIdentity () const
 
double distance2 (const HepBoostY &b) const
 
double distance2 (const HepBoost &b) const
 
double distance2 (const HepRotation &r) const
 
double distance2 (const HepLorentzRotation &lt) const
 
double howNear (const HepBoostY &b) const
 
double howNear (const HepBoost &b) const
 
double howNear (const HepRotation &r) const
 
double howNear (const HepLorentzRotation &lt) const
 
bool isNear (const HepBoostY &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
 
HepBoostY operator* (const HepBoostY &b) const
 
HepLorentzRotation operator* (const HepBoost &b) const
 
HepLorentzRotation operator* (const HepRotation &r) const
 
HepLorentzRotation operator* (const HepLorentzRotation &lt) const
 
HepBoostY inverse () const
 
HepBoostYinvert ()
 
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
 
 HepBoostY (double beta, double gamma)
 

Protected Attributes

double beta_
 
double gamma_
 

Friends

HepBoostY inverseOf (const HepBoostY &b)
 

Detailed Description

Author

Definition at line 41 of file BoostY.h.

Constructor & Destructor Documentation

◆ HepBoostY() [1/4]

CLHEP::HepBoostY::HepBoostY ( )
inline

Referenced by operator*().

◆ HepBoostY() [2/4]

CLHEP::HepBoostY::HepBoostY ( const HepBoostY b)
inline

◆ HepBoostY() [3/4]

CLHEP::HepBoostY::HepBoostY ( double  beta)
inline

◆ HepBoostY() [4/4]

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

Member Function Documentation

◆ beta()

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

Referenced by operator*().

◆ boostVector()

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

Referenced by decompose().

◆ col1()

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

◆ col2()

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

◆ col3()

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

◆ col4()

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

◆ compare()

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

◆ decompose() [1/4]

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

Definition at line 75 of file BoostY.cc.

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

◆ decompose() [2/4]

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

Definition at line 63 of file BoostY.cc.

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

◆ decompose() [3/4]

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

Definition at line 68 of file BoostY.cc.

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

◆ decompose() [4/4]

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

Definition at line 56 of file BoostY.cc.

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

◆ distance2() [1/4]

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

Definition at line 82 of file BoostY.cc.

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

◆ distance2() [2/4]

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

Referenced by distance2(), and isNear().

◆ distance2() [3/4]

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

Definition at line 92 of file BoostY.cc.

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

◆ distance2() [4/4]

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

Definition at line 86 of file BoostY.cc.

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

◆ gamma()

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

◆ getDirection()

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

◆ getTolerance()

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

◆ howNear() [1/4]

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

◆ howNear() [2/4]

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

◆ howNear() [3/4]

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

◆ howNear() [4/4]

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

◆ inverse()

HepBoostY CLHEP::HepBoostY::inverse ( ) const
inline

◆ invert()

HepBoostY & CLHEP::HepBoostY::invert ( )
inline

◆ isIdentity()

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

◆ isNear() [1/4]

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

◆ isNear() [2/4]

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

◆ isNear() [3/4]

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

Definition at line 108 of file BoostY.cc.

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

◆ isNear() [4/4]

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

Definition at line 101 of file BoostY.cc.

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

◆ matrixMultiplication() [1/2]

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

◆ matrixMultiplication() [2/2]

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

◆ norm2()

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

Referenced by distance2(), and isNear().

◆ operator!=()

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

◆ operator()()

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

◆ operator*() [1/5]

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

Definition at line 141 of file BoostY.cc.

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

◆ operator*() [2/5]

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

Definition at line 138 of file BoostY.cc.

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

◆ operator*() [3/5]

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

Definition at line 149 of file BoostY.cc.

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

◆ operator*() [4/5]

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

◆ operator*() [5/5]

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

Definition at line 145 of file BoostY.cc.

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

◆ operator<()

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

◆ operator<=()

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

◆ operator=()

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

◆ operator==()

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

◆ operator>()

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

◆ operator>=()

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

◆ print()

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

Definition at line 156 of file BoostY.cc.

156 {
157 os << "Boost in Y direction (beta = " << beta_
158 << ", gamma = " << gamma_ << ") ";
159 return os;
160}
double gamma_
Definition: BoostY.h:210
double beta_
Definition: BoostY.h:209

◆ rectify()

void CLHEP::HepBoostY::rectify ( )

Definition at line 121 of file BoostY.cc.

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

◆ rep4x4()

HepRep4x4 CLHEP::HepBoostY::rep4x4 ( ) const

Definition at line 38 of file BoostY.cc.

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

◆ rep4x4Symmetric()

HepRep4x4Symmetric CLHEP::HepBoostY::rep4x4Symmetric ( ) const

Definition at line 46 of file BoostY.cc.

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

◆ row1()

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

◆ row2()

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

◆ row3()

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

◆ row4()

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

◆ set()

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

Definition at line 22 of file BoostY.cc.

22 {
23 double b2 = bbeta*bbeta;
24 if (b2 >= 1) {
25 std::cerr << "HepBoostY::set() - "
26 << "Beta supplied to set HepBoostY represents speed >= c." << std::endl;
27 beta_ = 1.0 - 1.0E-8; // NaN-proofing
28 gamma_ = 1.0 / std::sqrt(1.0 - b2);
29 return *this;
30 }
31 beta_ = bbeta;
32 gamma_ = 1.0 / std::sqrt(1.0 - b2);
33 return *this;
34}

◆ setTolerance()

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

◆ tt()

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

◆ tx()

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

◆ ty()

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

◆ tz()

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

◆ vectorMultiplication()

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

◆ xt()

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

◆ xx()

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

◆ xy()

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

◆ xz()

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

◆ yt()

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

◆ yx()

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

◆ yy()

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

◆ yz()

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

◆ zt()

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

◆ zx()

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

◆ zy()

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

◆ zz()

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

Friends And Related Function Documentation

◆ inverseOf

HepBoostY inverseOf ( const HepBoostY b)
friend

Member Data Documentation

◆ beta_

double CLHEP::HepBoostY::beta_
protected

Definition at line 209 of file BoostY.h.

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

◆ gamma_

double CLHEP::HepBoostY::gamma_
protected

Definition at line 210 of file BoostY.h.

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


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