18 if(cutname.find(
"_gt") != std::string::npos){
31 if(isCutGT) substr =
"_gt";
34 std::size_t ind = cutname.find(substr);
35 if(ind !=std::string::npos){
36 cutvar = cutname.erase(ind,substr.length());
38 std::cout<<
"Substring does not exist in the string: "+cutname << std::endl;
45 std::pair<double,int> pair =
cuts[cutname];
46 double ogval = pair.first;
52 std::cout <<
"[IterativeCutSelector] Updating cut " << cutname <<
" value from " << ogval <<
" to: " <<
cuts[cutname].first << std::endl;
64 if (val <
cuts[cutname].first) {
73 if (val >
cuts[cutname].first) {
83 std::cout << it->first <<
": " << it->second.first << std::endl;
90 for(std::map<std::string, std::pair<double,int>>::iterator it =
getPointerToCuts()->begin();
92 std::string cutname = it->first;
93 std::string cutvariable =
getCutVar(cutname);
97 for(std::vector<std::string>::iterator iit=cut_variable_list.begin(); iit !=cut_variable_list.end(); iit++){
98 if((std::string)*iit == cutvariable){
std::map< std::string, std::pair< double, int > > cuts
description
bool hasCut(const std::string &cutname)
description
std::map< std::string, std::pair< double, int > >::iterator cut_it
description
virtual ~IterativeCutSelector()
bool isCutGreaterThan(std::string cutname)
is cut of type 'greater than'
std::string getCutVar(std::string cutname)
get cut variable from name
std::map< std::string, std::pair< double, int > > * getPointerToCuts()
get pointer to the base class cuts
void filterCuts(std::vector< std::string > cut_variable_list)
remove cuts that aren't specified in the list of cut variables
void setCutValue(std::string cutname, double value)
set cut value
void printCuts()
prints cuts and values
bool passCutGTorLT(std::string cutname, double val)
does value pass cut