Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
RandomEngineRoot.hh
Go to the documentation of this file.
1#ifndef G_RANDOM_ENGINE_ROOT_H
2#define G_RANDOM_ENGINE_ROOT_H
3
4#include <TRandom3.h>
5
6#include "RandomEngine.hh"
7
8namespace Garfield {
9
10/// ROOT random number generator.
11
13 public:
14 /// Constructor
16 /// Destructor
18 /// Call the random number generator.
19 double Draw() override { return m_rng.Rndm(); }
20 /// Initialise the random number generator.
21 void Seed(const unsigned int s) override;
22 /// Print information about the generator used and the seed.
23 void Print() override;
24
25 private:
26 TRandom3 m_rng;
27};
28}
29
30#endif
ROOT random number generator.
void Print() override
Print information about the generator used and the seed.
void Seed(const unsigned int s) override
Initialise the random number generator.
double Draw() override
Call the random number generator.
Abstract base class for random number generators.
Definition: RandomEngine.hh:8