6 #include <boost/uuid/uuid.hpp> 7 #include <boost/uuid/uuid_generators.hpp> 8 #include <boost/uuid/uuid_io.hpp> 9 #include <boost/lexical_cast.hpp> 15 boost::uuids::random_generator
gen;
17 for( std::vector<std::string>::const_iterator
formula = pl.formulas().begin();
formula != pl.formulas().end(); ++
formula ) {
19 const auto formulaUniqueName = boost::lexical_cast<
std::string>(uniqueFormulaId);
20 boost::shared_ptr<TFormula>
temp(
new TFormula(formulaUniqueName.c_str(),
formula->c_str()));
22 compiledFormulas_.push_back(temp);
32 if ( ! isInPayload(r,p) ) {
33 edm::LogError(
"PerformancePayloadFromTFormula") <<
"Missing formula in conditions. Maybe code/conditions are inconsistent" << std::endl;
37 const boost::shared_ptr<TFormula>&
formula = compiledFormulas_[resultPos(r)];
41 std::vector<BinningVariables::BinningVariablesType>
t = myBinning();
46 for (std::vector<BinningVariables::BinningVariablesType>::const_iterator it = t.begin(); it != t.end();++it, ++
i){
55 return formula->EvalPar(values);
60 std::vector<BinningVariables::BinningVariablesType>
t = myBinning();
62 for (std::vector<BinningVariables::BinningVariablesType>::const_iterator it = t.begin(); it != t.end();++it){
65 int pos = limitPos(*it);
66 std::pair<float, float> limits = (pl.limits())[pos];
67 if (v<limits.first || v>limits.second)
return false;
76 if ( ! isOk(point))
return false;
85 cout <<
"Warning: result not available!" << endl;
90 const boost::shared_ptr<TFormula>&
formula =
91 compiledFormulas_[resultPos(res)];
92 cout <<
"-- Formula: " << formula->GetExpFormula(
"p") << endl;
95 std::vector<BinningVariables::BinningVariablesType>
t = myBinning();
97 for (std::vector<BinningVariables::BinningVariablesType>::const_iterator it = t.begin(); it != t.end();++it){
98 int pos = limitPos(*it);
99 std::pair<float, float> limits = (pl.limits())[pos];
100 cout <<
" Variable: " << *it <<
" with limits: " <<
"from: " << limits.first <<
" to: " << limits.second << endl;
bool isKeyAvailable(BinningVariables::BinningVariablesType)
float value(BinningVariables::BinningVariablesType)
def gen(fragment, howMuch)
Production test section ####.
#define TYPELOOKUP_DATA_REG(_dataclass_)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point