Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1T_OmtfP1_OMTFReconstruction_H
0002 #define L1T_OmtfP1_OMTFReconstruction_H
0003 
0004 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/GhostBuster.h"
0005 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/IOMTFEmulationObserver.h"
0006 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/IProcessorEmulator.h"
0007 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/OMTFinputMaker.h"
0008 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/OMTFProcessor.h"
0009 
0010 #include "CondFormats/DataRecord/interface/L1TMuonOverlapParamsRcd.h"
0011 
0012 #include "DataFormats/L1TMuon/interface/RegionalMuonCand.h"
0013 #include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h"
0014 
0015 #include "FWCore/Framework/interface/Frameworkfwd.h"
0016 #include "FWCore/Framework/interface/Event.h"
0017 #include "FWCore/Framework/interface/EventSetup.h"
0018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0019 #include "FWCore/Utilities/interface/ESGetToken.h"
0020 #include "FWCore/Framework/interface/ESWatcher.h"
0021 
0022 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h"
0023 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h"
0024 #include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h"
0025 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
0026 
0027 #include "MagneticField/Engine/interface/MagneticField.h"
0028 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0029 
0030 #include "TrackPropagation/SteppingHelixPropagator/interface/SteppingHelixPropagator.h"
0031 #include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
0032 
0033 class OMTFConfiguration;
0034 class OMTFConfigMaker;
0035 
0036 class OMTFReconstruction {
0037 public:
0038   OMTFReconstruction(const edm::ParameterSet&, MuStubsInputTokens& muStubsInputTokens);
0039 
0040   virtual ~OMTFReconstruction();
0041 
0042   void beginJob();
0043 
0044   void endJob();
0045 
0046   void beginRun(edm::Run const& run,
0047                 edm::EventSetup const& iSetup,
0048                 edm::ESGetToken<L1TMuonOverlapParams, L1TMuonOverlapParamsRcd>& omtfParamsEsToken,
0049                 const MuonGeometryTokens& muonGeometryTokens,
0050                 const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord>& magneticFieldEsToken,
0051                 const edm::ESGetToken<Propagator, TrackingComponentsRecord>& propagatorEsToken);
0052 
0053   std::unique_ptr<l1t::RegionalMuonCandBxCollection> reconstruct(const edm::Event&, const edm::EventSetup&);
0054 
0055   //takes the ownership of the inputMaker
0056   void setInputMaker(unique_ptr<OMTFinputMaker> inputMaker) { this->inputMaker = std::move(inputMaker); }
0057 
0058   void virtual addObservers(const MuonGeometryTokens& muonGeometryTokens,
0059                             const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord>& magneticFieldEsToken,
0060                             const edm::ESGetToken<Propagator, TrackingComponentsRecord>& propagatorEsToken);
0061 
0062 protected:
0063   edm::ParameterSet edmParameterSet;
0064 
0065   MuStubsInputTokens& muStubsInputTokens;
0066 
0067   int bxMin, bxMax;
0068 
0069   ///OMTF objects
0070   unique_ptr<OMTFConfiguration> omtfConfig;
0071 
0072   unique_ptr<OMTFinputMaker> inputMaker;
0073 
0074   unique_ptr<IProcessorEmulator> omtfProc;
0075 
0076   OMTFConfigMaker* m_OMTFConfigMaker;
0077 
0078   std::vector<std::unique_ptr<IOMTFEmulationObserver> > observers;
0079 
0080   edm::ESWatcher<L1TMuonOverlapParamsRcd> omtfParamsRecordWatcher;
0081 };
0082 
0083 #endif