4 #include <boost/foreach.hpp>
5 #include <boost/bind.hpp>
13 namespace reco {
namespace tau {
16 const std::string eslabel):
17 name_(name), eslabel_(eslabel) {}
23 plugin.second->setup(evt, es);
33 const MVAComputerContainer *container = handle.
product();
43 typedef std::vector<PhysicsTools::Calibration::Variable> VarList;
49 if (std::strncmp(var.name.c_str(),
"__", 2) != 0) {
68 std::vector<double> pluginOutput = (
plugin->second)->
operator()(
tau);
70 for(
size_t instance = 0; instance < pluginOutput.size(); ++instance) {
73 <<
" the tau MVA variable " <<
id <<
" returning zero instead!";
74 pluginOutput[instance] = 0.0;
79 std::for_each(pluginOutput.begin(), pluginOutput.end(),
void setEvent(const edm::Event &evt, const edm::EventSetup &es)
void fillValues(const reco::PFTauRef &tau) const
Container::value_type value_type
std::string discPluginName(const std::string &mvaName)
PhysicsTools::Variable::ValueList values_
void addParameter(std::string const &name, T const &value)
double operator()(const PFTauRef &tau) const
const PhysicsTools::Variable::ValueList & discriminants(const PFTauRef &tau) const
void train(const PFTauRef &tau, bool target, double weight=1.0) const
T const * product() const
RecoTauMVAHelper(const std::string &name, const std::string eslabel="")
PhysicsTools::MVAComputerCache computer_
void loadDiscriminantPlugins(const PhysicsTools::Calibration::MVAComputer &computer)
T get(const Candidate &c)