10 #include <CLHEP/Random/RandGauss.h>
11 #include <CLHEP/Random/Random.h>
29 ALIint iast = str.find(
'*');
33 ALIstring unitstr = str.substr(iast + 1, str.length());
37 std::cerr <<
" ParameterMgr::getVal of an ALIstring that is not a number: " << valstr << std::endl;
51 std::cerr <<
" ParameterMgr::getVal of an string that is not a number nor a previous parameter: " << str
58 return atof(str.c_str()) * dimensionFactor;
66 std::cerr <<
"!! WARNING: PARAMETER " << name <<
" appears twice, it will take first value " << std::endl;
80 std::cerr <<
"!! WARNING: PARAMETER " << name <<
" appears twice, it will take first value " << std::endl;
87 std::cout <<
" addRandomGaussParameter " << name <<
" " << valMean <<
" " << valStdDev <<
" = " << val
98 std::cerr <<
"!! WARNING: PARAMETER " << name <<
" appears twice, it will take first value " << std::endl;
102 ALIdouble val = CLHEP::HepRandom::getTheEngine()->flat();
104 val = val * 2 * interval + mean -
interval;
107 std::cout <<
" addRandomFlatParameter " << name <<
" " << valMean <<
" " << valInterval <<
" = " << val
119 if (namet[0] ==
'-') {
121 namet = namet.substr(1, namet.length());
134 val = (*ite).second * negpar;
static ParameterMgr * getInstance()
ALIint getParameterValue(const ALIstring &name, ALIdouble &val)
void addRandomGaussParameter(const ALIstring &name, const ALIstring &valMean, const ALIstring &valStdDev)
void setRandomSeed(const long seed)
static int IsNumber(const ALIstring &str)
static ParameterMgr * theInstance
void addRandomFlatParameter(const ALIstring &name, const ALIstring &valMean, const ALIstring &valInterval)
static ALIdouble GetValueOf(ALIstring)
ALIdouble getVal(const ALIstring &str, const ALIdouble dimensionFactor=1.)
void addParameter(const ALIstring &name, const ALIstring &valstr)