Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:56

0001 #ifndef L1Trigger_TrackFindingTracklet_interface_VMStubsTEMemory_h
0002 #define L1Trigger_TrackFindingTracklet_interface_VMStubsTEMemory_h
0003 
0004 #include "L1Trigger/TrackFindingTracklet/interface/MemoryBase.h"
0005 #include "L1Trigger/TrackFindingTracklet/interface/TrackletLUT.h"
0006 #include "L1Trigger/TrackFindingTracklet/interface/VMStubTE.h"
0007 
0008 #include <string>
0009 #include <vector>
0010 
0011 namespace trklet {
0012 
0013   class Settings;
0014   class Stub;
0015   class L1TStub;
0016   class TrackletLUT;
0017 
0018   class VMStubsTEMemory : public MemoryBase {
0019   public:
0020     VMStubsTEMemory(std::string name, Settings const& settings);
0021 
0022     ~VMStubsTEMemory() override = default;
0023 
0024     void resize(int nbins) { stubsbinnedvm_.resize(nbins); }
0025 
0026     bool addVMStub(VMStubTE vmstub, int bin);
0027 
0028     bool addVMStub(VMStubTE vmstub);
0029 
0030     unsigned int nVMStubs() const { return stubsvm_.size(); }
0031 
0032     unsigned int nVMStubsBinned(unsigned int bin) const { return stubsbinnedvm_[bin].size(); }
0033 
0034     unsigned int nBin() const { return stubsbinnedvm_.size(); }
0035 
0036     const VMStubTE& getVMStubTE(unsigned int i) const { return stubsvm_[i]; }
0037 
0038     const VMStubTE& getVMStubTEBinned(unsigned int bin, unsigned int i) const { return stubsbinnedvm_[bin][i]; }
0039 
0040     void clean() override;
0041 
0042     void writeStubs(bool first, unsigned int iSector);
0043 
0044     int phibin() const { return phibin_; }
0045 
0046     void getPhiRange(double& phimin, double& phimax, unsigned int iSeed, unsigned int inner);
0047 
0048     void setother(VMStubsTEMemory* other) { other_ = other; }
0049 
0050     VMStubsTEMemory* other() { return other_; }
0051 
0052     void setbendtable(const TrackletLUT& bendtable);
0053 
0054   private:
0055     int layer_;
0056     int disk_;
0057     int layerdisk_;
0058     int phibin_;
0059     VMStubsTEMemory* other_;
0060     bool overlap_;
0061     bool extra_;
0062     bool extended_;  // for the L2L3->D1 and D1D2->L2
0063     bool isinner_;   // is inner layer/disk for TE purpose
0064 
0065     TrackletLUT bendtable_;
0066 
0067     std::vector<VMStubTE> stubsvm_;
0068     std::vector<std::vector<VMStubTE> > stubsbinnedvm_;
0069   };
0070 
0071 };  // namespace trklet
0072 #endif