39 #define init_param(type, varname) varname (ps.getParameter< type >( #varname )) 56 void endJob()
override;
63 std::unique_ptr<reco::FFTJetPileupSummary> calibrateFromConfig(
64 double uncalibrated)
const;
66 std::unique_ptr<reco::FFTJetPileupSummary> calibrateFromDB(
72 if (ptr.get() ==
NULL)
156 const unsigned nCdfvalues = h.
nPhiBins();
158 const unsigned fixedCdfvalueBin =
static_cast<unsigned>(
160 if (fixedCdfvalueBin >= nCdfvalues)
163 <<
"Bad cdf value" << std::endl;
168 <<
"Bad filter number" << std::endl;
174 std::unique_ptr<reco::FFTJetPileupSummary>
summary;
193 std::unique_ptr<reco::FFTJetPileupSummary>
205 int uncertaintyCode = -1;
209 for (
unsigned i = 0;
i < nZones; ++
i)
212 if (i == nZones - 1
U)
225 return std::make_unique<reco::FFTJetPileupSummary>(curve, pileupRho, rhoUncert, uncertaintyCode);
229 std::unique_ptr<reco::FFTJetPileupSummary>
236 boost::shared_ptr<npstat::StorableMultivariateFunctor> uz =
238 boost::shared_ptr<npstat::StorableMultivariateFunctor> cc =
240 boost::shared_ptr<npstat::StorableMultivariateFunctor> uc =
245 const int uncertaintyCode = round((*uz)(&curve, 1
U));
247 return std::make_unique<reco::FFTJetPileupSummary>(curve, pileupRho, rhoUncert, uncertaintyCode);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void produce(edm::Event &, const edm::EventSetup &) override
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
unsigned nEtaBins() const
std::string calibTableRecord
std::unique_ptr< reco::FFTJetPileupSummary > calibrateFromDB(double uncalibrated, const edm::EventSetup &iSetup) const
std::auto_ptr< fftjet::Functor1< double, double > > calibrationCurve
static std::string const input
edm::EDGetTokenT< reco::DiscretizedEnergyFlow > inputToken
const double * data() const
std::auto_ptr< fftjet::Functor1< double, double > > fftjet_Function_parser(const edm::ParameterSet &ps)
unsigned nPhiBins() const
std::vector< double > uncertaintyZones
std::auto_ptr< fftjet::Functor1< double, double > > uncertaintyCurve
std::string calibTableCategory
std::string uncertaintyZonesName
std::string calibrationCurveName
std::string uncertaintyCurveName
std::unique_ptr< reco::FFTJetPileupSummary > calibrateFromConfig(double uncalibrated) const
static const Mapper & instance()
#define init_param(type, varname)
void checkConfig(const Ptr &ptr, const char *message)