CMS 3D CMS Logo

TrackletEngineUnit.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTracklet_interface_TrackletEngineUnit_h
2 #define L1Trigger_TrackFindingTracklet_interface_TrackletEngineUnit_h
3 
6 
7 #include <cassert>
8 #include <vector>
9 
10 namespace trklet {
11 
12  class Settings;
13  class Stub;
14  class L1TStub;
15  class FPGAWord;
16 
17  struct TEData {
18  const Stub* stub_;
19  int start_;
24  std::vector<std::tuple<int, int, int> > regions_; // next z/r bin; phi-region; nstub
25  };
26 
28  public:
29  TrackletEngineUnit(const Settings* const settings,
30  unsigned int nbitsfinephi,
31  unsigned int layerdisk2,
32  unsigned int iSeed,
33  unsigned int nbitsfinephiediff,
34  unsigned int iAllStub,
35  std::vector<bool> const& pttableinner,
36  std::vector<bool> const& pttableouter,
37  VMStubsTEMemory* outervmstubs);
38 
39  ~TrackletEngineUnit() = default;
40 
41  void init(const TEData& tedata);
42 
43  bool empty() const { return candpairs_.empty(); }
44 
45  const std::pair<const Stub*, const Stub*>& read() { return candpairs_.read(); }
46 
47  const std::pair<const Stub*, const Stub*>& peek() const { return candpairs_.peek(); }
48 
49  bool idle() const { return idle_; }
50 
51  void reset();
52 
53  void step();
54 
55  private:
59  unsigned int nbitsfinephi_;
60  unsigned int layerdisk2_;
61  unsigned int iSeed_;
62  unsigned int nbitsfinephidiff_;
63 
64  unsigned int iAllStub_;
65 
66  //unsigned int memory slot
67  unsigned int nreg_;
68  unsigned int istub_;
69  unsigned int ireg_;
70  unsigned int next_;
71  unsigned int nstub_;
72 
73  bool idle_;
74 
75  std::vector<bool> pttableinner_;
76  std::vector<bool> pttableouter_;
77 
78  //save the candidate matches
80  }; // TrackletEngineUnit
81 
82 }; // namespace trklet
83 #endif
trklet::TrackletEngineUnit::settings_
const Settings * settings_
Definition: TrackletEngineUnit.h:58
trklet::TEData::rzbinfirst_
int rzbinfirst_
Definition: TrackletEngineUnit.h:20
trklet::TEData::start_
int start_
Definition: TrackletEngineUnit.h:19
trklet::TEData::rzdiffmax_
int rzdiffmax_
Definition: TrackletEngineUnit.h:21
trklet::TrackletEngineUnit::pttableouter_
std::vector< bool > pttableouter_
Definition: TrackletEngineUnit.h:76
trklet::TrackletEngineUnit::peek
const std::pair< const Stub *, const Stub * > & peek() const
Definition: TrackletEngineUnit.h:47
trklet::Settings
Definition: Settings.h:31
trklet::TrackletEngineUnit::outervmstubs_
VMStubsTEMemory * outervmstubs_
Definition: TrackletEngineUnit.h:56
trklet::VMStubsTEMemory
Definition: VMStubsTEMemory.h:16
trklet::TrackletEngineUnit::idle_
bool idle_
Definition: TrackletEngineUnit.h:73
trklet::TrackletEngineUnit::tedata_
TEData tedata_
Definition: TrackletEngineUnit.h:57
trklet::TEData::innerbend_
FPGAWord innerbend_
Definition: TrackletEngineUnit.h:23
CircularBuffer.h
trklet::TrackletEngineUnit::~TrackletEngineUnit
~TrackletEngineUnit()=default
trklet::TrackletEngineUnit::pttableinner_
std::vector< bool > pttableinner_
Definition: TrackletEngineUnit.h:75
trklet::TEData::innerfinephi_
int innerfinephi_
Definition: TrackletEngineUnit.h:22
trklet::TrackletEngineUnit::nreg_
unsigned int nreg_
Definition: TrackletEngineUnit.h:67
trklet::Stub
Definition: Stub.h:16
trklet::TrackletEngineUnit::next_
unsigned int next_
Definition: TrackletEngineUnit.h:70
trklet::TrackletEngineUnit::nstub_
unsigned int nstub_
Definition: TrackletEngineUnit.h:71
trklet::TrackletEngineUnit
Definition: TrackletEngineUnit.h:27
trklet::TrackletEngineUnit::read
const std::pair< const Stub *, const Stub * > & read()
Definition: TrackletEngineUnit.h:45
trklet::FPGAWord
Definition: FPGAWord.h:9
trklet::TrackletEngineUnit::iAllStub_
unsigned int iAllStub_
Definition: TrackletEngineUnit.h:64
trklet::CircularBuffer
Definition: CircularBuffer.h:10
trklet::TrackletEngineUnit::step
void step()
Definition: TrackletEngineUnit.cc:43
trklet::TrackletEngineUnit::init
void init(const TEData &tedata)
Definition: TrackletEngineUnit.cc:29
trklet::TrackletEngineUnit::ireg_
unsigned int ireg_
Definition: TrackletEngineUnit.h:69
trklet
Definition: AllProjectionsMemory.h:9
trklet::TrackletEngineUnit::nbitsfinephi_
unsigned int nbitsfinephi_
Definition: TrackletEngineUnit.h:59
VMStubsTEMemory.h
trklet::TrackletEngineUnit::empty
bool empty() const
Definition: TrackletEngineUnit.h:43
trklet::TrackletEngineUnit::candpairs_
CircularBuffer< std::pair< const Stub *, const Stub * > > candpairs_
Definition: TrackletEngineUnit.h:79
trklet::TEData::stub_
const Stub * stub_
Definition: TrackletEngineUnit.h:18
trklet::TrackletEngineUnit::iSeed_
unsigned int iSeed_
Definition: TrackletEngineUnit.h:61
trklet::TrackletEngineUnit::nbitsfinephidiff_
unsigned int nbitsfinephidiff_
Definition: TrackletEngineUnit.h:62
trklet::TrackletEngineUnit::idle
bool idle() const
Definition: TrackletEngineUnit.h:49
trklet::TEData::regions_
std::vector< std::tuple< int, int, int > > regions_
Definition: TrackletEngineUnit.h:24
trklet::TrackletEngineUnit::reset
void reset()
Definition: TrackletEngineUnit.cc:38
trklet::TrackletEngineUnit::TrackletEngineUnit
TrackletEngineUnit(const Settings *const settings, unsigned int nbitsfinephi, unsigned int layerdisk2, unsigned int iSeed, unsigned int nbitsfinephiediff, unsigned int iAllStub, std::vector< bool > const &pttableinner, std::vector< bool > const &pttableouter, VMStubsTEMemory *outervmstubs)
Definition: TrackletEngineUnit.cc:8
trklet::TrackletEngineUnit::layerdisk2_
unsigned int layerdisk2_
Definition: TrackletEngineUnit.h:60
trklet::TrackletEngineUnit::istub_
unsigned int istub_
Definition: TrackletEngineUnit.h:68
trklet::TEData
Definition: TrackletEngineUnit.h:17