CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalSCDynamicDPhiParametersESProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: RecoEcal/EgammaCoreTools
4 // Class: EcalSCDynamicDPhiParametersESProducer
5 //
13 //
14 // Original Author: Thomas Reis <Thomas.Reis@stfc.ac.uk>
15 // Created: Wed, 28 Oct 2020 16:17:26 GMT
16 //
17 //
18 
19 // system include files
20 #include <memory>
21 
22 // user include files
27 
30 
31 //
32 // class declaration
33 //
34 
36 public:
39 
40  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
41 
42  using ReturnType = std::unique_ptr<EcalSCDynamicDPhiParameters>;
43 
45 
46 private:
48 };
49 
50 //
51 // constructors and destructor
52 //
54  setWhatProduced(this);
55 
56  reco::SCDynamicDPhiParametersHelper scDynamicDPhiParams(params_, iConfig);
57 }
58 
60 
61 //
62 // member functions
63 //
64 
65 // ------------ method called to produce the data ------------
67  const EcalSCDynamicDPhiParametersRcd& iRecord) {
68  auto product = std::make_unique<EcalSCDynamicDPhiParameters>(params_);
69  return product;
70 }
71 
74  {
76  vpsd1.add<double>("eMin");
77  vpsd1.add<double>("etaMin");
78  vpsd1.add<double>("yoffset");
79  vpsd1.add<double>("scale");
80  vpsd1.add<double>("xoffset");
81  vpsd1.add<double>("width");
82  vpsd1.add<double>("saturation");
83  vpsd1.add<double>("cutoff");
84  std::vector<edm::ParameterSet> temp1;
85  temp1.reserve(1);
86  {
87  edm::ParameterSet temp2;
88  temp2.addParameter<double>("eMin", 0.);
89  temp2.addParameter<double>("etaMin", 0.);
90  temp2.addParameter<double>("yoffset", 0.0280506);
91  temp2.addParameter<double>("scale", 0.946048);
92  temp2.addParameter<double>("xoffset", -0.101172);
93  temp2.addParameter<double>("width", 0.432767);
94  temp2.addParameter<double>("saturation", 0.14);
95  temp2.addParameter<double>("cutoff", 0.6);
96  temp1.push_back(temp2);
97  }
98  desc.addVPSet("dynamicDPhiParameterSets", vpsd1, temp1);
99  }
100  descriptions.add("ecalSCDynamicDPhiParametersESProducer", desc);
101 }
102 
103 //define this as a plug-in
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
ParameterDescriptionBase * addVPSet(U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
std::unique_ptr< EcalSCDynamicDPhiParameters > ReturnType
ReturnType produce(const EcalSCDynamicDPhiParametersRcd &)
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:135
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
void add(std::string const &label, ParameterSetDescription const &psetDescription)