14 findingRecord<HBHEDarkeningRecord>();
26 desc.
add<
int>(
"ieta_shift");
27 desc.
add<
double>(
"drdA");
28 desc.
add<
double>(
"drdB");
30 desc_dosemaps.
add<
int>(
"energy");
32 std::vector<edm::ParameterSet> default_dosemap(1);
33 desc.
addVPSet(
"dosemaps",desc_dosemaps,default_dosemap);
36 desc_years.
add<
double>(
"intlumi");
37 desc_years.
add<
double>(
"lumirate");
38 desc_years.
add<
int>(
"energy");
39 std::vector<edm::ParameterSet> default_year(1);
40 desc.
addVPSet(
"years",desc_years,default_year);
49 std::vector<edm::ParameterSet> p_dosemaps =
pset_.
getParameter<std::vector<edm::ParameterSet>>(
"dosemaps");
50 std::map<int,std::vector<std::vector<float>>> dosemaps;
51 for(
const auto& p_dosemap : p_dosemaps){
53 int file_energy = p_dosemap.getParameter<
int>(
"energy");
58 std::vector<edm::ParameterSet> p_years =
pset_.
getParameter<std::vector<edm::ParameterSet>>(
"years");
59 std::vector<HBHEDarkening::LumiYear>
years;
60 years.reserve(p_years.size());
61 for(
const auto& p_year : p_years){
64 p_year.getParameter<
double>(
"intlumi"),
65 p_year.getParameter<
double>(
"lumirate"),
66 p_year.getParameter<
int>(
"energy")
70 return std::make_unique<HBHEDarkening>(
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ParameterDescriptionBase * addVPSet(U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
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
~HBHEDarkeningEP() override
void addDefault(ParameterSetDescription const &psetDescription)
static const IOVSyncValue & beginOfTime()
const edm::ParameterSet & pset_
static std::vector< std::vector< float > > readDoseMap(const std::string &fullpath)
std::unique_ptr< HBHEDarkening > ReturnType
HBHEDarkeningEP(const edm::ParameterSet &)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
std::string fullPath() const