CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
VMRouter.h
Go to the documentation of this file.
1 // VMRouter: sorts input stubs into smaller units in phi (and possibly z), referred to as "Virtual Modules" (VMs)
2 #ifndef L1Trigger_TrackFindingTracklet_interface_VMRouter_h
3 #define L1Trigger_TrackFindingTracklet_interface_VMRouter_h
4 
8 
9 #include <string>
10 #include <vector>
11 #include <utility>
12 
13 namespace trklet {
14 
15  class Settings;
16  class Globals;
17  class MemoryBase;
18  class InputLinkMemory;
19  class AllStubsMemory;
20  class VMStubsMEMemory;
21  class VMStubsTEMemory;
22 
23  struct VMStubsTEPHI {
24  VMStubsTEPHI(unsigned int seednumber_,
25  unsigned int stubposition_,
26  std::vector<std::vector<VMStubsTEMemory*> > vmstubmem_)
27  : seednumber(seednumber_), stubposition(stubposition_), vmstubmem(vmstubmem_){};
28 
29  unsigned int seednumber; //seed number [0,11]
30  unsigned int stubposition; //stub position in the seed
31  std::vector<std::vector<VMStubsTEMemory*> >
32  vmstubmem; // m_vmstubmem[iVM][n] is the VMStubsTEMemory for iVM and the nth copy
33  };
34 
35  class VMRouter : public ProcessBase {
36  public:
37  VMRouter(std::string name, Settings const& settings, Globals* global);
38 
39  ~VMRouter() override = default;
40 
41  void addOutput(MemoryBase* memory, std::string output) override;
42  void addInput(MemoryBase* memory, std::string input) override;
43 
44  void execute();
45 
46  private:
47  //0-5 are the layers and 6-10 are the disks
48  unsigned int layerdisk_;
49 
50  //overlapbits_ is the top bits of phicorr used to add or subtract one to see if stub should be added to
51  //two VMs. nextrabits_ is the number of bits beyond the bits for the phivm that is used by overlapbits_
52  unsigned int overlapbits_;
53  unsigned int nextrabits_;
54 
57 
58  TrackletLUT meTable_; //used for ME and outer TE barrel
59  TrackletLUT diskTable_; //outer disk used by D1, D2, and D4
60  TrackletLUT innerTable_; //projection to next layer/disk
61  TrackletLUT innerOverlapTable_; //projection to disk from layer
62  TrackletLUT innerThirdTable_; //projection to disk1 for extended - iseed=10
63 
64  //The input stub memories the two tmp inputs are used to build the order needed in HLS
65  std::vector<InputLinkMemory*> stubinputs_, stubinputtmp_, stubinputdisk2stmp_;
66 
67  //The all stub memories
68  std::vector<AllStubsMemory*> allstubs_;
69 
70  //The VM stubs memories used by the MEs
71  std::vector<VMStubsMEMemory*> vmstubsMEPHI_;
72 
73  //The VM stubs memories used by the TEs (using structure defined above)
74  std::vector<VMStubsTEPHI> vmstubsTEPHI_;
75  };
76 }; // namespace trklet
77 #endif
void addInput(MemoryBase *memory, std::string input) override
Definition: VMRouter.cc:160
TrackletLUT innerThirdTable_
Definition: VMRouter.h:62
std::vector< InputLinkMemory * > stubinputdisk2stmp_
Definition: VMRouter.h:65
VMStubsTEPHI(unsigned int seednumber_, unsigned int stubposition_, std::vector< std::vector< VMStubsTEMemory * > > vmstubmem_)
Definition: VMRouter.h:24
std::vector< InputLinkMemory * > stubinputtmp_
Definition: VMRouter.h:65
VMRouter(std::string name, Settings const &settings, Globals *global)
Definition: VMRouter.cc:16
TrackletLUT innerTable_
Definition: VMRouter.h:60
static std::string const input
Definition: EdmProvDump.cc:47
void addOutput(MemoryBase *memory, std::string output) override
Definition: VMRouter.cc:59
unsigned int stubposition
Definition: VMRouter.h:30
std::vector< InputLinkMemory * > stubinputs_
Definition: VMRouter.h:65
TrackletLUT meTable_
Definition: VMRouter.h:58
unsigned int overlapbits_
Definition: VMRouter.h:52
int nbitszfinebintable_
Definition: VMRouter.h:55
std::vector< VMStubsMEMemory * > vmstubsMEPHI_
Definition: VMRouter.h:71
int nbitsrfinebintable_
Definition: VMRouter.h:56
unsigned int layerdisk_
Definition: VMRouter.h:48
unsigned int nextrabits_
Definition: VMRouter.h:53
TrackletLUT innerOverlapTable_
Definition: VMRouter.h:61
~VMRouter() override=default
TrackletLUT diskTable_
Definition: VMRouter.h:59
std::vector< AllStubsMemory * > allstubs_
Definition: VMRouter.h:68
std::vector< VMStubsTEPHI > vmstubsTEPHI_
Definition: VMRouter.h:74
std::vector< std::vector< VMStubsTEMemory * > > vmstubmem
Definition: VMRouter.h:32
unsigned int seednumber
Definition: VMRouter.h:27