1 #ifndef DILEPTONANALYZER_H
2 #define DILEPTONANALYZER_H
4 #include <cp3_llbb/Framework/interface/Analyzer.h>
5 #include <cp3_llbb/Framework/interface/Category.h>
8 enum class WorkingPoint {
14 DileptonAnalyzer(
const std::string& name,
const ROOT::TreeGroup& tree_,
const edm::ParameterSet& config):
15 Analyzer(name, tree_, config) {
16 m_standalone_mode = config.getUntrackedParameter<
bool>(
"standalone",
false);
18 m_muons_wp = string_to_wp(config.getUntrackedParameter<std::string>(
"muons_wp",
"loose"));
19 m_electrons_wp = string_to_wp(config.getUntrackedParameter<std::string>(
"electrons_wp",
"loose"));
21 m_electron_loose_wp_name = config.getUntrackedParameter<std::string>(
"electrons_loose_wp_name",
"cutBasedElectronID-Summer16-80X-V1-loose");
22 m_electron_tight_wp_name = config.getUntrackedParameter<std::string>(
"electrons_tight_wp_name",
"cutBasedElectronID-Summer16-80X-V1-tight");
27 virtual void registerCategories(
CategoryManager& manager,
const edm::ParameterSet&)
override;
29 BRANCH(mumu, std::vector<LorentzVector>);
30 BRANCH(elel, std::vector<LorentzVector>);
31 BRANCH(elmu, std::vector<LorentzVector>);
32 BRANCH(muel, std::vector<LorentzVector>);
33 BRANCH(mumu_indices, std::vector<std::pair<unsigned int,unsigned int>>);
34 BRANCH(elel_indices, std::vector<std::pair<unsigned int,unsigned int>>);
35 BRANCH(elmu_indices, std::vector<std::pair<unsigned int,unsigned int>>);
36 BRANCH(muel_indices, std::vector<std::pair<unsigned int,unsigned int>>);
39 WorkingPoint string_to_wp(
const std::string& wp) {
41 return WorkingPoint::LOOSE;
42 }
else if (wp ==
"tight") {
43 return WorkingPoint::TIGHT;
45 throw edm::Exception(edm::errors::NotFound,
"Unsupported working point: " + wp);
49 template <
class T>
bool passID(
const T& producer,
size_t index);
51 bool m_standalone_mode =
false;
53 WorkingPoint m_muons_wp;
54 WorkingPoint m_electrons_wp;
56 std::string m_electron_loose_wp_name;
57 std::string m_electron_tight_wp_name;
Definition: AnalyzersManager.h:10
Definition: Category.h:88
Definition: DileptonAnalyzer.h:7
Definition: Analyzer.h:28
Definition: ProducersManager.h:10