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::HepBoost Class Reference

#include <Boost.h>

Public Member Functions

 HepBoost ()
 
 HepBoost (const HepBoost &m)
 
HepBoostoperator= (const HepBoost &m)
 
HepBoostset (double betaX, double betaY, double betaZ)
 
 HepBoost (double betaX, double betaY, double betaZ)
 
HepBoostset (const HepRep4x4Symmetric &m)
 
 HepBoost (const HepRep4x4Symmetric &m)
 
HepBoostset (Hep3Vector direction, double beta)
 
 HepBoost (Hep3Vector direction, double beta)
 
HepBoostset (const Hep3Vector &boost)
 
 HepBoost (const Hep3Vector &boost)
 
HepBoostset (const HepBoostX &boost)
 
HepBoostset (const HepBoostY &boost)
 
HepBoostset (const HepBoostZ &boost)
 
 HepBoost (const HepBoostX &boost)
 
 HepBoost (const HepBoostY &boost)
 
 HepBoost (const HepBoostZ &boost)
 
double beta () const
 
double gamma () const
 
Hep3Vector boostVector () const
 
Hep3Vector getDirection () const
 
Hep3Vector direction () 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 HepBoost &b) const
 
bool operator== (const HepBoost &b) const
 
bool operator!= (const HepBoost &b) const
 
bool operator<= (const HepBoost &b) const
 
bool operator>= (const HepBoost &b) const
 
bool operator< (const HepBoost &b) const
 
bool operator> (const HepBoost &b) const
 
bool isIdentity () const
 
double distance2 (const HepBoost &b) const
 
double distance2 (const HepBoostX &bx) const
 
double distance2 (const HepBoostY &by) const
 
double distance2 (const HepBoostZ &bz) const
 
double distance2 (const HepRotation &r) const
 
double distance2 (const HepLorentzRotation &lt) const
 
double howNear (const HepBoost &b) const
 
bool isNear (const HepBoost &b, double epsilon=Hep4RotationInterface::tolerance) const
 
double howNear (const HepRotation &r) const
 
double howNear (const HepLorentzRotation &lt) 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 &p) const
 
HepLorentzVector operator* (const HepLorentzVector &p) const
 
HepLorentzRotation operator* (const HepBoost &b) const
 
HepLorentzRotation operator* (const HepRotation &r) const
 
HepLorentzRotation operator* (const HepLorentzRotation &lt) const
 
HepBoost inverse () const
 
HepBoostinvert ()
 
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
 
 HepBoost (double xx, double xy, double xz, double xt, double yy, double yz, double yt, double zz, double zt, double tt)
 
void setBoost (double bx, double by, double bz)
 

Protected Attributes

HepRep4x4Symmetric rep_
 

Friends

HepBoost inverseOf (const HepBoost &lt)
 

Detailed Description

Author

Definition at line 42 of file Boost.h.

Constructor & Destructor Documentation

CLHEP::HepBoost::HepBoost ( )
inline

Referenced by decompose().

CLHEP::HepBoost::HepBoost ( const HepBoost m)
inline
CLHEP::HepBoost::HepBoost ( double  betaX,
double  betaY,
double  betaZ 
)
inline
CLHEP::HepBoost::HepBoost ( const HepRep4x4Symmetric m)
inline
CLHEP::HepBoost::HepBoost ( Hep3Vector  direction,
double  beta 
)
inline
CLHEP::HepBoost::HepBoost ( const Hep3Vector boost)
inline
CLHEP::HepBoost::HepBoost ( const HepBoostX boost)
inline
CLHEP::HepBoost::HepBoost ( const HepBoostY boost)
inline
CLHEP::HepBoost::HepBoost ( const HepBoostZ boost)
inline
CLHEP::HepBoost::HepBoost ( double  xx,
double  xy,
double  xz,
double  xt,
double  yy,
double  yz,
double  yt,
double  zz,
double  zt,
double  tt 
)
inlineprotected

Member Function Documentation

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

Definition at line 69 of file Boost.cc.

References boostVector(), and HepBoost().

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

Definition at line 76 of file Boost.cc.

References boostVector().

76  {
77  rotation = HepAxisAngle();
78  boost = boostVector();
79 }
Hep3Vector boostVector() const
void CLHEP::HepBoost::decompose ( HepBoost boost,
HepRotation rotation 
) const

Definition at line 81 of file Boost.cc.

References boostVector(), and HepBoost().

81  {
82  HepAxisAngle vdelta = HepAxisAngle();
83  rotation = HepRotation(vdelta);
84  Hep3Vector bbeta = boostVector();
85  boost = HepBoost(bbeta);
86 }
Hep3Vector boostVector() const
void CLHEP::HepBoost::decompose ( Hep3Vector boost,
HepAxisAngle rotation 
) const

Definition at line 88 of file Boost.cc.

References boostVector().

88  {
89  rotation = HepAxisAngle();
90  boost = boostVector();
91 }
Hep3Vector boostVector() const
Hep3Vector CLHEP::HepBoost::direction ( ) const
inline
double CLHEP::HepBoost::distance2 ( const HepBoost b) const
inline
double CLHEP::HepBoost::distance2 ( const HepBoostX bx) const
inline
double CLHEP::HepBoost::distance2 ( const HepBoostY by) const
inline
double CLHEP::HepBoost::distance2 ( const HepBoostZ bz) const
inline
double CLHEP::HepBoost::distance2 ( const HepRotation r) const

Definition at line 95 of file Boost.cc.

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

95  {
96  double db2 = norm2();
97  double dr2 = r.norm2();
98  return (db2 + dr2);
99 }
double norm2() const
Definition: Boost.cc:138
double CLHEP::HepBoost::distance2 ( const HepLorentzRotation lt) const

Definition at line 101 of file Boost.cc.

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

101  {
102  HepBoost b1;
103  HepRotation r1;
104  lt.decompose(b1,r1);
105  double db2 = distance2(b1);
106  double dr2 = r1.norm2();
107  return (db2 + dr2);
108 }
double distance2(const HepBoost &b) const
double CLHEP::HepBoost::gamma ( ) const
inline
Hep3Vector CLHEP::HepBoost::getDirection ( ) const
inline
static double CLHEP::HepBoost::getTolerance ( )
inlinestatic
double CLHEP::HepBoost::howNear ( const HepBoost b) const
inline
double CLHEP::HepBoost::howNear ( const HepRotation r) const

Definition at line 110 of file Boost.cc.

References distance2().

110  {
111  return std::sqrt(distance2(r));
112 }
double distance2(const HepBoost &b) const
double CLHEP::HepBoost::howNear ( const HepLorentzRotation lt) const

Definition at line 114 of file Boost.cc.

References distance2().

114  {
115  return std::sqrt(distance2(lt));
116 }
double distance2(const HepBoost &b) const
HepBoost CLHEP::HepBoost::inverse ( ) const
inline
HepBoost& CLHEP::HepBoost::invert ( )
inline
bool CLHEP::HepBoost::isIdentity ( ) const
inline
bool CLHEP::HepBoost::isNear ( const HepBoost b,
double  epsilon = Hep4RotationInterface::tolerance 
) const
inline
bool CLHEP::HepBoost::isNear ( const HepRotation r,
double  epsilon = Hep4RotationInterface::tolerance 
) const

Definition at line 118 of file Boost.cc.

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

118  {
119  double db2 = norm2();
120  if (db2 > epsilon*epsilon) return false;
121  double dr2 = r.norm2();
122  return (db2+dr2 <= epsilon*epsilon);
123 }
double norm2() const
Definition: Boost.cc:138
bool CLHEP::HepBoost::isNear ( const HepLorentzRotation lt,
double  epsilon = Hep4RotationInterface::tolerance 
) const

Definition at line 125 of file Boost.cc.

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

126  {
127  HepBoost b1;
128  HepRotation r1;
129  double db2 = distance2(b1);
130  lt.decompose(b1,r1);
131  if (db2 > epsilon*epsilon) return false;
132  double dr2 = r1.norm2();
133  return (db2 + dr2);
134 }
double distance2(const HepBoost &b) const
HepLorentzRotation CLHEP::HepBoost::matrixMultiplication ( const HepRep4x4 m) const
protected

Definition at line 180 of file Boost.cc.

References rep4x4Symmetric(), CLHEP::HepRep4x4::tt_, CLHEP::HepRep4x4Symmetric::tt_, CLHEP::HepRep4x4::tx_, CLHEP::HepRep4x4::ty_, CLHEP::HepRep4x4::tz_, CLHEP::HepRep4x4::xt_, CLHEP::HepRep4x4Symmetric::xt_, CLHEP::HepRep4x4::xx_, CLHEP::HepRep4x4Symmetric::xx_, CLHEP::HepRep4x4::xy_, CLHEP::HepRep4x4Symmetric::xy_, CLHEP::HepRep4x4::xz_, CLHEP::HepRep4x4Symmetric::xz_, CLHEP::HepRep4x4::yt_, CLHEP::HepRep4x4Symmetric::yt_, CLHEP::HepRep4x4::yx_, CLHEP::HepRep4x4::yy_, CLHEP::HepRep4x4Symmetric::yy_, CLHEP::HepRep4x4::yz_, CLHEP::HepRep4x4Symmetric::yz_, CLHEP::HepRep4x4::zt_, CLHEP::HepRep4x4Symmetric::zt_, CLHEP::HepRep4x4::zx_, CLHEP::HepRep4x4::zy_, CLHEP::HepRep4x4::zz_, and CLHEP::HepRep4x4Symmetric::zz_.

Referenced by operator*().

180  {
181  HepRep4x4Symmetric r = rep4x4Symmetric();
182  return HepLorentzRotation( HepRep4x4 (
183  r.xx_*m1.xx_ + r.xy_*m1.yx_ + r.xz_*m1.zx_ + r.xt_*m1.tx_,
184  r.xx_*m1.xy_ + r.xy_*m1.yy_ + r.xz_*m1.zy_ + r.xt_*m1.ty_,
185  r.xx_*m1.xz_ + r.xy_*m1.yz_ + r.xz_*m1.zz_ + r.xt_*m1.tz_,
186  r.xx_*m1.xt_ + r.xy_*m1.yt_ + r.xz_*m1.zt_ + r.xt_*m1.tt_,
187 
188  r.xy_*m1.xx_ + r.yy_*m1.yx_ + r.yz_*m1.zx_ + r.yt_*m1.tx_,
189  r.xy_*m1.xy_ + r.yy_*m1.yy_ + r.yz_*m1.zy_ + r.yt_*m1.ty_,
190  r.xy_*m1.xz_ + r.yy_*m1.yz_ + r.yz_*m1.zz_ + r.yt_*m1.tz_,
191  r.xy_*m1.xt_ + r.yy_*m1.yt_ + r.yz_*m1.zt_ + r.yt_*m1.tt_,
192 
193  r.xz_*m1.xx_ + r.yz_*m1.yx_ + r.zz_*m1.zx_ + r.zt_*m1.tx_,
194  r.xz_*m1.xy_ + r.yz_*m1.yy_ + r.zz_*m1.zy_ + r.zt_*m1.ty_,
195  r.xz_*m1.xz_ + r.yz_*m1.yz_ + r.zz_*m1.zz_ + r.zt_*m1.tz_,
196  r.xz_*m1.xt_ + r.yz_*m1.yt_ + r.zz_*m1.zt_ + r.zt_*m1.tt_,
197 
198  r.xt_*m1.xx_ + r.yt_*m1.yx_ + r.zt_*m1.zx_ + r.tt_*m1.tx_,
199  r.xt_*m1.xy_ + r.yt_*m1.yy_ + r.zt_*m1.zy_ + r.tt_*m1.ty_,
200  r.xt_*m1.xz_ + r.yt_*m1.yz_ + r.zt_*m1.zz_ + r.tt_*m1.tz_,
201  r.xt_*m1.xt_ + r.yt_*m1.yt_ + r.zt_*m1.zt_ + r.tt_*m1.tt_) );
202 }
HepRep4x4Symmetric rep4x4Symmetric() const
HepLorentzRotation CLHEP::HepBoost::matrixMultiplication ( const HepRep4x4Symmetric m) const
protected

Definition at line 205 of file Boost.cc.

References rep4x4Symmetric(), CLHEP::HepRep4x4Symmetric::tt_, CLHEP::HepRep4x4Symmetric::xt_, CLHEP::HepRep4x4Symmetric::xx_, CLHEP::HepRep4x4Symmetric::xy_, CLHEP::HepRep4x4Symmetric::xz_, CLHEP::HepRep4x4Symmetric::yt_, CLHEP::HepRep4x4Symmetric::yy_, CLHEP::HepRep4x4Symmetric::yz_, CLHEP::HepRep4x4Symmetric::zt_, and CLHEP::HepRep4x4Symmetric::zz_.

205  {
206  HepRep4x4Symmetric r = rep4x4Symmetric();
207  return HepLorentzRotation( HepRep4x4 (
208  r.xx_*m1.xx_ + r.xy_*m1.xy_ + r.xz_*m1.xz_ + r.xt_*m1.xt_,
209  r.xx_*m1.xy_ + r.xy_*m1.yy_ + r.xz_*m1.yz_ + r.xt_*m1.yt_,
210  r.xx_*m1.xz_ + r.xy_*m1.yz_ + r.xz_*m1.zz_ + r.xt_*m1.zt_,
211  r.xx_*m1.xt_ + r.xy_*m1.yt_ + r.xz_*m1.zt_ + r.xt_*m1.tt_,
212 
213  r.xy_*m1.xx_ + r.yy_*m1.xy_ + r.yz_*m1.xz_ + r.yt_*m1.xt_,
214  r.xy_*m1.xy_ + r.yy_*m1.yy_ + r.yz_*m1.yz_ + r.yt_*m1.yt_,
215  r.xy_*m1.xz_ + r.yy_*m1.yz_ + r.yz_*m1.zz_ + r.yt_*m1.zt_,
216  r.xy_*m1.xt_ + r.yy_*m1.yt_ + r.yz_*m1.zt_ + r.yt_*m1.tt_,
217 
218  r.xz_*m1.xx_ + r.yz_*m1.xy_ + r.zz_*m1.xz_ + r.zt_*m1.xt_,
219  r.xz_*m1.xy_ + r.yz_*m1.yy_ + r.zz_*m1.yz_ + r.zt_*m1.yt_,
220  r.xz_*m1.xz_ + r.yz_*m1.yz_ + r.zz_*m1.zz_ + r.zt_*m1.zt_,
221  r.xz_*m1.xt_ + r.yz_*m1.yt_ + r.zz_*m1.zt_ + r.zt_*m1.tt_,
222 
223  r.xt_*m1.xx_ + r.yt_*m1.xy_ + r.zt_*m1.xz_ + r.tt_*m1.xt_,
224  r.xt_*m1.xy_ + r.yt_*m1.yy_ + r.zt_*m1.yz_ + r.tt_*m1.yt_,
225  r.xt_*m1.xz_ + r.yt_*m1.yz_ + r.zt_*m1.zz_ + r.tt_*m1.zt_,
226  r.xt_*m1.xt_ + r.yt_*m1.yt_ + r.zt_*m1.zt_ + r.tt_*m1.tt_) );
227 }
HepRep4x4Symmetric rep4x4Symmetric() const
double CLHEP::HepBoost::norm2 ( ) const

Definition at line 138 of file Boost.cc.

References rep_, CLHEP::HepRep4x4Symmetric::xt_, CLHEP::HepRep4x4Symmetric::yt_, and CLHEP::HepRep4x4Symmetric::zt_.

Referenced by distance2(), CLHEP::HepLorentzRotation::distance2(), isNear(), CLHEP::HepLorentzRotation::isNear(), and CLHEP::HepLorentzRotation::norm2().

138  {
139  register double bgx = rep_.xt_;
140  register double bgy = rep_.yt_;
141  register double bgz = rep_.zt_;
142  return bgx*bgx+bgy*bgy+bgz*bgz;
143 }
HepRep4x4Symmetric rep_
Definition: Boost.h:235
bool CLHEP::HepBoost::operator!= ( const HepBoost b) const
inline
HepLorentzVector CLHEP::HepBoost::operator() ( const HepLorentzVector p) const
inline
HepLorentzVector CLHEP::HepBoost::operator* ( const HepLorentzVector p) const
inline
HepLorentzRotation CLHEP::HepBoost::operator* ( const HepBoost b) const

Definition at line 235 of file Boost.cc.

References matrixMultiplication(), and rep_.

235  {
236  return matrixMultiplication(b.rep_);
237 }
HepLorentzRotation matrixMultiplication(const HepRep4x4 &m) const
Definition: Boost.cc:180
HepLorentzRotation CLHEP::HepBoost::operator* ( const HepRotation r) const

Definition at line 240 of file Boost.cc.

References matrixMultiplication(), and CLHEP::HepRotation::rep4x4().

240  {
241  return matrixMultiplication(r.rep4x4());
242 }
HepLorentzRotation matrixMultiplication(const HepRep4x4 &m) const
Definition: Boost.cc:180
HepLorentzRotation CLHEP::HepBoost::operator* ( const HepLorentzRotation lt) const

Definition at line 230 of file Boost.cc.

References matrixMultiplication(), and CLHEP::HepLorentzRotation::rep4x4().

230  {
231  return matrixMultiplication(lt.rep4x4());
232 }
HepLorentzRotation matrixMultiplication(const HepRep4x4 &m) const
Definition: Boost.cc:180
bool CLHEP::HepBoost::operator< ( const HepBoost b) const
inline
bool CLHEP::HepBoost::operator<= ( const HepBoost b) const
inline
HepBoost& CLHEP::HepBoost::operator= ( const HepBoost m)
inline
bool CLHEP::HepBoost::operator== ( const HepBoost b) const
inline
bool CLHEP::HepBoost::operator> ( const HepBoost b) const
inline
bool CLHEP::HepBoost::operator>= ( const HepBoost b) const
inline
std::ostream & CLHEP::HepBoost::print ( std::ostream &  os) const

Definition at line 246 of file Boost.cc.

References beta(), boostVector(), gamma(), CLHEP::Hep3Vector::mag(), rep_, and CLHEP::HepRep4x4Symmetric::tt_.

246  {
247  if ( rep_.tt_ <= 1 ) {
248  os << "Lorentz Boost( IDENTITY )";
249  } else {
250  double norm = boostVector().mag();
251  os << "\nLorentz Boost " << boostVector()/norm <<
252  "\n{beta = " << beta() << " gamma = " << gamma() << "}\n";
253  }
254  return os;
255 }
Hep3Vector boostVector() const
HepRep4x4Symmetric rep_
Definition: Boost.h:235
double gamma() const
double beta() const
double mag() const
void CLHEP::HepBoost::rectify ( )

Definition at line 145 of file Boost.cc.

References G4InuclParticleNames::gam, CLHEP::Hep3Vector::mag(), CLHEP::Hep3Vector::mag2(), set(), tt(), xt(), yt(), and zt().

145  {
146  // Assuming the representation of this is close to a true pure boost,
147  // but may have drifted due to round-off error from many operations,
148  // this forms an "exact" pure boost matrix for the LT again.
149 
150  // The natural way to do this is to use the t column as a boost and set
151  // based on that boost vector.
152 
153  // There is perhaps danger that this boost vector will appear equal to or
154  // greater than a unit vector; the best we can do for such a case is use
155  // a boost in that direction but rescaled to just less than one.
156 
157  // There is in principle no way that gamma could have become negative,
158  // but if that happens, we ZMthrow and (if continuing) just rescale, which
159  // will change the sign of the last column when computing the boost.
160 
161  double gam = tt();
162  if (gam <= 0) { // 4/12/01 mf
163  std::cerr << "HepBoost::rectify() - "
164  << "Attempt to rectify a boost with non-positive gamma." << std::endl;
165  if (gam==0) return; // NaN-proofing
166  }
167  Hep3Vector boost (xt(), yt(), zt());
168  boost /= tt();
169  if ( boost.mag2() >= 1 ) { // NaN-proofing:
170  boost /= ( boost.mag() * ( 1.0 + 1.0e-16 ) ); // used to just check > 1
171  }
172  set ( boost );
173 }
double xt() const
double tt() const
double zt() const
HepBoost & set(double betaX, double betaY, double betaZ)
Definition: Boost.cc:21
double yt() const
HepRep4x4 CLHEP::HepBoost::rep4x4 ( ) const
inline
HepRep4x4Symmetric CLHEP::HepBoost::rep4x4Symmetric ( ) const
inline

Referenced by matrixMultiplication().

HepLorentzVector CLHEP::HepBoost::row1 ( ) const
inline
HepLorentzVector CLHEP::HepBoost::row2 ( ) const
inline
HepLorentzVector CLHEP::HepBoost::row3 ( ) const
inline
HepLorentzVector CLHEP::HepBoost::row4 ( ) const
inline
HepBoost & CLHEP::HepBoost::set ( double  betaX,
double  betaY,
double  betaZ 
)

Definition at line 21 of file Boost.cc.

References rep_, CLHEP::HepRep4x4Symmetric::tt_, CLHEP::HepRep4x4Symmetric::xt_, CLHEP::HepRep4x4Symmetric::xx_, CLHEP::HepRep4x4Symmetric::xy_, CLHEP::HepRep4x4Symmetric::xz_, CLHEP::HepRep4x4Symmetric::yt_, CLHEP::HepRep4x4Symmetric::yy_, CLHEP::HepRep4x4Symmetric::yz_, CLHEP::HepRep4x4Symmetric::zt_, and CLHEP::HepRep4x4Symmetric::zz_.

Referenced by CLHEP::HepRotationY::decompose(), CLHEP::HepRotationZ::decompose(), CLHEP::HepRotationX::decompose(), CLHEP::HepLorentzRotation::decompose(), rectify(), and set().

21  {
22  double bp2 = bx*bx + by*by + bz*bz;
23 // if (bp2 >= 1) {
24 // std::cerr << "HepBoost::set() - "
25 // << "Boost Vector supplied to set HepBoost represents speed >= c." << std::endl;
26 // }
27  double ggamma = 1.0 / std::sqrt(1.0 - bp2);
28  double bgamma = ggamma * ggamma / (1.0 + ggamma);
29  rep_.xx_ = 1.0 + bgamma * bx * bx;
30  rep_.yy_ = 1.0 + bgamma * by * by;
31  rep_.zz_ = 1.0 + bgamma * bz * bz;
32  rep_.xy_ = bgamma * bx * by;
33  rep_.xz_ = bgamma * bx * bz;
34  rep_.yz_ = bgamma * by * bz;
35  rep_.xt_ = ggamma * bx;
36  rep_.yt_ = ggamma * by;
37  rep_.zt_ = ggamma * bz;
38  rep_.tt_ = ggamma;
39  return *this;
40 }
HepRep4x4Symmetric rep_
Definition: Boost.h:235
HepBoost & CLHEP::HepBoost::set ( const HepRep4x4Symmetric m)

Definition at line 42 of file Boost.cc.

References rep_.

42  {
43  rep_ = m1;
44  return *this;
45 }
HepRep4x4Symmetric rep_
Definition: Boost.h:235
HepBoost & CLHEP::HepBoost::set ( Hep3Vector  direction,
double  beta 
)

Definition at line 47 of file Boost.cc.

References CLHEP::Hep3Vector::mag(), set(), CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

47  {
48  double length = ddirection.mag();
49  if (length <= 0) { // Nan-proofing
50  std::cerr << "HepBoost::set() - "
51  << "Direction supplied to set HepBoost is zero." << std::endl;
52  set (0,0,0);
53  return *this;
54  }
55  set(bbeta*ddirection.x()/length,
56  bbeta*ddirection.y()/length,
57  bbeta*ddirection.z()/length);
58  return *this;
59 }
HepBoost & set(double betaX, double betaY, double betaZ)
Definition: Boost.cc:21
HepBoost & CLHEP::HepBoost::set ( const Hep3Vector boost)

Definition at line 61 of file Boost.cc.

References set(), CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

61  {
62  return set (bboost.x(), bboost.y(), bboost.z());
63 }
HepBoost & set(double betaX, double betaY, double betaZ)
Definition: Boost.cc:21
HepBoost& CLHEP::HepBoost::set ( const HepBoostX boost)
inline
HepBoost& CLHEP::HepBoost::set ( const HepBoostY boost)
inline
HepBoost& CLHEP::HepBoost::set ( const HepBoostZ boost)
inline
void CLHEP::HepBoost::setBoost ( double  bx,
double  by,
double  bz 
)
inlineprotected
static double CLHEP::HepBoost::setTolerance ( double  tol)
inlinestatic
double CLHEP::HepBoost::tt ( ) const
inline
double CLHEP::HepBoost::tx ( ) const
inline

Referenced by pystfu(), and pystpr().

double CLHEP::HepBoost::ty ( ) const
inline
double CLHEP::HepBoost::tz ( ) const
inline
HepLorentzVector CLHEP::HepBoost::vectorMultiplication ( const HepLorentzVector w) const
inlineprotected
double CLHEP::HepBoost::xt ( ) const
inline
double CLHEP::HepBoost::xx ( ) const
inline
double CLHEP::HepBoost::xy ( ) const
inline
double CLHEP::HepBoost::xz ( ) const
inline
double CLHEP::HepBoost::yt ( ) const
inline
double CLHEP::HepBoost::yx ( ) const
inline
double CLHEP::HepBoost::yy ( ) const
inline
double CLHEP::HepBoost::yz ( ) const
inline
double CLHEP::HepBoost::zt ( ) const
inline

Referenced by rectify().

double CLHEP::HepBoost::zx ( ) const
inline
double CLHEP::HepBoost::zy ( ) const
inline
double CLHEP::HepBoost::zz ( ) const
inline

Friends And Related Function Documentation

HepBoost inverseOf ( const HepBoost lt)
friend

Field Documentation

HepRep4x4Symmetric CLHEP::HepBoost::rep_
protected

Definition at line 235 of file Boost.h.

Referenced by norm2(), operator*(), print(), and set().


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