ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
Tools
AtlasCLHEP_RandomGenerators
AtlasCLHEP_RandomGenerators
RandBinomialFixedP.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef RandBinomialFixedP_h
6
#define RandBinomialFixedP_h 1
7
8
#include <vector>
9
10
#include "CLHEP/Random/RandBinomial.h"
11
12
namespace
CLHEP
{
13
18
class
RandBinomialFixedP
:
public
RandBinomial {
19
20
public
:
21
22
inline
RandBinomialFixedP
( HepRandomEngine& anEngine,
long
n=1,
23
double
p=0.5,
long
Nmaxlookup=10 );
24
inline
RandBinomialFixedP
( HepRandomEngine* anEngine,
long
n=1,
25
double
p=0.5,
long
Nmaxlookup=10 );
26
// These constructors should be used to instantiate a RandBinomialFixedP
27
// distribution object defining a local engine for it.
28
// The static generator will be skipped using the non-static methods
29
// defined below. Only the non static method run with the fixed p value optimization
30
// If the engine is passed by pointer the corresponding engine object
31
// will be deleted by the RandBinomialFixedP destructor.
32
// If the engine is passed by reference the corresponding engine object
33
// will not be deleted by the RandBinomialFixedP destructor.
34
35
virtual
~RandBinomialFixedP
();
36
// Destructor
37
38
// Methods using the localEngine to shoot random values, by-passing
39
// the static generator.
40
41
void
initLookupTable
(
long
Nmaxlookup,
double
p);
42
43
inline
double
fire
();
44
45
double
fire
(
long
n);
46
47
double
fire
( HepRandomEngine* anEngine,
long
n);
48
49
void
fireArray
(
const
int
size
,
double
* vect);
50
void
fireArray
(
const
int
size
,
double
* vect,
51
long
n);
52
inline
double
operator()
();
53
inline
double
operator()
(
long
n );
54
55
std::string
name
()
const
;
56
57
static
std::string
distributionName
() {
return
"RandBinomialFixedP"
;}
58
// Provides the name of this distribution class
59
60
static
double
shoot
() =
delete
;
61
62
static
double
shoot
(
long
n,
double
p ) =
delete
;
63
64
static
void
shootArray
(
const
int
size
,
double
* vect,
long
n=1,
double
p=0.5 ) =
delete
;
65
66
static
inline
double
shoot
( HepRandomEngine* anEngine ) =
delete
;
67
68
static
double
shoot
( HepRandomEngine* anEngine,
long
n,
double
p ) =
delete
;
69
70
static
void
shootArray
( HepRandomEngine* anEngine,
const
int
size
,
double
* vect,
long
n=1,
double
p=0.5 ) =
delete
;
71
72
protected
:
73
74
std::vector< std::vector< double > >
LookupTable
;
75
76
};
77
78
}
// namespace CLHEP
79
80
#ifdef ENABLE_BACKWARDS_COMPATIBILITY
81
// backwards compatibility will be enabled ONLY in CLHEP 1.9
82
using namespace
CLHEP
;
83
#endif
84
85
#include "
RandBinomialFixedP.icc
"
86
87
#endif
RandBinomialFixedP.icc
size
size_t size() const
Number of registered mappings.
CLHEP::RandBinomialFixedP::shootArray
static void shootArray(HepRandomEngine *anEngine, const int size, double *vect, long n=1, double p=0.5)=delete
CLHEP::RandBinomialFixedP::LookupTable
std::vector< std::vector< double > > LookupTable
Definition
RandBinomialFixedP.h:74
CLHEP::RandBinomialFixedP::distributionName
static std::string distributionName()
Definition
RandBinomialFixedP.h:57
CLHEP::RandBinomialFixedP::RandBinomialFixedP
RandBinomialFixedP(HepRandomEngine *anEngine, long n=1, double p=0.5, long Nmaxlookup=10)
CLHEP::RandBinomialFixedP::shoot
static double shoot(HepRandomEngine *anEngine, long n, double p)=delete
CLHEP::RandBinomialFixedP::operator()
double operator()(long n)
CLHEP::RandBinomialFixedP::shootArray
static void shootArray(const int size, double *vect, long n=1, double p=0.5)=delete
CLHEP::RandBinomialFixedP::fireArray
void fireArray(const int size, double *vect)
Definition
RandBinomialFixedP.cxx:55
CLHEP::RandBinomialFixedP::fire
double fire(long n)
CLHEP::RandBinomialFixedP::fire
double fire()
CLHEP::RandBinomialFixedP::~RandBinomialFixedP
virtual ~RandBinomialFixedP()
Definition
RandBinomialFixedP.cxx:16
CLHEP::RandBinomialFixedP::RandBinomialFixedP
RandBinomialFixedP(HepRandomEngine &anEngine, long n=1, double p=0.5, long Nmaxlookup=10)
CLHEP::RandBinomialFixedP::shoot
static double shoot(HepRandomEngine *anEngine)=delete
CLHEP::RandBinomialFixedP::initLookupTable
void initLookupTable(long Nmaxlookup, double p)
Definition
RandBinomialFixedP.cxx:23
CLHEP::RandBinomialFixedP::shoot
static double shoot()=delete
CLHEP::RandBinomialFixedP::name
std::string name() const
Definition
RandBinomialFixedP.cxx:14
CLHEP::RandBinomialFixedP::shoot
static double shoot(long n, double p)=delete
CLHEP::RandBinomialFixedP::operator()
double operator()()
CLHEP
STD'S.
Definition
CaloNoiseCompCondAlg.h:57
Generated on
for ATLAS Offline Software by
1.17.0