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)
155 const unsigned nScales = h.
nEtaBins();
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::auto_ptr<reco::FFTJetPileupSummary>
summary;
193 std::auto_ptr<reco::FFTJetPileupSummary>
205 int uncertaintyCode = -1;
209 for (
unsigned i = 0;
i < nZones; ++
i)
212 if (i == nZones - 1U)
225 return std::auto_ptr<reco::FFTJetPileupSummary>(
227 rhoUncert, uncertaintyCode));
231 std::auto_ptr<reco::FFTJetPileupSummary>
238 boost::shared_ptr<npstat::StorableMultivariateFunctor> uz =
240 boost::shared_ptr<npstat::StorableMultivariateFunctor> cc =
242 boost::shared_ptr<npstat::StorableMultivariateFunctor> uc =
247 const int uncertaintyCode = round((*uz)(&curve, 1U));
249 return std::auto_ptr<reco::FFTJetPileupSummary>(
251 rhoUncert, uncertaintyCode));
T getParameter(std::string const &) const
void produce(edm::Event &, const edm::EventSetup &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#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
edm::EDGetTokenT< reco::DiscretizedEnergyFlow > inputToken
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
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
std::auto_ptr< fftjet::Functor1< double, double > > uncertaintyCurve
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