CMS 3D CMS Logo

VMRouterCM.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) - implementation for combined modules
2 #ifndef L1Trigger_TrackFindingTracklet_interface_VMRouterCM_h
3 #define L1Trigger_TrackFindingTracklet_interface_VMRouterCM_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 AllInnerStubsMemory;
21  class VMStubsMEMemory;
22  class VMStubsTEMemory;
23 
24  struct VMStubsTEPHICM {
25  VMStubsTEPHICM(unsigned int seednumber_,
26  unsigned int stubposition_,
27  const std::vector<std::vector<VMStubsTEMemory*> >& vmstubmem_)
28  : seednumber(seednumber_), stubposition(stubposition_), vmstubmem(vmstubmem_) {};
29 
30  unsigned int seednumber; //seed number [0,11]
31  unsigned int stubposition; //stub position in the seed (only used by triplet seeds)
32 
33  // The first index in the following 2D vector is only used in the case of
34  // the triplet seeds.
35  std::vector<std::vector<VMStubsTEMemory*> >
36  vmstubmem; // m_vmstubmem[iVM][n] is the VMStubsTEMemory for iVM and the nth copy
37  };
38 
39  class VMRouterCM : public ProcessBase {
40  public:
41  VMRouterCM(std::string name, Settings const& settings, Globals* global);
42 
43  ~VMRouterCM() override = default;
44 
45  void addOutput(MemoryBase* memory, std::string output) override;
46  void addInput(MemoryBase* memory, std::string input) override;
47 
48  void execute(unsigned int iSector);
49 
50  private:
51  //0-5 are the layers and 6-10 are the disks
52  unsigned int layerdisk_;
53 
54  //overlapbits_ is the top bits of phicorr used to add or subtract one to see if stub should be added to
55  //two VMs. nextrabits_ is the number of bits beyond the bits for the phivm that is used by overlapbits_
56  unsigned int overlapbits_;
57  unsigned int nextrabits_;
58 
61 
62  unsigned int nvmmebins_; //number of long z/r bins in VM
63 
64  TrackletLUT meTable_; //used for ME and outer TE barrel
65  TrackletLUT diskTable_; //outer disk used by D1, D2, and D4
66 
67  // The following tables are only used to replicate the behavior of the old
68  // VMRouter in the case of the triplet seeds.
69  TrackletLUT meTableOld_; //used for ME and outer TE barrel
70  TrackletLUT diskTableOld_; //outer disk used by D1, D2, and D4
71  TrackletLUT innerTable_; //projection to next layer/disk
72  TrackletLUT innerOverlapTable_; //projection to disk from layer
73  TrackletLUT innerThirdTable_; //projection to disk1 for extended - iseed=10
74 
75  //The input stub memories
76  std::vector<InputLinkMemory*> stubinputs_;
77 
78  //The all stub memories
79  std::vector<AllStubsMemory*> allstubs_;
80  std::vector<std::pair<char, AllInnerStubsMemory*> > allinnerstubs_;
81 
82  //The VM stubs memories used by the MEs
83  std::vector<VMStubsMEMemory*> vmstubsMEPHI_;
84 
85  //The VM stubs memories used by the TEs (using structure defined above)
86  std::vector<VMStubsTEPHICM> vmstubsTEPHI_;
87  };
88 }; // namespace trklet
89 #endif
TrackletLUT innerOverlapTable_
Definition: VMRouterCM.h:72
TrackletLUT diskTable_
Definition: VMRouterCM.h:65
unsigned int stubposition
Definition: VMRouterCM.h:31
unsigned int nvmmebins_
Definition: VMRouterCM.h:62
TrackletLUT innerTable_
Definition: VMRouterCM.h:71
std::vector< InputLinkMemory * > stubinputs_
Definition: VMRouterCM.h:76
unsigned int seednumber
Definition: VMRouterCM.h:28
std::vector< std::pair< char, AllInnerStubsMemory * > > allinnerstubs_
Definition: VMRouterCM.h:80
std::vector< VMStubsMEMemory * > vmstubsMEPHI_
Definition: VMRouterCM.h:83
VMStubsTEPHICM(unsigned int seednumber_, unsigned int stubposition_, const std::vector< std::vector< VMStubsTEMemory *> > &vmstubmem_)
Definition: VMRouterCM.h:25
TrackletLUT diskTableOld_
Definition: VMRouterCM.h:70
static std::string const input
Definition: EdmProvDump.cc:50
void execute(unsigned int iSector)
Definition: VMRouterCM.cc:187
std::vector< VMStubsTEPHICM > vmstubsTEPHI_
Definition: VMRouterCM.h:86
unsigned int overlapbits_
Definition: VMRouterCM.h:56
TrackletLUT innerThirdTable_
Definition: VMRouterCM.h:73
void addOutput(MemoryBase *memory, std::string output) override
Definition: VMRouterCM.cc:72
unsigned int nextrabits_
Definition: VMRouterCM.h:57
~VMRouterCM() override=default
TrackletLUT meTable_
Definition: VMRouterCM.h:64
Definition: output.py:1
void addInput(MemoryBase *memory, std::string input) override
Definition: VMRouterCM.cc:171
unsigned int layerdisk_
Definition: VMRouterCM.h:52
VMRouterCM(std::string name, Settings const &settings, Globals *global)
Definition: VMRouterCM.cc:17
std::vector< AllStubsMemory * > allstubs_
Definition: VMRouterCM.h:79
std::vector< std::vector< VMStubsTEMemory * > > vmstubmem
Definition: VMRouterCM.h:36
TrackletLUT meTableOld_
Definition: VMRouterCM.h:69