#include <RandLandau.h>
- Author
Definition at line 42 of file RandLandau.h.
CLHEP::RandLandau::~RandLandau |
( |
| ) |
|
|
virtual |
static std::string CLHEP::RandLandau::distributionName |
( |
| ) |
|
|
inlinestatic |
double CLHEP::RandLandau::fire |
( |
| ) |
|
|
inline |
void CLHEP::RandLandau::fireArray |
( |
const int |
size, |
|
|
double * |
vect |
|
) |
| |
std::istream & CLHEP::RandLandau::get |
( |
std::istream & |
is | ) |
|
|
virtual |
Reimplemented from CLHEP::HepRandom.
Definition at line 371 of file RandLandau.cc.
References name().
374 if (inName !=
name()) {
375 is.clear(std::ios::badbit | is.rdstate());
376 std::cerr <<
"Mismatch when expecting to read state of a "
377 <<
name() <<
" distribution\n"
378 <<
"Name found was " << inName
379 <<
"\nistream is left in the badbit state\n";
std::string CLHEP::RandLandau::name |
( |
| ) |
const |
|
virtual |
double CLHEP::RandLandau::operator() |
( |
| ) |
|
|
inlinevirtual |
std::ostream & CLHEP::RandLandau::put |
( |
std::ostream & |
os | ) |
const |
|
virtual |
static double CLHEP::RandLandau::shoot |
( |
| ) |
|
|
inlinestatic |
void CLHEP::RandLandau::shootArray |
( |
const int |
size, |
|
|
double * |
vect |
|
) |
| |
|
static |
double CLHEP::RandLandau::transform |
( |
double |
r | ) |
|
|
staticprotected |
Definition at line 286 of file RandLandau.cc.
References int(), and test::x.
288 double u = r * TABLE_MULTIPLIER;
290 double du = u - index;
309 if ( index >= 70 && index <= 800 ) {
311 double f0 = inverseLandau [index];
312 double f1 = inverseLandau [index+1];
313 return f0 + du * (f1 - f0);
315 }
else if ( index >= 7 && index <= 980 ) {
317 double f_1 = inverseLandau [index-1];
318 double f0 = inverseLandau [index];
319 double f1 = inverseLandau [index+1];
320 double f2 = inverseLandau [index+2];
322 return f0 + du * (f1 - f0 - .25*(1-du)* (f2 -f1 - f0 + f_1) );
324 }
else if ( index < 7 ) {
326 const double n0 = 0.99858950;
327 const double n1 = 34.5213058;
const double d1 = 34.1760202;
328 const double n2 = 17.0854528;
const double d2 = 4.01244582;
330 double logr = std::log(r);
334 double pade = (n0 + n1*x + n2*x2) / (1.0 + d1*x + d2*x2);
336 return ( - std::log ( -.91893853 - logr ) -1 ) * pade;
338 }
else if ( index <= 999 ) {
340 const double n0 = 1.00060006;
341 const double n1 = 263.991156;
const double d1 = 257.368075;
342 const double n2 = 4373.20068;
const double d2 = 3414.48018;
347 return (n0 + n1*x + n2*x2) / (x * (1.0 + d1*x + d2*x2));
351 const double n0 = 1.00001538;
352 const double n1 = 6075.14119;
const double d1 = 6065.11919;
353 const double n2 = 734266.409;
const double d2 = 694021.044;
358 return (n0 + n1*x + n2*x2) / (x * (1.0 + d1*x + d2*x2));
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
static double CLHEP::RandLandau::transformSmall |
( |
double |
r | ) |
|
|
staticprotected |
The documentation for this class was generated from the following files: