CMS 3D CMS Logo

EcalMustacheSCParametersESProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: RecoEcal/EgammaCoreTools
4 // Class: EcalMustacheSCParametersESProducer
5 //
13 //
14 // Original Author: Thomas Reis <Thomas.Reis@stfc.ac.uk>
15 // Created: Wed, 21 Oct 2020 15:05: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<EcalMustacheSCParameters>;
43 
45 
46 private:
48 };
49 
50 //
51 // constructors and destructor
52 //
54  setWhatProduced(this);
55 
56  reco::MustacheSCParametersHelper mustacheSCParams(params_, iConfig);
57 }
58 
60 
61 //
62 // member functions
63 //
64 
65 // ------------ method called to produce the data ------------
67  const EcalMustacheSCParametersRcd& iRecord) {
68  auto product = std::make_unique<EcalMustacheSCParameters>(params_);
69  return product;
70 }
71 
74  desc.add<double>("sqrtLogClustETuning", 1.1);
75  {
77  vpsd1.add<double>("log10EMin");
78  vpsd1.add<double>("etaMin");
79  vpsd1.add<std::vector<double>>("pUp");
80  vpsd1.add<std::vector<double>>("pLow");
81  vpsd1.add<std::vector<double>>("w0Up");
82  vpsd1.add<std::vector<double>>("w1Up");
83  vpsd1.add<std::vector<double>>("w0Low");
84  vpsd1.add<std::vector<double>>("w1Low");
85  std::vector<edm::ParameterSet> temp1;
86  temp1.reserve(1);
87  {
88  edm::ParameterSet temp2;
89  temp2.addParameter<double>("log10EMin", -3.);
90  temp2.addParameter<double>("etaMin", 0.);
91  temp2.addParameter<std::vector<double>>("pUp", {-0.107537, 0.590969, -0.076494});
92  temp2.addParameter<std::vector<double>>("pLow", {-0.0268843, 0.147742, -0.0191235});
93  temp2.addParameter<std::vector<double>>("w0Up", {-0.00681785, -0.00239516});
94  temp2.addParameter<std::vector<double>>("w1Up", {0.000699995, -0.00554331});
95  temp2.addParameter<std::vector<double>>("w0Low", {-0.00681785, -0.00239516});
96  temp2.addParameter<std::vector<double>>("w1Low", {0.000699995, -0.00554331});
97  temp1.push_back(temp2);
98  }
99  desc.addVPSet("parabolaParameterSets", vpsd1, temp1);
100  }
101  descriptions.add("ecalMustacheSCParametersESProducer", desc);
102 }
103 
104 //define this as a plug-in
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:136
ParameterDescriptionBase * add(U const &iLabel, T const &value)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
ReturnType produce(const EcalMustacheSCParametersRcd &)
std::unique_ptr< EcalMustacheSCParameters > ReturnType
void add(std::string const &label, ParameterSetDescription const &psetDescription)