Geant4  10.00.p02
UUtils Namespace Reference

Classes

struct  CompareAsc
 
struct  CompareDesc
 

Functions

short Sign (short a, short b)
 
int Sign (int a, int b)
 
long Sign (long a, long b)
 
float Sign (float a, float b)
 
double Sign (double a, double b)
 
double Infinity ()
 
double ASin (double)
 
double ACos (double)
 
double ATan (double)
 
double ATan2 (double, double)
 
void Exception (const char *originOfException, const char *exceptionCode, ExceptionSeverity severity, int level, const char *description)
 
bool AreEqualAbs (double af, double bf, double epsilon)
 
bool AreEqualRel (double af, double bf, double relPrec)
 
long LocMin (long n, const double *a)
 
long LocMax (long n, const double *a)
 
void TransformLimits (UVector3 &min, UVector3 &max, const UTransform3D &transformation)
 
double Random (double min=0.0, double max=1.0)
 
std::string ToString (int number)
 
std::string ToString (double number)
 
int FileSize (const std::string &filePath)
 
int StrPos (const std::string &haystack, const std::string &needle)
 
double GetRadiusInRing (double rmin, double rmax)
 
template<class T >
sqr (const T &x)
 
bool StrEnds (std::string const &fullString, std::string const &ending)
 

Variables

static const double kPi = 3.14159265358979323846
 
static const double kTwoPi = 2.0 * kPi
 
static const double kRadToDeg = 180.0 / kPi
 
static const double kDegToRad = kPi / 180.0
 
static const double kSqrt2 = 1.4142135623730950488016887242097
 
static const double kInfinity = DBL_MAX
 
static const double kMeshAngleDefault = (kPi / 4)
 
static const int kMinMeshSections = 3
 
static const int kMaxMeshSections = 37
 

Function Documentation

double UUtils::ACos ( double  x)
inline

Definition at line 213 of file UUtils.hh.

References kPi.

Referenced by UVector3::Angle(), and UVector3::Theta().

+ Here is the caller graph for this function:

bool UUtils::AreEqualAbs ( double  af,
double  bf,
double  epsilon 
)
inline

Definition at line 75 of file UUtils.hh.

bool UUtils::AreEqualRel ( double  af,
double  bf,
double  relPrec 
)
inline

Definition at line 80 of file UUtils.hh.

double UUtils::ASin ( double  x)
inline

Definition at line 206 of file UUtils.hh.

References kPi.

double UUtils::ATan ( double  )
inline
double UUtils::ATan2 ( double  y,
double  x 
)
inline

Definition at line 221 of file UUtils.hh.

References kPi.

Referenced by UVector3::Phi().

+ Here is the caller graph for this function:

int UUtils::FileSize ( const std::string &  filePath)

Definition at line 91 of file UUtils.cc.

double UUtils::GetRadiusInRing ( double  rmin,
double  rmax 
)
inline

Definition at line 155 of file UUtils.hh.

References Random(), and sqr().

Referenced by UTubs::GetPointOnSurface(), USphere::GetPointOnSurface(), and UCons::GetPointOnSurface().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UUtils::Infinity ( )
inline

Definition at line 172 of file UUtils.hh.

Referenced by USphere::DistanceToIn(), USphere::DistanceToOut(), and USphere::Normal().

+ Here is the caller graph for this function:

long UUtils::LocMax ( long  n,
const double *  a 
)
long UUtils::LocMin ( long  n,
const double *  a 
)
short UUtils::Sign ( short  a,
short  b 
)
inline

Definition at line 179 of file UUtils.hh.

Referenced by UBox::DistanceToOut(), G4StatMFChannel::FragmentsMomenta(), UBox::Normal(), G4ViewParameters::ReadInteger(), and G4QGSDiffractiveExcitation::String().

+ Here is the caller graph for this function:

int UUtils::Sign ( int  a,
int  b 
)
inline

Definition at line 184 of file UUtils.hh.

long UUtils::Sign ( long  a,
long  b 
)
inline

Definition at line 189 of file UUtils.hh.

float UUtils::Sign ( float  a,
float  b 
)
inline

Definition at line 194 of file UUtils.hh.

double UUtils::Sign ( double  a,
double  b 
)
inline

Definition at line 199 of file UUtils.hh.

template<class T >
T UUtils::sqr ( const T &  x)
inline
bool UUtils::StrEnds ( std::string const &  fullString,
std::string const &  ending 
)
inline

Definition at line 142 of file UUtils.hh.

int UUtils::StrPos ( const std::string &  haystack,
const std::string &  needle 
)

Definition at line 105 of file UUtils.cc.

string UUtils::ToString ( int  number)

Definition at line 77 of file UUtils.cc.

Referenced by UVoxelizer::BuildBitmasks().

+ Here is the caller graph for this function:

string UUtils::ToString ( double  number)

Definition at line 84 of file UUtils.cc.

void UUtils::TransformLimits ( UVector3 min,
UVector3 max,
const UTransform3D transformation 
)

Definition at line 29 of file UUtils.cc.

References UTransform3D::GlobalPoint(), kInfinity, UVector3::Set(), UVector3::x, UVector3::y, and UVector3::z.

+ Here is the call graph for this function:

Variable Documentation

const double UUtils::kDegToRad = kPi / 180.0
static
const int UUtils::kMaxMeshSections = 37
static

Definition at line 57 of file UUtils.hh.

const double UUtils::kMeshAngleDefault = (kPi / 4)
static

Definition at line 55 of file UUtils.hh.

const int UUtils::kMinMeshSections = 3
static

Definition at line 56 of file UUtils.hh.

const double UUtils::kRadToDeg = 180.0 / kPi
static

Definition at line 50 of file UUtils.hh.

const double UUtils::kSqrt2 = 1.4142135623730950488016887242097
static

Definition at line 52 of file UUtils.hh.

const double UUtils::kTwoPi = 2.0 * kPi
static

Definition at line 49 of file UUtils.hh.

Referenced by UPolycone::Init(), and UPolycone::InsideSection().