Garfield++ v2r0
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
14 public:
15 // Constructor
17 // Destructor
19 // Call the random number generator
20 double Draw() { return rng.Rndm(); }
21 // Initialise the random number generator
22 void Seed(unsigned int s);
23
24 private:
25 TRandom3 rng;
26};
27}
28
29#endif
ROOT random number generator.
double Draw()
Draw a random number.
void Seed(unsigned int s)
Initialise the random number generator.
Abstract base class for random number generators.
Definition: RandomEngine.hh:8