File indexing completed on 2024-04-06 12:21:01
0001 #ifndef L1Trigger_L1TMuonEndCapPhase2_SectorProcessor_h
0002 #define L1Trigger_L1TMuonEndCapPhase2_SectorProcessor_h
0003
0004 #include "L1Trigger/L1TMuonEndCapPhase2/interface/EMTFfwd.h"
0005 #include "L1Trigger/L1TMuonEndCapPhase2/interface/EMTFTypes.h"
0006
0007 namespace emtf::phase2 {
0008
0009 class SectorProcessor {
0010 public:
0011 SectorProcessor(const EMTFContext&, const int&, const int&);
0012
0013 ~SectorProcessor();
0014
0015 void configureEvent(const edm::Event&);
0016
0017 void configureBx(const int&);
0018
0019 void select(const TriggerPrimitive&, const TPInfo&);
0020
0021 void process(EMTFHitCollection&, EMTFTrackCollection&, EMTFInputCollection&);
0022
0023 private:
0024 const EMTFContext& context_;
0025
0026 int endcap_, sector_;
0027 std::map<SubsystemType, std::unique_ptr<TPSelector>> tp_selectors_;
0028 std::map<SubsystemType, std::unique_ptr<TPConverter>> tp_converters_;
0029
0030
0031 const edm::Event* event_;
0032 const int* bx_;
0033
0034
0035 std::vector<EMTFHitCollection> bx_window_hits_;
0036 std::map<SubsystemType, ILinkTPCMap> bx_ilink_tpc_maps_;
0037
0038
0039 void copyTP(const ILinkTPCMap& source, ILinkTPCMap& target) const;
0040
0041 void convertTP(const int&, const ILinkTPCMap&, EMTFHitCollection&);
0042
0043 void populateSegments(const std::vector<EMTFHitCollection>&, std::map<int, int>&, segment_collection_t&);
0044
0045 void buildTracks(const std::map<int, int>&, const segment_collection_t&, const bool&, EMTFTrackCollection&);
0046 };
0047
0048 }
0049
0050 #endif