Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 /*
0002  * EmulationObserverBase.h
0003  *
0004  *  Created on: Aug 18, 2021
0005  *      Author: kbunkow
0006  */
0007 
0008 #ifndef L1T_OmtfP1_TOOLS_EMULATIONOBSERVERBASE_H_
0009 #define L1T_OmtfP1_TOOLS_EMULATIONOBSERVERBASE_H_
0010 
0011 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/IOMTFEmulationObserver.h"
0012 
0013 #include "FWCore/Framework/interface/Event.h"
0014 #include "FWCore/Framework/interface/EventSetup.h"
0015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0016 #include "SimDataFormats/Track/interface/SimTrackContainer.h"
0017 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
0018 
0019 class EmulationObserverBase : public IOMTFEmulationObserver {
0020 public:
0021   EmulationObserverBase(const edm::ParameterSet& edmCfg, const OMTFConfiguration* omtfConfig);
0022 
0023   ~EmulationObserverBase() override;
0024 
0025   void observeProcesorEmulation(unsigned int iProcessor,
0026                                 l1t::tftype mtfType,
0027                                 const std::shared_ptr<OMTFinput>& input,
0028                                 const AlgoMuons& algoCandidates,
0029                                 const AlgoMuons& gbCandidates,
0030                                 const std::vector<l1t::RegionalMuonCand>& candMuons) override;
0031 
0032   void observeEventBegin(const edm::Event& iEvent) override;
0033 
0034   //void observeEventEnd(const edm::Event& iEvent,
0035   //                     std::unique_ptr<l1t::RegionalMuonCandBxCollection>& finalCandidates) override;
0036 
0037   //void endJob() override;
0038 
0039   const SimTrack* findSimMuon(const edm::Event& event, const SimTrack* previous = nullptr);
0040 
0041   const std::vector<const reco::GenParticle*> findGenMuon(const edm::Event& event);
0042 
0043 protected:
0044   edm::ParameterSet edmCfg;
0045   const OMTFConfiguration* omtfConfig;
0046 
0047   const SimTrack* simMuon = nullptr;
0048 
0049   //candidate found by omtf in a given event
0050   AlgoMuons::value_type omtfCand;
0051 
0052   l1t::RegionalMuonCand regionalMuonCand;
0053 
0054   //AlgoMuons algoCandidates;
0055 
0056   unsigned int candProcIndx = 0;
0057 };
0058 
0059 #endif /* INTERFACE_TOOLS_EMULATIONOBSERVERBASE_H_ */