1 #ifndef JetMETCorrections_FFTJetModules_FFTJetESParameterParser_h
2 #define JetMETCorrections_FFTJetModules_FFTJetESParameterParser_h
16 template <
class Jet,
class Adjustable>
19 typedef std::shared_ptr<AbsFFTJetAdjuster<Jet, Adjustable> > Result;
23 if (!adjuster_type.compare(
"FFTSimpleScalingAdjuster"))
26 else if (!adjuster_type.compare(
"FFTUncertaintyAdjuster"))
29 else if (!adjuster_type.compare(
"FFTScalingAdjusterWithUncertainty"))
34 <<
"In parseFFTJetAdjuster: unknown adjuster type \"" << adjuster_type <<
"\"\n";
38 template <
class Jet,
class Adjustable>
40 gs::StringArchive& ar,
42 typedef std::shared_ptr<AbsFFTJetScaleCalculator<Jet, Adjustable> > Result;
56 std::shared_ptr<npstat::StorableMultivariateFunctor>
f(autof.release());
60 if (!mapper_type.compare(
"auto"))
61 mapper_type =
f->description();
63 if (!mapper_type.compare(
"FFTEtaLogPtConeRadiusMapper"))
66 else if (!mapper_type.compare(
"FFTSpecificScaleCalculator")) {
74 <<
"In parseFFTJetScaleCalculator: unknown mapper type \"" << mapper_type <<
'"' << std::endl;
78 template <
class Corrector>
80 typedef typename Corrector::jet_type MyJet;
81 typedef typename Corrector::adjustable_type Adjustable;
91 std::shared_ptr<const AbsFFTJetAdjuster<MyJet, Adjustable> > adj =
92 parseFFTJetAdjuster<MyJet, Adjustable>(adjuster,
verbose);
95 const std::vector<edm::ParameterSet>& scalers = ps.
getParameter<std::vector<edm::ParameterSet> >(
"scalers");
96 const unsigned nScalers = scalers.size();
97 std::vector<std::shared_ptr<const AbsFFTJetScaleCalculator<MyJet, Adjustable> > > sVec;
98 sVec.reserve(nScalers);
99 for (
unsigned i = 0;
i < nScalers; ++
i) {
100 std::shared_ptr<AbsFFTJetScaleCalculator<MyJet, Adjustable> >
s =
101 parseFFTJetScaleCalculator<MyJet, Adjustable>(scalers[
i], ar,
verbose);
107 #endif // JetMETCorrections_FFTJetModules_FFTJetESParameterParser_h
Multidimensional functor which picks one of the elements from an array of doubles.
Corrector parseFFTJetCorrector(const edm::ParameterSet &ps, gs::StringArchive &ar, const bool verbose)
std::shared_ptr< AbsFFTJetAdjuster< Jet, Adjustable > > parseFFTJetAdjuster(const edm::ParameterSet &ps, const bool)
static constexpr int verbose
AbsFFTSpecificScaleCalculator * parseFFTSpecificScaleCalculator(const edm::ParameterSet &ps, const std::string &tableDescription)
FFTJetCorrectorApp parseFFTJetCorrectorApp(const std::string &config)
T getParameter(std::string const &) const
std::unique_ptr< npstat::StorableMultivariateFunctor > loadFFTJetInterpolationTable(const edm::ParameterSet &ps, gs::StringArchive &ar, bool verbose)
std::shared_ptr< AbsFFTJetScaleCalculator< Jet, Adjustable > > parseFFTJetScaleCalculator(const edm::ParameterSet &ps, gs::StringArchive &ar, const bool verbose)