CMS 3D CMS Logo

VMStubsTEMemory.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTracklet_interface_VMStubsTEMemory_h
2 #define L1Trigger_TrackFindingTracklet_interface_VMStubsTEMemory_h
3 
7 
8 #include <string>
9 #include <vector>
10 
11 namespace trklet {
12 
13  class Settings;
14  class Stub;
15  class L1TStub;
16  class TrackletLUT;
17 
18  class VMStubsTEMemory : public MemoryBase {
19  public:
20  VMStubsTEMemory(std::string name, Settings const& settings);
21 
22  ~VMStubsTEMemory() override = default;
23 
24  void resize(int nbins) { stubsbinnedvm_.resize(nbins); }
25 
26  bool addVMStub(VMStubTE vmstub, int bin);
27 
28  bool addVMStub(VMStubTE vmstub);
29 
30  unsigned int nVMStubs() const { return stubsvm_.size(); }
31 
32  unsigned int nVMStubsBinned(unsigned int bin) const { return stubsbinnedvm_[bin].size(); }
33 
34  unsigned int nBin() const { return stubsbinnedvm_.size(); }
35 
36  const VMStubTE& getVMStubTE(unsigned int i) const { return stubsvm_[i]; }
37 
38  const VMStubTE& getVMStubTEBinned(unsigned int bin, unsigned int i) const { return stubsbinnedvm_[bin][i]; }
39 
40  void clean() override;
41 
42  void writeStubs(bool first, unsigned int iSector);
43 
44  int phibin() const { return phibin_; }
45 
46  void getPhiRange(double& phimin, double& phimax, unsigned int iSeed, unsigned int inner);
47 
49 
50  VMStubsTEMemory* other() { return other_; }
51 
52  void setbendtable(const TrackletLUT& bendtable);
53 
54  private:
55  int layer_;
56  int disk_;
58  int phibin_;
60  bool overlap_;
61  bool extra_;
62  bool extended_; // for the L2L3->D1 and D1D2->L2
63  bool isinner_; // is inner layer/disk for TE purpose
64 
66 
67  std::vector<VMStubTE> stubsvm_;
68  std::vector<std::vector<VMStubTE> > stubsbinnedvm_;
69  };
70 
71 }; // namespace trklet
72 #endif
const VMStubTE & getVMStubTEBinned(unsigned int bin, unsigned int i) const
void setbendtable(const TrackletLUT &bendtable)
void setother(VMStubsTEMemory *other)
std::vector< VMStubTE > stubsvm_
void resize(int nbins)
unsigned int nBin() const
VMStubsTEMemory * other()
~VMStubsTEMemory() override=default
bool addVMStub(VMStubTE vmstub, int bin)
const VMStubTE & getVMStubTE(unsigned int i) const
void writeStubs(bool first, unsigned int iSector)
unsigned int nVMStubs() const
std::vector< std::vector< VMStubTE > > stubsbinnedvm_
unsigned int nVMStubsBinned(unsigned int bin) const
void getPhiRange(double &phimin, double &phimax, unsigned int iSeed, unsigned int inner)
VMStubsTEMemory * other_
VMStubsTEMemory(std::string name, Settings const &settings)