43 if (discriminatorOption_string ==
"loose")
45 else if (discriminatorOption_string ==
"medium")
47 else if (discriminatorOption_string ==
"tight")
49 else if (discriminatorOption_string ==
"custom")
53 <<
" Invalid Configuration parameter 'discriminatorOption' = " << discriminatorOption_string <<
" !!\n";
54 wpDef_ = std::make_unique<PFRecoTauDiscriminationAgainstMuonConfigSet>(
56 cfg.getParameter<
double>(
"HoPMin"),
57 cfg.getParameter<
int>(
"maxNumberOfMatches"),
58 cfg.getParameter<
bool>(
"doCaloMuonVeto"),
59 cfg.getParameter<
int>(
"maxNumberOfHitsLast2Stations"));
61 Muons_token = consumes<reco::MuonCollection>(srcMuons_);
62 dRmuonMatch_ =
cfg.getParameter<
double>(
"dRmuonMatch");
63 dRmuonMatchLimitedToJetArea_ =
cfg.getParameter<
bool>(
"dRmuonMatchLimitedToJetArea");
64 minPtMatchedMuon_ =
cfg.getParameter<
double>(
"minPtMatchedMuon");
65 typedef std::vector<int>
vint;
66 maskMatchesDT_ =
cfg.getParameter<
vint>(
"maskMatchesDT");
67 maskMatchesCSC_ =
cfg.getParameter<
vint>(
"maskMatchesCSC");
68 maskMatchesRPC_ =
cfg.getParameter<
vint>(
"maskMatchesRPC");
69 maskHitsDT_ =
cfg.getParameter<
vint>(
"maskHitsDT");
70 maskHitsCSC_ =
cfg.getParameter<
vint>(
"maskHitsCSC");
71 maskHitsRPC_ =
cfg.getParameter<
vint>(
"maskHitsRPC");
72 verbosity_ =
cfg.getParameter<
int>(
"verbosity");
74 ~PFRecoTauDiscriminationAgainstMuon2()
override {}
84 std::unique_ptr<PFRecoTauDiscriminationAgainstMuonConfigSet> wpDef_;
89 bool dRmuonMatchLimitedToJetArea_;
90 double minPtMatchedMuon_;
91 std::vector<int> maskMatchesDT_;
92 std::vector<int> maskMatchesCSC_;
93 std::vector<int> maskMatchesRPC_;
94 std::vector<int> maskHitsDT_;
95 std::vector<int> maskHitsCSC_;
96 std::vector<int> maskHitsRPC_;
97 static std::atomic<unsigned int> numWarnings_;
98 static constexpr unsigned int maxWarnings_ = 3;
102 std::atomic<unsigned int> PFRecoTauDiscriminationAgainstMuon2::numWarnings_{0};
105 if (!srcMuons_.label().empty()) {
114 srcMuons_.label().empty(),
117 dRmuonMatchLimitedToJetArea_,
129 double discriminatorValue =
helper.eval(*wpDef_, pfTau);
131 edm::LogPrint(
"PFTauAgainstMuon2") <<
"--> returning discriminatorValue = " << discriminatorValue;
132 return discriminatorValue;
140 desc.add<std::vector<int>>(
"maskHitsRPC",
147 desc.add<
int>(
"maxNumberOfHitsLast2Stations", 0);
148 desc.add<std::vector<int>>(
"maskMatchesRPC",
155 desc.add<std::vector<int>>(
"maskMatchesCSC",
162 desc.add<std::vector<int>>(
"maskHitsCSC",
170 desc.add<
int>(
"verbosity", 0);
171 desc.add<std::vector<int>>(
"maskMatchesDT",
178 desc.add<
double>(
"minPtMatchedMuon", 5.0);
179 desc.add<
bool>(
"dRmuonMatchLimitedToJetArea",
false);
185 psd1.
add<
double>(
"cut");
203 desc.add<std::vector<int>>(
"maskHitsDT",
210 desc.add<
double>(
"HoPMin", 0.2);
211 desc.add<
int>(
"maxNumberOfMatches", 0);
213 desc.add<
double>(
"dRmuonMatch", 0.3);
215 desc.add<
bool>(
"doCaloMuonVeto",
false);
216 descriptions.add(
"pfRecoTauDiscriminationAgainstMuon2",
desc);
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual TauDiscriminatorDataType discriminate(const TauRef &tau) const =0
virtual void beginEvent(const edm::Event &, const edm::EventSetup &)
#define DEFINE_FWK_MODULE(type)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Log< level::Warning, true > LogPrint
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)