11 #include "RooWorkspace.h" 15 #define ERROR(x) do{throw std::runtime_error(string("Error in file ")+__FILE__+" at line "+to_string(__LINE__)+" (in "+__func__+"): "+x);}while(false) 16 #define DBG(x) do{std::cerr << "In " << __FILE__ << " at line " << __LINE__ << " (in function " << __func__ << "): " << x << std::endl;}while(false) 18 bool Contains(
const std::string &str,
const std::string &pat);
19 bool StartsWith(
const std::string &str,
const std::string &pat);
21 void ReplaceAll(std::string &str,
const std::string &orig,
const std::string &rep);
23 void RmCutOn(std::string &cut,
const std::string &orig,
const std::string &rep=
"1");
25 size_t MaxIndex(
const std::vector<double> &v);
28 const std::string &set_name,
29 const std::vector<std::string> &
var_names);
38 std::vector<std::string>
Tokenize(
const std::string& input,
39 const std::string& tokens=
" ");
41 std::string
ChangeExtension(std::string path,
const std::string &new_ext);
43 std::string
MakeDir(std::string prefix);
48 void Append(T &collection,
const typename T::value_type &value){
49 collection.insert(collection.end(), value);
void Append(T &collection, const typename T::value_type &value)
void RmCutOn(std::string &cut, const std::string &orig, const std::string &rep="1")
bool StartsWith(const std::string &str, const std::string &pat)
void parseMasses(const std::string &str, int &mglu, int &mlsp)
void ReplaceAll(std::string &str, const std::string &orig, const std::string &rep)
bool Contains(const std::string &str, const std::string &pat)
std::string execute(const std::string &cmd)
size_t MaxIndex(const std::vector< double > &v)
std::string ChangeExtension(std::string path, const std::string &new_ext)
void DefineSet(RooWorkspace &w, const std::string &set_name, const std::vector< std::string > &var_names)
void GetCountAndUncertainty(TTree &tree, const Cut &cut, double &count, double &uncertainty)
std::string MakeDir(std::string prefix)
std::vector< std::string > Tokenize(const std::string &input, const std::string &tokens=" ")