15 findingRecord<HcalTimeSlewRecord>();
18 std::vector<edm::ParameterSet> p_TimeSlewM2 =
19 pset.getParameter<std::vector<edm::ParameterSet>>(
"timeSlewParametersM2");
20 std::vector<edm::ParameterSet> p_TimeSlewM3 =
21 pset.getParameter<std::vector<edm::ParameterSet>>(
"timeSlewParametersM3");
24 for (
const auto& p_timeslew : p_TimeSlewM2) {
25 m2parameters_.push_back({
static_cast<float>(p_timeslew.getParameter<
double>(
"tzero")),
26 static_cast<float>(p_timeslew.getParameter<
double>(
"slope")),
27 static_cast<float>(p_timeslew.getParameter<
double>(
"tmax"))});
30 for (
const auto& p_timeslew : p_TimeSlewM3) {
31 m3parameters_.push_back({p_timeslew.getParameter<
double>(
"cap"),
32 p_timeslew.getParameter<
double>(
"tspar0"),
33 p_timeslew.getParameter<
double>(
"tspar1"),
34 p_timeslew.getParameter<
double>(
"tspar2"),
35 p_timeslew.getParameter<
double>(
"tspar0_siPM"),
36 p_timeslew.getParameter<
double>(
"tspar1_siPM"),
37 p_timeslew.getParameter<
double>(
"tspar2_siPM")});
53 desc_M2.
add<
double>(
"tzero");
54 desc_M2.
add<
double>(
"slope");
55 desc_M2.
add<
double>(
"tmax");
56 std::vector<edm::ParameterSet> default_M2(1);
57 desc.addVPSet(
"timeSlewParametersM2", desc_M2, default_M2);
60 desc_M3.
add<
double>(
"cap");
61 desc_M3.
add<
double>(
"tspar0");
62 desc_M3.
add<
double>(
"tspar1");
63 desc_M3.
add<
double>(
"tspar2");
64 desc_M3.
add<
double>(
"tspar0_siPM");
65 desc_M3.
add<
double>(
"tspar1_siPM");
66 desc_M3.
add<
double>(
"tspar2_siPM");
67 std::vector<edm::ParameterSet> default_M3(1);
68 desc.addVPSet(
"timeSlewParametersM3", desc_M3, default_M3);
75 ReturnType hcalTimeSlew = std::make_unique<HcalTimeSlew>();
79 hcalTimeSlew->addM2ParameterSet(
p.t0,
p.m,
p.tmaximum);
83 hcalTimeSlew->addM3ParameterSet(
p.cap,
p.tspar0,
p.tspar1,
p.tspar2,
p.tspar0_siPM,
p.tspar1_siPM,
p.tspar2_siPM);
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static const IOVSyncValue & endOfTime()
std::pair< Time_t, Time_t > ValidityInterval
ReturnType produce(const HcalTimeSlewRecord &)
void addDefault(ParameterSetDescription const &psetDescription)
std::vector< M3Parameters > m3parameters_
static const IOVSyncValue & beginOfTime()
~HcalTimeSlewEP() override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
std::vector< M2Parameters > m2parameters_
HcalTimeSlewEP(const edm::ParameterSet &)
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
std::unique_ptr< HcalTimeSlew > ReturnType