Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1Trigger_TrackerTFP_ZHoughTransform_h
0002 #define L1Trigger_TrackerTFP_ZHoughTransform_h
0003 
0004 #include "L1Trigger/TrackTrigger/interface/Setup.h"
0005 #include "L1Trigger/TrackerTFP/interface/DataFormats.h"
0006 #include "DataFormats/L1TrackTrigger/interface/TTTypes.h"
0007 
0008 #include <vector>
0009 #include <deque>
0010 
0011 namespace trackerTFP {
0012 
0013   // Class to refine MHT track candidates in r-z
0014   class ZHoughTransform {
0015   public:
0016     ZHoughTransform(const edm::ParameterSet& iConfig,
0017                     const tt::Setup* setup,
0018                     const DataFormats* dataFormats,
0019                     int region);
0020     ~ZHoughTransform() {}
0021 
0022     // read in and organize input product (fill vector input_)
0023     void consume(const tt::StreamsStub& streams);
0024     // fill output products
0025     void produce(tt::StreamsStub& accepted, tt::StreamsStub& lost);
0026 
0027   private:
0028     // remove and return first element of deque, returns nullptr if empty
0029     template <class T>
0030     T* pop_front(std::deque<T*>& ts) const;
0031     // perform finer pattern recognition per track
0032     void fill(int channel, const std::deque<StubZHT*>& input, std::vector<std::deque<StubZHT*>>& output);
0033     // Static load balancing of inputs: mux 4 streams to 1 stream
0034     void slb(std::vector<std::deque<StubZHT*>>& inputs, std::deque<StubZHT*>& accepted, tt::StreamStub& lost) const;
0035     //
0036     void merge(std::deque<StubZHT*>& stubs, tt::StreamStub& stream) const;
0037 
0038     // true if truncation is enbaled
0039     bool enableTruncation_;
0040     // provides run-time constants
0041     const tt::Setup* setup_;
0042     // provides dataformats
0043     const DataFormats* dataFormats_;
0044     // processing region (0 - 8)
0045     int region_;
0046     // container of in- and output stubs
0047     std::vector<StubZHT> stubsZHT_;
0048     // h/w liked organized pointer to input stubs
0049     std::vector<std::vector<StubZHT*>> input_;
0050     //
0051     int stage_;
0052   };
0053 
0054 }  // namespace trackerTFP
0055 
0056 #endif