22 #include "fftjet/FrequencyKernelConvolver.hh" 23 #include "fftjet/DiscreteGauss2d.hh" 24 #include "fftjet/EquidistantSequence.hh" 25 #include "fftjet/interpolate.hh" 26 #include "fftjet/FrequencyKernelConvolver.hh" 27 #include "fftjet/FrequencySequentialConvolver.hh" 28 #include "fftjet/DiscreteGauss1d.hh" 29 #include "fftjet/DiscreteGauss2d.hh" 59 void endJob()
override;
79 std::unique_ptr<fftjet::AbsFrequencyKernel>
kernel2d;
80 std::unique_ptr<fftjet::AbsFrequencyKernel1d>
etaKernel;
81 std::unique_ptr<fftjet::AbsFrequencyKernel1d>
phiKernel;
84 std::unique_ptr<fftjet::AbsConvolverBase<Real> >
convolver;
98 scalePower(ps.getParameter<double>(
"scalePower")),
105 convolvedFlow = std::unique_ptr<fftjet::Grid2d<fftjetcms::Real> >(
new fftjet::Grid2d<fftjetcms::Real>(*energyFlow));
125 const bool use2dKernel = etaDependentScaleFactors.empty();
127 if (etaDependentScaleFactors.size() !=
energyFlow->nEta())
128 throw cms::Exception(
"FFTJetBadConfig") <<
"invalid number of eta-dependent scale factors" << std::endl;
133 if (kernelEtaScale <= 0.0 || kernelPhiScale <= 0.0)
134 throw cms::Exception(
"FFTJetBadConfig") <<
"invalid kernel scale" << std::endl;
145 if (fixEfficiency || !use2dKernel) {
146 convolverMinBin = ps.
getParameter<
unsigned>(
"convolverMinBin");
155 kernel2d = std::unique_ptr<fftjet::AbsFrequencyKernel>(
156 new fftjet::DiscreteGauss2d(kernelEtaScale, kernelPhiScale,
energyFlow->nEta(),
energyFlow->nPhi()));
159 convolver = std::unique_ptr<fftjet::AbsConvolverBase<Real> >(
new fftjet::FrequencyKernelConvolver<Real, Complex>(
168 std::unique_ptr<fftjet::AbsFrequencyKernel1d>(
new fftjet::DiscreteGauss1d(kernelEtaScale,
energyFlow->nEta()));
171 std::unique_ptr<fftjet::AbsFrequencyKernel1d>(
new fftjet::DiscreteGauss1d(kernelPhiScale,
energyFlow->nPhi()));
174 convolver = std::unique_ptr<fftjet::AbsConvolverBase<Real> >(
175 new fftjet::FrequencySequentialConvolver<Real, Complex>(
engine.get(),
196 const double* scales = &(*iniScales)[0];
198 const unsigned nEta = g.nEta();
199 const unsigned nPhi = g.nPhi();
200 const double bin0edge = g.phiBin0Edge();
203 auto pTable = std::make_unique<TH3F>(
"FFTJetEFlowSmoother",
204 "FFTJetEFlowSmoother",
213 bin0edge + 2.0 *
M_PI);
214 TH3F*
h = pTable.get();
215 h->SetDirectory(
nullptr);
216 h->GetXaxis()->SetTitle(
"Scale");
217 h->GetYaxis()->SetTitle(
"Eta");
218 h->GetZaxis()->SetTitle(
"Phi");
224 h->SetBinContent(1U,
ieta + 1U,
iphi + 1U, factor * g.binValue(
ieta,
iphi));
228 for (
unsigned iscale = 0; iscale <
nScales; ++iscale) {
238 h->SetBinContent(iscale + 2U,
ieta + 1U,
iphi + 1U, factor * etaData[
iphi]);
std::unique_ptr< MyFFTEngine > engine
T getParameter(std::string const &) const
std::unique_ptr< fftjet::AbsFrequencyKernel1d > etaKernel
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::unique_ptr< fftjet::AbsConvolverBase< Real > > convolver
void loadInputCollection(const edm::Event &)
std::unique_ptr< MyFFTEngine > anotherEngine
FFTJetEFlowSmoother()=delete
void checkConfig(const Ptr &ptr, const char *message)
std::unique_ptr< fftjet::Grid2d< Real > > fftjet_Grid2d_parser(const edm::ParameterSet &ps)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
double etConversionFactor
double getEventScale() const
#define DEFINE_FWK_MODULE(type)
std::unique_ptr< std::vector< double > > iniScales
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > convolvedFlow
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > energyFlow
void produce(edm::Event &, const edm::EventSetup &) override
std::unique_ptr< fftjet::AbsFrequencyKernel > kernel2d
~FFTJetEFlowSmoother() override
void discretizeEnergyFlow()
fftjet::FFTWDoubleEngine MyFFTEngine
void buildKernelConvolver(const edm::ParameterSet &)
std::unique_ptr< fftjet::AbsFrequencyKernel1d > phiKernel
std::unique_ptr< std::vector< double > > fftjet_ScaleSet_parser(const edm::ParameterSet &ps)
const std::string outputLabel
Power< A, B >::type pow(const A &a, const B &b)