Skip to content

Commit

Permalink
add bit into AllStubInner for TP Disks (cms-sw#230)
Browse files Browse the repository at this point in the history
* add bit to allstubinner needed for TP Disk expansion

* formatting

* run scram b -j code-format
  • Loading branch information
jasonfan393 committed Aug 8, 2023
1 parent 200d7b8 commit e0bc9ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
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

0 comments on commit e0bc9ba

Please sign in to comment.