Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 /*
0002  * EventCapture.h
0003  *
0004  *  Created on: Oct 23, 2019
0005  *      Author: kbunkow
0006  */
0007 
0008 #ifndef L1T_OmtfP1_EVENTCAPTURE_H_
0009 #define L1T_OmtfP1_EVENTCAPTURE_H_
0010 
0011 #include "SimDataFormats/Track/interface/SimTrack.h"
0012 
0013 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/IOMTFEmulationObserver.h"
0014 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/GoldenPatternWithStat.h"
0015 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Tools/CandidateSimMuonMatcher.h"
0016 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Tools/StubsSimHitsMatcher.h"
0017 
0018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0019 
0020 class EventCapture : public IOMTFEmulationObserver {
0021 public:
0022   EventCapture(const edm::ParameterSet& edmCfg,
0023                const OMTFConfiguration* omtfConfig,
0024                CandidateSimMuonMatcher* candidateSimMuonMatcher,
0025                const MuonGeometryTokens& muonGeometryTokens,
0026                const GoldenPatternVec<GoldenPattern>* gps = nullptr);
0027 
0028   ~EventCapture() override;
0029 
0030   void beginRun(edm::EventSetup const& eventSetup) override;
0031 
0032   void observeProcesorEmulation(unsigned int iProcessor,
0033                                 l1t::tftype mtfType,
0034                                 const std::shared_ptr<OMTFinput>&,
0035                                 const AlgoMuons& algoCandidates,
0036                                 const AlgoMuons& gbCandidates,
0037                                 const std::vector<l1t::RegionalMuonCand>& candMuons) override;
0038 
0039   void observeEventBegin(const edm::Event& event) override;
0040 
0041   void observeEventEnd(const edm::Event& event,
0042                        std::unique_ptr<l1t::RegionalMuonCandBxCollection>& finalCandidates) override;
0043 
0044   void endJob() override;
0045 
0046 private:
0047   edm::InputTag simTracksTag;
0048   const OMTFConfiguration* omtfConfig = nullptr;
0049 
0050   const GoldenPatternVec<GoldenPattern>* goldenPatterns = nullptr;
0051 
0052   CandidateSimMuonMatcher* candidateSimMuonMatcher = nullptr;
0053 
0054   std::vector<edm::Ptr<SimTrack> > simMuons;
0055 
0056   std::vector<std::shared_ptr<OMTFinput> > inputInProcs;
0057   std::vector<AlgoMuons> algoMuonsInProcs;
0058   std::vector<AlgoMuons> gbCandidatesInProcs;
0059 
0060   std::unique_ptr<StubsSimHitsMatcher> stubsSimHitsMatcher;
0061 };
0062 
0063 #endif /* L1T_OmtfP1_EVENTCAPTURE_H_ */