Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
CLHEP::HepBoostZ Class Reference

#include <BoostZ.h>

Public Member Functions

 HepBoostZ ()
 
 HepBoostZ (const HepBoostZ &b)
 
HepBoostZoperator= (const HepBoostZ &m)
 
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 41 of file BoostZ.h.

Constructor & Destructor Documentation

CLHEP::HepBoostZ::HepBoostZ ( )
inline

Referenced by operator*().

CLHEP::HepBoostZ::HepBoostZ ( const HepBoostZ b)
inline
CLHEP::HepBoostZ::HepBoostZ ( double  beta)
inline
CLHEP::HepBoostZ::HepBoostZ ( double  beta,
double  gamma 
)
inlineprotected

Member Function Documentation

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

Referenced by operator*().

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

Referenced by decompose().

HepLorentzVector CLHEP::HepBoostZ::col1 ( ) const
inline
HepLorentzVector CLHEP::HepBoostZ::col2 ( ) const
inline
HepLorentzVector CLHEP::HepBoostZ::col3 ( ) const
inline
HepLorentzVector CLHEP::HepBoostZ::col4 ( ) const
inline
int CLHEP::HepBoostZ::compare ( const HepBoostZ b) const
inline
void CLHEP::HepBoostZ::decompose ( HepRotation rotation,
HepBoost boost 
) const

Definition at line 56 of file BoostZ.cc.

References boostVector().

56  {
57  HepAxisAngle vdelta = HepAxisAngle();
58  rotation = HepRotation(vdelta);
59  Hep3Vector bbeta = boostVector();
60  boost = HepBoost(bbeta);
61 }
Hep3Vector boostVector() const
void CLHEP::HepBoostZ::decompose ( HepAxisAngle rotation,
Hep3Vector boost 
) const

Definition at line 63 of file BoostZ.cc.

References boostVector().

63  {
64  rotation = HepAxisAngle();
65  boost = boostVector();
66 }
Hep3Vector boostVector() const
void CLHEP::HepBoostZ::decompose ( HepBoost boost,
HepRotation rotation 
) const

Definition at line 68 of file BoostZ.cc.

References boostVector().

68  {
69  HepAxisAngle vdelta = HepAxisAngle();
70  rotation = HepRotation(vdelta);
71  Hep3Vector bbeta = boostVector();
72  boost = HepBoost(bbeta);
73 }
Hep3Vector boostVector() const
void CLHEP::HepBoostZ::decompose ( Hep3Vector boost,
HepAxisAngle rotation 
) const

Definition at line 75 of file BoostZ.cc.

References boostVector().

75  {
76  rotation = HepAxisAngle();
77  boost = boostVector();
78 }
Hep3Vector boostVector() const
double CLHEP::HepBoostZ::distance2 ( const HepBoostZ b) const
inline

Referenced by distance2(), and isNear().

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

Definition at line 82 of file BoostZ.cc.

References CLHEP::HepBoost::distance2().

82  {
83  return b.distance2(*this);
84 }
double CLHEP::HepBoostZ::distance2 ( const HepRotation r) const

Definition at line 86 of file BoostZ.cc.

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

86  {
87  double db2 = norm2();
88  double dr2 = r.norm2();
89  return (db2 + dr2);
90 }
double norm2() const
double CLHEP::HepBoostZ::distance2 ( const HepLorentzRotation lt) const

Definition at line 92 of file BoostZ.cc.

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

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 HepBoostZ &b) const
double CLHEP::HepBoostZ::gamma ( ) const
inline
Hep3Vector CLHEP::HepBoostZ::getDirection ( ) const
inline
static double CLHEP::HepBoostZ::getTolerance ( )
inlinestatic
double CLHEP::HepBoostZ::howNear ( const HepBoostZ b) const
inline
double CLHEP::HepBoostZ::howNear ( const HepBoost b) const
inline
double CLHEP::HepBoostZ::howNear ( const HepRotation r) const
inline
double CLHEP::HepBoostZ::howNear ( const HepLorentzRotation lt) const
inline
HepBoostZ CLHEP::HepBoostZ::inverse ( ) const
inline
HepBoostZ& CLHEP::HepBoostZ::invert ( )
inline
bool CLHEP::HepBoostZ::isIdentity ( ) const
inline
bool CLHEP::HepBoostZ::isNear ( const HepBoostZ b,
double  epsilon = Hep4RotationInterface::tolerance 
) const
inline
bool CLHEP::HepBoostZ::isNear ( const HepBoost b,
double  epsilon = Hep4RotationInterface::tolerance 
) const
inline
bool CLHEP::HepBoostZ::isNear ( const HepRotation r,
double  epsilon = Hep4RotationInterface::tolerance 
) const

Definition at line 101 of file BoostZ.cc.

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

101  {
102  double db2 = norm2();
103  if (db2 > epsilon*epsilon) return false;
104  double dr2 = r.norm2();
105  return (db2+dr2 <= epsilon*epsilon);
106 }
double norm2() const
bool CLHEP::HepBoostZ::isNear ( const HepLorentzRotation lt,
double  epsilon = Hep4RotationInterface::tolerance 
) const

Definition at line 108 of file BoostZ.cc.

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

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 }
double distance2(const HepBoostZ &b) const
HepLorentzRotation CLHEP::HepBoostZ::matrixMultiplication ( const HepRep4x4 m) const
protected
HepLorentzRotation CLHEP::HepBoostZ::matrixMultiplication ( const HepRep4x4Symmetric m) const
protected
double CLHEP::HepBoostZ::norm2 ( ) const
inline

Referenced by distance2(), and isNear().

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

Definition at line 138 of file BoostZ.cc.

References beta(), and HepBoostZ().

138  {
139  return HepBoostZ ( (beta()+b.beta()) / (1+beta()*b.beta()) );
140 }
double beta() const
HepLorentzRotation CLHEP::HepBoostZ::operator* ( const HepBoost b) const

Definition at line 141 of file BoostZ.cc.

References test::b.

141  {
142  HepLorentzRotation me (*this);
143  return me*b;
144 }
HepLorentzRotation CLHEP::HepBoostZ::operator* ( const HepRotation r) const

Definition at line 145 of file BoostZ.cc.

145  {
146  HepLorentzRotation me (*this);
147  return me*r;
148 }
HepLorentzRotation CLHEP::HepBoostZ::operator* ( const HepLorentzRotation lt) const

Definition at line 149 of file BoostZ.cc.

149  {
150  HepLorentzRotation me (*this);
151  return me*lt;
152 }
bool CLHEP::HepBoostZ::operator< ( const HepBoostZ b) const
inline
bool CLHEP::HepBoostZ::operator<= ( const HepBoostZ b) const
inline
HepBoostZ& CLHEP::HepBoostZ::operator= ( const HepBoostZ m)
inline
bool CLHEP::HepBoostZ::operator== ( const HepBoostZ b) const
inline
bool CLHEP::HepBoostZ::operator> ( const HepBoostZ b) const
inline
bool CLHEP::HepBoostZ::operator>= ( const HepBoostZ b) const
inline
std::ostream & CLHEP::HepBoostZ::print ( std::ostream &  os) const

Definition at line 156 of file BoostZ.cc.

References beta_, and gamma_.

156  {
157  os << "Boost in Z direction (beta = " << beta_
158  << ", gamma = " << gamma_ << ") ";
159  return os;
160 }
double beta_
Definition: BoostZ.h:208
double gamma_
Definition: BoostZ.h:209
void CLHEP::HepBoostZ::rectify ( )

Definition at line 121 of file BoostZ.cc.

References beta_, and gamma_.

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 BoostZ 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 }
double beta_
Definition: BoostZ.h:208
double gamma_
Definition: BoostZ.h:209
HepRep4x4 CLHEP::HepBoostZ::rep4x4 ( ) const

Definition at line 38 of file BoostZ.cc.

References beta_, and gamma_.

38  {
39  double bg = beta_*gamma_;
40  return HepRep4x4( 1, 0, 0, 0,
41  0, 1, 0, 0,
42  0, 0, gamma_, bg,
43  0, 0, bg, gamma_ );
44 }
double beta_
Definition: BoostZ.h:208
double gamma_
Definition: BoostZ.h:209
HepRep4x4Symmetric CLHEP::HepBoostZ::rep4x4Symmetric ( ) const

Definition at line 46 of file BoostZ.cc.

References beta_, and gamma_.

46  {
47  double bg = beta_*gamma_;
48  return HepRep4x4Symmetric( 1, 0, 0, 0,
49  1, 0, 0,
50  gamma_, bg,
51  gamma_ );
52 }
double beta_
Definition: BoostZ.h:208
double gamma_
Definition: BoostZ.h:209
HepLorentzVector CLHEP::HepBoostZ::row1 ( ) const
inline
HepLorentzVector CLHEP::HepBoostZ::row2 ( ) const
inline
HepLorentzVector CLHEP::HepBoostZ::row3 ( ) const
inline
HepLorentzVector CLHEP::HepBoostZ::row4 ( ) const
inline
HepBoostZ & CLHEP::HepBoostZ::set ( double  beta)

Definition at line 22 of file BoostZ.cc.

References beta_, and gamma_.

22  {
23  double b2 = bbeta*bbeta;
24  if (b2 >= 1) {
25  std::cerr << "HepBoostZ::set() - "
26  << "Beta supplied to set HepBoostZ 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 }
double beta_
Definition: BoostZ.h:208
double gamma_
Definition: BoostZ.h:209
static double CLHEP::HepBoostZ::setTolerance ( double  tol)
inlinestatic
double CLHEP::HepBoostZ::tt ( ) const
inline
double CLHEP::HepBoostZ::tx ( ) const
inline
double CLHEP::HepBoostZ::ty ( ) const
inline
double CLHEP::HepBoostZ::tz ( ) const
inline
HepLorentzVector CLHEP::HepBoostZ::vectorMultiplication ( const HepLorentzVector w) const
inlineprotected
double CLHEP::HepBoostZ::xt ( ) const
inline
double CLHEP::HepBoostZ::xx ( ) const
inline
double CLHEP::HepBoostZ::xy ( ) const
inline
double CLHEP::HepBoostZ::xz ( ) const
inline
double CLHEP::HepBoostZ::yt ( ) const
inline
double CLHEP::HepBoostZ::yx ( ) const
inline
double CLHEP::HepBoostZ::yy ( ) const
inline
double CLHEP::HepBoostZ::yz ( ) const
inline
double CLHEP::HepBoostZ::zt ( ) const
inline
double CLHEP::HepBoostZ::zx ( ) const
inline
double CLHEP::HepBoostZ::zy ( ) const
inline
double CLHEP::HepBoostZ::zz ( ) const
inline

Friends And Related Function Documentation

HepBoostZ inverseOf ( const HepBoostZ b)
friend

Field Documentation

double CLHEP::HepBoostZ::beta_
protected

Definition at line 208 of file BoostZ.h.

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

double CLHEP::HepBoostZ::gamma_
protected

Definition at line 209 of file BoostZ.h.

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


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