File indexing completed on 2024-04-06 12:21:04
0001 #ifndef OMTFPatternMaker_H
0002 #define OMTFPatternMaker_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 "FWCore/Framework/interface/Frameworkfwd.h"
0010 #include "FWCore/Framework/interface/Event.h"
0011 #include "FWCore/Framework/interface/EventSetup.h"
0012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0013 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0014 #include "FWCore/Utilities/interface/ESGetToken.h"
0015
0016 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h"
0017 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h"
0018 #include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h"
0019 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
0020 #include "SimDataFormats/Track/interface/SimTrackContainer.h"
0021
0022 #include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h"
0023
0024 class OMTFProcessor;
0025 class OMTFConfiguration;
0026 class OMTFConfigMaker;
0027 class OMTFinputMaker;
0028
0029 class SimTrack;
0030
0031 class XMLConfigWriter;
0032
0033 namespace XERCES_CPP_NAMESPACE {
0034 class DOMElement;
0035 class DOMDocument;
0036 class DOMImplementation;
0037 }
0038
0039 class OMTFPatternMaker : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0040 public:
0041 OMTFPatternMaker(const edm::ParameterSet &cfg);
0042
0043 ~OMTFPatternMaker() override;
0044
0045 void beginRun(edm::Run const &run, edm::EventSetup const &iSetup) override;
0046
0047 void endRun(edm::Run const &, edm::EventSetup const &) override;
0048
0049 void beginJob() override;
0050
0051 void endJob() override;
0052
0053 void analyze(const edm::Event &, const edm::EventSetup &) override;
0054
0055 private:
0056 const SimTrack *findSimMuon(const edm::Event &ev, const SimTrack *previous = nullptr);
0057
0058 edm::ParameterSet theConfig;
0059 edm::InputTag g4SimTrackSrc;
0060
0061 edm::EDGetTokenT<L1MuDTChambPhContainer> inputTokenDTPh;
0062 edm::EDGetTokenT<L1MuDTChambThContainer> inputTokenDTTh;
0063 edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> inputTokenCSC;
0064 edm::EDGetTokenT<RPCDigiCollection> inputTokenRPC;
0065 edm::EDGetTokenT<edm::SimTrackContainer> inputTokenSimHit;
0066
0067 edm::ESGetToken<L1TMuonOverlapParams, L1TMuonOverlapParamsRcd> esTokenParams_;
0068
0069 void writeMergedGPs();
0070
0071 bool makeConnectionsMaps, makeGoldenPatterns, mergeXMLFiles;
0072
0073
0074 unsigned int nPdfAddrBits;
0075
0076
0077 OMTFConfiguration *myOMTFConfig;
0078 OMTFinputMaker *myInputMaker;
0079 OMTFProcessor *myOMTF;
0080
0081 xercesc::DOMElement *aTopElement;
0082 OMTFConfigMaker *myOMTFConfigMaker;
0083 XMLConfigWriter *myWriter;
0084 };
0085
0086 #endif