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

Namespaces

namespace  detail
 
namespace  sp
 
namespace  tt
 

Classes

struct  add_const
 
struct  add_cv
 
struct  add_lvalue_reference
 
struct  add_pointer
 
struct  add_rvalue_reference
 
struct  add_volatile
 
class  bad_weak_ptr
 
struct  conditional
 
struct  conditional< false, T, F >
 
struct  conditional< true, T, F >
 
struct  do_nothing_deleter
 
class  DoubConv
 
class  DoubConvException
 
class  DualRand
 
struct  enable_if
 
struct  enable_if< false, T >
 
struct  enable_if< true, T >
 
struct  enable_if_auto_ptr
 
struct  enable_if_auto_ptr< std::auto_ptr< P >, R >
 
struct  enable_if_convertible
 
struct  enable_if_ptr_convertible
 
class  enable_shared_from_this
 
class  enable_shared_from_this2
 
class  EngineFactory
 
struct  extent
 
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
 
struct  integral_constant
 
struct  is_abstract
 
struct  is_arithmetic
 
struct  is_array
 
struct  is_class
 
struct  is_compound
 
struct  is_const
 
struct  is_convertible
 
struct  is_convertible< const void, const void >
 
struct  is_convertible< const void, T >
 
struct  is_convertible< const volatile void, const volatile void >
 
struct  is_convertible< const volatile void, T >
 
struct  is_convertible< From, To[N]>
 
struct  is_convertible< From[N], To >
 
struct  is_convertible< T, const void >
 
struct  is_convertible< T, const volatile void >
 
struct  is_convertible< T, void >
 
struct  is_convertible< T, volatile void >
 
struct  is_convertible< void, T >
 
struct  is_convertible< void, void >
 
struct  is_convertible< volatile void, T >
 
struct  is_convertible< volatile void, volatile void >
 
struct  is_enum
 
struct  is_floating_point
 
struct  is_function
 
struct  is_fundamental
 
struct  is_integral
 
struct  is_lvalue_reference
 
struct  is_member_function_pointer
 
struct  is_member_object_pointer
 
struct  is_member_pointer
 
struct  is_object
 
struct  is_pointer
 
struct  is_ptr_convertible
 
struct  is_reference
 
struct  is_rvalue_reference
 
struct  is_same
 
struct  is_same< T, T >
 
struct  is_scalar
 
struct  is_signed
 
struct  is_signed< int >
 
struct  is_signed< long >
 
struct  is_signed< short >
 
struct  is_signed< signed char >
 
struct  is_signed< T const >
 
struct  is_signed< T const volatile >
 
struct  is_signed< T volatile >
 
struct  is_union
 
struct  is_unsigned
 
struct  is_unsigned< T const >
 
struct  is_unsigned< T const volatile >
 
struct  is_unsigned< T volatile >
 
struct  is_unsigned< unsigned char >
 
struct  is_unsigned< unsigned int >
 
struct  is_unsigned< unsigned long >
 
struct  is_unsigned< unsigned short >
 
struct  is_void
 
struct  is_volatile
 
class  MTwistEngine
 
class  noncopyable
 
class  NonRandomEngine
 
class  RandBinomial
 
class  RandBit
 
class  RandBreitWigner
 
class  RandChiSquare
 
class  RandExponential
 
class  RandFlat
 
class  RandGamma
 
class  RandGauss
 
class  RandGaussQ
 
class  RandGeneral
 
class  RandLandau
 
class  RandPoisson
 
class  RandPoissonQ
 
class  RandStudentT
 
class  RanecuEngine
 
struct  rank
 
class  Ranlux64Engine
 
class  RanluxEngine
 
class  RanshiEngine
 
struct  remove_all_extents
 
struct  remove_const
 
struct  remove_cv
 
struct  remove_extent
 
struct  remove_pointer
 
struct  remove_reference
 
struct  remove_volatile
 
class  shared_ptr
 
class  StaticRandomStates
 
class  Tcomponent
 
class  weak_ptr
 

Typedefs

typedef integral_constant< bool, true > true_type
 
typedef integral_constant< bool, false > false_type
 
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)
 
template<typename P , typename P2 >
bool operator== (shared_ptr< P > const &, shared_ptr< P2 > const &)
 
template<typename P , typename P2 >
bool operator!= (shared_ptr< P > const &, shared_ptr< P2 > const &)
 
template<typename P , typename P2 >
bool operator< (shared_ptr< P > const &, shared_ptr< P2 > const &)
 
template<typename P >
void swap (shared_ptr< P > &, shared_ptr< P > &)
 
template<typename P , typename P2 >
shared_ptr< P > static_pointer_cast (shared_ptr< P2 > const &)
 
template<typename P , typename P2 >
shared_ptr< P > const_pointer_cast (shared_ptr< P2 > const &)
 
template<typename P , typename P2 >
shared_ptr< P > dynamic_pointer_cast (shared_ptr< P2 > const &)
 
template<typename P >
P * get_pointer (shared_ptr< P > const &)
 
template<typename D , typename P >
D * get_deleter (shared_ptr< P > const &)
 
template<typename C , typename T , typename P >
std::basic_ostream< C, T > & operator<< (std::basic_ostream< C, T > &, shared_ptr< P > const &)
 
template<typename P , typename P2 >
bool operator< (weak_ptr< P > const &a, weak_ptr< P2 > const &b)
 
template<typename P >
void swap (weak_ptr< P > &a, weak_ptr< P > &b)
 
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 &, const Hep2Vector &)
 
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

◆ false_type

typedef integral_constant<bool, false > CLHEP::false_type

Definition at line 33 of file type_traits.h.

◆ HepLorentzVectorD

Definition at line 550 of file LorentzVector.h.

◆ HepLorentzVectorF

Definition at line 551 of file LorentzVector.h.

◆ HepThreeVectorD

Definition at line 426 of file ThreeVector.h.

◆ HepThreeVectorF

Definition at line 427 of file ThreeVector.h.

◆ true_type

typedef integral_constant<bool, true > CLHEP::true_type

Definition at line 32 of file type_traits.h.

Enumeration Type Documentation

◆ ZMpvMetric_t

Enumerator
TimePositive 
TimeNegative 

Definition at line 64 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

◆ const_pointer_cast()

template<typename P , typename P2 >
shared_ptr< P > CLHEP::const_pointer_cast ( shared_ptr< P2 > const other)
inline

Definition at line 1261 of file memory.h.

1262{
1263 return shared_ptr<P>( other, sp::const_cast_tag() );
1264}

◆ crc32ul()

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

Definition at line 37 of file engineIDulong.cc.

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

Referenced by engineIDulong().

◆ dynamic_pointer_cast()

template<typename P , typename P2 >
shared_ptr< P > CLHEP::dynamic_pointer_cast ( shared_ptr< P2 > const other)
inline

Definition at line 1268 of file memory.h.

1269{
1270 return shared_ptr<P>( other, sp::dynamic_cast_tag() );
1271}

◆ engineIDulong()

template<class E >
unsigned long CLHEP::engineIDulong ( )

Definition at line 24 of file engineIDulong.h.

24 {
25 static unsigned long id = crc32ul(E::engineName());
26 return id;
27}
unsigned long crc32ul(const std::string &s)

◆ gammln()

double CLHEP::gammln ( double  xx)

Definition at line 54 of file RandPoisson.cc.

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

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

◆ get_deleter()

template<typename D , typename P >
D * CLHEP::get_deleter ( shared_ptr< P > const p)
inline

Definition at line 1282 of file memory.h.

1283{
1284 return static_cast<D*>( p._internal_get_deleter( typeid(D)) );
1285}
void * _internal_get_deleter(std::type_info const &) const
Definition: memory.h:1212

◆ get_pointer()

template<typename P >
P * CLHEP::get_pointer ( shared_ptr< P > const p)
inline

Definition at line 1275 of file memory.h.

1276{
1277 return p.get();
1278}
P * get() const
Definition: memory.h:1183

◆ 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/3]

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

Definition at line 366 of file LorentzRotation.h.

367 { return lt!=b; }

◆ operator!=() [2/3]

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

Definition at line 353 of file LorentzRotation.h.

354 { return lt!=r; }

◆ operator!=() [3/3]

template<typename P , typename P2 >
bool CLHEP::operator!= ( shared_ptr< P > const a,
shared_ptr< P2 > const b 
)
inline

Definition at line 1233 of file memory.h.

1234{
1235 return a.get() != b.get();
1236}

◆ 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 264 of file LorentzRotation.cc.

265 {
266 r.rep4x4();
267 lt.rep4x4();
269 r.xx()*lt.xx() + r.xy()*lt.yx() + r.xz()*lt.zx() + r.xt()*lt.tx(),
270 r.xx()*lt.xy() + r.xy()*lt.yy() + r.xz()*lt.zy() + r.xt()*lt.ty(),
271 r.xx()*lt.xz() + r.xy()*lt.yz() + r.xz()*lt.zz() + r.xt()*lt.tz(),
272 r.xx()*lt.xt() + r.xy()*lt.yt() + r.xz()*lt.zt() + r.xt()*lt.tt(),
273
274 r.yx()*lt.xx() + r.yy()*lt.yx() + r.yz()*lt.zx() + r.yt()*lt.tx(),
275 r.yx()*lt.xy() + r.yy()*lt.yy() + r.yz()*lt.zy() + r.yt()*lt.ty(),
276 r.yx()*lt.xz() + r.yy()*lt.yz() + r.yz()*lt.zz() + r.yt()*lt.tz(),
277 r.yx()*lt.xt() + r.yy()*lt.yt() + r.yz()*lt.zt() + r.yt()*lt.tt(),
278
279 r.zx()*lt.xx() + r.zy()*lt.yx() + r.zz()*lt.zx() + r.zt()*lt.tx(),
280 r.zx()*lt.xy() + r.zy()*lt.yy() + r.zz()*lt.zy() + r.zt()*lt.ty(),
281 r.zx()*lt.xz() + r.zy()*lt.yz() + r.zz()*lt.zz() + r.zt()*lt.tz(),
282 r.zx()*lt.xt() + r.zy()*lt.yt() + r.zz()*lt.zt() + r.zt()*lt.tt(),
283
284 r.tx()*lt.xx() + r.ty()*lt.yx() + r.tz()*lt.zx() + r.tt()*lt.tx(),
285 r.tx()*lt.xy() + r.ty()*lt.yy() + r.tz()*lt.zy() + r.tt()*lt.ty(),
286 r.tx()*lt.xz() + r.ty()*lt.yz() + r.tz()*lt.zz() + r.tt()*lt.tz(),
287 r.tx()*lt.xt() + r.ty()*lt.yt() + r.tz()*lt.zt() + r.tt()*lt.tt() ) );
288}
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 335 of file ThreeVector.cc.

335 {
336// if (c == 0) {
337// std::cerr << "Hep3Vector::operator/ () - "
338// << "Attempt to divide vector by 0 -- "
339// << "will produce infinities and/or NANs" << std::endl;
340// }
341 double oneOverC = 1.0/c;
342 return Hep3Vector ( v1.x() * oneOverC,
343 v1.y() * oneOverC,
344 v1.z() * oneOverC );
345} /* v / c */
double z() const
double x() const
double y() const

◆ operator/() [3/3]

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

Definition at line 165 of file LorentzVector.cc.

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

◆ operator<() [1/4]

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

Definition at line 372 of file LorentzRotation.h.

373 { return lt<b; }

◆ operator<() [2/4]

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

Definition at line 359 of file LorentzRotation.h.

360 { return lt<r; }

◆ operator<() [3/4]

template<typename P , typename P2 >
bool CLHEP::operator< ( shared_ptr< P > const a,
shared_ptr< P2 > const b 
)
inline

Definition at line 1239 of file memory.h.

1241{
1242 return a._internal_less(b);
1243}
bool _internal_less(shared_ptr< P2 > const &) const
Definition: memory.h:1205

◆ operator<() [4/4]

template<typename P , typename P2 >
bool CLHEP::operator< ( weak_ptr< P > const a,
weak_ptr< P2 > const b 
)
inline

Definition at line 1459 of file memory.h.

1461{
1462 return a._internal_less(b);
1463}
bool _internal_less(weak_ptr< P2 > const &rhs) const
Definition: memory.h:1453

◆ operator<<() [1/17]

template<typename C , typename T , typename P >
std::basic_ostream< C, T > & CLHEP::operator<< ( std::basic_ostream< C, T > &  os,
shared_ptr< P > const p 
)
inline

Definition at line 1282 of file memory.h.

1290{
1291 os << p.get();
1292 return os;
1293}

◆ operator<<() [2/17]

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<<() [3/17]

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

Definition at line 100 of file ThreeVector.cc.

100 {
101 return os << "(" << v.x() << "," << v.y() << "," << v.z() << ")";
102}

◆ operator<<() [4/17]

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

Definition at line 90 of file LorentzVector.cc.

91{
92 return os << "(" << v1.x() << "," << v1.y() << "," << v1.z()
93 << ";" << v1.t() << ")";
94}

◆ operator<<() [5/17]

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

Definition at line 85 of file AxisAngle.cc.

85 {
86 os << '(' << aa.axis() << ", " << aa.delta() << ')';
87 return os;
88} // operator<<()
double delta() const
Hep3Vector axis() const

◆ operator<<() [6/17]

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

Definition at line 240 of file Boost.h.

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

◆ operator<<() [7/17]

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

Definition at line 214 of file BoostX.h.

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

◆ operator<<() [8/17]

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

Definition at line 215 of file BoostY.h.

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

◆ operator<<() [9/17]

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

Definition at line 214 of file BoostZ.h.

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

◆ operator<<() [10/17]

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

Definition at line 100 of file EulerAngles.cc.

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

◆ operator<<() [11/17]

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

Definition at line 347 of file LorentzRotation.h.

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

◆ operator<<() [12/17]

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

Definition at line 116 of file Random.cc.

116 {
117 return dist.put(os);
118}
virtual std::ostream & put(std::ostream &os) const
Definition: Random.cc:124

◆ operator<<() [13/17]

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

Definition at line 98 of file RandomEngine.cc.

98 {
99 return e.put(os);
100}
virtual std::ostream & put(std::ostream &os) const
Definition: RandomEngine.cc:57

◆ operator<<() [14/17]

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

Definition at line 409 of file Rotation.h.

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

◆ operator<<() [15/17]

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

Definition at line 277 of file RotationX.h.

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

◆ operator<<() [16/17]

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

Definition at line 277 of file RotationY.h.

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

◆ operator<<() [17/17]

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

Definition at line 277 of file RotationZ.h.

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

◆ operator<=() [1/2]

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

Definition at line 368 of file LorentzRotation.h.

369 { return lt<=b; }

◆ operator<=() [2/2]

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

Definition at line 355 of file LorentzRotation.h.

356 { return lt<=r; }

◆ operator==() [1/3]

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

Definition at line 364 of file LorentzRotation.h.

365 { return lt==b; }

◆ operator==() [2/3]

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

Definition at line 351 of file LorentzRotation.h.

352 { return lt==r; }

◆ operator==() [3/3]

template<typename P , typename P2 >
bool CLHEP::operator== ( shared_ptr< P > const a,
shared_ptr< P2 > const b 
)
inline

Definition at line 1226 of file memory.h.

1227{
1228 return a.get() == b.get();
1229}

◆ operator>() [1/2]

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

Definition at line 374 of file LorentzRotation.h.

375 { return lt>b; }

◆ operator>() [2/2]

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

Definition at line 361 of file LorentzRotation.h.

362 { return lt>r; }

◆ operator>=() [1/2]

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

Definition at line 370 of file LorentzRotation.h.

371 { return lt>=b; }

◆ operator>=() [2/2]

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

Definition at line 357 of file LorentzRotation.h.

358 { 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 107 of file ThreeVector.cc.

107 {
108 double x, y, z;
109 ZMinput3doubles ( is, "Hep3Vector", x, y, z );
110 v.set(x, y, z);
111 return is;
112} // 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 96 of file LorentzVector.cc.

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

◆ operator>>() [4/7]

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

Definition at line 95 of file AxisAngle.cc.

95 {
96 Hep3Vector axis;
97 double delta;
98 double x,y,z;
99 ZMinputAxisAngle ( is, x, y, z, delta );
100 axis.set(x,y,z);
101 aa.set ( axis, delta );
102 return is;
103} // 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 109 of file EulerAngles.cc.

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

◆ operator>>() [6/7]

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

Definition at line 120 of file Random.cc.

120 {
121 return dist.get(is);
122}
virtual std::istream & get(std::istream &is)
Definition: Random.cc:125

◆ operator>>() [7/7]

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

Definition at line 102 of file RandomEngine.cc.

102 {
103 return e.get(is);
104}
virtual std::istream & get(std::istream &is)
Definition: RandomEngine.cc:61

◆ possibleKeywordInput()

◆ rotationOf() [1/8]

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

Definition at line 132 of file SpaceVectorR.cc.

133 {
134 Hep3Vector vv(vec);
135 return vv.rotate(axis, ddelta);
136}

◆ rotationOf() [2/8]

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

Definition at line 127 of file SpaceVectorR.cc.

127 {
128 Hep3Vector vv(vec);
129 return vv.rotate (ax);
130}

◆ rotationOf() [3/8]

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

Definition at line 138 of file SpaceVectorR.cc.

138 {
139 Hep3Vector vv(vec);
140 return vv.rotate (ex);
141}

◆ rotationOf() [4/8]

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

Definition at line 143 of file SpaceVectorR.cc.

144 {
145 Hep3Vector vv(vec);
146 return vv.rotate(phi, theta, psi);
147}

◆ rotationOf() [5/8]

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

Definition at line 47 of file LorentzVectorR.cc.

49 {
50 HepLorentzVector vv (vec);
51 return vv.rotate (aaxis, ddelta);
52}

◆ rotationOf() [6/8]

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

Definition at line 54 of file LorentzVectorR.cc.

55 {
56 HepLorentzVector vv (vec);
57 return vv.rotate (ax);
58}

◆ rotationOf() [7/8]

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

Definition at line 60 of file LorentzVectorR.cc.

61 {
62 HepLorentzVector vv (vec);
63 return vv.rotate (e1);
64}

◆ rotationOf() [8/8]

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

Definition at line 66 of file LorentzVectorR.cc.

69 {
70 HepLorentzVector vv (vec);
71 return vv.rotate (phi1, theta1, psi1);
72}

◆ rotationXOf() [1/2]

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

Definition at line 149 of file SpaceVectorR.cc.

149 {
150 Hep3Vector vv(vec);
151 return vv.rotateX (ddelta);
152}

◆ rotationXOf() [2/2]

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

Definition at line 27 of file LorentzVectorB.cc.

28 {
29 HepLorentzVector vv (vec);
30 return vv.rotateX (phi);
31}

◆ rotationYOf() [1/2]

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

Definition at line 154 of file SpaceVectorR.cc.

154 {
155 Hep3Vector vv(vec);
156 return vv.rotateY (ddelta);
157}

◆ rotationYOf() [2/2]

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

Definition at line 33 of file LorentzVectorB.cc.

34 {
35 HepLorentzVector vv (vec);
36 return vv.rotateY (phi);
37}

◆ rotationZOf() [1/2]

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

Definition at line 159 of file SpaceVectorR.cc.

159 {
160 Hep3Vector vv(vec);
161 return vv.rotateZ (ddelta);
162}

◆ rotationZOf() [2/2]

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

Definition at line 39 of file LorentzVectorB.cc.

40 {
41 HepLorentzVector vv (vec);
42 return vv.rotateZ (phi);
43}

◆ static_pointer_cast()

template<typename P , typename P2 >
shared_ptr< P > CLHEP::static_pointer_cast ( shared_ptr< P2 > const other)
inline

Definition at line 1254 of file memory.h.

1255{
1256 return shared_ptr<P>( other, sp::static_cast_tag() );
1257}

◆ swap() [1/2]

template<typename P >
void CLHEP::swap ( shared_ptr< P > &  a,
shared_ptr< P > &  b 
)
inline

Definition at line 1247 of file memory.h.

1248{
1249 a.swap( b );
1250}
void swap(shared_ptr< P > &)
Definition: memory.h:972

◆ swap() [2/2]

template<typename P >
void CLHEP::swap ( weak_ptr< P > &  a,
weak_ptr< P > &  b 
)
inline

Definition at line 1467 of file memory.h.

1468{
1469 a.swap(b);
1470}
void swap(this_type &other)
Definition: memory.h:1436

◆ transformSmall()

double CLHEP::transformSmall ( double  r)

Definition at line 219 of file flatToGaussian.cc.

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

const Hep3Vector CLHEP::HepYHat(0.0, 1.0, 0.0)

◆ HepZHat

const Hep3Vector CLHEP::HepZHat(0.0, 0.0, 1.0)