1 #ifndef JetMETCorrections_FFTJetModules_FFTJetESParameterParser_h
2 #define JetMETCorrections_FFTJetModules_FFTJetESParameterParser_h
16 template<
class Jet,
class Adjustable>
17 boost::shared_ptr<AbsFFTJetAdjuster<Jet, Adjustable> >
20 typedef boost::shared_ptr<AbsFFTJetAdjuster<Jet,Adjustable> > Result;
24 if (!adjuster_type.compare(
"FFTSimpleScalingAdjuster"))
27 else if (!adjuster_type.compare(
"FFTUncertaintyAdjuster"))
30 else if (!adjuster_type.compare(
"FFTScalingAdjusterWithUncertainty"))
35 <<
"In parseFFTJetAdjuster: unknown adjuster type \""
36 << adjuster_type <<
"\"\n";
41 template<
class Jet,
class Adjustable>
42 boost::shared_ptr<AbsFFTJetScaleCalculator<Jet, Adjustable> >
44 gs::StringArchive& ar,
47 typedef boost::shared_ptr<AbsFFTJetScaleCalculator<Jet,Adjustable> > Result;
60 CPP11_auto_ptr<npstat::StorableMultivariateFunctor> autof =
62 CPP11_shared_ptr<npstat::StorableMultivariateFunctor>
f(autof.release());
66 if (!mapper_type.compare(
"auto"))
67 mapper_type =
f->description();
69 if (!mapper_type.compare(
"FFTEtaLogPtConeRadiusMapper"))
72 else if (!mapper_type.compare(
"FFTSpecificScaleCalculator"))
77 subclass,
f->description());
83 <<
"In parseFFTJetScaleCalculator: unknown mapper type \""
84 << mapper_type <<
'"' << std::endl;
89 template<
class Corrector>
91 gs::StringArchive& ar,
94 typedef typename Corrector::jet_type MyJet;
95 typedef typename Corrector::adjustable_type Adjustable;
105 boost::shared_ptr<AbsFFTJetAdjuster<MyJet,Adjustable> > adj =
106 parseFFTJetAdjuster<MyJet,Adjustable>(adjuster,
verbose);
109 const std::vector<edm::ParameterSet>& scalers =
110 ps.
getParameter<std::vector<edm::ParameterSet> >(
"scalers");
111 const unsigned nScalers = scalers.size();
112 std::vector<boost::shared_ptr<AbsFFTJetScaleCalculator<MyJet,Adjustable> > > sVec;
113 sVec.reserve(nScalers);
114 for (
unsigned i=0;
i<nScalers; ++
i)
116 boost::shared_ptr<AbsFFTJetScaleCalculator<MyJet,Adjustable> >
s =
117 parseFFTJetScaleCalculator<MyJet,Adjustable>(scalers[
i], ar,
verbose);
123 #endif // JetMETCorrections_FFTJetModules_FFTJetESParameterParser_h
Multidimensional functor which picks one of the elements from an array of doubles.
T getParameter(std::string const &) const
Corrector parseFFTJetCorrector(const edm::ParameterSet &ps, gs::StringArchive &ar, const bool verbose)
AbsFFTSpecificScaleCalculator * parseFFTSpecificScaleCalculator(const edm::ParameterSet &ps, const std::string &tableDescription)
FFTJetCorrectorApp parseFFTJetCorrectorApp(const std::string &config)
std::unique_ptr< npstat::StorableMultivariateFunctor > loadFFTJetInterpolationTable(const edm::ParameterSet &ps, gs::StringArchive &ar, bool verbose)
boost::shared_ptr< AbsFFTJetScaleCalculator< Jet, Adjustable > > parseFFTJetScaleCalculator(const edm::ParameterSet &ps, gs::StringArchive &ar, const bool verbose)
boost::shared_ptr< AbsFFTJetAdjuster< Jet, Adjustable > > parseFFTJetAdjuster(const edm::ParameterSet &ps, const bool)