CP3-llbb Framework
ScaleFactors.h
1 #pragma once
2 
3 #include <FWCore/ParameterSet/interface/ParameterSet.h>
4 
5 #include <cp3_llbb/Framework/interface/Histogram.h>
6 #include <cp3_llbb/Framework/interface/BinnedValues.h>
7 #include <cp3_llbb/TreeWrapper/interface/TreeWrapper.h>
8 
9 #include <boost/property_tree/ptree.hpp>
10 
11 #include <memory>
12 
13 class ScaleFactors {
14 
15  public:
16  ScaleFactors(ROOT::TreeGroup& tree):
17  m_tree(tree) {
18  // Empty
19  }
20 
21  virtual void create_branches(const edm::ParameterSet&) final;
22  virtual void create_branch(const std::string& scale_factor, const std::string& branch_name);
23 
24  virtual void store_scale_factors(const Parameters&, bool isData) final;
25 
26  virtual float get_scale_factor(const std::string& tag, size_t index, Variation variation = Variation::Nominal) final;
27 
28  private:
29  ROOT::TreeGroup& m_tree;
30 
31  std::map<std::string, std::vector<std::vector<float>>*> m_branches;
32  std::map<std::string, std::unique_ptr<BinnedValues>> m_scale_factors;
33 };
Definition: BinnedValues.h:67
Definition: ScaleFactors.h:13