Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Data Structures | Typedefs | Enumerations | Functions | Variables
CLHEP Namespace Reference

Namespaces

 detail
 
 sp
 
 tt
 

Data Structures

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  RandExpZiggurat
 
class  RandFlat
 
class  RandGamma
 
class  RandGauss
 
class  RandGaussQ
 
class  RandGaussZiggurat
 
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

typedef integral_constant<bool, false > CLHEP::false_type

Definition at line 33 of file type_traits.h.

Definition at line 550 of file LorentzVector.h.

Definition at line 551 of file LorentzVector.h.

Definition at line 426 of file ThreeVector.h.

Definition at line 427 of file ThreeVector.h.

typedef integral_constant<bool, true > CLHEP::true_type

Definition at line 31 of file type_traits.h.

Enumeration Type Documentation

Enumerator
TimePositive 
TimeNegative 

Definition at line 64 of file LorentzVector.h.

Function Documentation

HepLorentzVector CLHEP::boostOf ( const HepLorentzVector &  vec,
const Hep3Vector &  betaVector 
)
inline
HepLorentzVector CLHEP::boostOf ( const HepLorentzVector &  vec,
const Hep3Vector &  axis,
double  beta 
)
inline
HepLorentzVector CLHEP::boostXOf ( const HepLorentzVector &  vec,
double  beta 
)
inline
HepLorentzVector CLHEP::boostYOf ( const HepLorentzVector &  vec,
double  beta 
)
inline
HepLorentzVector CLHEP::boostZOf ( const HepLorentzVector &  vec,
double  beta 
)
inline
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 }
unsigned long CLHEP::crc32ul ( const std::string &  s)

Definition at line 37 of file engineIDulong.cc.

References int().

Referenced by engineIDulong().

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 }
local const z_crc_t FAR crc_table[TBLS][256]
Definition: crc32.h:5
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
const XML_Char * s
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 }
template<class E >
unsigned long CLHEP::engineIDulong ( )

Definition at line 24 of file engineIDulong.h.

References crc32ul().

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

Definition at line 54 of file RandPoisson.cc.

References test::x.

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

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 }
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 }
const char * p
Definition: xmltok.h:285
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 }
const char * p
Definition: xmltok.h:285
const Hep3Vector CLHEP::HepXHat ( 1.  0,
0.  0,
0.  0 
)
const Hep3Vector CLHEP::HepYHat ( 0.  0,
1.  0,
0.  0 
)
const Hep3Vector CLHEP::HepZHat ( 0.  0,
0.  0,
1.  0 
)
HepBoostX CLHEP::inverseOf ( const HepBoostX &  b)
inline
HepBoostY CLHEP::inverseOf ( const HepBoostY &  b)
inline
HepBoostZ CLHEP::inverseOf ( const HepBoostZ &  b)
inline
HepRotationY CLHEP::inverseOf ( const HepRotationY &  r)
inline
HepRotationZ CLHEP::inverseOf ( const HepRotationZ &  r)
inline
HepRotationX CLHEP::inverseOf ( const HepRotationX &  r)
inline
HepBoost CLHEP::inverseOf ( const HepBoost &  lt)
inline
HepRotation CLHEP::inverseOf ( const HepRotation &  r)
inline
HepLorentzRotation CLHEP::inverseOf ( const HepLorentzRotation &  lt)
inline
bool CLHEP::operator!= ( const HepRotation &  r,
const HepLorentzRotation &  lt 
)
inline

Definition at line 353 of file LorentzRotation.h.

354  { return lt!=r; }
bool CLHEP::operator!= ( const HepBoost &  b,
const HepLorentzRotation &  lt 
)
inline

Definition at line 366 of file LorentzRotation.h.

References test::b.

367  { return lt!=b; }
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 }
double CLHEP::operator* ( const Hep2Vector &  a,
const Hep2Vector &  b 
)
inline
Hep2Vector CLHEP::operator* ( const Hep2Vector &  p,
double  a 
)
inline
HepRotation CLHEP::operator* ( const HepRotationX &  rx,
const HepRotation &  r 
)
inline
Hep2Vector CLHEP::operator* ( double  a,
const Hep2Vector &  p 
)
inline
HepLorentzRotation CLHEP::operator* ( const HepRotation &  r,
const HepLorentzRotation &  lt 
)

Definition at line 264 of file LorentzRotation.cc.

References CLHEP::HepLorentzRotation::rep4x4(), CLHEP::HepRotation::rep4x4(), CLHEP::HepLorentzRotation::tt(), CLHEP::HepRotation::tt(), CLHEP::HepLorentzRotation::tx(), CLHEP::HepRotation::tx(), CLHEP::HepLorentzRotation::ty(), CLHEP::HepRotation::ty(), CLHEP::HepLorentzRotation::tz(), CLHEP::HepRotation::tz(), CLHEP::HepLorentzRotation::xt(), CLHEP::HepRotation::xt(), CLHEP::HepRotation::xx(), CLHEP::HepLorentzRotation::xx(), CLHEP::HepRotation::xy(), CLHEP::HepLorentzRotation::xy(), CLHEP::HepRotation::xz(), CLHEP::HepLorentzRotation::xz(), CLHEP::HepLorentzRotation::yt(), CLHEP::HepRotation::yt(), CLHEP::HepRotation::yx(), CLHEP::HepLorentzRotation::yx(), CLHEP::HepRotation::yy(), CLHEP::HepLorentzRotation::yy(), CLHEP::HepRotation::yz(), CLHEP::HepLorentzRotation::yz(), CLHEP::HepLorentzRotation::zt(), CLHEP::HepRotation::zt(), CLHEP::HepRotation::zx(), CLHEP::HepLorentzRotation::zx(), CLHEP::HepRotation::zy(), CLHEP::HepLorentzRotation::zy(), CLHEP::HepRotation::zz(), and CLHEP::HepLorentzRotation::zz().

265  {
266  r.rep4x4();
267  lt.rep4x4();
268  return HepLorentzRotation( HepRep4x4(
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 }
HepRotation CLHEP::operator* ( const HepRotationY &  ry,
const HepRotation &  r 
)
inline
HepRotation CLHEP::operator* ( const HepRotationZ &  rz,
const HepRotation &  r 
)
inline
HepLorentzRotation CLHEP::operator* ( const HepRotationX &  r,
const HepLorentzRotation &  lt 
)
HepLorentzRotation CLHEP::operator* ( const HepRotationY &  r,
const HepLorentzRotation &  lt 
)
HepLorentzRotation CLHEP::operator* ( const HepRotationZ &  r,
const HepLorentzRotation &  lt 
)
double CLHEP::operator* ( const Hep3Vector &  ,
const Hep3Vector &   
)
inline
Hep3Vector CLHEP::operator* ( const Hep3Vector &  ,
double  a 
)
inline
Hep3Vector CLHEP::operator* ( double  a,
const Hep3Vector &   
)
inline
HepLorentzVector CLHEP::operator* ( const HepLorentzVector &  ,
double  a 
)
inline
HepLorentzVector CLHEP::operator* ( double  a,
const HepLorentzVector &   
)
inline
Hep2Vector CLHEP::operator+ ( const Hep2Vector &  a,
const Hep2Vector &  b 
)
inline
Hep3Vector CLHEP::operator+ ( const Hep3Vector &  ,
const Hep3Vector &   
)
inline
Hep2Vector CLHEP::operator- ( const Hep2Vector &  a,
const Hep2Vector &  b 
)
inline
Hep3Vector CLHEP::operator- ( const Hep3Vector &  ,
const Hep3Vector &   
)
inline
Hep2Vector CLHEP::operator/ ( const Hep2Vector &  p,
double  a 
)

Definition at line 61 of file TwoVector.cc.

References test::a, CLHEP::Hep2Vector::x(), and CLHEP::Hep2Vector::y().

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 }
const char * p
Definition: xmltok.h:285
Hep3Vector CLHEP::operator/ ( const Hep3Vector &  v1,
double  a 
)

Definition at line 335 of file ThreeVector.cc.

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

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 */
HepLorentzVector CLHEP::operator/ ( const HepLorentzVector &  w,
double  a 
)

Definition at line 165 of file LorentzVector.cc.

References test::c, CLHEP::HepLorentzVector::getT(), and CLHEP::HepLorentzVector::getV().

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 */
bool CLHEP::operator< ( const HepRotation &  r,
const HepLorentzRotation &  lt 
)
inline

Definition at line 359 of file LorentzRotation.h.

360  { return lt<r; }
bool CLHEP::operator< ( const HepBoost &  b,
const HepLorentzRotation &  lt 
)
inline

Definition at line 372 of file LorentzRotation.h.

References test::b.

373  { return lt<b; }
template<typename P , typename P2 >
bool CLHEP::operator< ( shared_ptr< P > const &  a,
shared_ptr< P2 > const &  b 
)
inline

Definition at line 1240 of file memory.h.

References test::a, and test::b.

1241 {
1242  return a._internal_less(b);
1243 }
template<typename P , typename P2 >
bool CLHEP::operator< ( weak_ptr< P > const &  a,
weak_ptr< P2 > const &  b 
)
inline

Definition at line 1460 of file memory.h.

References test::a, and test::b.

1461 {
1462  return a._internal_less(b);
1463 }
std::ostream & CLHEP::operator<< ( std::ostream &  os,
const HepAxisAngle &  aa 
)

Definition at line 85 of file AxisAngle.cc.

References CLHEP::HepAxisAngle::axis(), and CLHEP::HepAxisAngle::delta().

85  {
86  os << '(' << aa.axis() << ", " << aa.delta() << ')';
87  return os;
88 } // operator<<()
std::ostream & CLHEP::operator<< ( std::ostream &  os,
const HepEulerAngles &  aa 
)

Definition at line 100 of file EulerAngles.cc.

References CLHEP::HepEulerAngles::phi(), CLHEP::HepEulerAngles::psi(), and CLHEP::HepEulerAngles::theta().

101 {
102  os << "(" << ea.phi() << ", " << ea.theta() << ", " << ea.psi() << ")";
103  return os;
104 } // operator<<()
std::ostream & CLHEP::operator<< ( std::ostream &  os,
const Hep2Vector &  q 
)

Definition at line 69 of file TwoVector.cc.

References CLHEP::Hep2Vector::x(), and CLHEP::Hep2Vector::y().

69  {
70  os << "(" << q.x() << ", " << q.y() << ")";
71  return os;
72 }
std::ostream & CLHEP::operator<< ( std::ostream &  os,
const HepRandom &  dist 
)

Definition at line 116 of file Random.cc.

References CLHEP::HepRandom::put().

116  {
117  return dist.put(os);
118 }
std::ostream & CLHEP::operator<< ( std::ostream &  os,
const HepRandomEngine &  e 
)

Definition at line 98 of file RandomEngine.cc.

References CLHEP::HepRandomEngine::put().

98  {
99  return e.put(os);
100 }
std::ostream& CLHEP::operator<< ( std::ostream &  os,
const HepBoostX &  b 
)
inline

Definition at line 215 of file BoostX.h.

References test::b.

215 {return b.print(os);}
std::ostream& CLHEP::operator<< ( std::ostream &  os,
const HepBoostZ &  b 
)
inline

Definition at line 215 of file BoostZ.h.

References test::b.

215 {return b.print(os);}
std::ostream& CLHEP::operator<< ( std::ostream &  os,
const HepBoostY &  b 
)
inline

Definition at line 216 of file BoostY.h.

References test::b.

216 {return b.print(os);}
std::ostream& CLHEP::operator<< ( std::ostream &  os,
const HepBoost &  b 
)
inline

Definition at line 241 of file Boost.h.

References test::b.

241 {return b.print(os);}
std::ostream& CLHEP::operator<< ( std::ostream &  os,
const HepRotationX &  r 
)
inline

Definition at line 278 of file RotationX.h.

278 {return r.print(os);}
std::ostream& CLHEP::operator<< ( std::ostream &  os,
const HepRotationY &  r 
)
inline

Definition at line 278 of file RotationY.h.

278 {return r.print(os);}
std::ostream& CLHEP::operator<< ( std::ostream &  os,
const HepRotationZ &  r 
)
inline

Definition at line 278 of file RotationZ.h.

278 {return r.print(os);}
std::ostream& CLHEP::operator<< ( std::ostream &  os,
const HepLorentzRotation &  lt 
)
inline

Definition at line 348 of file LorentzRotation.h.

349  {return lt.print(os);}
std::ostream& CLHEP::operator<< ( std::ostream &  os,
const HepRotation &  r 
)
inline

Definition at line 410 of file Rotation.h.

410 {return r.print(os);}
std::ostream & CLHEP::operator<< ( std::ostream &  os,
const Hep3Vector &  v 
)

Definition at line 100 of file ThreeVector.cc.

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

100  {
101  return os << "(" << v.x() << "," << v.y() << "," << v.z() << ")";
102 }
std::ostream & CLHEP::operator<< ( std::ostream &  os,
const HepLorentzVector &  v1 
)

Definition at line 90 of file LorentzVector.cc.

References CLHEP::HepLorentzVector::t(), CLHEP::HepLorentzVector::x(), CLHEP::HepLorentzVector::y(), and CLHEP::HepLorentzVector::z().

91 {
92  return os << "(" << v1.x() << "," << v1.y() << "," << v1.z()
93  << ";" << v1.t() << ")";
94 }
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 1289 of file memory.h.

1290 {
1291  os << p.get();
1292  return os;
1293 }
const char * p
Definition: xmltok.h:285
bool CLHEP::operator<= ( const HepRotation &  r,
const HepLorentzRotation &  lt 
)
inline

Definition at line 355 of file LorentzRotation.h.

356  { return lt<=r; }
bool CLHEP::operator<= ( const HepBoost &  b,
const HepLorentzRotation &  lt 
)
inline

Definition at line 368 of file LorentzRotation.h.

References test::b.

369  { return lt<=b; }
bool CLHEP::operator== ( const HepRotation &  r,
const HepLorentzRotation &  lt 
)
inline

Definition at line 351 of file LorentzRotation.h.

352  { return lt==r; }
bool CLHEP::operator== ( const HepBoost &  b,
const HepLorentzRotation &  lt 
)
inline

Definition at line 364 of file LorentzRotation.h.

References test::b.

365  { return lt==b; }
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 }
bool CLHEP::operator> ( const HepRotation &  r,
const HepLorentzRotation &  lt 
)
inline

Definition at line 361 of file LorentzRotation.h.

362  { return lt>r; }
bool CLHEP::operator> ( const HepBoost &  b,
const HepLorentzRotation &  lt 
)
inline

Definition at line 374 of file LorentzRotation.h.

References test::b.

375  { return lt>b; }
bool CLHEP::operator>= ( const HepRotation &  r,
const HepLorentzRotation &  lt 
)
inline

Definition at line 357 of file LorentzRotation.h.

358  { return lt>=r; }
bool CLHEP::operator>= ( const HepBoost &  b,
const HepLorentzRotation &  lt 
)
inline

Definition at line 370 of file LorentzRotation.h.

References test::b.

371  { return lt>=b; }
std::istream & CLHEP::operator>> ( std::istream &  is,
HepAxisAngle &  aa 
)

Definition at line 95 of file AxisAngle.cc.

References CLHEP::HepAxisAngle::set(), CLHEP::Hep3Vector::set(), test::x, z, and ZMinputAxisAngle().

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>>()
void ZMinputAxisAngle(std::istream &is, double &x, double &y, double &z, double &delta)
Definition: ZMinput.cc:156
G4double z
Definition: TRTMaterials.hh:39
std::istream & CLHEP::operator>> ( std::istream &  is,
HepEulerAngles &  aa 
)

Definition at line 109 of file EulerAngles.cc.

References CLHEP::HepEulerAngles::set(), and ZMinput3doubles().

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>>()
void ZMinput3doubles(std::istream &is, const char *type, double &x, double &y, double &z)
Definition: ZMinput.cc:42
std::istream & CLHEP::operator>> ( std::istream &  is,
Hep2Vector &  p 
)

Definition at line 77 of file TwoVector.cc.

References CLHEP::Hep2Vector::set(), test::x, and ZMinput2doubles().

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

Definition at line 120 of file Random.cc.

References CLHEP::HepRandom::get().

120  {
121  return dist.get(is);
122 }
std::istream & CLHEP::operator>> ( std::istream &  is,
HepRandomEngine &  e 
)

Definition at line 102 of file RandomEngine.cc.

References CLHEP::HepRandomEngine::get().

102  {
103  return e.get(is);
104 }
std::istream & CLHEP::operator>> ( std::istream &  is,
Hep3Vector &  v 
)

Definition at line 107 of file ThreeVector.cc.

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

107  {
108  double x, y, z;
109  ZMinput3doubles ( is, "Hep3Vector", x, y, z );
110  v.set(x, y, z);
111  return is;
112 } // operator>>()
G4double z
Definition: TRTMaterials.hh:39
void ZMinput3doubles(std::istream &is, const char *type, double &x, double &y, double &z)
Definition: ZMinput.cc:42
std::istream & CLHEP::operator>> ( std::istream &  is,
HepLorentzVector &  v1 
)

Definition at line 96 of file LorentzVector.cc.

References test::c, CLHEP::HepLorentzVector::setT(), CLHEP::HepLorentzVector::setX(), CLHEP::HepLorentzVector::setY(), CLHEP::HepLorentzVector::setZ(), test::x, and z.

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 }
G4double z
Definition: TRTMaterials.hh:39
template<class IS , class T >
bool CLHEP::possibleKeywordInput ( IS &  is,
const std::string &  key,
T &  t 
)
HepLorentzVector CLHEP::rotationOf ( const HepLorentzVector &  vec,
const Hep3Vector &  axis,
double  delta 
)

Definition at line 47 of file LorentzVectorR.cc.

References CLHEP::HepLorentzVector::rotate().

49  {
50  HepLorentzVector vv (vec);
51  return vv.rotate (aaxis, ddelta);
52 }
HepLorentzVector CLHEP::rotationOf ( const HepLorentzVector &  vec,
const HepAxisAngle &  ax 
)

Definition at line 55 of file LorentzVectorR.cc.

References CLHEP::HepLorentzVector::rotate().

55  {
56  HepLorentzVector vv (vec);
57  return vv.rotate (ax);
58 }
HepLorentzVector CLHEP::rotationOf ( const HepLorentzVector &  vec,
const HepEulerAngles &  e 
)

Definition at line 61 of file LorentzVectorR.cc.

References CLHEP::HepLorentzVector::rotate().

61  {
62  HepLorentzVector vv (vec);
63  return vv.rotate (e1);
64 }
HepLorentzVector CLHEP::rotationOf ( const HepLorentzVector &  vec,
double  phi,
double  theta,
double  psi 
)

Definition at line 66 of file LorentzVectorR.cc.

References CLHEP::HepLorentzVector::rotate().

69  {
70  HepLorentzVector vv (vec);
71  return vv.rotate (phi1, theta1, psi1);
72 }
Hep3Vector CLHEP::rotationOf ( const Hep3Vector &  vec,
const Hep3Vector &  axis,
double  delta 
)

Definition at line 132 of file SpaceVectorR.cc.

References CLHEP::Hep3Vector::rotate().

133  {
134  Hep3Vector vv(vec);
135  return vv.rotate(axis, ddelta);
136 }
Hep3Vector CLHEP::rotationOf ( const Hep3Vector &  vec,
const HepAxisAngle &  ax 
)

Definition at line 127 of file SpaceVectorR.cc.

References CLHEP::Hep3Vector::rotate().

127  {
128  Hep3Vector vv(vec);
129  return vv.rotate (ax);
130 }
Hep3Vector CLHEP::rotationOf ( const Hep3Vector &  vec,
double  phi,
double  theta,
double  psi 
)

Definition at line 143 of file SpaceVectorR.cc.

References CLHEP::Hep3Vector::rotate().

144  {
145  Hep3Vector vv(vec);
146  return vv.rotate(phi, theta, psi);
147 }
Hep3Vector CLHEP::rotationOf ( const Hep3Vector &  vec,
const HepEulerAngles &  e 
)

Definition at line 138 of file SpaceVectorR.cc.

References CLHEP::Hep3Vector::rotate().

138  {
139  Hep3Vector vv(vec);
140  return vv.rotate (ex);
141 }
HepLorentzVector CLHEP::rotationXOf ( const HepLorentzVector &  vec,
double  delta 
)

Definition at line 28 of file LorentzVectorB.cc.

References CLHEP::HepLorentzVector::rotateX().

28  {
29  HepLorentzVector vv (vec);
30  return vv.rotateX (phi);
31 }
Hep3Vector CLHEP::rotationXOf ( const Hep3Vector &  vec,
double  delta 
)

Definition at line 149 of file SpaceVectorR.cc.

References CLHEP::Hep3Vector::rotateX().

149  {
150  Hep3Vector vv(vec);
151  return vv.rotateX (ddelta);
152 }
HepLorentzVector CLHEP::rotationYOf ( const HepLorentzVector &  vec,
double  delta 
)

Definition at line 34 of file LorentzVectorB.cc.

References CLHEP::HepLorentzVector::rotateY().

34  {
35  HepLorentzVector vv (vec);
36  return vv.rotateY (phi);
37 }
Hep3Vector CLHEP::rotationYOf ( const Hep3Vector &  vec,
double  delta 
)

Definition at line 154 of file SpaceVectorR.cc.

References CLHEP::Hep3Vector::rotateY().

154  {
155  Hep3Vector vv(vec);
156  return vv.rotateY (ddelta);
157 }
HepLorentzVector CLHEP::rotationZOf ( const HepLorentzVector &  vec,
double  delta 
)

Definition at line 40 of file LorentzVectorB.cc.

References CLHEP::HepLorentzVector::rotateZ().

40  {
41  HepLorentzVector vv (vec);
42  return vv.rotateZ (phi);
43 }
Hep3Vector CLHEP::rotationZOf ( const Hep3Vector &  vec,
double  delta 
)

Definition at line 159 of file SpaceVectorR.cc.

References CLHEP::Hep3Vector::rotateZ().

159  {
160  Hep3Vector vv(vec);
161  return vv.rotateZ (ddelta);
162 }
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 }
template<typename P >
void CLHEP::swap ( shared_ptr< P > &  a,
shared_ptr< P > &  b 
)
inline
template<typename P >
void CLHEP::swap ( weak_ptr< P > &  a,
weak_ptr< P > &  b 
)
inline

Definition at line 1467 of file memory.h.

Referenced by CLHEP::shared_ptr< T >::swap(), and CLHEP::weak_ptr< T >::swap().

1468 {
1469  a.swap(b);
1470 }
double CLHEP::transformSmall ( double  r)

Definition at line 219 of file flatToGaussian.cc.

References test::v.

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

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()
void CLHEP::ZMinput2doubles ( std::istream &  is,
const char *  type,
double &  x,
double &  y 
)

Definition at line 243 of file ZMinput.cc.

References test::c.

Referenced by operator>>().

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 }
void CLHEP::ZMinput3doubles ( std::istream &  is,
const char *  type,
double &  x,
double &  y,
double &  z 
)

Definition at line 42 of file ZMinput.cc.

References test::c.

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

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 }
G4double z
Definition: TRTMaterials.hh:39
void CLHEP::ZMinputAxisAngle ( std::istream &  is,
double &  x,
double &  y,
double &  z,
double &  delta 
)

Definition at line 156 of file ZMinput.cc.

References test::c, and ZMinput3doubles().

Referenced by operator>>().

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 }
G4double z
Definition: TRTMaterials.hh:39
void ZMinput3doubles(std::istream &is, const char *type, double &x, double &y, double &z)
Definition: ZMinput.cc:42

Variable Documentation

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