Skip to content

Commit

Permalink
Fix to phi output
Browse files Browse the repository at this point in the history
  • Loading branch information
Chriisbrown committed Sep 9, 2022
1 parent 98406f0 commit 38ab830
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion L1Trigger/L1TTrackMatch/interface/L1TkEtMissEmuAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace l1tmetemu {
const unsigned int kMETPhiSize{13}; // For Output Phi default 13

typedef ap_ufixed<kMETSize,kMETMagSize> METWord_t;
typedef ap_uint<kMETPhiSize> METWordphi_t;
typedef ap_int<kMETPhiSize> METWordphi_t;

const double kStepMETwordEt = kMaxMET / ( 1 << kMETSize);
const double kStepMETwordPhi = kMaxMETPhi / ( 1 << kMETPhiSize);
Expand Down
4 changes: 0 additions & 4 deletions L1Trigger/L1TTrackMatch/src/Cordic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,18 @@ EtMiss Cordic::toPolar(Et_t x, Et_t y) const {
}

if (in_x >= 0 && in_y >= 0) {
phi = E2t_t(M_PI);
sign = true;

} else if (in_x < 0 && in_y >= 0) {
phi = E2t_t(2*M_PI);
sign = false;
in_x = -in_x;

} else if (in_x < 0 && in_y < 0) {
phi = 0;
sign = true;
in_x = -in_x;
in_y = -in_y;

} else {
phi = E2t_t(M_PI);
sign = false;
in_y = -in_y;
}
Expand Down

0 comments on commit 38ab830

Please sign in to comment.