Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:30:35

0001 #ifndef L1Trigger_RPCTrigger_h
0002 #define L1Trigger_RPCTrigger_h
0003 
0004 /** \class RPCTrigger
0005  *  \brief Implements RPC trigger emulation
0006  *
0007  *  \author Tomasz Fruboes
0008  */
0009 
0010 #include "FWCore/Framework/interface/Frameworkfwd.h"
0011 #include "FWCore/Framework/interface/one/EDProducer.h"
0012 
0013 #include "FWCore/Framework/interface/Event.h"
0014 #include "FWCore/Framework/interface/MakerMacros.h"
0015 
0016 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0017 
0018 #include "DataFormats/MuonDetId/interface/RPCDetId.h"
0019 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
0020 
0021 #include "FWCore/Framework/interface/ESHandle.h"  // Handle to read geometry
0022 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0023 #include "FWCore/Utilities/interface/EDGetToken.h"
0024 #include "FWCore/Utilities/interface/EDPutToken.h"
0025 #include "FWCore/Utilities/interface/ESGetToken.h"
0026 
0027 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuRegionalCand.h"
0028 // Configuration via eventsetup:
0029 #include "CondFormats/DataRecord/interface/L1RPCConfigRcd.h"
0030 #include "CondFormats/L1TObjects/interface/L1RPCConfig.h"
0031 
0032 #include "CondFormats/DataRecord/interface/L1RPCConeBuilderRcd.h"
0033 #include "CondFormats/RPCObjects/interface/L1RPCConeBuilder.h"
0034 
0035 #include "CondFormats/DataRecord/interface/L1RPCHwConfigRcd.h"
0036 #include "CondFormats/RPCObjects/interface/L1RPCHwConfig.h"
0037 
0038 #include "CondFormats/DataRecord/interface/L1RPCBxOrConfigRcd.h"
0039 #include "CondFormats/L1TObjects/interface/L1RPCBxOrConfig.h"
0040 
0041 // L1RpcTrigger specific includes
0042 #include "L1Trigger/RPCTrigger/interface/RPCConeBuilderFromES.h"
0043 
0044 #include "L1Trigger/RPCTrigger/interface/RPCPacManager.h"
0045 
0046 #include "L1Trigger/RPCTrigger/interface/RPCPacTrigger.h"
0047 #include "L1Trigger/RPCTrigger/interface/RPCBasicTrigConfig.h"
0048 #include "L1Trigger/RPCTrigger/interface/RPCPacData.h"
0049 #include "L1Trigger/RPCTrigger/interface/RPCConst.h"
0050 #include "L1Trigger/RPCTrigger/interface/RPCPacManager.h"
0051 #include "CondFormats/DataRecord/interface/L1RPCHsbConfigRcd.h"
0052 #include "CondFormats/L1TObjects/interface/L1RPCHsbConfig.h"
0053 #include "DataFormats/RPCDigi/interface/RPCDigiL1Link.h"
0054 #include <memory>
0055 #include <vector>
0056 
0057 //class RPCTriggerGeo;
0058 
0059 class RPCTrigger : public edm::one::EDProducer<edm::one::SharedResources> {
0060 public:
0061   explicit RPCTrigger(const edm::ParameterSet&);
0062 
0063   void produce(edm::Event&, const edm::EventSetup&) override;
0064 
0065 private:
0066   // ----------member data ---------------------------
0067 
0068   RPCConeBuilderFromES m_theLinksystemFromES;
0069 
0070   RPCPacManager<RPCPacData> m_pacManager;
0071 
0072   std::unique_ptr<RPCBasicTrigConfig> m_trigConfig;
0073 
0074   std::unique_ptr<RPCPacTrigger> m_pacTrigger;
0075 
0076   const int m_triggerDebug;
0077   unsigned long long m_cacheID;
0078   // TODO keep L1MuRegionalCandVec equally as RPCDigiL1LinkVec
0079   std::vector<L1MuRegionalCand> giveFinallCandindates(const L1RpcTBMuonsVec& finalMuons,
0080                                                       int type,
0081                                                       int bx,
0082                                                       edm::Handle<RPCDigiCollection> rpcDigis,
0083                                                       std::vector<RPCDigiL1Link>& retRPCDigiLink);
0084 
0085   const std::string m_label;
0086   const edm::EDGetTokenT<RPCDigiCollection> m_rpcDigiToken;
0087 
0088   const edm::EDPutTokenT<std::vector<L1MuRegionalCand>> m_brlCandPutToken;
0089   const edm::EDPutTokenT<std::vector<L1MuRegionalCand>> m_fwdCandPutToken;
0090 
0091   const edm::EDPutTokenT<std::vector<RPCDigiL1Link>> m_brlLinksPutToken;
0092   const edm::EDPutTokenT<std::vector<RPCDigiL1Link>> m_fwdLinksPutToken;
0093   const edm::ESGetToken<L1RPCConfig, L1RPCConfigRcd> m_configToken;
0094   const edm::ESGetToken<L1RPCConeBuilder, L1RPCConeBuilderRcd> m_coneBuilderToken;
0095   const edm::ESGetToken<L1RPCConeDefinition, L1RPCConeDefinitionRcd> m_coneDefinitionToken;
0096   const edm::ESGetToken<L1RPCHwConfig, L1RPCHwConfigRcd> m_hwConfigToken;
0097   const edm::ESGetToken<L1RPCBxOrConfig, L1RPCBxOrConfigRcd> m_BxOrConfigToken;
0098   const edm::ESGetToken<L1RPCHsbConfig, L1RPCHsbConfigRcd> m_hsbConfigToken;
0099 };
0100 
0101 #endif