FastSimulation
Utilities
interface
RandomEngineAndDistribution.h
Go to the documentation of this file.
1
#ifndef FastSimulation_Utilities_RandomEngineAndDistribution_H
2
#define FastSimulation_Utilities_RandomEngineAndDistribution_H
3
4
#include "CLHEP/Random/RandFlat.h"
5
#include "CLHEP/Random/RandGaussQ.h"
6
#include "CLHEP/Random/RandPoissonQ.h"
7
#include "TRandom3.h"
8
9
namespace
CLHEP
{
10
class
HepRandomEngine;
11
}
12
13
namespace
edm
{
14
class
LuminosityBlockIndex;
15
class
StreamID;
16
}
// namespace edm
17
18
class
RandomEngineAndDistribution
{
19
public
:
20
RandomEngineAndDistribution
(
edm::StreamID
const
&);
21
RandomEngineAndDistribution
(
edm::LuminosityBlockIndex
const
&);
22
23
~RandomEngineAndDistribution
();
24
25
CLHEP::HepRandomEngine&
theEngine
()
const
{
return
*
engine_
; }
26
27
inline
double
flatShoot
(
double
xmin
= 0.0,
double
xmax
= 1.0)
const
{
return
xmin
+ (
xmax
-
xmin
) *
engine_
->flat(); }
28
29
inline
double
gaussShoot
(
double
mean
= 0.0,
double
sigma = 1.0)
const
{
30
return
CLHEP::RandGauss::shoot(
engine_
,
mean
, sigma);
31
}
32
33
inline
unsigned
int
poissonShoot
(
double
mean
)
const
{
return
CLHEP::RandPoissonQ::shoot(
engine_
,
mean
); }
34
35
private
:
36
CLHEP::HepRandomEngine*
engine_
;
37
};
38
#endif // FastSimulation_Utilities_RandomEngineAndDistribution_H
edm::StreamID
Definition:
StreamID.h:30
RandomEngineAndDistribution::~RandomEngineAndDistribution
~RandomEngineAndDistribution()
Definition:
RandomEngineAndDistribution.cc:31
SiStripPI::mean
Definition:
SiStripPayloadInspectorHelper.h:169
edm
HLT enums.
Definition:
AlignableModifier.h:19
RandomEngineAndDistribution::engine_
CLHEP::HepRandomEngine * engine_
Definition:
RandomEngineAndDistribution.h:36
edm::LuminosityBlockIndex
Definition:
LuminosityBlockIndex.h:33
CLHEP
Definition:
CocoaGlobals.h:27
RandomEngineAndDistribution::theEngine
CLHEP::HepRandomEngine & theEngine() const
Definition:
RandomEngineAndDistribution.h:25
RandomEngineAndDistribution::flatShoot
double flatShoot(double xmin=0.0, double xmax=1.0) const
Definition:
RandomEngineAndDistribution.h:27
RandomEngineAndDistribution::RandomEngineAndDistribution
RandomEngineAndDistribution(edm::StreamID const &)
Definition:
RandomEngineAndDistribution.cc:10
TrackerOfflineValidation_Dqm_cff.xmax
xmax
Definition:
TrackerOfflineValidation_Dqm_cff.py:11
TrackerOfflineValidation_Dqm_cff.xmin
xmin
Definition:
TrackerOfflineValidation_Dqm_cff.py:10
RandomEngineAndDistribution::gaussShoot
double gaussShoot(double mean=0.0, double sigma=1.0) const
Definition:
RandomEngineAndDistribution.h:29
RandomEngineAndDistribution::poissonShoot
unsigned int poissonShoot(double mean) const
Definition:
RandomEngineAndDistribution.h:33
RandomEngineAndDistribution
Definition:
RandomEngineAndDistribution.h:18
Generated for CMSSW Reference Manual by
1.8.16