Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Garfield::RandomEngineRoot Class Reference

#include <RandomEngineRoot.hh>

+ Inheritance diagram for Garfield::RandomEngineRoot:

Public Member Functions

 RandomEngineRoot ()
 
 ~RandomEngineRoot ()
 
double Draw ()
 
void Seed (unsigned int s)
 
- Public Member Functions inherited from Garfield::RandomEngine
 RandomEngine ()
 
virtual ~RandomEngine ()
 
virtual double Draw ()=0
 
virtual void Seed (unsigned int s)=0
 

Detailed Description

Definition at line 12 of file RandomEngineRoot.hh.

Constructor & Destructor Documentation

◆ RandomEngineRoot()

Garfield::RandomEngineRoot::RandomEngineRoot ( )

Definition at line 8 of file RandomEngineRoot.cc.

8 : rng(0) {
9
10 std::cout << "RandomEngineRoot:\n";
11 std::cout << " Generator type: TRandom3\n";
12 std::cout << " Seed: " << rng.GetSeed() << "\n";
13}

◆ ~RandomEngineRoot()

Garfield::RandomEngineRoot::~RandomEngineRoot ( )

Definition at line 15 of file RandomEngineRoot.cc.

15{}

Member Function Documentation

◆ Draw()

double Garfield::RandomEngineRoot::Draw ( )
inlinevirtual

Implements Garfield::RandomEngine.

Definition at line 20 of file RandomEngineRoot.hh.

20{ return rng.Rndm(); }

Referenced by Garfield::RndmUniform().

◆ Seed()

void Garfield::RandomEngineRoot::Seed ( unsigned int  s)
virtual

Implements Garfield::RandomEngine.

Definition at line 17 of file RandomEngineRoot.cc.

17 {
18
19 rng.SetSeed(s);
20 std::cout << "RandomEngineRoot::Seed:\n";
21 std::cout << " Seed: " << rng.GetSeed() << "\n";
22}

Referenced by main().


The documentation for this class was generated from the following files: