Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:54

0001 #ifndef L1TMuonEndCap_EMTFSetup_h
0002 #define L1TMuonEndCap_EMTFSetup_h
0003 
0004 #include <memory>
0005 #include <string>
0006 
0007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0008 
0009 #include "FWCore/Framework/interface/Event.h"
0010 #include "FWCore/Framework/interface/EventSetup.h"
0011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0012 
0013 #include "L1Trigger/L1TMuon/interface/GeometryTranslator.h"
0014 #include "L1Trigger/L1TMuonEndCap/interface/ConditionHelper.h"
0015 #include "L1Trigger/L1TMuonEndCap/interface/VersionControl.h"
0016 #include "L1Trigger/L1TMuonEndCap/interface/SectorProcessorLUT.h"
0017 #include "L1Trigger/L1TMuonEndCap/interface/PtAssignmentEngine.h"
0018 #include "L1Trigger/L1TMuonEndCap/interface/PtAssignmentEngineDxy.h"
0019 
0020 class EMTFSetup {
0021 public:
0022   explicit EMTFSetup(const edm::ParameterSet& iConfig, edm::ConsumesCollector iCollector);
0023   ~EMTFSetup();
0024 
0025   // Check and update geometry, conditions, versions, sp LUTs, and pt assignment engine
0026   void reload(const edm::Event& iEvent, const edm::EventSetup& iSetup);
0027 
0028   // Getters
0029   const GeometryTranslator& getGeometryTranslator() const { return geometry_translator_; }
0030 
0031   const ConditionHelper& getConditionHelper() const { return condition_helper_; }
0032 
0033   const VersionControl& getVersionControl() const { return version_control_; }
0034 
0035   const SectorProcessorLUT& getSectorProcessorLUT() const { return sector_processor_lut_; }
0036 
0037   PtAssignmentEngine* getPtAssignmentEngine() const { return pt_assign_engine_.get(); }
0038 
0039   PtAssignmentEngineDxy* getPtAssignmentEngineDxy() const { return pt_assign_engine_dxy_.get(); }
0040 
0041   // Setters
0042   //void set_fw_version(unsigned version) { fw_ver_ = version; }
0043   //void set_pt_lut_version(unsigned version) { pt_lut_ver_ = version; }
0044   //void set_pc_lut_version(unsigned version) { pc_lut_ver_ = version; }
0045 
0046   // Getters
0047   unsigned get_fw_version() const { return fw_ver_; }
0048   unsigned get_pt_lut_version() const { return pt_lut_ver_; }
0049   unsigned get_pc_lut_version() const { return pc_lut_ver_; }
0050 
0051   // VersionControl getters
0052   const edm::ParameterSet& getConfig() const { return version_control_.getConfig(); }
0053   int verbose() const { return version_control_.verbose(); }
0054   bool useO2O() const { return version_control_.useO2O(); }
0055   std::string era() const { return version_control_.era(); }
0056 
0057 private:
0058   GeometryTranslator geometry_translator_;
0059 
0060   ConditionHelper condition_helper_;
0061 
0062   VersionControl version_control_;
0063 
0064   SectorProcessorLUT sector_processor_lut_;
0065 
0066   // Polymorphic class
0067   std::unique_ptr<PtAssignmentEngine> pt_assign_engine_;
0068   // Displaced muon pT assignment
0069   std::unique_ptr<PtAssignmentEngineDxy> pt_assign_engine_dxy_;
0070 
0071   // Version numbers. Note: may be different from those in ConditionHelper
0072   unsigned fw_ver_;
0073   unsigned pt_lut_ver_;
0074   unsigned pc_lut_ver_;
0075 };
0076 
0077 #endif