Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:03

0001 #ifndef OMTFReconstruction_H
0002 #define OMTFReconstruction_H
0003 
0004 #include "xercesc/util/XercesDefs.hpp"
0005 
0006 #include "CondFormats/DataRecord/interface/L1TMuonOverlapParamsRcd.h"
0007 #include "CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h"
0008 
0009 #include "DataFormats/L1TMuon/interface/RegionalMuonCand.h"
0010 #include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h"
0011 
0012 #include "FWCore/Framework/interface/FrameworkfwdMostUsed.h"
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 #include "FWCore/Utilities/interface/ESGetToken.h"
0015 #include "DataFormats/Common/interface/Handle.h"
0016 
0017 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h"
0018 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h"
0019 #include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h"
0020 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
0021 
0022 #include "L1Trigger/L1TMuonOverlap/interface/OMTFinputMaker.h"
0023 #include "L1Trigger/L1TMuonOverlap/interface/OMTFSorter.h"
0024 #include "L1Trigger/L1TMuonOverlap/interface/GhostBuster.h"
0025 
0026 class OMTFProcessor;
0027 class OMTFConfiguration;
0028 class OMTFConfigMaker;
0029 class XMLConfigWriter;
0030 
0031 namespace XERCES_CPP_NAMESPACE {
0032   class DOMElement;
0033   class DOMDocument;
0034   class DOMImplementation;
0035 }  // namespace XERCES_CPP_NAMESPACE
0036 
0037 class OMTFReconstruction {
0038 public:
0039   OMTFReconstruction(const edm::ParameterSet &, edm::ConsumesCollector &&);
0040 
0041   ~OMTFReconstruction();
0042 
0043   void beginJob();
0044 
0045   void endJob();
0046 
0047   void beginRun(edm::Run const &, edm::EventSetup const &);
0048 
0049   std::unique_ptr<l1t::RegionalMuonCandBxCollection> reconstruct(const edm::Event &, const edm::EventSetup &);
0050 
0051 private:
0052   edm::ParameterSet m_Config;
0053 
0054   edm::Handle<L1MuDTChambPhContainer> dtPhDigis;
0055   edm::Handle<L1MuDTChambThContainer> dtThDigis;
0056   edm::Handle<CSCCorrelatedLCTDigiCollection> cscDigis;
0057   edm::Handle<RPCDigiCollection> rpcDigis;
0058 
0059   edm::ESGetToken<L1TMuonOverlapParams, L1TMuonOverlapParamsRcd> l1TMuonOverlapParamsToken_;
0060 
0061   void loadAndFilterDigis(const edm::Event &);
0062 
0063   void getProcessorCandidates(unsigned int iProcessor,
0064                               l1t::tftype mtfType,
0065                               int bx,
0066                               l1t::RegionalMuonCandBxCollection &myCandidates);
0067 
0068   void writeResultToXML(unsigned int iProcessor,
0069                         l1t::tftype mtfType,
0070                         const OMTFinput &myInput,
0071                         const std::vector<OMTFProcessor::resultsMap> &myResults,
0072                         const std::vector<l1t::RegionalMuonCand> &candMuons);
0073 
0074   bool dumpResultToXML, dumpDetailedResultToXML;
0075   int bxMin, bxMax;
0076 
0077   ///OMTF objects
0078   OMTFConfiguration *m_OMTFConfig;
0079   OMTFinputMaker m_InputMaker;
0080   OMTFSorter m_Sorter;
0081   std::unique_ptr<IGhostBuster> m_GhostBuster;
0082   OMTFProcessor *m_OMTF;
0083   ///
0084   xercesc::DOMElement *aTopElement;
0085   OMTFConfigMaker *m_OMTFConfigMaker;
0086   XMLConfigWriter *m_Writer;
0087 };
0088 
0089 #endif