#include <FastSimulation/ParticleDecay/interface/Pythia6Random.h>
Public Member Functions | |
void | get (int i) |
int & | mrpy (int i) |
Pythia6Random (int seed) | |
double & | rrpy (int i) |
void | save (int i) |
~Pythia6Random (void) | |
Private Member Functions | |
void | init (void) |
Private Attributes | |
_pythia6random * | myPythia6Random [2] |
Static Private Attributes | |
static struct _pythia6random * | __pythia6random = 0 |
static double | dDummy = 0.0 |
static int | nDummy = 0 |
Classes | |
struct | _pythia6random |
Definition at line 7 of file Pythia6Random.h.
Pythia6Random::Pythia6Random | ( | int | seed | ) |
Definition at line 23 of file Pythia6Random.cc.
References j, Pythia6Random::_pythia6random::mrpy, myPythia6Random, and rrpy().
00023 { 00024 00025 myPythia6Random[0] = new _pythia6random; 00026 myPythia6Random[1] = new _pythia6random; 00027 00028 // Initialize current state of the decay random generation 00029 myPythia6Random[1]->mrpy[0] = seed; 00030 myPythia6Random[1]->mrpy[1] = 0; 00031 myPythia6Random[1]->mrpy[2] = 0; 00032 myPythia6Random[1]->mrpy[3] = 0; 00033 myPythia6Random[1]->mrpy[4] = 0; 00034 myPythia6Random[1]->mrpy[5] = 0; 00035 for ( int j=0; j<100; ++j ) myPythia6Random[1]->rrpy[j] = 0.; 00036 00037 }
Pythia6Random::~Pythia6Random | ( | void | ) |
Definition at line 39 of file Pythia6Random.cc.
References myPythia6Random.
00039 { 00040 00041 delete myPythia6Random[0]; 00042 delete myPythia6Random[1]; 00043 00044 }
Definition at line 90 of file Pythia6Random.cc.
References j, Pythia6Random::_pythia6random::mrpy, mrpy(), myPythia6Random, rrpy(), and Pythia6Random::_pythia6random::rrpy.
Referenced by Pythia6Decays::getRandom(), and Pythia6Decays::saveRandom().
00090 { 00091 00092 for ( int j=1; j<7; ++j ) { 00093 mrpy(j) = myPythia6Random[i]->mrpy[j-1]; 00094 // std::cout << "Get " << i << " mrpy(" << j << ") = " << mrpy(j) << std::endl; 00095 } 00096 for ( int j=1; j<101; ++j ) { 00097 rrpy(j) = myPythia6Random[i]->rrpy[j-1]; 00098 // std::cout << "Get " << i << " rrpy(" << j << ") = " << rrpy(j) << std::endl; 00099 } 00100 00101 }
Definition at line 47 of file Pythia6Random.cc.
References __pythia6random, getAddr(), and PYDATR.
Referenced by mrpy(), and rrpy().
00048 { 00049 __pythia6random = 00050 static_cast<struct Pythia6Random::_pythia6random *>(getAddr(&PYDATR.mrpy[0])); 00051 }
Definition at line 54 of file Pythia6Random.cc.
References __pythia6random, init(), m_length, Pythia6Random::_pythia6random::mrpy, and nDummy.
Referenced by get(), and save().
00055 { 00056 if (__pythia6random == 0) init(); 00057 if ( i<1 || i>m_length ) { 00058 nDummy = -999; 00059 return nDummy; 00060 } 00061 return __pythia6random->mrpy[i-1]; 00062 }
double & Pythia6Random::rrpy | ( | int | i | ) |
Definition at line 65 of file Pythia6Random.cc.
References __pythia6random, dDummy, init(), r_length, and Pythia6Random::_pythia6random::rrpy.
Referenced by get(), Pythia6Random(), and save().
00066 { 00067 if (__pythia6random == 0) init(); 00068 if ( i<1 || i>r_length ) { 00069 dDummy = -999.0; 00070 return dDummy; 00071 } 00072 return __pythia6random->rrpy[i-1]; 00073 }
Definition at line 76 of file Pythia6Random.cc.
References j, mrpy(), Pythia6Random::_pythia6random::mrpy, myPythia6Random, rrpy(), and Pythia6Random::_pythia6random::rrpy.
Referenced by Pythia6Decays::getRandom(), and Pythia6Decays::saveRandom().
00076 { 00077 00078 for ( int j=1; j<7; ++j ) { 00079 myPythia6Random[i]->mrpy[j-1] = mrpy(j); 00080 // std::cout << "Save " << i << " mrpy(" << j << ") = " << mrpy(j) << std::endl; 00081 } 00082 for ( int j=1; j<101; ++j ) { 00083 myPythia6Random[i]->rrpy[j-1] = rrpy(j); 00084 // std::cout << "Save " << i << " rrpy(" << j << ") = " << rrpy(j) << std::endl; 00085 } 00086 00087 }
struct Pythia6Random::_pythia6random * Pythia6Random::__pythia6random = 0 [static, read, private] |
double Pythia6Random::dDummy = 0.0 [static, private] |
_pythia6random* Pythia6Random::myPythia6Random[2] [private] |
Definition at line 36 of file Pythia6Random.h.
Referenced by get(), Pythia6Random(), save(), and ~Pythia6Random().
int Pythia6Random::nDummy = 0 [static, private] |