Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
CLHEP Namespace Reference

Namespaces

namespace  detail
 

Classes

struct  do_nothing_deleter
 
class  DoubConv
 
class  DoubConvException
 
class  DualRand
 
class  EngineFactory
 
class  Hep2Vector
 
class  Hep3RotationInterface
 
class  Hep3Vector
 
class  Hep4RotationInterface
 
class  HepAxisAngle
 
class  HepBoost
 
class  HepBoostX
 
class  HepBoostY
 
class  HepBoostZ
 
class  HepEulerAngles
 
class  HepJamesRandom
 
class  HepLorentzRotation
 
class  HepLorentzVector
 
class  HepRandom
 
class  HepRandomEngine
 
struct  HepRep3x3
 
struct  HepRep4x4
 
struct  HepRep4x4Symmetric
 
class  HepRotation
 
class  HepRotationX
 
class  HepRotationY
 
class  HepRotationZ
 
class  HepStat
 
class  MixMaxRng
 
class  MTwistEngine
 
class  noncopyable
 
class  NonRandomEngine
 
class  RandBinomial
 
class  RandBit
 
class  RandBreitWigner
 
class  RandChiSquare
 
class  RandExponential
 
class  RandExpZiggurat
 
class  RandFlat
 
class  RandGamma
 
class  RandGauss
 
class  RandGaussQ
 
class  RandGaussZiggurat
 
class  RandGeneral
 
class  RandLandau
 
class  RandPoisson
 
class  RandPoissonQ
 
class  RandStudentT
 
class  RanecuEngine
 
class  Ranlux64Engine
 
class  RanluxEngine
 
class  RanluxppEngine
 
class  RanshiEngine
 
class  StaticRandomStates
 
class  Tcomponent
 

Typedefs

using myID_t = std::uint32_t
 
using myuint_t = std::uint64_t
 
template<typename T >
using shared_ptr = std::shared_ptr<T>
 
template<typename T >
using weak_ptr = std::weak_ptr<T>
 
typedef HepLorentzVector HepLorentzVectorD
 
typedef HepLorentzVector HepLorentzVectorF
 
typedef Hep3Vector HepThreeVectorD
 
typedef Hep3Vector HepThreeVectorF
 

Enumerations

enum  ZMpvMetric_t { TimePositive , TimeNegative }
 

Functions

unsigned long crc32ul (const std::string &s)
 
template<class E >
unsigned long engineIDulong ()
 
std::ostream & operator<< (std::ostream &os, const HepRandom &dist)
 
std::istream & operator>> (std::istream &is, HepRandom &dist)
 
std::ostream & operator<< (std::ostream &os, const HepRandomEngine &e)
 
std::istream & operator>> (std::istream &is, HepRandomEngine &e)
 
template<class IS , class T >
bool possibleKeywordInput (IS &is, const std::string &key, T &t)
 
std::ostream & operator<< (std::ostream &os, const HepAxisAngle &aa)
 
std::istream & operator>> (std::istream &is, HepAxisAngle &aa)
 
HepBoost inverseOf (const HepBoost &lt)
 
std::ostream & operator<< (std::ostream &os, const HepBoost &b)
 
HepBoostX inverseOf (const HepBoostX &b)
 
std::ostream & operator<< (std::ostream &os, const HepBoostX &b)
 
HepBoostY inverseOf (const HepBoostY &b)
 
std::ostream & operator<< (std::ostream &os, const HepBoostY &b)
 
HepBoostZ inverseOf (const HepBoostZ &b)
 
std::ostream & operator<< (std::ostream &os, const HepBoostZ &b)
 
std::ostream & operator<< (std::ostream &os, const HepEulerAngles &aa)
 
std::istream & operator>> (std::istream &is, HepEulerAngles &aa)
 
HepLorentzRotation inverseOf (const HepLorentzRotation &lt)
 
HepLorentzRotation operator* (const HepRotation &r, const HepLorentzRotation &lt)
 
HepLorentzRotation operator* (const HepRotationX &r, const HepLorentzRotation &lt)
 
HepLorentzRotation operator* (const HepRotationY &r, const HepLorentzRotation &lt)
 
HepLorentzRotation operator* (const HepRotationZ &r, const HepLorentzRotation &lt)
 
std::ostream & operator<< (std::ostream &os, const HepLorentzRotation &lt)
 
bool operator== (const HepRotation &r, const HepLorentzRotation &lt)
 
bool operator!= (const HepRotation &r, const HepLorentzRotation &lt)
 
bool operator<= (const HepRotation &r, const HepLorentzRotation &lt)
 
bool operator>= (const HepRotation &r, const HepLorentzRotation &lt)
 
bool operator< (const HepRotation &r, const HepLorentzRotation &lt)
 
bool operator> (const HepRotation &r, const HepLorentzRotation &lt)
 
bool operator== (const HepBoost &b, const HepLorentzRotation &lt)
 
bool operator!= (const HepBoost &b, const HepLorentzRotation &lt)
 
bool operator<= (const HepBoost &b, const HepLorentzRotation &lt)
 
bool operator>= (const HepBoost &b, const HepLorentzRotation &lt)
 
bool operator< (const HepBoost &b, const HepLorentzRotation &lt)
 
bool operator> (const HepBoost &b, const HepLorentzRotation &lt)
 
HepLorentzVector rotationXOf (const HepLorentzVector &vec, double delta)
 
HepLorentzVector rotationYOf (const HepLorentzVector &vec, double delta)
 
HepLorentzVector rotationZOf (const HepLorentzVector &vec, double delta)
 
HepLorentzVector rotationOf (const HepLorentzVector &vec, const Hep3Vector &axis, double delta)
 
HepLorentzVector rotationOf (const HepLorentzVector &vec, const HepAxisAngle &ax)
 
HepLorentzVector rotationOf (const HepLorentzVector &vec, const HepEulerAngles &e)
 
HepLorentzVector rotationOf (const HepLorentzVector &vec, double phi, double theta, double psi)
 
HepLorentzVector boostXOf (const HepLorentzVector &vec, double beta)
 
HepLorentzVector boostYOf (const HepLorentzVector &vec, double beta)
 
HepLorentzVector boostZOf (const HepLorentzVector &vec, double beta)
 
HepLorentzVector boostOf (const HepLorentzVector &vec, const Hep3Vector &betaVector)
 
HepLorentzVector boostOf (const HepLorentzVector &vec, const Hep3Vector &axis, double beta)
 
std::ostream & operator<< (std::ostream &, const HepLorentzVector &)
 
std::istream & operator>> (std::istream &, HepLorentzVector &)
 
HepLorentzVector operator* (const HepLorentzVector &, double a)
 
HepLorentzVector operator* (double a, const HepLorentzVector &)
 
HepLorentzVector operator/ (const HepLorentzVector &, double a)
 
HepRotation inverseOf (const HepRotation &r)
 
HepRotation operator* (const HepRotationX &rx, const HepRotation &r)
 
HepRotation operator* (const HepRotationY &ry, const HepRotation &r)
 
HepRotation operator* (const HepRotationZ &rz, const HepRotation &r)
 
std::ostream & operator<< (std::ostream &os, const HepRotation &r)
 
HepRotationX inverseOf (const HepRotationX &r)
 
std::ostream & operator<< (std::ostream &os, const HepRotationX &r)
 
HepRotationY inverseOf (const HepRotationY &r)
 
std::ostream & operator<< (std::ostream &os, const HepRotationY &r)
 
HepRotationZ inverseOf (const HepRotationZ &r)
 
std::ostream & operator<< (std::ostream &os, const HepRotationZ &r)
 
Hep3Vector rotationXOf (const Hep3Vector &vec, double delta)
 
Hep3Vector rotationYOf (const Hep3Vector &vec, double delta)
 
Hep3Vector rotationZOf (const Hep3Vector &vec, double delta)
 
Hep3Vector rotationOf (const Hep3Vector &vec, const Hep3Vector &axis, double delta)
 
Hep3Vector rotationOf (const Hep3Vector &vec, const HepAxisAngle &ax)
 
Hep3Vector rotationOf (const Hep3Vector &vec, double phi, double theta, double psi)
 
Hep3Vector rotationOf (const Hep3Vector &vec, const HepEulerAngles &e)
 
std::ostream & operator<< (std::ostream &, const Hep3Vector &)
 
std::istream & operator>> (std::istream &, Hep3Vector &)
 
Hep3Vector operator/ (const Hep3Vector &, double a)
 
Hep3Vector operator+ (const Hep3Vector &, const Hep3Vector &)
 
Hep3Vector operator- (const Hep3Vector &, const Hep3Vector &)
 
double operator* (const Hep3Vector &, const Hep3Vector &)
 
Hep3Vector operator* (const Hep3Vector &, double a)
 
Hep3Vector operator* (double a, const Hep3Vector &)
 
std::ostream & operator<< (std::ostream &os, const Hep2Vector &q)
 
std::istream & operator>> (std::istream &, Hep2Vector &)
 
double operator* (const Hep2Vector &a, const Hep2Vector &b)
 
Hep2Vector operator* (const Hep2Vector &p, double a)
 
Hep2Vector operator* (double a, const Hep2Vector &p)
 
Hep2Vector operator/ (const Hep2Vector &p, double a)
 
Hep2Vector operator+ (const Hep2Vector &a, const Hep2Vector &b)
 
Hep2Vector operator- (const Hep2Vector &a, const Hep2Vector &b)
 
void ZMinputAxisAngle (std::istream &is, double &x, double &y, double &z, double &delta)
 
void ZMinput3doubles (std::istream &is, const char *type, double &x, double &y, double &z)
 
double transformSmall (double r)
 
double gammln (double xx)
 
const Hep3Vector HepXHat (1.0, 0.0, 0.0)
 
const Hep3Vector HepYHat (0.0, 1.0, 0.0)
 
const Hep3Vector HepZHat (0.0, 0.0, 1.0)
 
void ZMinput2doubles (std::istream &is, const char *type, double &x, double &y)
 

Variables

DLL_API const Hep3Vector HepXHat
 
DLL_API const Hep3Vector HepYHat
 
DLL_API const Hep3Vector HepZHat
 

Typedef Documentation

◆ HepLorentzVectorD

Definition at line 547 of file LorentzVector.h.

◆ HepLorentzVectorF

Definition at line 548 of file LorentzVector.h.

◆ HepThreeVectorD

Definition at line 421 of file ThreeVector.h.

◆ HepThreeVectorF

Definition at line 422 of file ThreeVector.h.

◆ myID_t

using CLHEP::myID_t = std::uint32_t
Author
K.Savvidy

Definition at line 49 of file MixMaxRng.h.

◆ myuint_t

using CLHEP::myuint_t = std::uint64_t

Definition at line 50 of file MixMaxRng.h.

◆ shared_ptr

template<typename T >
using CLHEP::shared_ptr = std::shared_ptr<T>

Definition at line 15 of file memory.h.

◆ weak_ptr

template<typename T >
using CLHEP::weak_ptr = std::weak_ptr<T>

Definition at line 17 of file memory.h.

Enumeration Type Documentation

◆ ZMpvMetric_t

Enumerator
TimePositive 
TimeNegative 

Definition at line 59 of file LorentzVector.h.

Function Documentation

◆ boostOf() [1/2]

HepLorentzVector CLHEP::boostOf ( const HepLorentzVector & vec,
const Hep3Vector & axis,
double beta )
inline

◆ boostOf() [2/2]

HepLorentzVector CLHEP::boostOf ( const HepLorentzVector & vec,
const Hep3Vector & betaVector )
inline

◆ boostXOf()

HepLorentzVector CLHEP::boostXOf ( const HepLorentzVector & vec,
double beta )
inline

◆ boostYOf()

HepLorentzVector CLHEP::boostYOf ( const HepLorentzVector & vec,
double beta )
inline

◆ boostZOf()

HepLorentzVector CLHEP::boostZOf ( const HepLorentzVector & vec,
double beta )
inline

◆ crc32ul()

unsigned long CLHEP::crc32ul ( const std::string & s)

Definition at line 36 of file engineIDulong.cc.

36 {
37 static const std::vector<unsigned long> crc_table = gen_crc_table();
38 unsigned long crc = 0;
39 unsigned long end = s.length();
40 for (unsigned long j = 0; j != end; ++j) {
41 int i = ( (int) ( crc >> 24) ^ s[j] ) & 0xff;
42 crc = ( ( crc << 8 ) ^ crc_table[i] ) & 0xffffffffUL;
43 }
44 return crc;
45}
local const z_crc_t FAR crc_table[]
Definition crc32.h:5

Referenced by engineIDulong().

◆ engineIDulong()

◆ gammln()

double CLHEP::gammln ( double xx)

Definition at line 56 of file RandPoisson.cc.

56 {
57
58// Returns the value ln(Gamma(xx) for xx > 0. Full accuracy is obtained for
59// xx > 1. For 0 < xx < 1. the reflection formula (6.1.4) can be used first.
60// (Adapted from Numerical Recipes in C)
61
62 static const double cof[6] = {76.18009172947146,-86.50532032941677,
63 24.01409824083091, -1.231739572450155,
64 0.1208650973866179e-2, -0.5395239384953e-5};
65 int j;
66 double x = xx - 1.0;
67 double tmp = x + 5.5;
68 tmp -= (x + 0.5) * std::log(tmp);
69 double ser = 1.000000000190015;
70
71 for ( j = 0; j <= 5; j++ ) {
72 x += 1.0;
73 ser += cof[j]/x;
74 }
75 return -tmp + std::log(2.5066282746310005*ser);
76}

Referenced by CLHEP::RandPoisson::fire(), CLHEP::RandPoisson::shoot(), and CLHEP::RandPoisson::shoot().

◆ HepXHat()

const Hep3Vector CLHEP::HepXHat ( 1. 0,
0. 0,
0. 0 )

◆ HepYHat()

const Hep3Vector CLHEP::HepYHat ( 0. 0,
1. 0,
0. 0 )

◆ HepZHat()

const Hep3Vector CLHEP::HepZHat ( 0. 0,
0. 0,
1. 0 )

◆ inverseOf() [1/9]

HepBoost CLHEP::inverseOf ( const HepBoost & lt)
inline

◆ inverseOf() [2/9]

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

◆ inverseOf() [3/9]

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

◆ inverseOf() [4/9]

HepBoostZ CLHEP::inverseOf ( const HepBoostZ & b)
inline

◆ inverseOf() [5/9]

HepLorentzRotation CLHEP::inverseOf ( const HepLorentzRotation & lt)
inline

◆ inverseOf() [6/9]

HepRotation CLHEP::inverseOf ( const HepRotation & r)
inline

◆ inverseOf() [7/9]

HepRotationX CLHEP::inverseOf ( const HepRotationX & r)
inline

◆ inverseOf() [8/9]

HepRotationY CLHEP::inverseOf ( const HepRotationY & r)
inline

◆ inverseOf() [9/9]

HepRotationZ CLHEP::inverseOf ( const HepRotationZ & r)
inline

◆ operator!=() [1/2]

bool CLHEP::operator!= ( const HepBoost & b,
const HepLorentzRotation & lt )
inline

Definition at line 363 of file LorentzRotation.h.

◆ operator!=() [2/2]

bool CLHEP::operator!= ( const HepRotation & r,
const HepLorentzRotation & lt )
inline

Definition at line 350 of file LorentzRotation.h.

351 { return lt!=HepLorentzRotation(r); }

◆ operator*() [1/15]

double CLHEP::operator* ( const Hep2Vector & a,
const Hep2Vector & b )
inline

◆ operator*() [2/15]

Hep2Vector CLHEP::operator* ( const Hep2Vector & p,
double a )
inline

◆ operator*() [3/15]

double CLHEP::operator* ( const Hep3Vector & ,
const Hep3Vector &  )
inline

◆ operator*() [4/15]

Hep3Vector CLHEP::operator* ( const Hep3Vector & ,
double a )
inline

◆ operator*() [5/15]

HepLorentzVector CLHEP::operator* ( const HepLorentzVector & ,
double a )
inline

◆ operator*() [6/15]

HepLorentzRotation CLHEP::operator* ( const HepRotation & r,
const HepLorentzRotation & lt )

Definition at line 260 of file LorentzRotation.cc.

261 {
262 r.rep4x4();
263 lt.rep4x4();
265 r.xx()*lt.xx() + r.xy()*lt.yx() + r.xz()*lt.zx() + r.xt()*lt.tx(),
266 r.xx()*lt.xy() + r.xy()*lt.yy() + r.xz()*lt.zy() + r.xt()*lt.ty(),
267 r.xx()*lt.xz() + r.xy()*lt.yz() + r.xz()*lt.zz() + r.xt()*lt.tz(),
268 r.xx()*lt.xt() + r.xy()*lt.yt() + r.xz()*lt.zt() + r.xt()*lt.tt(),
269
270 r.yx()*lt.xx() + r.yy()*lt.yx() + r.yz()*lt.zx() + r.yt()*lt.tx(),
271 r.yx()*lt.xy() + r.yy()*lt.yy() + r.yz()*lt.zy() + r.yt()*lt.ty(),
272 r.yx()*lt.xz() + r.yy()*lt.yz() + r.yz()*lt.zz() + r.yt()*lt.tz(),
273 r.yx()*lt.xt() + r.yy()*lt.yt() + r.yz()*lt.zt() + r.yt()*lt.tt(),
274
275 r.zx()*lt.xx() + r.zy()*lt.yx() + r.zz()*lt.zx() + r.zt()*lt.tx(),
276 r.zx()*lt.xy() + r.zy()*lt.yy() + r.zz()*lt.zy() + r.zt()*lt.ty(),
277 r.zx()*lt.xz() + r.zy()*lt.yz() + r.zz()*lt.zz() + r.zt()*lt.tz(),
278 r.zx()*lt.xt() + r.zy()*lt.yt() + r.zz()*lt.zt() + r.zt()*lt.tt(),
279
280 r.tx()*lt.xx() + r.ty()*lt.yx() + r.tz()*lt.zx() + r.tt()*lt.tx(),
281 r.tx()*lt.xy() + r.ty()*lt.yy() + r.tz()*lt.zy() + r.tt()*lt.ty(),
282 r.tx()*lt.xz() + r.ty()*lt.yz() + r.tz()*lt.zz() + r.tt()*lt.tz(),
283 r.tx()*lt.xt() + r.ty()*lt.yt() + r.tz()*lt.zt() + r.tt()*lt.tt() ) );
284}
HepRep4x4 rep4x4() const
double zz() const
double yz() const
double zx() const
double tz() const
double ty() const
double tx() const
double yx() const
double zy() const
HepRep4x4 rep4x4() const
double zt() const
double xx() const
double tt() const
double yy() const
double xz() const
double yt() const
double xy() const
double xt() const

◆ operator*() [7/15]

HepLorentzRotation CLHEP::operator* ( const HepRotationX & r,
const HepLorentzRotation & lt )

◆ operator*() [8/15]

HepRotation CLHEP::operator* ( const HepRotationX & rx,
const HepRotation & r )
inline

◆ operator*() [9/15]

HepLorentzRotation CLHEP::operator* ( const HepRotationY & r,
const HepLorentzRotation & lt )

◆ operator*() [10/15]

HepRotation CLHEP::operator* ( const HepRotationY & ry,
const HepRotation & r )
inline

◆ operator*() [11/15]

HepLorentzRotation CLHEP::operator* ( const HepRotationZ & r,
const HepLorentzRotation & lt )

◆ operator*() [12/15]

HepRotation CLHEP::operator* ( const HepRotationZ & rz,
const HepRotation & r )
inline

◆ operator*() [13/15]

Hep2Vector CLHEP::operator* ( double a,
const Hep2Vector & p )
inline

◆ operator*() [14/15]

Hep3Vector CLHEP::operator* ( double a,
const Hep3Vector &  )
inline

◆ operator*() [15/15]

HepLorentzVector CLHEP::operator* ( double a,
const HepLorentzVector &  )
inline

◆ operator+() [1/2]

Hep2Vector CLHEP::operator+ ( const Hep2Vector & a,
const Hep2Vector & b )
inline

◆ operator+() [2/2]

Hep3Vector CLHEP::operator+ ( const Hep3Vector & ,
const Hep3Vector &  )
inline

◆ operator-() [1/2]

Hep2Vector CLHEP::operator- ( const Hep2Vector & a,
const Hep2Vector & b )
inline

◆ operator-() [2/2]

Hep3Vector CLHEP::operator- ( const Hep3Vector & ,
const Hep3Vector &  )
inline

◆ operator/() [1/3]

Hep2Vector CLHEP::operator/ ( const Hep2Vector & p,
double a )

Definition at line 61 of file TwoVector.cc.

61 {
62// if (a==0) {
63// std::cerr << "Hep2Vector operator/ () - "
64// << "Division of Hep2Vector by zero" << std::endl;
65// }
66 return Hep2Vector(p.x()/a, p.y()/a);
67}
double x() const
double y() const

◆ operator/() [2/3]

Hep3Vector CLHEP::operator/ ( const Hep3Vector & v1,
double a )

Definition at line 298 of file ThreeVector.cc.

298 {
299// if (c == 0) {
300// std::cerr << "Hep3Vector::operator/ () - "
301// << "Attempt to divide vector by 0 -- "
302// << "will produce infinities and/or NANs" << std::endl;
303// }
304 return v1 * (1.0/c);
305} /* v / c */

◆ operator/() [3/3]

HepLorentzVector CLHEP::operator/ ( const HepLorentzVector & w,
double a )

Definition at line 161 of file LorentzVector.cc.

161 {
162// if (c == 0) {
163// std::cerr << "HepLorentzVector::operator /() - "
164// << "Attempt to do LorentzVector / 0 -- \n"
165// << "division by zero would produce infinite or NAN components"
166// << std::endl;
167// }
168 double oneOverC = 1.0/c;
169 return HepLorentzVector (w.getV() * oneOverC,
170 w.getT() * oneOverC);
171} /* LV = w / c */
Hep3Vector getV() const

◆ operator<() [1/2]

bool CLHEP::operator< ( const HepBoost & b,
const HepLorentzRotation & lt )
inline

Definition at line 369 of file LorentzRotation.h.

370 { return lt<b; }

◆ operator<() [2/2]

bool CLHEP::operator< ( const HepRotation & r,
const HepLorentzRotation & lt )
inline

Definition at line 356 of file LorentzRotation.h.

357 { return lt<r; }

◆ operator<<() [1/16]

std::ostream & CLHEP::operator<< ( std::ostream & os,
const Hep3Vector & v )

Definition at line 63 of file ThreeVector.cc.

63 {
64 return os << "(" << v.x() << "," << v.y() << "," << v.z() << ")";
65}
double z() const
double x() const
double y() const

◆ operator<<() [2/16]

std::ostream & CLHEP::operator<< ( std::ostream & os,
const HepLorentzVector & v1 )

Definition at line 86 of file LorentzVector.cc.

87{
88 return os << "(" << v1.x() << "," << v1.y() << "," << v1.z()
89 << ";" << v1.t() << ")";
90}

◆ operator<<() [3/16]

std::ostream & CLHEP::operator<< ( std::ostream & os,
const Hep2Vector & q )

Definition at line 69 of file TwoVector.cc.

69 {
70 os << "(" << q.x() << ", " << q.y() << ")";
71 return os;
72}

◆ operator<<() [4/16]

std::ostream & CLHEP::operator<< ( std::ostream & os,
const HepAxisAngle & aa )

Definition at line 89 of file AxisAngle.cc.

89 {
90 os << '(' << aa.axis() << ", " << aa.delta() << ')';
91 return os;
92} // operator<<()
double delta() const
Hep3Vector axis() const

◆ operator<<() [5/16]

std::ostream & CLHEP::operator<< ( std::ostream & os,
const HepBoost & b )
inline

Definition at line 238 of file Boost.h.

239{return b.print(os);}
std::ostream & print(std::ostream &os) const
Definition Boost.cc:245

◆ operator<<() [6/16]

std::ostream & CLHEP::operator<< ( std::ostream & os,
const HepBoostX & b )
inline

Definition at line 212 of file BoostX.h.

213{return b.print(os);}
std::ostream & print(std::ostream &os) const
Definition BoostX.cc:156

◆ operator<<() [7/16]

std::ostream & CLHEP::operator<< ( std::ostream & os,
const HepBoostY & b )
inline

Definition at line 213 of file BoostY.h.

214{return b.print(os);}
std::ostream & print(std::ostream &os) const
Definition BoostY.cc:155

◆ operator<<() [8/16]

std::ostream & CLHEP::operator<< ( std::ostream & os,
const HepBoostZ & b )
inline

Definition at line 212 of file BoostZ.h.

213{return b.print(os);}
std::ostream & print(std::ostream &os) const
Definition BoostZ.cc:155

◆ operator<<() [9/16]

std::ostream & CLHEP::operator<< ( std::ostream & os,
const HepEulerAngles & aa )

Definition at line 101 of file EulerAngles.cc.

102{
103 os << "(" << ea.phi() << ", " << ea.theta() << ", " << ea.psi() << ")";
104 return os;
105} // operator<<()

◆ operator<<() [10/16]

std::ostream & CLHEP::operator<< ( std::ostream & os,
const HepLorentzRotation & lt )
inline

Definition at line 344 of file LorentzRotation.h.

346 {return lt.print(os);}
std::ostream & print(std::ostream &os) const

◆ operator<<() [11/16]

std::ostream & CLHEP::operator<< ( std::ostream & os,
const HepRandom & dist )

Definition at line 219 of file Random.cc.

219 {
220 return dist.put(os);
221}
virtual std::ostream & put(std::ostream &os) const
Definition Random.cc:227

◆ operator<<() [12/16]

std::ostream & CLHEP::operator<< ( std::ostream & os,
const HepRandomEngine & e )

Definition at line 100 of file RandomEngine.cc.

100 {
101 return e.put(os);
102}
virtual std::ostream & put(std::ostream &os) const

◆ operator<<() [13/16]

std::ostream & CLHEP::operator<< ( std::ostream & os,
const HepRotation & r )
inline

Definition at line 406 of file Rotation.h.

407{return r.print(os);}
std::ostream & print(std::ostream &os) const
Definition RotationIO.cc:17

◆ operator<<() [14/16]

std::ostream & CLHEP::operator<< ( std::ostream & os,
const HepRotationX & r )
inline

Definition at line 275 of file RotationX.h.

276{return r.print(os);}
std::ostream & print(std::ostream &os) const
Definition RotationX.cc:185

◆ operator<<() [15/16]

std::ostream & CLHEP::operator<< ( std::ostream & os,
const HepRotationY & r )
inline

Definition at line 275 of file RotationY.h.

276{return r.print(os);}
std::ostream & print(std::ostream &os) const
Definition RotationY.cc:188

◆ operator<<() [16/16]

std::ostream & CLHEP::operator<< ( std::ostream & os,
const HepRotationZ & r )
inline

Definition at line 275 of file RotationZ.h.

276{return r.print(os);}
std::ostream & print(std::ostream &os) const
Definition RotationZ.cc:176

◆ operator<=() [1/2]

bool CLHEP::operator<= ( const HepBoost & b,
const HepLorentzRotation & lt )
inline

Definition at line 365 of file LorentzRotation.h.

366 { return lt<=b; }

◆ operator<=() [2/2]

bool CLHEP::operator<= ( const HepRotation & r,
const HepLorentzRotation & lt )
inline

Definition at line 352 of file LorentzRotation.h.

353 { return lt<=r; }

◆ operator==() [1/2]

bool CLHEP::operator== ( const HepBoost & b,
const HepLorentzRotation & lt )
inline

Definition at line 361 of file LorentzRotation.h.

362 { return lt==HepLorentzRotation(b); }

◆ operator==() [2/2]

bool CLHEP::operator== ( const HepRotation & r,
const HepLorentzRotation & lt )
inline

Definition at line 348 of file LorentzRotation.h.

349 { return lt==HepLorentzRotation(r); }

◆ operator>() [1/2]

bool CLHEP::operator> ( const HepBoost & b,
const HepLorentzRotation & lt )
inline

Definition at line 371 of file LorentzRotation.h.

372 { return lt>b; }

◆ operator>() [2/2]

bool CLHEP::operator> ( const HepRotation & r,
const HepLorentzRotation & lt )
inline

Definition at line 358 of file LorentzRotation.h.

359 { return lt>r; }

◆ operator>=() [1/2]

bool CLHEP::operator>= ( const HepBoost & b,
const HepLorentzRotation & lt )
inline

Definition at line 367 of file LorentzRotation.h.

368 { return lt>=b; }

◆ operator>=() [2/2]

bool CLHEP::operator>= ( const HepRotation & r,
const HepLorentzRotation & lt )
inline

Definition at line 354 of file LorentzRotation.h.

355 { return lt>=r; }

◆ operator>>() [1/7]

std::istream & CLHEP::operator>> ( std::istream & is,
Hep2Vector & p )

Definition at line 77 of file TwoVector.cc.

77 {
78 double x, y;
79 ZMinput2doubles ( is, "Hep2Vector", x, y );
80 p.set(x, y);
81 return is;
82} // operator>>()
void set(double x, double y)
void ZMinput2doubles(std::istream &is, const char *type, double &x, double &y)
Definition ZMinput.cc:243

◆ operator>>() [2/7]

std::istream & CLHEP::operator>> ( std::istream & is,
Hep3Vector & v )

Definition at line 70 of file ThreeVector.cc.

70 {
71 double x, y, z;
72 ZMinput3doubles ( is, "Hep3Vector", x, y, z );
73 v.set(x, y, z);
74 return is;
75} // operator>>()
void set(double x, double y, double z)
void ZMinput3doubles(std::istream &is, const char *type, double &x, double &y, double &z)
Definition ZMinput.cc:42

◆ operator>>() [3/7]

std::istream & CLHEP::operator>> ( std::istream & is,
HepLorentzVector & v1 )

Definition at line 92 of file LorentzVector.cc.

92 {
93
94// Required format is ( a, b, c; d ) that is, four numbers, preceded by
95// (, followed by ), components of the spatial vector separated by commas,
96// time component separated by semicolon. The four numbers are taken
97// as x, y, z, t.
98
99 double x, y, z, t;
100 char c;
101
102 is >> std::ws >> c;
103 // ws is defined to invoke eatwhite(istream & )
104 // see (Stroustrup gray book) page 333 and 345.
105 if (is.fail() || c != '(' ) {
106 std::cerr << "Could not find required opening parenthesis "
107 << "in input of a HepLorentzVector" << std::endl;
108 return is;
109 }
110
111 is >> x >> std::ws >> c;
112 if (is.fail() || c != ',' ) {
113 std::cerr << "Could not find x value and required trailing comma "
114 << "in input of a HepLorentzVector" << std::endl;
115 return is;
116 }
117
118 is >> y >> std::ws >> c;
119 if (is.fail() || c != ',' ) {
120 std::cerr << "Could not find y value and required trailing comma "
121 << "in input of a HepLorentzVector" << std::endl;
122 return is;
123 }
124
125 is >> z >> std::ws >> c;
126 if (is.fail() || c != ';' ) {
127 std::cerr << "Could not find z value and required trailing semicolon "
128 << "in input of a HepLorentzVector" << std::endl;
129 return is;
130 }
131
132 is >> t >> std::ws >> c;
133 if (is.fail() || c != ')' ) {
134 std::cerr << "Could not find t value and required close parenthesis "
135 << "in input of a HepLorentzVector" << std::endl;
136 return is;
137 }
138
139 v1.setX(x);
140 v1.setY(y);
141 v1.setZ(z);
142 v1.setT(t);
143 return is;
144}

◆ operator>>() [4/7]

std::istream & CLHEP::operator>> ( std::istream & is,
HepAxisAngle & aa )

Definition at line 99 of file AxisAngle.cc.

99 {
100 Hep3Vector axis;
101 double delta;
102 double x,y,z;
103 ZMinputAxisAngle ( is, x, y, z, delta );
104 axis.set(x,y,z);
105 aa.set ( axis, delta );
106 return is;
107} // operator>>()
AA & set(const Hep3Vector axis, Scalar delta)
void ZMinputAxisAngle(std::istream &is, double &x, double &y, double &z, double &delta)
Definition ZMinput.cc:156

◆ operator>>() [5/7]

std::istream & CLHEP::operator>> ( std::istream & is,
HepEulerAngles & aa )

Definition at line 110 of file EulerAngles.cc.

110 {
111 double thePhi;
112 double theTheta;
113 double thePsi;
114 ZMinput3doubles ( is, "HepEulerAngle", thePhi , theTheta , thePsi );
115 ea.set ( thePhi , theTheta , thePsi );
116 return is;
117} // operator>>()

◆ operator>>() [6/7]

std::istream & CLHEP::operator>> ( std::istream & is,
HepRandom & dist )

Definition at line 223 of file Random.cc.

223 {
224 return dist.get(is);
225}
virtual std::istream & get(std::istream &is)
Definition Random.cc:228

◆ operator>>() [7/7]

std::istream & CLHEP::operator>> ( std::istream & is,
HepRandomEngine & e )

Definition at line 104 of file RandomEngine.cc.

104 {
105 return e.get(is);
106}
virtual std::istream & get(std::istream &is)

◆ possibleKeywordInput()

◆ rotationOf() [1/8]

Hep3Vector CLHEP::rotationOf ( const Hep3Vector & vec,
const Hep3Vector & axis,
double delta )

Definition at line 126 of file SpaceVectorR.cc.

127 {
128 Hep3Vector vv(vec);
129 return vv.rotate(axis, ddelta);
130}

◆ rotationOf() [2/8]

Hep3Vector CLHEP::rotationOf ( const Hep3Vector & vec,
const HepAxisAngle & ax )

Definition at line 121 of file SpaceVectorR.cc.

121 {
122 Hep3Vector vv(vec);
123 return vv.rotate (ax);
124}

◆ rotationOf() [3/8]

Hep3Vector CLHEP::rotationOf ( const Hep3Vector & vec,
const HepEulerAngles & e )

Definition at line 132 of file SpaceVectorR.cc.

132 {
133 Hep3Vector vv(vec);
134 return vv.rotate (ex);
135}

◆ rotationOf() [4/8]

Hep3Vector CLHEP::rotationOf ( const Hep3Vector & vec,
double phi,
double theta,
double psi )

Definition at line 137 of file SpaceVectorR.cc.

138 {
139 Hep3Vector vv(vec);
140 return vv.rotate(phi, theta, psi);
141}

◆ rotationOf() [5/8]

HepLorentzVector CLHEP::rotationOf ( const HepLorentzVector & vec,
const Hep3Vector & axis,
double delta )

Definition at line 43 of file LorentzVectorR.cc.

45 {
46 HepLorentzVector vv (vec);
47 return vv.rotate (aaxis, ddelta);
48}

◆ rotationOf() [6/8]

HepLorentzVector CLHEP::rotationOf ( const HepLorentzVector & vec,
const HepAxisAngle & ax )

Definition at line 50 of file LorentzVectorR.cc.

51 {
52 HepLorentzVector vv (vec);
53 return vv.rotate (ax);
54}

◆ rotationOf() [7/8]

HepLorentzVector CLHEP::rotationOf ( const HepLorentzVector & vec,
const HepEulerAngles & e )

Definition at line 56 of file LorentzVectorR.cc.

57 {
58 HepLorentzVector vv (vec);
59 return vv.rotate (e1);
60}

◆ rotationOf() [8/8]

HepLorentzVector CLHEP::rotationOf ( const HepLorentzVector & vec,
double phi,
double theta,
double psi )

Definition at line 62 of file LorentzVectorR.cc.

65 {
66 HepLorentzVector vv (vec);
67 return vv.rotate (phi1, theta1, psi1);
68}

◆ rotationXOf() [1/2]

Hep3Vector CLHEP::rotationXOf ( const Hep3Vector & vec,
double delta )

Definition at line 143 of file SpaceVectorR.cc.

143 {
144 Hep3Vector vv(vec);
145 return vv.rotateX (ddelta);
146}

◆ rotationXOf() [2/2]

HepLorentzVector CLHEP::rotationXOf ( const HepLorentzVector & vec,
double delta )

Definition at line 25 of file LorentzVectorB.cc.

26 {
27 HepLorentzVector vv (vec);
28 return vv.rotateX (phi);
29}

◆ rotationYOf() [1/2]

Hep3Vector CLHEP::rotationYOf ( const Hep3Vector & vec,
double delta )

Definition at line 148 of file SpaceVectorR.cc.

148 {
149 Hep3Vector vv(vec);
150 return vv.rotateY (ddelta);
151}

◆ rotationYOf() [2/2]

HepLorentzVector CLHEP::rotationYOf ( const HepLorentzVector & vec,
double delta )

Definition at line 31 of file LorentzVectorB.cc.

32 {
33 HepLorentzVector vv (vec);
34 return vv.rotateY (phi);
35}

◆ rotationZOf() [1/2]

Hep3Vector CLHEP::rotationZOf ( const Hep3Vector & vec,
double delta )

Definition at line 153 of file SpaceVectorR.cc.

153 {
154 Hep3Vector vv(vec);
155 return vv.rotateZ (ddelta);
156}

◆ rotationZOf() [2/2]

HepLorentzVector CLHEP::rotationZOf ( const HepLorentzVector & vec,
double delta )

Definition at line 37 of file LorentzVectorB.cc.

38 {
39 HepLorentzVector vv (vec);
40 return vv.rotateZ (phi);
41}

◆ transformSmall()

double CLHEP::transformSmall ( double r)

Definition at line 218 of file flatToGaussian.cc.

218 {
219
220 // Solve for -v in the asymtotic formula
221 //
222 // errInt (-v) = exp(-v*v/2) 1 1*3 1*3*5
223 // ------------ * (1 - ---- + ---- - ----- + ... )
224 // v*sqrt(2*pi) v**2 v**4 v**6
225
226 // The value of r (=errInt(-v)) supplied is going to less than 2.0E-13,
227 // which is such that v < -7.25. Since the value of r is meaningful only
228 // to an absolute error of 1E-16 (double precision accuracy for a number
229 // which on the high side could be of the form 1-epsilon), computing
230 // v to more than 3-4 digits of accuracy is suspect; however, to ensure
231 // smoothness with the table generator (which uses quite a few terms) we
232 // also use terms up to 1*3*5* ... *13/v**14, and insist on accuracy of
233 // solution at the level of 1.0e-7.
234
235 // This routine is called less than one time in a trillion firings, so
236 // speed is of no concern. As a matter of technique, we terminate the
237 // iterations in case they would be infinite, but this should not happen.
238
239 double eps = 1.0e-7;
240 double guess = 7.5;
241 double v;
242
243 for ( int i = 1; i < 50; i++ ) {
244 double vn2 = 1.0/(guess*guess);
245 double s1 = -13*11*9*7*5*3 * vn2*vn2*vn2*vn2*vn2*vn2*vn2;
246 s1 += 11*9*7*5*3 * vn2*vn2*vn2*vn2*vn2*vn2;
247 s1 += -9*7*5*3 * vn2*vn2*vn2*vn2*vn2;
248 s1 += 7*5*3 * vn2*vn2*vn2*vn2;
249 s1 += -5*3 * vn2*vn2*vn2;
250 s1 += 3 * vn2*vn2 - vn2 + 1.0;
251 v = std::sqrt ( 2.0 * std::log ( s1 / (r*guess*std::sqrt(CLHEP::twopi)) ) );
252 if ( std::abs(v-guess) < eps ) break;
253 guess = v;
254 }
255
256 return -v;
257
258} // transformSmall()

Referenced by CLHEP::HepStat::flatToGaussian().

◆ ZMinput2doubles()

void CLHEP::ZMinput2doubles ( std::istream & is,
const char * type,
double & x,
double & y )

Definition at line 243 of file ZMinput.cc.

244 {
245
246// Accepted formats are
247// x y
248// x, y (comma is optional, and whitespace ignored if comma present)
249// ( x, y ) (comma optional)
250
251 char c;
252 bool parenthesis = false;
253
254 if ( !eatwhitespace(is) ) {
255 std::cerr << "istream ended before trying to input " << type << "\n";
256 return;
257 }
258
259 if ( !is.get(c) ) { fouledup(); return; }
260 if ( c == '(' ) {
261 parenthesis = true;
262 if ( !eatwhitespace(is) ) {
263 std::cerr << "istream ended after ( trying to input " << type << "\n";
264 return;
265 }
266 } else {
267 is.putback(c);
268 }
269
270 // At this point, parenthesis or not, the next item read is supposed to
271 // be the number x.
272
273 if (!(is >> x)) {
274 std::cerr << "Could not read first value in input of " << type << "\n";
275 return;
276 }
277
278 if ( !eatwhitespace(is) ) {
279 std::cerr << "istream ended before second value of " << type << "\n";
280 return;
281 }
282
283 if ( !is.get(c) ) { fouledup(); return; }
284 if ( c == ',' ) {
285 if ( !eatwhitespace(is) ) {
286 std::cerr << "istream ended ater one value and comma in "
287 << type << "\n";
288 return;
289 }
290 } else {
291 is.putback(c);
292 }
293
294 // At this point, comma or not, the next item read is supposed to
295 // be the number y.
296
297 if (!(is >> y)) {
298 std::cerr << "Could not read second value in input of " << type << "\n";
299 return;
300 }
301
302 // Finally, check for the closing parenthesis if there was an open paren.
303
304 if (parenthesis) {
305 if ( !eatwhitespace(is) ) {
306 std::cerr << "No closing parenthesis in input of " << type << "\n";
307 return;
308 }
309 if ( !is.get(c) ) { fouledup(); return; }
310 if ( c != ')' ) {
311 std::cerr << "Missing closing parenthesis in input of "
312 << type << "\n";
313 // Now a trick to do (as nearly as we can) what
314 // is.putback(c); is.setstate(std::ios_base::failbit);
315 // would do (because using ios_base will confuse old CLHEP compilers):
316 if ( isdigit(c) || (c=='-') || (c=='+') ) {
317 is.putback('@');
318 } else {
319 is.putback('c');
320 }
321 int m;
322 is >> m; // This fails, leaving the state bad, and the istream
323 // otherwise unchanged, except if the next char might
324 // have started a valid int, it turns to @
325 return;
326 }
327 }
328
329 return;
330
331}

Referenced by operator>>().

◆ ZMinput3doubles()

void CLHEP::ZMinput3doubles ( std::istream & is,
const char * type,
double & x,
double & y,
double & z )

Definition at line 42 of file ZMinput.cc.

43 {
44
45// Accepted formats are
46// x y z
47// x, y, z (each comma is optional, and whitespace ignored if comma present)
48// ( x, y, z ) (commas optional)
49
50 char c;
51 bool parenthesis = false;
52
53 if ( !eatwhitespace(is) ) {
54 std::cerr << "istream ended before trying to input " << type << "\n";
55 return;
56 }
57
58 if ( !is.get(c) ) { fouledup(); return; }
59 if ( c == '(' ) {
60 parenthesis = true;
61 if ( !eatwhitespace(is) ) {
62 std::cerr << "istream ended after ( trying to input " << type << "\n";
63 return;
64 }
65 } else {
66 is.putback(c);
67 }
68
69 // At this point, parenthesis or not, the next item read is supposed to
70 // be the number x.
71
72 if (!(is >> x)) {
73 std::cerr << "Could not read first value in input of " << type << "\n";
74 return;
75 }
76
77 if ( !eatwhitespace(is) ) {
78 std::cerr << "istream ended before second value of " << type << "\n";
79 return;
80 }
81
82 if ( !is.get(c) ) { fouledup(); return; }
83 if ( c == ',' ) {
84 if ( !eatwhitespace(is) ) {
85 std::cerr << "istream ended ater one value and comma in "
86 << type << "\n";
87 return;
88 }
89 } else {
90 is.putback(c);
91 }
92
93 // At this point, comma or not, the next item read is supposed to
94 // be the number y.
95
96 if (!(is >> y)) {
97 std::cerr << "Could not read second value in input of " << type << "\n";
98 return;
99 }
100
101 if ( !eatwhitespace(is) ) {
102 std::cerr << "istream ended before third value of " << type << "\n";
103 return;
104 }
105
106 if ( !is.get(c) ) { fouledup(); return; }
107 if ( c == ',' ) {
108 if ( !eatwhitespace(is) ) {
109 std::cerr << "istream ended ater two values and comma in "
110 << type << "\n";
111 return;
112 }
113 } else {
114 is.putback(c);
115 }
116
117 // At this point, comma or not, the next item read is supposed to
118 // be the number z.
119
120 if (!(is >> z)) {
121 std::cerr << "Could not read third value in input of " << type << "\n";
122 return;
123 }
124
125 // Finally, check for the closing parenthesis if there was an open paren.
126
127 if (parenthesis) {
128 if ( !eatwhitespace(is) ) {
129 std::cerr << "No closing parenthesis in input of " << type << "\n";
130 return;
131 }
132 if ( !is.get(c) ) { fouledup(); return; }
133 if ( c != ')' ) {
134 std::cerr << "Missing closing parenthesis in input of "
135 << type << "\n";
136 // Now a trick to do (as nearly as we can) what
137 // is.putback(c); is.setstate(std::ios_base::failbit);
138 // would do (because using ios_base will confuse old CLHEP compilers):
139 if ( isdigit(c) || (c=='-') || (c=='+') ) {
140 is.putback('@');
141 } else {
142 is.putback('c');
143 }
144 int m;
145 is >> m; // This fails, leaving the state bad, and the istream
146 // otherwise unchanged, except if the next char might
147 // have started a valid int, it turns to @
148 return;
149 }
150 }
151
152 return;
153
154}

Referenced by operator>>(), and ZMinputAxisAngle().

◆ ZMinputAxisAngle()

void CLHEP::ZMinputAxisAngle ( std::istream & is,
double & x,
double & y,
double & z,
double & delta )

Definition at line 156 of file ZMinput.cc.

158 {
159// Accepted formats are
160// parenthesis optional, then
161// any acceptable format for a Hep3Vector, then
162// optional comma, then
163// delta, then
164// close parenthesis if opened at start.
165//
166// But if there is an open parenthesis, it must be for the overall
167// object. That is, if the axis has parentheses, the form must be
168// ( (x,y,z) , delta )
169
170 char c;
171 bool parenthesis = false;
172
173 if ( !eatwhitespace(is) ) {
174 std::cerr << "istream ended before trying to input AxisAngle \n";
175 return;
176 }
177
178 if ( !is.get(c) ) { fouledup(); return; }
179 if ( c == '(' ) {
180 parenthesis = true;
181 if ( !eatwhitespace(is) ) {
182 std::cerr << "istream ended after ( trying to input AxisAngle \n";
183 return;
184 }
185 } else {
186 is.putback(c);
187 }
188
189 // At this point, parenthesis or not, the next item read is supposed to
190 // be a valid Hep3Vector axis.
191
192 ZMinput3doubles ( is, "axis of AxisAngle", x, y, z );
193 if (!is) return;
194
195 if ( !eatwhitespace(is) ) {
196 std::cerr << "istream ended before delta of AxisAngle \n";
197 return;
198 }
199
200 if ( !is.get(c) ) { fouledup(); return; }
201 if ( c == ',' ) {
202 if ( !eatwhitespace(is) ) {
203 std::cerr << "istream ended ater axis and comma in AxisAngle \n";
204 return;
205 }
206 } else {
207 is.putback(c);
208 }
209
210 // At this point, comma or not, the next item read is supposed to
211 // be the number delta.
212
213 if (!(is >> delta)) {
214 std::cerr << "Could not delta value in input of AxisAngle \n";
215 return;
216 }
217
218 // Finally, check for the closing parenthesis if there was an open paren.
219
220 if (parenthesis) {
221 if ( !eatwhitespace(is) ) {
222 std::cerr << "No closing parenthesis in input of AxisAngle \n";
223 return;
224 }
225 if ( !is.get(c) ) { fouledup(); return; }
226 if ( c != ')' ) {
227 std::cerr << "Missing closing parenthesis in input of AxisAngle \n";
228 if ( isdigit(c) || (c=='-') || (c=='+') ) {
229 is.putback('@');
230 } else {
231 is.putback('c');
232 }
233 int m;
234 is >> m; // This fails, leaving the state bad.
235 return;
236 }
237 }
238
239 return;
240
241}

Variable Documentation

◆ HepXHat

◆ HepYHat

◆ HepZHat