11 #include <boost/ptr_container/ptr_map.hpp> 34 const std::vector<double> &
values =
36 double stepSize = (max -
min)/(values.size()-1);
37 std::unique_ptr<TGraph>
output(
new TGraph(values.size()));
39 double x = min +
step*stepSize;
58 typedef boost::ptr_map<reco::PFTau::hadronicDecayMode, TGraph>
TransformMap;
69 typedef std::vector<edm::ParameterSet>
VPSet;
84 transforms_.insert(decayMode, buildTransform(transformImpl).
get());
86 edm::LogError(
"DecayModeNotUnique") <<
"The tau decay mode with " 87 "nCharged/nPiZero = " << nCharged <<
"/" << nPiZeros <<
88 " dm: " << decayMode <<
89 " is associated to multiple MVA transforms, " 90 "the second instantiation is being ignored!!!";
103 TransformMap::const_iterator transformIter =
108 const TGraph *
transform = transformIter->second;
111 double result = transform->Eval(value);
123 vpsd_transforms.
add<uint32_t>(
"nCharged");
124 vpsd_transforms.add<uint32_t>(
"nPiZeros");
127 pset_transform.
add<
double>(
"min");
128 pset_transform.add<
double>(
"max");
129 pset_transform.add<std::vector<double>>(
"transform");
133 desc.
addVPSet(
"transforms", vpsd_transforms);
137 descriptions.
add(
"recoTauMVATransform", desc);
T getParameter(std::string const &) const
ParameterDescriptionBase * addVPSet(U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
PFTau::hadronicDecayMode translateDecayMode(unsigned int nCharged, unsigned int nPiZero)
#define DEFINE_FWK_MODULE(type)
static void fillProducerDescriptions(edm::ParameterSetDescription &desc)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
double prediscriminantFailValue_