#include <G4INCLRanecu.hh>
Inheritance diagram for G4INCL::Ranecu:
Public Member Functions | |
Ranecu () | |
Ranecu (const SeedVector &sv) | |
virtual | ~Ranecu () |
SeedVector | getSeeds () const |
void | setSeeds (const SeedVector &sv) |
G4double | flat () |
Definition at line 51 of file G4INCLRanecu.hh.
G4INCL::Ranecu::Ranecu | ( | ) |
G4INCL::Ranecu::Ranecu | ( | const SeedVector & | sv | ) |
Definition at line 53 of file G4INCLRanecu.cc.
References setSeeds().
00053 { 00054 setSeeds(sv); 00055 }
G4INCL::Ranecu::~Ranecu | ( | ) | [virtual] |
G4double G4INCL::Ranecu::flat | ( | ) | [virtual] |
Implements G4INCL::IRandomGenerator.
Definition at line 59 of file G4INCLRanecu.cc.
00060 { 00061 // This is an adapted version of subroutine ranecu: 00062 // A. Padal, J. Sempau Computer Physics Cummunications 175 (2006) 440-450 00063 G4double uscale=1.0/2.147483563e9; 00064 00065 long i1=iseed1/53668; 00066 iseed1=40014*(iseed1-i1*53668)-i1*12211; 00067 00068 if(iseed1 < 0) iseed1 = iseed1 + 2147483563; 00069 00070 long i2=iseed2/52774; 00071 iseed2=40692*(iseed2-i2*52774)-i2*3791; 00072 if(iseed2 < 0) iseed2=iseed2+2147483399; 00073 00074 long iz=iseed1-iseed2; 00075 if(iz < 1) iz=iz+2147483562; 00076 00077 return iz*uscale; 00078 }
SeedVector G4INCL::Ranecu::getSeeds | ( | ) | const [inline, virtual] |
Implements G4INCL::IRandomGenerator.
Definition at line 57 of file G4INCLRanecu.hh.
00057 { 00058 SeedVector sv; 00059 sv.push_back(iseed1); 00060 sv.push_back(iseed2); 00061 return sv; 00062 };
void G4INCL::Ranecu::setSeeds | ( | const SeedVector & | sv | ) | [inline, virtual] |
Implements G4INCL::IRandomGenerator.
Definition at line 64 of file G4INCLRanecu.hh.
Referenced by Ranecu().