1#ifndef TREECUTSELECTOR_H
2#define TREECUTSELECTOR_H
14 TreeCutSelector(
const std::string& inputName,
const std::string& cfgFile);
19 std::string
getCutString(std::string cutname,
bool forTree =
false);
20 std::string
getFullCutString(std::vector<std::string> cuts_to_exclude = {},
bool forTree =
false);
21 std::string
getCutVar(std::string cutname,
bool forTree =
false);
37 std::cout <<
"ERROR " << cutname <<
" cut not implemented" << std::endl;
38 return std::make_pair(-999.9, 999.9);
45 std::cout << it->first <<
" [min:] =" << it->second.first.first <<
" [max:] =" << it->second.first.second
46 <<
" [id:] =" << it->second.second << std::endl;
50 void setCutValue(std::string cutname, std::pair<double, double> value) {
52 range_cuts[cutname] = std::make_pair(value,
id);
55 bool hasCut(
const std::string& cutname) {
62 void filterCuts(std::vector<std::string> cut_variable_list);
65 typedef std::map<std::string, std::pair<std::pair<double, double>,
int>>::iterator
range_cut_it;
66 std::map<std::string, std::pair<std::pair<double, double>,
int>>
range_cuts;
72 std::map<std::string, std::string>
labels;
std::string getCutString(std::string cutname, bool forTree=false)
std::map< std::string, std::pair< std::pair< double, double >, int > > * getPointerToCuts()
get pointer to the base class cuts
std::pair< double, double > getCutRange(std::string cutname)
json _h_selections
description
std::string getFullCutString(std::vector< std::string > cuts_to_exclude={}, bool forTree=false)
bool hasCut(const std::string &cutname)
std::string getCutVar(std::string cutname, bool forTree=false)
void filterCuts(std::vector< std::string > cut_variable_list)
virtual ~TreeCutSelector()
std::shared_ptr< TH1F > h_cf_
description
void setCutValue(std::string cutname, std::pair< double, double > value)
std::map< std::string, std::pair< std::pair< double, double >, int > >::iterator range_cut_it
description
void makeCutFlowHisto()
description
std::map< std::string, std::pair< std::pair< double, double >, int > > range_cuts
std::string m_cfgFile
description
std::string m_name
description
std::map< std::string, std::string > labels
description