14#include "CLHEP/Random/defs.h"
15#include "CLHEP/Random/RandSkewNormal.h"
16#include "CLHEP/Random/RandGaussT.h"
17#include "CLHEP/Random/DoubConv.hh"
28 return fire( shapeParameter );
67 for(
double* v = vect; v != vect+size; ++v )
72 double* vect,
double shape )
74 for(
double* v = vect; v != vect+size; ++v )
75 *v =
shoot(anEngine, shape);
90 for(
double* v = vect; v != vect+size; ++v )
91 *v =
fire( shapeParameter );
97 for(
double* v = vect; v != vect+size; ++v )
113 double delta = k/std::sqrt(1. + k*k);
114 double u1 = delta*u[0] + std::sqrt(1 - delta*delta)*u[1];
115 double r = u[0] >= 0 ? u1 : -u1;
122 int pr=os.precision(20);
123 std::vector<unsigned long> t(2);
124 os <<
" " <<
name() <<
"\n";
125 os <<
"Uvec" <<
"\n";
127 os << shapeParameter <<
" " << t[0] <<
" " << t[1] <<
"\n";
135 if (inName !=
name()) {
136 is.clear(std::ios::badbit | is.rdstate());
137 std::cerr <<
"Mismatch when expecting to read state of a "
138 <<
name() <<
" distribution\n"
139 <<
"Name found was " << inName
140 <<
"\nistream is left in the badbit state\n";
144 std::vector<unsigned long> t(2);
static double longs2double(const std::vector< unsigned long > &v)
static std::vector< unsigned long > dto2longs(double d)
static HepRandomEngine * getTheEngine()
static void shootArray(const int size, double *vect, double mean=0.0, double stdDev=1.0)
static double gaussianSkewNormal(HepRandomEngine *e, double k)
static void shootArray(const int size, double *vect, double shape=0.)
virtual ~RandSkewNormal()
double getShapeParameter()
void fireArray(const int size, double *vect)
std::istream & get(std::istream &is)
HepRandomEngine * getLocalEngine()
std::ostream & put(std::ostream &os) const
HepRandomEngine & engine()
bool possibleKeywordInput(IS &is, const std::string &key, T &t)