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
ConfigurationDescriptions.h
EcalMustacheSCParametersESProducer::produce
ReturnType produce(const EcalMustacheSCParametersRcd &)
Definition: EcalMustacheSCParametersESProducer.cc:66
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
EcalMustacheSCParametersESProducer::ReturnType
std::unique_ptr< EcalMustacheSCParameters > ReturnType
Definition: EcalMustacheSCParametersESProducer.cc:42
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ESProducer.h
EcalMustacheSCParameters
Definition: EcalMustacheSCParameters.h:13
EcalMustacheSCParametersRcd.h
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
MustacheSCParametersHelper.h
EcalMustacheSCParametersESProducer::params_
EcalMustacheSCParameters params_
Definition: EcalMustacheSCParametersESProducer.cc:47
ParameterSetDescription.h
EcalMustacheSCParametersESProducer::~EcalMustacheSCParametersESProducer
~EcalMustacheSCParametersESProducer() override
Definition: EcalMustacheSCParametersESProducer.cc:59
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
EcalMustacheSCParametersRcd
Definition: EcalMustacheSCParametersRcd.h:23
edm::ParameterSet
Definition: ParameterSet.h:47
EcalMustacheSCParametersESProducer
Definition: EcalMustacheSCParametersESProducer.cc:35
reco::MustacheSCParametersHelper
Definition: MustacheSCParametersHelper.h:9
edm::ParameterSet::addParameter
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:135
EcalMustacheSCParametersESProducer::EcalMustacheSCParametersESProducer
EcalMustacheSCParametersESProducer(const edm::ParameterSet &)
Definition: EcalMustacheSCParametersESProducer.cc:53
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
edm::ESProducer
Definition: ESProducer.h:104
EcalMustacheSCParametersESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: EcalMustacheSCParametersESProducer.cc:72