39 #define init_param(type, varname) varname (ps.getParameter< type >( #varname ))
41 using namespace fftjetcms;
56 void endJob()
override;
63 std::auto_ptr<reco::FFTJetPileupSummary> calibrateFromConfig(
64 double uncalibrated)
const;
66 std::auto_ptr<reco::FFTJetPileupSummary> calibrateFromDB(
72 if (ptr.get() ==
NULL)
151 const unsigned nScales = h.
nEtaBins();
152 const unsigned nCdfvalues = h.
nPhiBins();
154 const unsigned fixedCdfvalueBin =
static_cast<unsigned>(
156 if (fixedCdfvalueBin >= nCdfvalues)
159 <<
"Bad cdf value" << std::endl;
164 <<
"Bad filter number" << std::endl;
170 std::auto_ptr<reco::FFTJetPileupSummary>
summary;
189 std::auto_ptr<reco::FFTJetPileupSummary>
201 int uncertaintyCode = -1;
205 for (
unsigned i = 0;
i < nZones; ++
i)
208 if (i == nZones - 1U)
221 return std::auto_ptr<reco::FFTJetPileupSummary>(
223 rhoUncert, uncertaintyCode));
227 std::auto_ptr<reco::FFTJetPileupSummary>
234 boost::shared_ptr<npstat::StorableMultivariateFunctor> uz =
236 boost::shared_ptr<npstat::StorableMultivariateFunctor> cc =
238 boost::shared_ptr<npstat::StorableMultivariateFunctor> uc =
243 const int uncertaintyCode = round((*uz)(&curve, 1U));
245 return std::auto_ptr<reco::FFTJetPileupSummary>(
247 rhoUncert, uncertaintyCode));
T getParameter(std::string const &) const
void produce(edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
unsigned nEtaBins() const
std::string calibTableRecord
Summary info for pile-up determined by Gaussian filtering.
std::auto_ptr< fftjet::Functor1< double, double > > calibrationCurve
static std::string const input
const double * data() const
std::auto_ptr< fftjet::Functor1< double, double > > fftjet_Function_parser(const edm::ParameterSet &ps)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
unsigned nPhiBins() const
std::vector< double > uncertaintyZones
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::auto_ptr< fftjet::Functor1< double, double > > uncertaintyCurve
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
std::string calibTableCategory
std::string uncertaintyZonesName
std::string calibrationCurveName
std::string uncertaintyCurveName
std::auto_ptr< reco::FFTJetPileupSummary > calibrateFromDB(double uncalibrated, const edm::EventSetup &iSetup) const
static const Mapper & instance()
#define init_param(type, varname)
void checkConfig(const Ptr &ptr, const char *message)
std::auto_ptr< reco::FFTJetPileupSummary > calibrateFromConfig(double uncalibrated) const