11 #include <boost/foreach.hpp>
19 namespace reco {
namespace tau {
31 std::map<reco::PFTau::hadronicDecayMode, MeanAndWidthFuncs>
transforms_;
37 typedef std::vector<edm::ParameterSet> VPSet;
42 uint32_t nPiZeros = dm.
getParameter<uint32_t>(
"nPiZeros");
58 std::map<reco::PFTau::hadronicDecayMode, MeanAndWidthFuncs>::const_iterator
65 meanFunc = transform->second.first.get();
66 rmsFunc = transform->second.second.get();
69 double mean = (*meanFunc)(*tau);
70 double rms = (*rmsFunc)(*tau);
72 double result = (rms > 0) ? (weightedDeltaR - mean)/rms : -1.;
74 return std::vector<double>(1,
result);
82 "RecoTauDiscriminantInvariantWidth");
T getParameter(std::string const &) const
std::pair< TauFuncPtr, TauFuncPtr > MeanAndWidthFuncs
PFTau::hadronicDecayMode translateDecayMode(unsigned int nCharged, unsigned int nPiZero)
std::vector< double > operator()(const reco::PFTauRef &tau) const
std::map< reco::PFTau::hadronicDecayMode, MeanAndWidthFuncs > transforms_
RecoTauDiscriminantInvariantWidth(const edm::ParameterSet &pset)
StringObjectFunction< PFTau > TauFunc
MeanAndWidthFuncs defaultTransform_
unsigned int nCharged(const GenJet &jet)
double OpeningDeltaR(Tau tau)
#define DEFINE_EDM_PLUGIN(factory, type, name)
boost::shared_ptr< TauFunc > TauFuncPtr