CP3-llbb Framework
Cut.h
1 #ifndef CUT_H
2 #define CUT_H
3 
4 #include <string>
5 #include <map>
6 
7 #include <cp3_llbb/TreeWrapper/interface/TreeWrapper.h>
8 
9 
10 struct CategoryData;
11 
12 struct Cut {
13  Cut(const std::string& name_, const std::string& description_, ROOT::TreeGroup& tree):
14  cut(tree[name_ + "_cut"].write<bool>()),
15  name(name_),
16  description(description_) {
17 
18  // Empty
19  }
20 
21  bool& cut;
22 
23  std::string name;
24  std::string description;
25 };
26 
27 class CutManager {
28  public:
29  CutManager(CategoryData& category):
30  m_category(category)
31  {
32  // Empty
33  }
34 
35  void new_cut(const std::string& name, const std::string& description);
36  void pass_cut(const std::string& name);
37  bool cut_passed(const std::string& name) const;
38  private:
39  CategoryData& m_category;
40  std::map<std::string, Cut> m_cuts;
41 };
42 
43 #endif
Definition: Cut.h:27
Definition: Category.h:40
Definition: Cut.h:12