5 : isPUFilter_(pset.getParameter<bool>(
"isPUFilter")),
6 preselection_(pset.getParameter<std::
string>(
"preselection")),
7 method_(pset.getParameter<std::
string>(
"method")),
8 weightsFile_(pset.getParameter<std::
string>(
"weightsFile")),
9 reader_(new TMVA::Reader()),
10 wp_(pset.getParameter<std::
string>(
"wp")) {
12 for (
const auto &psvar : pset.
getParameter<std::vector<edm::ParameterSet>>(
"variables")) {
19 for (
auto &
var : variables_)
20 var.declare(*reader_);
22 if (weightsFile_[0] !=
'/' && weightsFile_[0] !=
'.') {
29 if (preselection_(c)) {
30 for (
auto &
var : variables_)
32 float mvaOut = reader_->EvaluateMVA(method_);
37 return (mvaOut > wp_(c) ? 1 : 0);
HGC3DClusterEgID(const edm::ParameterSet &pset)
const edm::EventSetup & c
void setEgVsPionMVAOut(float egVsPionMVAOut)
void setEgVsPUMVAOut(float egVsPUMVAOut)
T getParameter(std::string const &) const
std::vector< Var > variables_
TMVA::IMethod * loadTMVAWeights(TMVA::Reader *reader, const std::string &method, const std::string &weightFile, bool verbose=false)
std::string fullPath() const
float passID(l1t::HGCalMulticluster c, l1t::PFCluster &cpf)