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 bit into AllStubInner for TP Disks #230

Merged
merged 3 commits into from
Aug 8, 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
8 changes: 7 additions & 1 deletion L1Trigger/TrackFindingTracklet/interface/Stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ namespace trklet {
unsigned int nbitsfinephi = 8;
FPGAWord finephi(
phicorr_.bits(phicorr_.nbits() - nbitsfinephi, nbitsfinephi), nbitsfinephi, true, __LINE__, __FILE__);
return str() + "|" + stubindex_.str() + "|" + finephi.str();
if (layer_.value() == -1) {
return str() + "|" + negdisk_.str() + "|" + stubindex_.str() + "|" + finephi.str();
} else {
return str() + "|" + stubindex_.str() + "|" + finephi.str();
}
}

FPGAWord allStubIndex() const { return stubindex_; }
Expand All @@ -59,6 +63,7 @@ namespace trklet {

const FPGAWord& r() const { return r_; }
const FPGAWord& z() const { return z_; }
const FPGAWord& negdisk() const { return negdisk_; }
const FPGAWord& phi() const { return phi_; }
const FPGAWord& phicorr() const { return phicorr_; }
const FPGAWord& alpha() const { return alpha_; }
Expand Down Expand Up @@ -87,6 +92,7 @@ namespace trklet {
FPGAWord disk_;
FPGAWord r_;
FPGAWord z_;
FPGAWord negdisk_;
FPGAWord phi_;
FPGAWord alpha_;

Expand Down
2 changes: 2 additions & 0 deletions L1Trigger/TrackFindingTracklet/src/Stub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Stub::Stub(L1TStub& stub, Settings const& settings, Globals& globals) : settings
alpha_.set(newalpha, nalphabits, false, __LINE__, __FILE__);
nrbits = 4;
}
int negdisk = (disk < 0) ? 1 : 0;
negdisk_.set(negdisk, 1, true, __LINE__, __FILE__);
} else {
disk_.set(0, 4, false, __LINE__, __FILE__);
layer_.set(layerdisk_, 3, true, __LINE__, __FILE__);
Expand Down