File indexing completed on 2024-07-16 02:43:03
0001 #ifndef L1Trigger_Phase2L1GMT_KMTF_h
0002 #define L1Trigger_Phase2L1GMT_KMTF_h
0003 #include "DataFormats/L1TMuonPhase2/interface/MuonStub.h"
0004 #include "L1Trigger/Phase2L1GMT/interface/KMTFCore.h"
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006 #include <cstdlib>
0007
0008 namespace Phase2L1GMT {
0009
0010 class KMTF {
0011 public:
0012 KMTF(int verbose, const edm::ParameterSet& iConfig);
0013 ~KMTF();
0014 std::pair<std::vector<l1t::KMTFTrack>, std::vector<l1t::KMTFTrack> > process(const l1t::MuonStubRefVector& stubsAll,
0015 int bx,
0016 unsigned int MAXN);
0017
0018 private:
0019 int verbose_;
0020 std::unique_ptr<KMTFCore> trackMaker_;
0021 void overlapCleanTrack(l1t::KMTFTrack& source, const l1t::KMTFTrack& other, bool eq, bool vertex);
0022 std::vector<l1t::KMTFTrack> cleanRegion(const std::vector<l1t::KMTFTrack>& tracks2,
0023 const std::vector<l1t::KMTFTrack>& tracks3,
0024 const std::vector<l1t::KMTFTrack>& tracks4,
0025 bool vertex);
0026 void sort(std::vector<l1t::KMTFTrack>& in, bool vertex);
0027 void swap(std::vector<l1t::KMTFTrack>& list, int i, int j, bool vertex);
0028
0029 class SeedSorter {
0030 public:
0031 SeedSorter() {}
0032 bool operator()(const l1t::MuonStubRef& a, const l1t::MuonStubRef& b) { return (a->id() < b->id()); }
0033 };
0034 };
0035 }
0036 #endif