9 #ifndef ThePEG_HandlerBase_H 10 #define ThePEG_HandlerBase_H 13 #include "ThePEG/Interface/Interfaced.h" 14 #include "ThePEG/Repository/UseRandom.fh" 15 #include "ThePEG/Repository/EventGenerator.h" 20 template <
typename T = UseRandom>
67 double rnd()
const {
return T::rnd(); }
72 double rnd(
double xu)
const {
return T::rnd(xu); }
77 double rnd(
double xl,
double xu)
const {
return T::rnd(xl, xu); }
82 bool rndbool()
const {
return T::rndbool(); }
87 bool rndbool(
double p)
const {
return T::rndbool(p); }
92 bool rndbool(
double p1,
double p2)
const {
return T::rndbool(p1, p2); }
97 int rndsign(
double p1,
double p2,
double p3)
const {
return T::rndsign(p1, p2, p3); }
102 int rnd2(
double p0,
double p1)
const {
return T::rnd2(p0, p1); }
108 int rnd3(
double p0,
double p1,
double p2)
const {
return T::rnd3(p0, p1, p2); }
114 int rnd4(
double p0,
double p1,
double p2,
double p3)
const {
return T::rnd4(p0, p1, p2, p3); }
119 long irnd(
long xu = 2)
const {
return T::irnd(xu); }
124 long irnd(
long xl,
long xu)
const {
return T::irnd(xl, xu); }
194 static string className() {
return "ThePEG::HandlerBase"; }
StandardModelBase is used to handle standard model parameters in an EventGenerator.
int rndsign(double p1, double p2, double p3) const
Return -1, 0, or 1 with relative probabilities p1, p2, p3.
static void Init()
Standard Init function.
int rnd4(double p0, double p1, double p2, double p3) const
Return an integer/ with probability p (p0+p1+p2+p3).
ClassTraitsType is an empty, non-polymorphic, base class.
double rnd() const
Return a simple flat random number in the range ]0,1[.
bool rndbool(double p1, double p2) const
Return a true with probability p1/(p1+p2).
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
const StandardModelBase & SM() const
Return a reference to the object containing the standard model parameters for this run...
This is the main namespace within which all identifiers in ThePEG are declared.
bool rndbool(double p) const
Return a true with probability p.
virtual ~HandlerBaseT()
Destructor.
Interfaced & operator=(const Interfaced &)
Private and non-existent assignment operator.
A concreate implementation of ClassDescriptionBase describing an abstract class without persistent da...
double rnd(double xl, double xu) const
Return a simple flat random number in the range ]xl,xu[.
long irnd(long xl, long xu) const
Return a simple flat random integrer number in the range [xl,xu[.
bool rndbool() const
Return true with 50% probability.
int rnd2(double p0, double p1) const
Return an integer with probability p /(p0+p1).
HandlerBaseT()
Default constructor.
HandlerBase is an abstract base class derived from the Interfaced class via the HandlerBaseT class ad...
The Interfaced class is derived from the InterfacedBase class adding a couple of things particular to...
tSMPtr standardModel() const
Return a pointer to the object containing the standard model parameters for this run.
tEGPtr generator() const
Return a pointer to the EventGenerator controlling the run.
long irnd(long xu=2) const
Return a simple flat random integrer number in the range [0,xu[.
The default concrete implementation of ClassTraitsBase.
int rnd3(double p0, double p1, double p2) const
Return an integer with probability p /(p0+p1+p2).
HandlerBaseT is a dummy abstract templated class used as base class to HandlerBase.
BaseClassTraits describes the base classes of the templated class.
double rnd(double xu) const
Return a simple flat random number in the range ]0,xu[.
static AbstractNoPIOClassDescription< HandlerBase > initHandlerBase
Describe an abstract class without persistent data.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...