Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:51

0001 #ifndef L1GCTEMULATOR_H
0002 #define L1GCTEMULATOR_H
0003 
0004 /**\class L1GctEmulator L1GctEmulator.h src/L1Trigger/GlobalCaloTrigger/src/L1GctEmulator.h
0005 
0006  Description:  Framework module that runs the GCT bit-level emulator
0007 
0008  Implementation:
0009        An EDProducer that contains an instance of L1GlobalCaloTrigger.
0010 */
0011 //
0012 // Original Author:  Jim Brooke
0013 //         Created:  Thu May 18 15:04:56 CEST 2006
0014 //
0015 //
0016 
0017 // system includes
0018 
0019 // EDM includes
0020 #include "FWCore/Framework/interface/stream/EDProducer.h"
0021 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0022 #include "FWCore/Framework/interface/EventSetup.h"
0023 #include "FWCore/Framework/interface/Event.h"
0024 #include "FWCore/Utilities/interface/EDGetToken.h"
0025 #include "FWCore/Utilities/interface/ESGetToken.h"
0026 
0027 #include "DataFormats/L1CaloTrigger/interface/L1CaloCollections.h"
0028 
0029 #include "L1Trigger/GlobalCaloTrigger/interface/L1GlobalCaloTrigger.h"
0030 // Trigger configuration includes
0031 #include "CondFormats/L1TObjects/interface/L1CaloEtScale.h"
0032 #include "CondFormats/L1TObjects/interface/L1GctJetFinderParams.h"
0033 #include "CondFormats/L1TObjects/interface/L1GctChannelMask.h"
0034 #include "CondFormats/DataRecord/interface/L1JetEtScaleRcd.h"
0035 #include "CondFormats/DataRecord/interface/L1HtMissScaleRcd.h"
0036 #include "CondFormats/DataRecord/interface/L1HfRingEtScaleRcd.h"
0037 #include "CondFormats/DataRecord/interface/L1GctJetFinderParamsRcd.h"
0038 #include "CondFormats/DataRecord/interface/L1GctChannelMaskRcd.h"
0039 
0040 class L1GctEmulator : public edm::stream::EDProducer<> {
0041 public:
0042   /// typedefs
0043   typedef L1GlobalCaloTrigger::lutPtr lutPtr;
0044   typedef L1GlobalCaloTrigger::lutPtrVector lutPtrVector;
0045 
0046   /// constructor
0047   explicit L1GctEmulator(const edm::ParameterSet& ps);
0048 
0049 private:
0050   void produce(edm::Event& e, const edm::EventSetup& c) override;
0051 
0052   int configureGct(const edm::EventSetup& c);
0053 
0054   // input label
0055   std::string m_inputLabel;
0056   edm::EDGetTokenT<L1CaloEmCollection> m_emToken;
0057   edm::EDGetTokenT<L1CaloRegionCollection> m_regionToken;
0058 
0059   //EventSetup Tokens
0060   edm::ESGetToken<L1GctJetFinderParams, L1GctJetFinderParamsRcd> m_jfParsToken;
0061   edm::ESGetToken<L1GctChannelMask, L1GctChannelMaskRcd> m_chanMaskToken;
0062   edm::ESGetToken<L1CaloEtScale, L1JetEtScaleRcd> m_etScaleToken;
0063   edm::ESGetToken<L1CaloEtScale, L1HtMissScaleRcd> m_htMissScaleToken;
0064   edm::ESGetToken<L1CaloEtScale, L1HfRingEtScaleRcd> m_hfRingEtScaleToken;
0065 
0066   // pointer to the actual emulator
0067   std::unique_ptr<L1GlobalCaloTrigger> m_gct;
0068 
0069   // pointers to the jet Et LUTs
0070   lutPtrVector m_jetEtCalibLuts;
0071 
0072   // data output switch
0073   const bool m_writeInternalData;
0074 
0075   // untracked parameters
0076   const bool m_verbose;
0077 
0078   // label for conditions
0079   const std::string m_conditionsLabel;
0080 
0081   // tracked parameters
0082 };
0083 
0084 #endif