35 return fire( defaultA );
78 while ((w = u * u + v * v) > 1.0);
80 return(u * std::sqrt( a * ( std::exp(- 2.0 / a * std::log(w)) - 1.0) / w));
86 for(
double*
v = vect;
v != vect + size; ++
v )
91 const int size,
double* vect,
94 for(
double*
v = vect;
v != vect + size; ++
v )
104 u = 2.0 * localEngine->flat() - 1.0;
105 v = 2.0 * localEngine->flat() - 1.0;
107 while ((w = u * u + v * v) > 1.0);
109 return(u * std::sqrt( a * ( std::exp(- 2.0 / a * std::log(w)) - 1.0) / w));
114 for(
double*
v = vect;
v != vect + size; ++
v )
121 for(
double*
v = vect;
v != vect + size; ++
v )
131 u = 2.0 * anEngine->
flat() - 1.0;
132 v = 2.0 * anEngine->
flat() - 1.0;
134 while ((w = u * u + v * v) > 1.0);
136 return(u * std::sqrt( a * ( std::exp(- 2.0 / a * std::log(w)) - 1.0) / w));
140 int pr=os.precision(20);
141 std::vector<unsigned long> t(2);
142 os <<
" " <<
name() <<
"\n";
143 os <<
"Uvec" <<
"\n";
145 os << defaultA <<
" " << t[0] <<
" " << t[1] <<
"\n";
153 if (inName !=
name()) {
154 is.clear(std::ios::badbit | is.rdstate());
155 std::cerr <<
"Mismatch when expecting to read state of a "
156 <<
name() <<
" distribution\n"
157 <<
"Name found was " << inName
158 <<
"\nistream is left in the badbit state\n";
162 std::vector<unsigned long> t(2);
void fireArray(const int size, double *vect)
std::vector< ExP01TrackerHit * > a
std::istream & get(std::istream &is)
static HepRandomEngine * getTheEngine()
bool possibleKeywordInput(IS &is, const std::string &key, T &t)
static std::vector< unsigned long > dto2longs(double d)
static void shootArray(const int size, double *vect, double a=1.0)
std::ostream & put(std::ostream &os) const
HepRandomEngine & engine()
static double longs2double(const std::vector< unsigned long > &v)