CMS 3D CMS Logo

MiniHoughTransform.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackerTFP_MiniHoughTransform_h
2 #define L1Trigger_TrackerTFP_MiniHoughTransform_h
3 
7 
8 #include <vector>
9 #include <set>
10 #include <deque>
11 
12 namespace trackerTFP {
13 
14  // Class to refine HT track candidates in r-phi, by subdividing each HT cell into a finer granularity array
16  public:
18  const tt::Setup* setup,
19  const DataFormats* dataFormats,
20  int region);
22 
23  // read in and organize input product (fill vector input_)
24  void consume(const tt::StreamsStub& streams);
25  // fill output products
26  void produce(tt::StreamsStub& accepted, tt::StreamsStub& lost);
27 
28  private:
29  // remove and return first element of deque, returns nullptr if empty
30  template <class T>
31  T* pop_front(std::deque<T*>& ts) const;
32  // perform finer pattern recognition per track
33  void fill(int channel, const std::vector<StubHT*>& input, std::vector<std::deque<StubMHT*>>& output);
34  // Static load balancing of inputs: mux 4 streams to 1 stream
35  void slb(std::vector<std::deque<StubMHT*>>& inputs, std::vector<StubMHT*>& accepted, tt::StreamStub& lost) const;
36  // Dynamic load balancing of inputs: swapping parts of streams to balance the amount of tracks per stream
37  void dlb(std::vector<std::vector<StubMHT*>>& streams) const;
38 
39  // true if truncation is enbaled
41  // provides run-time constants
42  const tt::Setup* setup_;
43  // provides dataformats
45  // dataformat of inv2R
47  // dataformat of phiT
49  // processing region (0 - 8)
50  int region_;
51  // number of inv2R bins used in HT
53  // number of cells used in MHT
54  int numCells_;
55  // number of dynamic load balancing nodes
56  int numNodes_;
57  // number of channel per dynamic load balancing node
59  // container of input stubs
60  std::vector<StubHT> stubsHT_;
61  // container of output stubs
62  std::vector<StubMHT> stubsMHT_;
63  // h/w liked organized pointer to input stubs
64  std::vector<std::vector<StubHT*>> input_;
65  };
66 
67 } // namespace trackerTFP
68 
69 #endif
T * pop_front(std::deque< T *> &ts) const
Class to process and provide run-time constants used by Track Trigger emulators.
Definition: Setup.h:44
std::vector< StreamStub > StreamsStub
Definition: TTTypes.h:66
std::vector< FrameStub > StreamStub
Definition: TTTypes.h:63
void slb(std::vector< std::deque< StubMHT *>> &inputs, std::vector< StubMHT *> &accepted, tt::StreamStub &lost) const
std::vector< StubMHT > stubsMHT_
static std::string const input
Definition: EdmProvDump.cc:50
MiniHoughTransform(const edm::ParameterSet &iConfig, const tt::Setup *setup, const DataFormats *dataFormats, int region)
std::vector< std::vector< StubHT * > > input_
void dlb(std::vector< std::vector< StubMHT *>> &streams) const
void produce(tt::StreamsStub &accepted, tt::StreamsStub &lost)
void fill(int channel, const std::vector< StubHT *> &input, std::vector< std::deque< StubMHT *>> &output)
std::vector< StubHT > stubsHT_
void consume(const tt::StreamsStub &streams)
Class to calculate and provide dataformats used by Track Trigger emulator.
Definition: DataFormats.h:216
long double T