14#include "CLHEP/Random/defs.h"
15#include "CLHEP/Random/RandSkewNormal.h"
16#include "CLHEP/Random/RandGaussT.h"
17#include "CLHEP/Random/DoubConv.h"
33 return fire( shapeParameter );
72 for(
double* v = vect; v != vect+size; ++v )
77 double* vect,
double shape )
79 for(
double* v = vect; v != vect+size; ++v )
80 *v =
shoot(anEngine, shape);
95 for(
double* v = vect; v != vect+size; ++v )
96 *v =
fire( shapeParameter );
102 for(
double* v = vect; v != vect+size; ++v )
118 double delta = k/std::sqrt(1. + k*k);
119 double u1 = delta*u[0] + std::sqrt(1 - delta*delta)*u[1];
120 double r = u[0] >= 0 ? u1 : -u1;
127 long pr=os.precision(20);
128 std::vector<unsigned long> t(2);
129 os <<
" " <<
name() <<
"\n";
130 os <<
"Uvec" <<
"\n";
132 os << shapeParameter <<
" " << t[0] <<
" " << t[1] <<
"\n";
140 if (inName !=
name()) {
141 is.clear(std::ios::badbit | is.rdstate());
142 std::cerr <<
"Mismatch when expecting to read state of a "
143 <<
name() <<
" distribution\n"
144 <<
"Name found was " << inName
145 <<
"\nistream is left in the badbit state\n";
149 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)