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 
6 
7 #include <string>
8 #include <vector>
9 
10 namespace trklet {
11 
12  class Settings;
13  class Stub;
14  class L1TStub;
15 
16  class VMStubsTEMemory : public MemoryBase {
17  public:
18  VMStubsTEMemory(std::string name, Settings const& settings, unsigned int iSector);
19 
20  ~VMStubsTEMemory() override = default;
21 
22  void resize(int nbins) { stubsbinnedvm_.resize(nbins); }
23 
24  bool addVMStub(VMStubTE vmstub, int bin);
25 
26  bool addVMStub(VMStubTE vmstub);
27 
28  unsigned int nVMStubs() const { return stubsvm_.size(); }
29 
30  unsigned int nVMStubsBinned(unsigned int bin) const { return stubsbinnedvm_[bin].size(); }
31 
32  unsigned int nBin() const { return stubsbinnedvm_.size(); }
33 
34  const VMStubTE& getVMStubTE(unsigned int i) const { return stubsvm_[i]; }
35 
36  const VMStubTE& getVMStubTEBinned(unsigned int bin, unsigned int i) const { return stubsbinnedvm_[bin][i]; }
37 
38  void clean() override;
39 
40  void writeStubs(bool first);
41 
42  int phibin() const { return phibin_; }
43 
44  void getPhiRange(double& phimin, double& phimax, unsigned int iSeed, unsigned int inner);
45 
47 
48  VMStubsTEMemory* other() { return other_; }
49 
50  void setbendtable(std::vector<bool> vmbendtable);
51 
52  bool passbend(unsigned int ibend) const {
53  assert(ibend < vmbendtable_.size());
54  return vmbendtable_[ibend];
55  }
56 
57  void writeVMBendTable();
58 
59  private:
60  int layer_;
61  int disk_;
62  int phibin_;
64  bool overlap_;
65  bool extra_;
66  bool extended_; // for the L2L3->D1 and D1D2->L2
67  bool isinner_; // is inner layer/disk for TE purpose
68 
69  std::vector<bool> vmbendtable_;
70 
71  std::vector<VMStubTE> stubsvm_;
72  std::vector<std::vector<VMStubTE> > stubsbinnedvm_;
73  };
74 
75 }; // namespace trklet
76 #endif
trklet::VMStubsTEMemory::setother
void setother(VMStubsTEMemory *other)
Definition: VMStubsTEMemory.h:46
trklet::VMStubsTEMemory::setbendtable
void setbendtable(std::vector< bool > vmbendtable)
Definition: VMStubsTEMemory.cc:270
mps_fire.i
i
Definition: mps_fire.py:428
trklet::VMStubTE
Definition: VMStubTE.h:15
trklet::VMStubsTEMemory::vmbendtable_
std::vector< bool > vmbendtable_
Definition: VMStubsTEMemory.h:69
phimin
float phimin
Definition: ReggeGribovPartonMCHadronizer.h:107
trklet::VMStubsTEMemory::getVMStubTEBinned
const VMStubTE & getVMStubTEBinned(unsigned int bin, unsigned int i) const
Definition: VMStubsTEMemory.h:36
trklet::Settings
Definition: Settings.h:31
trklet::VMStubsTEMemory
Definition: VMStubsTEMemory.h:16
cms::cuda::assert
assert(be >=bs)
trklet::VMStubsTEMemory::other
VMStubsTEMemory * other()
Definition: VMStubsTEMemory.h:48
trklet::VMStubsTEMemory::~VMStubsTEMemory
~VMStubsTEMemory() override=default
trklet::VMStubsTEMemory::nVMStubs
unsigned int nVMStubs() const
Definition: VMStubsTEMemory.h:28
trklet::VMStubsTEMemory::writeVMBendTable
void writeVMBendTable()
Definition: VMStubsTEMemory.cc:280
trklet::VMStubsTEMemory::VMStubsTEMemory
VMStubsTEMemory(std::string name, Settings const &settings, unsigned int iSector)
Definition: VMStubsTEMemory.cc:9
trklet::VMStubsTEMemory::extra_
bool extra_
Definition: VMStubsTEMemory.h:65
trklet::VMStubsTEMemory::disk_
int disk_
Definition: VMStubsTEMemory.h:61
SurfaceOrientation::inner
Definition: Surface.h:19
trklet::VMStubsTEMemory::isinner_
bool isinner_
Definition: VMStubsTEMemory.h:67
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
trklet::VMStubsTEMemory::extended_
bool extended_
Definition: VMStubsTEMemory.h:66
trklet::VMStubsTEMemory::nBin
unsigned int nBin() const
Definition: VMStubsTEMemory.h:32
trklet::VMStubsTEMemory::layer_
int layer_
Definition: VMStubsTEMemory.h:60
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:112
trklet::VMStubsTEMemory::getVMStubTE
const VMStubTE & getVMStubTE(unsigned int i) const
Definition: VMStubsTEMemory.h:34
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
trklet::MemoryBase
Definition: MemoryBase.h:13
trklet::VMStubsTEMemory::addVMStub
bool addVMStub(VMStubTE vmstub, int bin)
Definition: VMStubsTEMemory.cc:62
trklet::VMStubsTEMemory::resize
void resize(int nbins)
Definition: VMStubsTEMemory.h:22
trklet::VMStubsTEMemory::other_
VMStubsTEMemory * other_
Definition: VMStubsTEMemory.h:63
trklet::VMStubsTEMemory::phibin
int phibin() const
Definition: VMStubsTEMemory.h:42
trklet
Definition: AllProjectionsMemory.h:9
trklet::VMStubsTEMemory::clean
void clean() override
Definition: VMStubsTEMemory.cc:210
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
phimax
float phimax
Definition: ReggeGribovPartonMCHadronizer.h:106
VMStubTE.h
trklet::VMStubsTEMemory::passbend
bool passbend(unsigned int ibend) const
Definition: VMStubsTEMemory.h:52
trklet::VMStubsTEMemory::writeStubs
void writeStubs(bool first)
Definition: VMStubsTEMemory.cc:217
trklet::VMStubsTEMemory::getPhiRange
void getPhiRange(double &phimin, double &phimax, unsigned int iSeed, unsigned int inner)
Definition: VMStubsTEMemory.cc:241
MemoryBase.h
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
trklet::VMStubsTEMemory::stubsbinnedvm_
std::vector< std::vector< VMStubTE > > stubsbinnedvm_
Definition: VMStubsTEMemory.h:72
trklet::VMStubsTEMemory::phibin_
int phibin_
Definition: VMStubsTEMemory.h:62
trklet::VMStubsTEMemory::nVMStubsBinned
unsigned int nVMStubsBinned(unsigned int bin) const
Definition: VMStubsTEMemory.h:30
trklet::VMStubsTEMemory::stubsvm_
std::vector< VMStubTE > stubsvm_
Definition: VMStubsTEMemory.h:71
trklet::VMStubsTEMemory::overlap_
bool overlap_
Definition: VMStubsTEMemory.h:64