60 std::optional<EGEnergyCorrector>
cordb;
67 : corddbFactory_(consumesCollector(),
"wgbrph"),
96 auto const& caloGeometry = ecalClusterToolsESData.
caloGeometry;
100 iEvent.
getByLabel(
"offlinePrimaryVerticesWithBS", hVertexProduct);
102 for (
auto const& it : *hPhotonProduct) {
104 std::pair<double, double> corsdb =
cordb->CorrectedEnergyWithError(it, *hVertexProduct, lazyTools, caloGeometry);
106 printf(
"file: default = %5f, correction = %5f, uncertainty = %5f\n", it.energy(), corsfile.first, corsfile.second);
107 printf(
"db: default = %5f, correction = %5f, uncertainty = %5f\n", it.energy(), corsdb.first, corsdb.second);
std::pair< double, double > CorrectedEnergyWithError(const reco::Photon &p, const reco::VertexCollection &vtxcol, EcalClusterLazyTools &clustertools, CaloGeometry const &caloGeometry)
EGEnergyAnalyzer(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
EGEnergyCorrector corfile
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< EcalRecHitCollection > ebRHToken_
const EcalClusterLazyTools::ESGetTokens ecalClusterToolsESGetTokens_
EGEnergyCorrector::Initializer build(edm::EventSetup const &) const
void addDefault(ParameterSetDescription const &psetDescription)
~EGEnergyAnalyzer() override
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< EcalRecHitCollection > eeRHToken_
EGEnergyCorrectorFactoryFromEventSetup corddbFactory_
std::optional< EGEnergyCorrector > cordb