RecoEcal
EgammaCoreTools
plugins
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
23
#include "
FWCore/Framework/interface/ModuleFactory.h
"
24
#include "
FWCore/Framework/interface/ESProducer.h
"
25
#include <
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
>
26
#include <
FWCore/ParameterSet/interface/ParameterSetDescription.h
>
27
28
#include "
CondFormats/DataRecord/interface/EcalSCDynamicDPhiParametersRcd.h
"
29
#include "
RecoEcal/EgammaCoreTools/interface/SCDynamicDPhiParametersHelper.h
"
30
31
//
32
// class declaration
33
//
34
35
class
EcalSCDynamicDPhiParametersESProducer
:
public
edm::ESProducer
{
36
public
:
37
EcalSCDynamicDPhiParametersESProducer
(
const
edm::ParameterSet
&);
38
~EcalSCDynamicDPhiParametersESProducer
()
override
;
39
40
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
41
42
using
ReturnType
= std::unique_ptr<EcalSCDynamicDPhiParameters>;
43
44
ReturnType
produce
(
const
EcalSCDynamicDPhiParametersRcd
&);
45
46
private
:
47
EcalSCDynamicDPhiParameters
params_
;
48
};
49
50
//
51
// constructors and destructor
52
//
53
EcalSCDynamicDPhiParametersESProducer::EcalSCDynamicDPhiParametersESProducer
(
const
edm::ParameterSet
& iConfig) {
54
setWhatProduced
(
this
);
55
56
reco::SCDynamicDPhiParametersHelper
scDynamicDPhiParams(
params_
, iConfig);
57
}
58
59
EcalSCDynamicDPhiParametersESProducer::~EcalSCDynamicDPhiParametersESProducer
() {}
60
61
//
62
// member functions
63
//
64
65
// ------------ method called to produce the data ------------
66
EcalSCDynamicDPhiParametersESProducer::ReturnType
EcalSCDynamicDPhiParametersESProducer::produce
(
67
const
EcalSCDynamicDPhiParametersRcd
& iRecord) {
68
auto
product = std::make_unique<EcalSCDynamicDPhiParameters>(
params_
);
69
return
product;
70
}
71
72
void
EcalSCDynamicDPhiParametersESProducer::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
73
edm::ParameterSetDescription
desc
;
74
{
75
edm::ParameterSetDescription
vpsd1;
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
104
DEFINE_FWK_EVENTSETUP_MODULE
(
EcalSCDynamicDPhiParametersESProducer
);
ConfigurationDescriptions.h
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition:
ParameterSetDescription.h:95
SCDynamicDPhiParametersHelper.h
EcalSCDynamicDPhiParametersESProducer::~EcalSCDynamicDPhiParametersESProducer
~EcalSCDynamicDPhiParametersESProducer() override
Definition:
EcalSCDynamicDPhiParametersESProducer.cc:59
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:163
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
ESProducer.h
EcalSCDynamicDPhiParametersESProducer
Definition:
EcalSCDynamicDPhiParametersESProducer.cc:35
EcalSCDynamicDPhiParametersESProducer::EcalSCDynamicDPhiParametersESProducer
EcalSCDynamicDPhiParametersESProducer(const edm::ParameterSet &)
Definition:
EcalSCDynamicDPhiParametersESProducer.cc:53
EcalSCDynamicDPhiParametersESProducer::produce
ReturnType produce(const EcalSCDynamicDPhiParametersRcd &)
Definition:
EcalSCDynamicDPhiParametersESProducer.cc:66
EcalSCDynamicDPhiParametersESProducer::params_
EcalSCDynamicDPhiParameters params_
Definition:
EcalSCDynamicDPhiParametersESProducer.cc:47
EcalSCDynamicDPhiParametersESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
EcalSCDynamicDPhiParametersESProducer.cc:72
EcalSCDynamicDPhiParametersRcd.h
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
EcalSCDynamicDPhiParametersESProducer::ReturnType
std::unique_ptr< EcalSCDynamicDPhiParameters > ReturnType
Definition:
EcalSCDynamicDPhiParametersESProducer.cc:42
EcalSCDynamicDPhiParameters
Definition:
EcalSCDynamicDPhiParameters.h:13
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::ParameterSet
Definition:
ParameterSet.h:47
reco::SCDynamicDPhiParametersHelper
Definition:
SCDynamicDPhiParametersHelper.h:9
edm::ParameterSet::addParameter
void addParameter(std::string const &name, T const &value)
Definition:
ParameterSet.h:135
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
EcalSCDynamicDPhiParametersRcd
Definition:
EcalSCDynamicDPhiParametersRcd.h:23
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
edm::ESProducer
Definition:
ESProducer.h:104
Generated for CMSSW Reference Manual by
1.8.16