11 #include <boost/foreach.hpp>
12 #include <boost/ptr_container/ptr_map.hpp>
32 const std::vector<double> &
values =
34 double stepSize = (max -
min)/(values.size()-1);
35 std::auto_ptr<TGraph>
output(
new TGraph(values.size()));
37 double x = min +
step*stepSize;
55 typedef boost::ptr_map<reco::PFTau::hadronicDecayMode, TGraph>
TransformMap;
66 typedef std::vector<edm::ParameterSet> VPSet;
71 unsigned int nPiZeros = transform.
getParameter<
unsigned int>(
"nPiZeros");
81 transforms_.insert(decayMode, buildTransform(transformImpl));
83 edm::LogError(
"DecayModeNotUnique") <<
"The tau decay mode with "
84 "nCharged/nPiZero = " << nCharged <<
"/" << nPiZeros <<
85 " dm: " << decayMode <<
86 " is associated to multiple MVA transforms, "
87 "the second instantiation is being ignored!!!";
100 TransformMap::const_iterator transformIter =
105 const TGraph *
transform = transformIter->second;
108 double result = transform->Eval(value);
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
PFTau::hadronicDecayMode translateDecayMode(unsigned int nCharged, unsigned int nPiZero)
const T & max(const T &a, const T &b)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
unsigned int nCharged(const GenJet &jet)
double prediscriminantFailValue_