CMS 3D CMS Logo

TrackFitMemory.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTracklet_interface_TrackFitMemory_h
2 #define L1Trigger_TrackFindingTracklet_interface_TrackFitMemory_h
3 
5 
6 #include <vector>
7 
8 namespace trklet {
9 
10  class Settings;
11  class Stub;
12  class L1TStub;
13  class Tracklet;
14 
15  class TrackFitMemory : public MemoryBase {
16  public:
17  TrackFitMemory(std::string name, Settings const& settings, double phimin, double phimax);
18 
19  ~TrackFitMemory() override = default;
20 
21  void addTrack(Tracklet* tracklet) { tracks_.push_back(tracklet); }
22  void addStubList(std::vector<const Stub*> stublist) { stublists_.push_back(stublist); }
23  void addStubidsList(std::vector<std::pair<int, int>> stubidslist) { stubidslists_.push_back(stubidslist); }
24 
25  unsigned int nTracks() const { return tracks_.size(); }
26  unsigned int nStublists() const { return stublists_.size(); }
27  unsigned int nStubidslists() const { return stubidslists_.size(); }
28 
29  Tracklet* getTrack(unsigned int i) { return tracks_[i]; }
30  std::vector<const Stub*> getStublist(unsigned int i) const { return stublists_[i]; }
31  std::vector<std::pair<int, int>> getStubidslist(unsigned int i) const { return stubidslists_[i]; }
32 
33  void clean() override {
34  tracks_.clear();
35  stublists_.clear();
36  stubidslists_.clear();
37  }
38 
39  void writeTF(bool first, unsigned int iSector);
40 
41  private:
42  double phimin_;
43  double phimax_;
44  std::vector<Tracklet*> tracks_;
45  std::vector<std::vector<const Stub*>> stublists_;
46  std::vector<std::vector<std::pair<int, int>>> stubidslists_;
47  };
48 
49 }; // namespace trklet
50 #endif
unsigned int nStubidslists() const
~TrackFitMemory() override=default
void writeTF(bool first, unsigned int iSector)
void addTrack(Tracklet *tracklet)
std::vector< std::vector< std::pair< int, int > > > stubidslists_
std::vector< Tracklet * > tracks_
void addStubList(std::vector< const Stub *> stublist)
unsigned int nTracks() const
std::vector< std::vector< const Stub * > > stublists_
TrackFitMemory(std::string name, Settings const &settings, double phimin, double phimax)
Tracklet * getTrack(unsigned int i)
std::vector< std::pair< int, int > > getStubidslist(unsigned int i) const
void addStubidsList(std::vector< std::pair< int, int >> stubidslist)
void clean() override
std::vector< const Stub * > getStublist(unsigned int i) const
unsigned int nStublists() const