File indexing completed on 2024-04-06 11:57:35
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include <memory>
0019
0020
0021 #include "FWCore/Framework/interface/ESProducer.h"
0022 #include "FWCore/Framework/interface/ModuleFactory.h"
0023
0024 #include "FWCore/Framework/interface/ESHandle.h"
0025
0026 #include "CondFormats/DataRecord/interface/EcalGlobalShowerContainmentCorrectionsVsEtaRcd.h"
0027 #include "CondFormats/EcalCorrections/interface/EcalGlobalShowerContainmentCorrectionsVsEta.h"
0028 #include "DataFormats/EcalDetId/interface/EBDetId.h"
0029
0030 class EcalGlobalShowerContainmentCorrectionsVsEtaESProducer : public edm::ESProducer {
0031 public:
0032 EcalGlobalShowerContainmentCorrectionsVsEtaESProducer(const edm::ParameterSet &);
0033 ~EcalGlobalShowerContainmentCorrectionsVsEtaESProducer() override;
0034
0035 typedef std::unique_ptr<EcalGlobalShowerContainmentCorrectionsVsEta> ReturnType;
0036
0037 ReturnType produce(const EcalGlobalShowerContainmentCorrectionsVsEtaRcd &);
0038
0039 private:
0040 };
0041
0042 EcalGlobalShowerContainmentCorrectionsVsEtaESProducer::EcalGlobalShowerContainmentCorrectionsVsEtaESProducer(
0043 const edm::ParameterSet &iConfig) {
0044 setWhatProduced(this);
0045 }
0046
0047 EcalGlobalShowerContainmentCorrectionsVsEtaESProducer::~EcalGlobalShowerContainmentCorrectionsVsEtaESProducer() {}
0048
0049
0050
0051
0052
0053 EcalGlobalShowerContainmentCorrectionsVsEtaESProducer::ReturnType
0054 EcalGlobalShowerContainmentCorrectionsVsEtaESProducer::produce(
0055 const EcalGlobalShowerContainmentCorrectionsVsEtaRcd &iRecord) {
0056 using namespace edm::es;
0057 using namespace std;
0058
0059 auto pEcalGlobalShowerContainmentCorrectionsVsEta = std::make_unique<EcalGlobalShowerContainmentCorrectionsVsEta>();
0060
0061 double values[] = {
0062 43.77,
0063 1.,
0064 -3.97e-006,
0065 43.77,
0066 1.,
0067 -3.97e-006,
0068 };
0069
0070 const size_t size = sizeof values / sizeof values[0];
0071 EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients coeff;
0072 std::copy(values, values + size, coeff.data);
0073 pEcalGlobalShowerContainmentCorrectionsVsEta->fillCorrectionCoefficients(coeff);
0074
0075 return pEcalGlobalShowerContainmentCorrectionsVsEta;
0076 }
0077
0078
0079 DEFINE_FWK_EVENTSETUP_MODULE(EcalGlobalShowerContainmentCorrectionsVsEtaESProducer);