12 const std::map<std::string, unsigned>& n2idx,
13 const std::vector<double>&
values,
17 for (
const auto&
val : n2idx) {
24 unsigned internal_idx = 0;
27 return names_[internal_idx];
30 throw cms::Exception(
"IndexNotFound") <<
"index = " <<
idx <<
" has no corresponding cut name!";
36 throw cms::Exception(
"OutOfBounds") <<
idx <<
" is out of bounds for this cut flow!";
43 if (found_name ==
names_.end() || *found_name !=
name) {
44 throw cms::Exception(
"UnknownName") <<
"Cut name: " <<
name <<
" is not known for this cutflow!";
51 throw cms::Exception(
"OutOfBounds") <<
idx <<
" is out of bounds for this cut flow!";
58 if (found_name ==
names_.end() || *found_name !=
name) {
59 throw cms::Exception(
"UnknownName") <<
"Cut name: " <<
name <<
" is not known for this cutflow!";
66 throw cms::Exception(
"OutOfBounds") <<
idx <<
" is out of bounds for this cut flow!";
73 if (found_name ==
names_.end() || *found_name !=
name) {
74 throw cms::Exception(
"UnknownName") <<
"Cut name: " <<
name <<
" is not known for this cutflow!";
82 for (
const unsigned idx : idxs) {
84 throw cms::Exception(
"OutOfBounds") <<
idx <<
" is out of bounds for this cut flow!";
88 bitmap = bitmap |
mask;
97 if (found_name ==
names_.end() || *found_name !=
name) {
98 throw cms::Exception(
"UnknownName") <<
"Cut name: " <<
name <<
" is not known for this cutflow!";
102 bitmap = bitmap |
mask;
110 throw cms::Exception(
"OutOfBounds") <<
idx <<
" is out of bounds for this cut flow!";
113 bitmap = bitmap |
mask;
121 if (found_name ==
names_.end() || *found_name !=
name) {
122 throw cms::Exception(
"UnknownName") <<
"Cut name: " <<
name <<
" is not known for this cutflow!";
125 bitmap = bitmap |
mask;
bool isCutMasked(const unsigned idx) const
double getCutValue(const unsigned idx) const
bool getCutBit(const unsigned idx) const
std::vector< unsigned > indices_
std::vector< std::string > names_
const std::string names[nVars_]
bool getCutResultByIndex(const unsigned idx) const
double getValueCutUpon(const unsigned idx) const
const std::string & getNameAtIndex(const unsigned idx) const
std::vector< double > values_
bool getCutResultByName(const std::string &name) const
CutFlowResult getCutFlowResultMasking(const unsigned idx) const
bool getMaskBit(const unsigned idx) const