Go to the documentation of this file.
10 #include "CLHEP/Units/GlobalPhysicalConstants.h"
11 #include "CLHEP/Random/RanecuEngine.h"
12 #include "CLHEP/Random/Random.h"
23 void useSeed(
int, std::vector<Sample>& );
29 std::ofstream
output(
"testRanecuSequence.output");
31 output <<
" Setting CLHEP Random Engine..." << std::endl;
34 std::vector<Sample> ranList;
40 useSeed(1275168040-2048*215, ranList);
45 for (
int i = 0;
i < 1000; ++
i ) {
52 for (
unsigned int it=0; it < ranList.size(); ++it ) {
53 for (
unsigned int jt=it+1; jt < ranList.size(); ++jt ) {
56 output <<
"ERROR: Seed " << ranList[it].seed
57 <<
" and Seed " << ranList[jt].seed
58 <<
" are " << (ranList[jt].seed - ranList[it].seed )
59 <<
" apart and result in identical sequences" << std::endl;
60 std::cerr <<
"Seed " << ranList[it].seed
61 <<
" and Seed " << ranList[jt].seed
62 <<
" are " << (ranList[jt].seed - ranList[it].seed )
63 <<
" apart and result in identical sequences" << std::endl;
68 output <<
" numbad is " << numbad << std::endl;
72 void useSeed(
int seed, std::vector<Sample>& ranList )
78 for(
int i = 0;
i < 15; ++
i ) {
79 v.case1.push_back( c1.
flat() );
83 for(
int i = 0;
i < 15; ++
i ) {
84 v.case2.push_back( c2.
flat() );
88 for(
int i = 0;
i < 15; ++
i ) {
94 for(
int i = 0;
i < 15; ++
i ) {
95 v.case4.push_back( c4.
flat() );
103 for(
int i = 0;
i < 15; ++
i ) {
104 v.case5.push_back( c5.
flat() );
107 ranList.push_back(
v);
114 output <<
" case1: default constructor \n" ;
115 output <<
" comparing Seed " << s1.
seed <<
" and Seed " << s2.
seed << std::endl;
116 output <<
" case1 sequence:" ;
122 output <<
" case2: construct with single seed \n" ;
123 output <<
" comparing Seed " << s1.
seed <<
" and Seed " << s2.
seed << std::endl;
124 output <<
" case2 sequence:" ;
130 output <<
" case3: construct with single seed \n" ;
131 output <<
" comparing Seed " << s1.
seed <<
" and Seed " << s2.
seed << std::endl;
132 output <<
" case3 sequence:" ;
138 output <<
" case4: use setSeed \n" ;
139 output <<
" comparing Seed " << s1.
seed <<
" and Seed " << s2.
seed << std::endl;
140 output <<
" case4 sequence:" ;
146 output <<
" case5: use setSeeds \n" ;
147 output <<
" comparing Seed " << s1.
seed <<
" and Seed " << s2.
seed << std::endl;
148 output <<
" case5 sequence:" ;
std::vector< double > case3
void setSeed(long index, int dum=0)
std::vector< double > case4
bool compareSamples(Sample &, Sample &, std::ofstream &)
static void setTheEngine(HepRandomEngine *theNewEngine)
void useSeed(int, std::vector< Sample > &)
std::vector< double > case5
they are gone ZOOM Features Discontinued The following features of the ZOOM package were felt to be extreme overkill These have been after checking that no existing user code was utilizing as in SpaceVector v
std::vector< double > case2
std::ofstream output("ranRestoreTest.cout")
void setSeeds(const long *seeds, int index=-1)
static void setTheSeed(long seed, int lux=3)
static HepRandomEngine * getTheEngine()
std::vector< double > case1