CMS 3D CMS Logo

EcalGlobalShowerContainmentCorrectionsVsEtaESProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: EcalGlobalShowerContainmentCorrectionsVsEtaESProducer
4 // Class: EcalGlobalShowerContainmentCorrectionsVsEtaESProducer
5 //
17 // system include files
18 #include <memory>
19 
20 // user include files
23 
25 
29 
31 public:
34 
35  typedef std::unique_ptr<EcalGlobalShowerContainmentCorrectionsVsEta> ReturnType;
36 
38 
39 private:
40 };
41 
43  const edm::ParameterSet &iConfig) {
44  setWhatProduced(this);
45 }
46 
48 
49 //
50 // member functions
51 //
52 
56  using namespace edm::es;
57  using namespace std;
58 
59  auto pEcalGlobalShowerContainmentCorrectionsVsEta = std::make_unique<EcalGlobalShowerContainmentCorrectionsVsEta>();
60 
61  double values[] = {
62  43.77, // 3x3
63  1.,
64  -3.97e-006,
65  43.77, // 5x5
66  1.,
67  -3.97e-006,
68  };
69 
70  const size_t size = sizeof values / sizeof values[0];
72  std::copy(values, values + size, coeff.data);
73  pEcalGlobalShowerContainmentCorrectionsVsEta->fillCorrectionCoefficients(coeff);
74 
75  return pEcalGlobalShowerContainmentCorrectionsVsEta;
76 }
77 
78 // define this as a plug-in
size
Write out results.
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
def copy(args, dbName)
Structure defining the container for correction coefficients.
ReturnType produce(const EcalGlobalShowerContainmentCorrectionsVsEtaRcd &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
std::unique_ptr< EcalGlobalShowerContainmentCorrectionsVsEta > ReturnType