Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:58:08

0001 #ifndef CalibCalorimetry_HcalPlugins_HBHEDarkeningEP_H
0002 #define CalibCalorimetry_HcalPlugins_HBHEDarkeningEP_H
0003 
0004 // system include files
0005 #include <memory>
0006 
0007 // user include files
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/HBHEDarkeningRecord.h"
0012 #include "CondFormats/HcalObjects/interface/HBHEDarkening.h"
0013 
0014 namespace edm {
0015   class ConfigurationDescriptions;
0016 }
0017 
0018 class HBHEDarkeningEP : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder {
0019 public:
0020   HBHEDarkeningEP(const edm::ParameterSet&);
0021   ~HBHEDarkeningEP() override;
0022 
0023   typedef std::unique_ptr<HBHEDarkening> ReturnType;
0024 
0025   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0026 
0027   ReturnType produce(const HBHEDarkeningRecord&);
0028 
0029 protected:
0030   void setIntervalFor(const edm::eventsetup::EventSetupRecordKey&,
0031                       const edm::IOVSyncValue&,
0032                       edm::ValidityInterval&) override;
0033 
0034 private:
0035   struct Dosemap {
0036     edm::FileInPath fp;
0037     int file_energy;
0038   };
0039   std::vector<Dosemap> dosemaps_;
0040   std::vector<HBHEDarkening::LumiYear> years_;
0041   const double drdA_;
0042   const double drdB_;
0043   const int ieta_shift_;
0044 };
0045 
0046 #endif