12 #include "TMVA/Factory.h" 13 #include "TMVA/Reader.h" 54 for (
const auto &psvar : iConfig.
getParameter<std::vector<edm::ParameterSet>>(
"variables")) {
66 produces<l1t::HGCalMulticlusterBxCollection>();
67 produces<l1t::HGCalMulticlusterBxCollection>(
"fail");
71 std::unique_ptr<l1t::HGCalMulticlusterBxCollection>
out = std::make_unique<l1t::HGCalMulticlusterBxCollection>();
72 std::unique_ptr<l1t::HGCalMulticlusterBxCollection>
fail = std::make_unique<l1t::HGCalMulticlusterBxCollection>();
77 for (
int bx = multiclusters->getFirstBX(); bx <= multiclusters->getLastBX(); ++bx) {
78 for (
auto it = multiclusters->begin(bx), ed = multiclusters->end(bx); it != ed; ++it) {
84 if (mvaOut >
wp_(
c)) {
85 out->push_back(bx,
c);
87 fail->push_back(bx,
c);
Var(const std::string &name, const std::string &expr)
T getParameter(std::string const &) const
void produce(edm::Event &, const edm::EventSetup &) override
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::vector< Var > variables_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::unique_ptr< TMVA::Reader > reader_
StringCutObjectSelector< l1t::HGCalMulticluster > preselection_
#define DEFINE_FWK_MODULE(type)
StringObjectFunction< l1t::HGCalMulticluster > expr_
StringObjectFunction< l1t::HGCalMulticluster > wp_
edm::EDGetTokenT< l1t::HGCalMulticlusterBxCollection > src_
TMVA::IMethod * loadTMVAWeights(TMVA::Reader *reader, const std::string &method, const std::string &weightFile, bool verbose=false)
void declare(TMVA::Reader &r)
std::string fullPath() const
~HGC3DClusterTMVASelector() override
HGC3DClusterTMVASelector(const edm::ParameterSet &)
void fill(const l1t::HGCalMulticluster &c)