31 std::map<reco::PFTau::hadronicDecayMode, MeanAndWidthFuncs>
transforms_;
37 typedef std::vector<edm::ParameterSet>
VPSet;
40 uint32_t
nCharged =
dm.getParameter<uint32_t>(
"nCharged");
41 uint32_t
nPiZeros =
dm.getParameter<uint32_t>(
"nPiZeros");
57 std::map<reco::PFTau::hadronicDecayMode, MeanAndWidthFuncs>::const_iterator
64 meanFunc = transform->second.first.get();
65 rmsFunc = transform->second.second.get();
68 double mean = (*meanFunc)(*tau);
69 double rms = (*rmsFunc)(*tau);
71 double result = (rms > 0) ? (weightedDeltaR - mean)/rms : -1.;
73 return std::vector<double>(1,
result);
81 "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 override
std::map< reco::PFTau::hadronicDecayMode, MeanAndWidthFuncs > transforms_
RecoTauDiscriminantInvariantWidth(const edm::ParameterSet &pset)
StringObjectFunction< PFTau > TauFunc
MeanAndWidthFuncs defaultTransform_
double OpeningDeltaR(Tau tau)
#define DEFINE_EDM_PLUGIN(factory, type, name)
boost::shared_ptr< TauFunc > TauFuncPtr