Go to the documentation of this file.
15 #include "CLHEP/Random/defs.h"
16 #include "CLHEP/Random/RandGaussQ.h"
17 #include "CLHEP/Units/PhysicalConstants.h"
38 double mean,
double stdDev )
40 for(
double*
v = vect;
v != vect +
size; ++
v )
45 const int size,
double* vect,
46 double mean,
double stdDev )
48 for(
double*
v = vect;
v != vect +
size; ++
v )
49 *
v =
shoot(anEngine,mean,stdDev);
54 for(
double*
v = vect;
v != vect +
size; ++
v )
59 double mean,
double stdDev )
61 for(
double*
v = vect;
v != vect +
size; ++
v )
62 *
v =
fire( mean, stdDev );
76 #define Table0size 250
77 #define Table1size 1000
78 #define TableSize (Table0size+Table1size)
80 #define Table0step (2.0E-6)
81 #define Table1step (5.0E-4)
83 #define Table0scale (1.0/Table1step)
85 #define Table0offset 0
86 #define Table1offset (Table0size)
90 static const float gaussTables [
TableSize] = {
91 #include "gaussQTables.cdat"
121 double y0 = gaussTables [index++];
122 double y1 = gaussTables [index];
124 return (
float) (sign * ( y1 * dx + y0 * (1.0-dx) ));
155 for (
int i = 1;
i < 50;
i++ ) {
156 double vn2 = 1.0/(guess*guess);
157 double s1 = -13*11*9*7*5*3 * vn2*vn2*vn2*vn2*vn2*vn2*vn2;
158 s1 += 11*9*7*5*3 * vn2*vn2*vn2*vn2*vn2*vn2;
159 s1 += -9*7*5*3 * vn2*vn2*vn2*vn2*vn2;
160 s1 += 7*5*3 * vn2*vn2*vn2*vn2;
161 s1 += -5*3 * vn2*vn2*vn2;
162 s1 += 3 * vn2*vn2 - vn2 + 1.0;
163 v = std::sqrt ( 2.0 * std::log ( s1 / (r*guess*std::sqrt(CLHEP::twopi)) ) );
164 if ( std::fabs(
v-guess) < eps )
break;
172 int pr=os.precision(20);
173 os <<
" " <<
name() <<
"\n";
182 if (inName !=
name()) {
183 is.clear(std::ios::badbit |
is.rdstate());
184 std::cerr <<
"Mismatch when expecting to read state of a "
185 <<
name() <<
" distribution\n"
186 <<
"Name found was " << inName
187 <<
"\nistream is left in the badbit state\n";
HepRandomEngine & engine()
HepRandomEngine & engine()
HepRotation and so forth isNear() norm2() rectify() static Rotation row1 row4(To avoid bloat in the code pulled in for programs which don 't use all these features, we split the implementation .cc files. Only isNear() goes into the original Rotation.cc) --------------------------------------- HepAxisAngle and HepEulerAngles classes --------------------------------------- These classes are very useful and simple structures for holding the result of a nice intuituve decomposition of a rotation there is no longer much content in the distinct ZOOM PhysicsVectors library The only content left in the library is the object files representing the various Exception objects When we build the CLHEP classes for the ZOOM we will set up so as to use ZOOM SpaceVector is(but we can disable namespace usage and most of our users do so at this point). What I do is leave Hep3Vector in the global namespace
std::istream & get(std::istream &is)
user code seldom needs to call this function directly ZMerrno whether or not they are still recorded ZMerrno size() Return the(integer) number of ZMthrow 'n exceptions currently recorded. 5) ZMerrno.clear() Set an internal counter to zero. This counter is available(see next function) to user code to track ZMthrow 'n exceptions that have occurred during any arbitrary time interval. 6) ZMerrno.countSinceCleared() Return the(integer) number of ZMthrow 'n exceptions that have been recorded via ZMerrno.write()
they are gone ZOOM Features Discontinued The following features of the ZOOM package were felt to be extreme overkill These have been after checking that no existing user code was utilizing as in SpaceVector v
static void shootArray(const int size, double *vect, double mean=0.0, double stdDev=1.0)
static double transformQuick(double r)
static double transformSmall(double r)
std::ostream & put(std::ostream &os) const
void fireArray(const int size, double *vect)
shared_ptr< HepRandomEngine > localEngine
std::istream & get(std::istream &is)
virtual double operator()()
std::ostream & put(std::ostream &os) const