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)
list var
if using global norm cols_to_minmax = ['t_delta', 't_hmaxNearP','t_emaxNearP', 't_hAnnular', 't_eAnnular','t_pt','t_nVtx','t_ieta','t_eHcal10', 't_eHcal30','t_rhoh','t_eHcal'] df[cols_to_minmax] = df[cols_to_minmax].apply(lambda x: (x - x.min()) / (x.max() - x.min()) if (x.max() - x.min() > 0) else 1.0/200.0)
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)