Geant4-11
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
CLHEP::HepBoostZ Class Reference

#include <BoostZ.h>

Public Member Functions

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

Static Public Member Functions

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

Protected Member Functions

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

Protected Attributes

double beta_
 
double gamma_
 

Friends

HepBoostZ inverseOf (const HepBoostZ &b)
 

Detailed Description

Author

Definition at line 37 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 74 of file BoostZ.cc.

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

References boostVector().

◆ decompose() [2/4]

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

Definition at line 62 of file BoostZ.cc.

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

References boostVector().

◆ decompose() [3/4]

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

Definition at line 67 of file BoostZ.cc.

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

References boostVector().

◆ decompose() [4/4]

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

Definition at line 55 of file BoostZ.cc.

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

References boostVector().

◆ distance2() [1/4]

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

Definition at line 81 of file BoostZ.cc.

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

References CLHEP::HepBoost::distance2().

◆ 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 91 of file BoostZ.cc.

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

References CLHEP::HepLorentzRotation::decompose(), distance2(), and CLHEP::HepRotation::norm2().

◆ distance2() [4/4]

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

Definition at line 85 of file BoostZ.cc.

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

References norm2(), and CLHEP::HepRotation::norm2().

◆ 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 107 of file BoostZ.cc.

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

References CLHEP::HepLorentzRotation::decompose(), distance2(), epsilon(), and CLHEP::HepRotation::norm2().

◆ isNear() [4/4]

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

Definition at line 100 of file BoostZ.cc.

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

References epsilon(), norm2(), and CLHEP::HepRotation::norm2().

◆ 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 140 of file BoostZ.cc.

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

◆ operator*() [2/5]

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

Definition at line 137 of file BoostZ.cc.

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

References beta(), and HepBoostZ().

◆ operator*() [3/5]

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

Definition at line 148 of file BoostZ.cc.

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

◆ 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 144 of file BoostZ.cc.

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

◆ 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 155 of file BoostZ.cc.

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

References beta_, and gamma_.

◆ rectify()

void CLHEP::HepBoostZ::rectify ( )

Definition at line 120 of file BoostZ.cc.

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

References beta_, and gamma_.

◆ rep4x4()

HepRep4x4 CLHEP::HepBoostZ::rep4x4 ( ) const

Definition at line 37 of file BoostZ.cc.

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

References beta_, and gamma_.

◆ rep4x4Symmetric()

HepRep4x4Symmetric CLHEP::HepBoostZ::rep4x4Symmetric ( ) const

Definition at line 45 of file BoostZ.cc.

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

References beta_, and gamma_.

◆ 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 21 of file BoostZ.cc.

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

References beta_, and gamma_.

◆ 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

Field Documentation

◆ beta_

double CLHEP::HepBoostZ::beta_
protected

Definition at line 206 of file BoostZ.h.

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

◆ gamma_

double CLHEP::HepBoostZ::gamma_
protected

Definition at line 207 of file BoostZ.h.

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


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