File indexing completed on 2024-04-06 11:58:09
0001 #ifndef CalibCalorimetry_HcalPlugins_HcalTimeSlewEP_H
0002 #define CalibCalorimetry_HcalPlugins_HcalTimeSlewEP_H
0003
0004
0005 #include <memory>
0006
0007
0008 #include "FWCore/Framework/interface/ModuleFactory.h"
0009 #include "FWCore/Framework/interface/ESProducer.h"
0010 #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h"
0011 #include "CondFormats/DataRecord/interface/HcalTimeSlewRecord.h"
0012 #include "CalibCalorimetry/HcalAlgos/interface/HcalTimeSlew.h"
0013
0014 namespace edm {
0015 class ConfigurationDescriptions;
0016 }
0017
0018 class HcalTimeSlewEP : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder {
0019 public:
0020 HcalTimeSlewEP(const edm::ParameterSet&);
0021 ~HcalTimeSlewEP() override;
0022
0023 typedef std::unique_ptr<HcalTimeSlew> ReturnType;
0024
0025 static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0026
0027 ReturnType produce(const HcalTimeSlewRecord&);
0028
0029 protected:
0030 void setIntervalFor(const edm::eventsetup::EventSetupRecordKey&,
0031 const edm::IOVSyncValue&,
0032 edm::ValidityInterval&) override;
0033
0034 private:
0035 struct M2Parameters {
0036 float t0, m, tmaximum;
0037 };
0038 struct M3Parameters {
0039 double cap, tspar0, tspar1, tspar2, tspar0_siPM, tspar1_siPM, tspar2_siPM;
0040 };
0041 std::vector<M2Parameters> m2parameters_;
0042 std::vector<M3Parameters> m3parameters_;
0043 };
0044
0045 #endif