Files
geant4/source/analysis/g4tools/include/tools/rtausmed
T
2016-06-10 14:11:04 +02:00

38 lines
799 B
Plaintext

// Copyright (C) 2010, Guy Barrand. All rights reserved.
// See the file tools.license for terms.
#ifndef tools_rtausmed
#define tools_rtausmed
// flat in ]0,1[ ???
#include "rtausmeui"
#include "S_STRING"
#include <cmath>
namespace tools {
class rtausmed : public rtausmeui {
typedef rtausmeui parent;
public:
TOOLS_SCLASS(tools::rtausmed)
public:
rtausmed(unsigned int a_seed = 4357):parent(a_seed){}
virtual ~rtausmed(){}
public:
rtausmed(const rtausmed& a_from):parent(a_from){}
rtausmed& operator=(const rtausmed& a_from) {parent::operator=(a_from);return *this;}
protected:
static double two_to_minus_32() {
static const double s_v = std::ldexp(1.0,-32);
return s_v;
}
public:
double shoot() {return double(parent::shoot()) * two_to_minus_32();}
};
}
#endif