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  // Get pointers to Stubs on track.
31  std::vector<const Stub*> getStublist(unsigned int i) const { return stublists_[i]; }
32  // Get (layer, unique stub index in layer) of stubs on track.
33  std::vector<std::pair<int, int>> getStubidslist(unsigned int i) const { return stubidslists_[i]; }
34 
35  void clean() override {
36  tracks_.clear();
37  stublists_.clear();
38  stubidslists_.clear();
39  }
40 
41  void writeTF(bool first, unsigned int iSector);
42 
43  private:
44  double phimin_;
45  double phimax_;
46  std::vector<Tracklet*> tracks_;
47  std::vector<std::vector<const Stub*>> stublists_;
48  std::vector<std::vector<std::pair<int, int>>> stubidslists_;
49  };
50 
51 }; // namespace trklet
52 #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