Garfield 0.3
Toolkit for the detailed simulation of particle detectors based on ionization 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
7
8namespace Garfield {
9
10class RandomEngineRoot : public RandomEngine<RandomEngineRoot, UInt_t> {
11 public:
12 RandomEngineRoot() { m_rng.SetSeed(); };
13 RandomEngineRoot(const UInt_t& seed) : RandomEngine(seed) {}
14 inline double Draw() { return m_rng.Rndm(); }
15 inline void SetSeed(const seed_t& seed) { m_rng.SetSeed(seed); }
16 inline seed_t GetSeed() { return m_seed; }
17 void Print();
18
19 private:
20 TRandom3 m_rng;
21};
22
23} // namespace Garfield
24
25#endif
RandomEngineRoot(const UInt_t &seed)
void SetSeed(const seed_t &seed)