File indexing completed on 2023-03-17 11:12:51
0001 #ifndef L1T_OmtfP1_OMTFProcessor_H
0002 #define L1T_OmtfP1_OMTFProcessor_H
0003
0004 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/AlgoMuon.h"
0005 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/GoldenPattern.h"
0006 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/GoldenPatternResult.h"
0007 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/IGhostBuster.h"
0008 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/IProcessorEmulator.h"
0009 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/OMTFConfiguration.h"
0010 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/OMTFinputMaker.h"
0011 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/ProcessorBase.h"
0012 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/SorterBase.h"
0013
0014 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/PtAssignmentBase.h"
0015
0016 #include <memory>
0017
0018 #include "FWCore/Framework/interface/Event.h"
0019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0020
0021 #include "DataFormats/L1TMuon/interface/RegionalMuonCand.h"
0022 #include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h"
0023
0024 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h"
0025 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h"
0026 #include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h"
0027 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
0028
0029 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/GoldenPattern.h"
0030
0031 class OMTFinput;
0032
0033 namespace edm {
0034 class ParameterSet;
0035 };
0036
0037 template <class GoldenPatternType>
0038 class OMTFProcessor : public ProcessorBase<GoldenPatternType>, public IProcessorEmulator {
0039 public:
0040 OMTFProcessor(OMTFConfiguration* omtfConfig,
0041 const edm::ParameterSet& edmCfg,
0042 edm::EventSetup const& evSetup,
0043 const L1TMuonOverlapParams* omtfPatterns);
0044
0045 OMTFProcessor(OMTFConfiguration* omtfConfig,
0046 const edm::ParameterSet& edmCfg,
0047 edm::EventSetup const& evSetup,
0048 GoldenPatternVec<GoldenPatternType>&& gps);
0049
0050 ~OMTFProcessor() override;
0051
0052
0053
0054
0055
0056
0057
0058
0059 void processInput(unsigned int iProcessor, l1t::tftype mtfType, const OMTFinput& aInput) override;
0060
0061 AlgoMuons sortResults(unsigned int iProcessor, l1t::tftype mtfType, int charge = 0) override;
0062
0063 AlgoMuons ghostBust(AlgoMuons refHitCands, int charge = 0) override {
0064 return ghostBuster->select(refHitCands, charge);
0065 }
0066
0067
0068 std::vector<l1t::RegionalMuonCand> getFinalcandidates(unsigned int iProcessor,
0069 l1t::tftype mtfType,
0070 const AlgoMuons& algoCands) override;
0071
0072
0073 virtual void setSorter(SorterBase<GoldenPatternType>* sorter) { this->sorter.reset(sorter); }
0074
0075
0076 void setGhostBuster(IGhostBuster* ghostBuster) override { this->ghostBuster.reset(ghostBuster); }
0077
0078 virtual void setPtAssignment(PtAssignmentBase* ptAssignment) { this->ptAssignment = ptAssignment; }
0079
0080 std::vector<l1t::RegionalMuonCand> run(unsigned int iProcessor,
0081 l1t::tftype mtfType,
0082 int bx,
0083 OMTFinputMaker* inputMaker,
0084 std::vector<std::unique_ptr<IOMTFEmulationObserver> >& observers) override;
0085
0086 void printInfo() const override;
0087
0088 private:
0089 virtual void init(const edm::ParameterSet& edmCfg, edm::EventSetup const& evSetup);
0090
0091
0092
0093
0094
0095
0096
0097 bool checkHitPatternValidity(unsigned int hits) override;
0098
0099 std::unique_ptr<SorterBase<GoldenPatternType> > sorter;
0100
0101 std::unique_ptr<IGhostBuster> ghostBuster;
0102
0103
0104 PtAssignmentBase* ptAssignment = nullptr;
0105 };
0106
0107 #endif