Skip to content
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

Add missing bits to store the phi region for the inner stub in the combined module trackletparameters #233

Merged
merged 1 commit into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions L1Trigger/TrackFindingTracklet/interface/Stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ namespace trklet {

unsigned int phiregionaddress() const;
std::string phiregionaddressstr() const;
std::string phiregionstr() const;

void setAllStubIndex(int nstub); //should migrate away from using this method

Expand Down
6 changes: 6 additions & 0 deletions L1Trigger/TrackFindingTracklet/src/Stub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ std::string Stub::phiregionaddressstr() const {
return phiregion.str() + stubindex_.str();
}

std::string Stub::phiregionstr() const {
int iphi = (phicorr_.value() >> (phicorr_.nbits() - settings_.nbitsallstubs(layerdisk())));
FPGAWord phiregion(iphi, 3, true, __LINE__, __FILE__);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magic numbers like "3" should be avoided, so try to replace this with a named constant sometime.

return phiregion.str();
}

void Stub::setAllStubIndex(int nstub) {
if (nstub >= (1 << N_BITSMEMADDRESS)) {
if (settings_.debugTracklet())
Expand Down
10 changes: 9 additions & 1 deletion L1Trigger/TrackFindingTracklet/src/Tracklet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,15 @@ std::string Tracklet::trackletparstr() {
std::to_string(fpgapars_.t().value() * settings_.ktpars());
return oss;
} else {
std::string str = innerFPGAStub_->stubindex().str() + "|";
std::string str = "";
if (settings_.combined()) {
if (seedIndex() == Seed::L1D1 || seedIndex() == Seed::L2D1) {
str += outerFPGAStub_->phiregionstr() + "|";
} else {
str += innerFPGAStub_->phiregionstr() + "|";
}
}
str += innerFPGAStub_->stubindex().str() + "|";
if (middleFPGAStub_) {
str += middleFPGAStub_->stubindex().str() + "|";
}
Expand Down