12 : drdA_(
pset.getParameter<double>(
"drdA")),
13 drdB_(
pset.getParameter<double>(
"drdB")),
14 ieta_shift_(
pset.getParameter<
int>(
"ieta_shift")) {
16 findingRecord<HBHEDarkeningRecord>();
18 const std::vector<edm::ParameterSet>& p_dosemaps =
pset.getParameter<std::vector<edm::ParameterSet>>(
"dosemaps");
20 for (
const auto& p_dosemap : p_dosemaps) {
25 const std::vector<edm::ParameterSet>& p_years =
pset.getParameter<std::vector<edm::ParameterSet>>(
"years");
26 years_.reserve(p_years.size());
27 for (
const auto& p_year : p_years) {
29 p_year.getParameter<
double>(
"intlumi"),
30 p_year.getParameter<
double>(
"lumirate"),
31 p_year.getParameter<
int>(
"energy"));
45 desc.add<
int>(
"ieta_shift");
46 desc.add<
double>(
"drdA");
47 desc.add<
double>(
"drdB");
49 desc_dosemaps.
add<
int>(
"energy");
51 std::vector<edm::ParameterSet> default_dosemap(1);
52 desc.addVPSet(
"dosemaps", desc_dosemaps, default_dosemap);
55 desc_years.
add<
double>(
"intlumi");
56 desc_years.
add<
double>(
"lumirate");
57 desc_years.
add<
int>(
"energy");
58 std::vector<edm::ParameterSet> default_year(1);
59 desc.addVPSet(
"years", desc_years, default_year);
67 std::map<int, std::vector<std::vector<float>>> dosemaps;
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ReturnType produce(const HBHEDarkeningRecord &)
static const IOVSyncValue & endOfTime()
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
std::pair< Time_t, Time_t > ValidityInterval
std::vector< HBHEDarkening::LumiYear > years_
~HBHEDarkeningEP() override
void addDefault(ParameterSetDescription const &psetDescription)
static const IOVSyncValue & beginOfTime()
static std::vector< std::vector< float > > readDoseMap(const std::string &fullpath)
std::vector< Dosemap > dosemaps_
std::unique_ptr< HBHEDarkening > ReturnType
HBHEDarkeningEP(const edm::ParameterSet &)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)