File: HandlerBase.h
Description:
HandlerBase is an abstract base class derived from the
Interfaced class adding some functionality such as
easy acces to the RandomGenerator and the
StandardModel object of the controlling
EventGenerator object. This is in fact two
classes. HandlerBase inherits from the templated
HandlerBaseT class which includes the inlined accessor
functions. This is a trick so that classes inheriting from
HandlerBase need not depend on the
EventGenerator if the inlined accessor funtions
are not actually used.
See
also:
namespace Pythia7
template <int I = 0>
CLASS
HandlerBaseT:
Base class:
Public members:
Friends
Private members:
inline HandlerBaseT();
inline HandlerBaseT(const HandlerBaseT &);
virtual ~HandlerBaseT();
Standard ctors and dtor are private and can only be accessed
through the HandlerBase class.
Public members:
inline double rnd() const;
inline double rnd(double xu) const;
inline double rnd(double xl, double xu) const;
Return a simple flat random number in the range ]0,1[, ]0,xu[ and
]xl,xu[ respectively.
inline bool rndbool() const;
Return 50/50.
inline bool rndbool(double p) const;
Return a true with probability p.
inline bool rndbool(double p1, double p2) const;
Return a true with probability p1/(p1+p2).
inline int rndsign(double p1, double p2, double p3) const;
Return -1, 0, or 1 with relative probabilities p1, p2, p3.
inline int rnd2(double p0, double p1) const;
inline int rnd3(double p0, double p1, double p2) const;
inline int rnd4(double p0, double p1, double p2, double p3) const;
Return a i with probability p_i/sum(p_i).
inline long irnd(long xu = 2) const;
inline long irnd(long xl, long xu) const;
Return a simple flat random integrer number in the range [0,xu[ and
[xl,xu[ respectively.
inline const StandardModelBase & SM() const;
inline tSMPtr standardModel() const;
Return a reference/pointer to the object containing the standard
model parameters for this run.
CLASS
HandlerBase:
Base class:
Public members:
inline HandlerBase();
inline HandlerBase(const HandlerBase &);
virtual ~HandlerBase();
Standard ctors and dtor
static void Init();
Standard Init function used to initialize the interface.
Protected members:
inline virtual void doupdate() throw(UpdateException);
inline virtual void doinit() throw(InitException);
inline virtual void dofinish();
Standard Interfaced virtual functions.
inline virtual void rebind(const TranslationMap & trans)
throw(RebindException);
Change all pointers to Interfaced objects to corresponding clones.
inline virtual IVector getReferences();
Return pointers to all Interfaced objects refered to by this.
Private members:
static AbstractNoPIOClassDescription<HandlerBase> initHandlerBase;
HandlerBase & operator=(const HandlerBase &);
Private and non-existent assignment operator.
template <>
STRUCT
BaseClassTrait<HandlerBase,1>
Public members:
typedef Interfaced NthBase;
We ignore the fact that HandlerBaseT<0> is the actual base class.
template <>
STRUCT
ClassTraits<HandlerBase>:
Public members:
static string className() { return "/Pythia7/HandlerBase"; }
DEFINED MACROS
INCLUDED FILES
Pythia7/Interface/Interfaced.h
stdexcept
HandlerBase.icc