Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:23:19

0001 #ifndef L1TMuonEndCap_PatternRecognition_h
0002 #define L1TMuonEndCap_PatternRecognition_h
0003 
0004 #include "L1Trigger/L1TMuonEndCap/interface/Common.h"
0005 #include "L1Trigger/L1TMuonEndCap/interface/PhiMemoryImage.h"
0006 
0007 class PatternRecognition {
0008 public:
0009   // Pattern detector ID: [zone, keystrip, pattern]
0010   typedef std::array<int, 3> pattern_ref_t;
0011 
0012   void configure(int verbose,
0013                  int endcap,
0014                  int sector,
0015                  int bx,
0016                  int bxWindow,
0017                  const std::vector<std::string>& pattDefinitions,
0018                  const std::vector<std::string>& symPattDefinitions,
0019                  bool useSymPatterns,
0020                  int maxRoadsPerZone,
0021                  bool useSecondEarliest);
0022 
0023   void configure_details();
0024 
0025   void process(const std::deque<EMTFHitCollection>& extended_conv_hits,
0026                std::map<pattern_ref_t, int>& patt_lifetime_map,
0027                emtf::zone_array<EMTFRoadCollection>& zone_roads) const;
0028 
0029   bool is_zone_empty(int zone,
0030                      const std::deque<EMTFHitCollection>& extended_conv_hits,
0031                      const std::map<pattern_ref_t, int>& patt_lifetime_map) const;
0032 
0033   void make_zone_image(int zone, const std::deque<EMTFHitCollection>& extended_conv_hits, PhiMemoryImage& image) const;
0034 
0035   void process_single_zone(int zone,
0036                            PhiMemoryImage cloned_image,
0037                            std::map<pattern_ref_t, int>& patt_lifetime_map,
0038                            EMTFRoadCollection& roads) const;
0039 
0040   void sort_single_zone(EMTFRoadCollection& roads) const;
0041 
0042 private:
0043   int verbose_, endcap_, sector_, bx_;
0044 
0045   int bxWindow_;
0046   std::vector<std::string> pattDefinitions_, symPattDefinitions_;
0047   bool useSymPatterns_;
0048   int maxRoadsPerZone_;
0049   bool useSecondEarliest_;
0050 
0051   std::vector<PhiMemoryImage> patterns_;
0052 };
0053 
0054 #endif