forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restructure TrackletProcessorDisplaced #297
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
94 changes: 94 additions & 0 deletions
94
L1Trigger/TrackFindingTracklet/interface/TripletEngineUnit.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,94 @@ | ||
#ifndef L1Trigger_TrackFindingTracklet_interface_TripletEngineUnit_h | ||
#define L1Trigger_TrackFindingTracklet_interface_TripletEngineUnit_h | ||
|
||
#include "L1Trigger/TrackFindingTracklet/interface/VMStubsTEMemory.h" | ||
#include "L1Trigger/TrackFindingTracklet/interface/CircularBuffer.h" | ||
#include "L1Trigger/TrackFindingTracklet/interface/TrackletLUT.h" | ||
|
||
#include <cassert> | ||
#include <vector> | ||
|
||
namespace trklet { | ||
|
||
class Settings; | ||
class Stub; | ||
class L1TStub; | ||
|
||
struct TrpEData { | ||
const Stub* stub_; | ||
int start_out_; | ||
int start_in_; | ||
int rzbinfirst_out_; | ||
int rzdiffmax_out_; | ||
std::vector<std::tuple<int, int, int> > projbin_out_; // next z/r bin; outer stub mem; nstub | ||
std::vector<std::tuple<int, int, int> > projbin_in_; // next z/r bin; inner stub mem; nstub | ||
}; | ||
|
||
class TripletEngineUnit { | ||
public: | ||
TripletEngineUnit(const Settings* const settings, | ||
unsigned int layerdisk1, | ||
unsigned int layerdisk2, | ||
unsigned int layerdisk3, | ||
unsigned int iSeed, | ||
std::vector<VMStubsTEMemory*> innervmstubs, | ||
std::vector<VMStubsTEMemory*> outervmstubs); | ||
|
||
~TripletEngineUnit() = default; | ||
|
||
void init(const TrpEData& trpdata); | ||
|
||
bool getGoodTriplet() { return goodtriplet__; } | ||
|
||
bool empty() const { return candtriplets_.empty(); } | ||
|
||
const std::tuple<const Stub*, const Stub*, const Stub*>& read() { return candtriplets_.read(); } | ||
|
||
const std::tuple<const Stub*, const Stub*, const Stub*>& peek() const { return candtriplets_.peek(); } | ||
|
||
bool idle() const { return idle_; } | ||
|
||
void setNearFull() { nearfull_ = candtriplets_.nearfull(); } | ||
|
||
void reset(); | ||
|
||
void step(); | ||
|
||
const Stub* innerStub() const { return trpdata_.stub_; } | ||
|
||
private: | ||
std::vector<VMStubsTEMemory*> innervmstubs_; | ||
std::vector<VMStubsTEMemory*> outervmstubs_; | ||
TrpEData trpdata_; | ||
const Settings* settings_; | ||
unsigned int layerdisk1_; | ||
unsigned int layerdisk2_; | ||
unsigned int layerdisk3_; | ||
unsigned int iSeed_; | ||
bool nearfull_; //initialized at start of each processing step | ||
|
||
//unsigned int memory slot | ||
unsigned int nmem_out_; | ||
unsigned int nmem_in_; | ||
unsigned int istub_out_; | ||
unsigned int istub_in_; | ||
unsigned int next_out_; | ||
unsigned int next_in_; | ||
unsigned int nstub_out_; | ||
unsigned int nstub_in_; | ||
unsigned int outmem_; | ||
unsigned int inmem_; | ||
unsigned int nproj_out_; | ||
unsigned int nproj_in_; | ||
|
||
bool idle_; | ||
|
||
std::tuple<const Stub*, const Stub*, const Stub*> candtriplet_, candtriplet__; | ||
bool goodtriplet_, goodtriplet__; | ||
|
||
//save the candidate matches | ||
CircularBuffer<std::tuple<const Stub*, const Stub*, const Stub*> > candtriplets_; | ||
}; // TripletEngineUnit | ||
|
||
}; // namespace trklet | ||
#endif |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is a "trp"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This indicates the number of triplet engine units, distinct from tracklet engine units