forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cms-sw#35 from cms-L1TK/LS-port-11_1_0_pre5
Ls port 11 1 0 pre5
- Loading branch information
Showing
37 changed files
with
1,446 additions
and
1,043 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
L1Trigger/TrackFindingTracklet/interface/TrackletEngineUnit.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#ifndef L1Trigger_TrackFindingTracklet_interface_TrackletEngineUnit_h | ||
#define L1Trigger_TrackFindingTracklet_interface_TrackletEngineUnit_h | ||
|
||
#include "L1Trigger/TrackFindingTracklet/interface/VMStubsTEMemory.h" | ||
#include "L1Trigger/TrackFindingTracklet/interface/CircularBuffer.h" | ||
|
||
#include <cassert> | ||
#include <vector> | ||
|
||
|
||
namespace trklet { | ||
|
||
class Settings; | ||
class Stub; | ||
class L1TStub; | ||
class FPGAWord; | ||
|
||
struct TEData{ | ||
const Stub* stub_; | ||
int start_; | ||
int rzbinfirst_; | ||
int rzdiffmax_; | ||
int innerfinephi_; | ||
FPGAWord innerbend_; | ||
std::vector< std::tuple<int, int, int> > regions_; // next z/r bin; phi-region; nstub | ||
}; | ||
|
||
|
||
class TrackletEngineUnit { | ||
public: | ||
TrackletEngineUnit(const Settings* const settings, unsigned int nbitsfinephi, unsigned int layerdisk2, unsigned int iSeed, unsigned int nbitsfinephiediff, unsigned int iAllStub, std::vector<bool> pttableinner, std::vector<bool> pttableouter, VMStubsTEMemory* outervmstubs); | ||
|
||
~TrackletEngineUnit() = default; | ||
|
||
void init(const TEData& tedata); | ||
|
||
bool empty() const { return candpairs_.empty(); } | ||
|
||
std::pair<const Stub*, const Stub*> read() { return candpairs_.read(); } | ||
|
||
std::pair<const Stub*, const Stub*> peek() const { return candpairs_.peek(); } | ||
|
||
bool idle() const { return idle_; } | ||
|
||
void reset(); | ||
|
||
void step(); | ||
|
||
private: | ||
VMStubsTEMemory* outervmstubs_; | ||
TEData tedata_; | ||
const Settings* settings_; | ||
unsigned int nbitsfinephi_; | ||
unsigned int layerdisk2_; | ||
unsigned int iSeed_; | ||
unsigned int nbitsfinephidiff_; | ||
|
||
unsigned int iAllStub_; | ||
|
||
//unsigned int memory slot | ||
unsigned int nreg_; | ||
unsigned int istub_; | ||
unsigned int ireg_; | ||
unsigned int next_; | ||
unsigned int nstub_; | ||
|
||
bool idle_; | ||
|
||
std::vector<bool> pttableinner_; | ||
std::vector<bool> pttableouter_; | ||
|
||
//save the candidate matches | ||
CircularBuffer<std::pair<const Stub*, const Stub*> > candpairs_; | ||
}; // TrackletEngineUnit | ||
|
||
}; // namespace trklet | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.