11 #include <boost/foreach.hpp>
17 namespace reco {
namespace tau {
29 typedef std::pair<edm::InputTag, edm::Handle<reco::PFTauDiscriminator> >
DiscInfo;
50 pset.
getParameter<std::vector<edm::InputTag> >(
"discSrc");
69 bool foundGoodDiscriminator =
false;
76 foundGoodDiscriminator =
true;
82 if (!foundGoodDiscriminator) {
83 std::stringstream
error;
84 error <<
"Couldn't find a PFTauDiscriminator usable with given tau."
85 << std::endl <<
" Input tau has product id: " << tau.
id() << std::endl;
94 edm::LogError(
"BadDiscriminatorConfiguration") << error.str();
100 return std::vector<double>(1,
result);
108 "RecoTauDiscriminantFromDiscriminator");
void beginEvent() override
T getParameter(std::string const &) const
std::vector< double > operator()(const reco::PFTauRef &tau) const override
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
U second(std::pair< T, U > const &p)
std::vector< DiscInfo > discriminators_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const edm::Event * evt() const
RecoTauDiscriminantFromDiscriminator(const edm::ParameterSet &pset)
KeyRefProd const & keyProduct() const
std::pair< edm::InputTag, edm::Handle< reco::PFTauDiscriminator > > DiscInfo
#define DEFINE_EDM_PLUGIN(factory, type, name)
ProductID id() const
Accessor for product ID.