Definition at line 16 of file HGC3DClusterTMVASelector.cc.
l1t::HGC3DClusterTMVASelector::HGC3DClusterTMVASelector |
( |
const edm::ParameterSet & |
iConfig | ) |
|
|
explicit |
Definition at line 46 of file HGC3DClusterTMVASelector.cc.
References edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), reco::details::loadTMVAWeights(), method_, reader_, AlCaHLTBitMon_QueryRunRegistry::string, JetChargeProducer_cfi::var, variables_, and weightsFile_.
54 for (
const auto &psvar : iConfig.
getParameter<std::vector<edm::ParameterSet>>(
"variables")) {
66 produces<l1t::HGCalMulticlusterBxCollection>();
67 produces<l1t::HGCalMulticlusterBxCollection>(
"fail");
T getParameter(std::string const &) const
std::vector< Var > variables_
std::unique_ptr< TMVA::Reader > reader_
StringCutObjectSelector< l1t::HGCalMulticluster > preselection_
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)
std::string fullPath() const
l1t::HGC3DClusterTMVASelector::~HGC3DClusterTMVASelector |
( |
| ) |
|
|
inlineoverride |
Definition at line 70 of file HGC3DClusterTMVASelector.cc.
References EnergyCorrector::c, DEFINE_FWK_MODULE, cmsPerfPublish::fail(), edm::Event::getByToken(), method_, eostools::move(), MillePedeFileConverter_cfg::out, preselection_, edm::Event::put(), reader_, src_, JetChargeProducer_cfi::var, variables_, and wp_.
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);
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_
StringObjectFunction< l1t::HGCalMulticluster > wp_
edm::EDGetTokenT< l1t::HGCalMulticlusterBxCollection > src_
std::string l1t::HGC3DClusterTMVASelector::method_ |
|
private |
std::unique_ptr<TMVA::Reader> l1t::HGC3DClusterTMVASelector::reader_ |
|
private |
std::vector<Var> l1t::HGC3DClusterTMVASelector::variables_ |
|
private |
std::string l1t::HGC3DClusterTMVASelector::weightsFile_ |
|
private |