Geant4-11
Functions
pyRandomize Namespace Reference

Functions

int f1_RandBit_shootBit ()
 
double f1_RandGaussQ_shoot ()
 
void f1_restoreEngineStatus ()
 
void f1_saveEngineStatus ()
 
void f1_setTheSeed (long seed)
 
void f1_setTheSeeds (const list &seedList)
 
double f2_RandGaussQ_shoot (double mean, double stdDev)
 
void f2_restoreEngineStatus (const char *filename)
 
void f2_saveEngineStatus (const char *filename)
 
void f2_setTheSeed (long seed, int lux)
 
void f2_setTheSeeds (const list &seedList, int aux)
 
double f_G4UniformRand ()
 
list f_getTheSeeds ()
 
list f_getTheTableSeeds (int index)
 

Function Documentation

◆ f1_RandBit_shootBit()

int pyRandomize::f1_RandBit_shootBit ( )

Definition at line 146 of file pyRandomize.cc.

147{
148 return RandBit::shootBit();
149}

Referenced by export_Randomize().

◆ f1_RandGaussQ_shoot()

double pyRandomize::f1_RandGaussQ_shoot ( )

Definition at line 152 of file pyRandomize.cc.

153{
154 return RandGaussQ::shoot();
155}
ThreeVector shoot(const G4int Ap, const G4int Af)

References G4INCL::DeJongSpin::shoot().

Referenced by export_Randomize().

◆ f1_restoreEngineStatus()

void pyRandomize::f1_restoreEngineStatus ( )

Definition at line 135 of file pyRandomize.cc.

136{
137 HepRandom::restoreEngineStatus();
138}

Referenced by export_Randomize().

◆ f1_saveEngineStatus()

void pyRandomize::f1_saveEngineStatus ( )

Definition at line 124 of file pyRandomize.cc.

125{
126 HepRandom::saveEngineStatus();
127}

Referenced by export_Randomize().

◆ f1_setTheSeed()

void pyRandomize::f1_setTheSeed ( long  seed)

Definition at line 45 of file pyRandomize.cc.

46{
47 HepRandom::setTheSeed(seed);
48}

Referenced by export_Randomize().

◆ f1_setTheSeeds()

void pyRandomize::f1_setTheSeeds ( const list &  seedList)

Definition at line 56 of file pyRandomize.cc.

57{
58 // check size...
59 int idx=0;
60 while(1) {
61 long val= extract<long>(seedList[idx]);
62 if(val==0) break;
63 idx++;
64 }
65 int nsize= idx+1;
66
67 long* seedArray= new long[nsize]; // should not be deleted!!
68 // (this is a problem with CLHEP.)
69 for (int i=0; i< nsize; i++) {
70 seedArray[i]= extract<long>(seedList[i]);
71 }
72
73 HepRandom::setTheSeeds(seedArray);
74}

Referenced by export_Randomize().

◆ f2_RandGaussQ_shoot()

double pyRandomize::f2_RandGaussQ_shoot ( double  mean,
double  stdDev 
)

Definition at line 157 of file pyRandomize.cc.

158{
159 return RandGaussQ::shoot(mean, stdDev);
160}

References G4INCL::DeJongSpin::shoot().

Referenced by export_Randomize().

◆ f2_restoreEngineStatus()

void pyRandomize::f2_restoreEngineStatus ( const char *  filename)

Definition at line 140 of file pyRandomize.cc.

141{
142 HepRandom::restoreEngineStatus(filename);
143}

Referenced by export_Randomize().

◆ f2_saveEngineStatus()

void pyRandomize::f2_saveEngineStatus ( const char *  filename)

Definition at line 129 of file pyRandomize.cc.

130{
131 HepRandom::saveEngineStatus(filename);
132}

Referenced by export_Randomize().

◆ f2_setTheSeed()

void pyRandomize::f2_setTheSeed ( long  seed,
int  lux 
)

Definition at line 50 of file pyRandomize.cc.

51{
52 HepRandom::setTheSeed(seed, lux);
53}
static constexpr double lux
Definition: G4SIunits.hh:320

References lux.

Referenced by export_Randomize().

◆ f2_setTheSeeds()

void pyRandomize::f2_setTheSeeds ( const list &  seedList,
int  aux 
)

Definition at line 76 of file pyRandomize.cc.

77{
78 // check size...
79 int idx=0;
80 while(1) {
81 long val= extract<long>(seedList[idx]);
82 if(val==0) break;
83 idx++;
84 }
85 int nsize= idx+1;
86
87 long* seedArray= new long[nsize];
88 for (int i=0; i< nsize; i++) {
89 seedArray[i]= extract<long>(seedList[i]);
90 }
91
92 HepRandom::setTheSeeds(seedArray, aux);
93}

Referenced by export_Randomize().

◆ f_G4UniformRand()

double pyRandomize::f_G4UniformRand ( )

Definition at line 164 of file pyRandomize.cc.

165{
166 return G4UniformRand();
167}
#define G4UniformRand()
Definition: Randomize.hh:52

References G4UniformRand.

Referenced by export_Randomize().

◆ f_getTheSeeds()

list pyRandomize::f_getTheSeeds ( )

Definition at line 96 of file pyRandomize.cc.

97{
98 list seedList;
99 const long* seeds= HepRandom::getTheSeeds();
100 int idx=0;
101 while(1) {
102 if( seeds[idx]==0) break;
103 seedList.append(seeds[idx]);
104 idx++;
105 }
106 return seedList;
107}

Referenced by export_Randomize().

◆ f_getTheTableSeeds()

list pyRandomize::f_getTheTableSeeds ( int  index)

Definition at line 110 of file pyRandomize.cc.

111{
112 long seedPair[2];
113 HepRandom::getTheTableSeeds(seedPair, index);
114
115 list seedList;
116 seedList.append(seedPair[0]);
117 seedList.append(seedPair[1]);
118
119 return seedList;
120}

Referenced by export_Randomize().