[Phase2 L1T] GMT Upgrade of Kalman Filter for Barrel Muon KMTF#51111
[Phase2 L1T] GMT Upgrade of Kalman Filter for Barrel Muon KMTF#51111zhenbinwu wants to merge 46 commits into
Conversation
KMTFTrack now requires z, kSlope as arguments added z, kSlope members and accessors setCoordinates, setCovariance now require arguments z, kSlope
…new gain LUTs now for z, kSlope
|
cms-bot internal usage |
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-51111/49609
|
|
A new Pull Request was created by @zhenbinwu for master. It involves the following packages:
@BenjaminRS, @cmsbuild, @quinnanm can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
|
please test |
|
+1 Size: This PR adds an extra 692KB to repository Comparison SummarySummary:
|
|
Milestone for this pull request has been moved to CMSSW_20_0_X. Please open a backport if it should also go in to CMSSW_17_0_X. |
|
(I assume this PR does not need a backport to 17_0_X (Run 3 legacy)) |
| <version ClassVersion="5" checksum="251130338"/> | ||
| <version ClassVersion="4" checksum="251130338"/> |
There was a problem hiding this comment.
Only one new class version should be added. Very likely you also need to rebase on top of 20_0_0_pre1 (hopefully available early next week) because the checksum for version 3 will be changed for that.
|
HI Matti - indeed this is a Phase 2 only algorithm for 20_1_X |
quinnanm
left a comment
There was a problem hiding this comment.
Thank you for this PR! Just a few minor comments.
| int KMTFCore::customBitmask(unsigned int bit1, unsigned int bit2, unsigned int bit3, unsigned int bit4) { | ||
| return bit1 * 1 + bit2 * 2 + bit3 * 4 + bit4 * 8; | ||
| } | ||
|
|
||
| bool KMTFCore::getBit(int bitmask, int pos) { return (bitmask & (1 << pos)) >> pos; } | ||
|
|
||
| void KMTFCore::setFourVectors(l1t::KMTFTrack& track) { | ||
| int etaINT = track.coarseEta(); | ||
| //int etaINT = track.coarseEta(); | ||
| ap_ufixed<18, 0> m = 0.03602; |
There was a problem hiding this comment.
could you maybe add a comment adding context to these numbers?
| @@ -745,7 +1045,7 @@ bool KMTFCore::updateLUT(l1t::KMTFTrack& track, const l1t::MuonStubRef& stub, in | |||
| << ap_ufixed<GAIN2_5, GAIN2_5INT>(GAIN[3]).to_float(); | |||
| } | |||
|
|
|||
| track.setKalmanGain(track.step(), fabs(trackK), GAIN[0], GAIN[1], 1, 0, GAIN[2], GAIN[3]); | |||
| //track.setKalmanGain(track.step(), fabs(trackK), GAIN[0], GAIN[1], 1, 0, GAIN[2], GAIN[3]); | |||
There was a problem hiding this comment.
can this comment be deleted?
| @@ -1086,7 +1464,7 @@ int KMTFCore::encode(bool ownwheel, int sector, int tag) { | |||
|
|
|||
| std::pair<bool, uint> KMTFCore::getByCode(const std::vector<l1t::KMTFTrack>& tracks, int mask) { | |||
| for (uint i = 0; i < tracks.size(); ++i) { | |||
| edm::LogInfo("KMTFCore") << "Code=" << tracks[i].hitPattern() << ", track=" << mask; | |||
| //edm::LogInfo("KMTFCore") << "Code=" << tracks[i].hitPattern() << ", track=" << mask; | |||
There was a problem hiding this comment.
can this comment be deleted?
There was a problem hiding this comment.
is this the intended location of this file or is it planned to live elsewhere like cms-data?
| TFile *lutFile_; | ||
| TFile *lutThetaFile_; |
There was a problem hiding this comment.
should these be std::unique_ptr<TFile>?
| const auto& phiS = pairs.phiDigi(); | ||
| static constexpr int ZCenterDigitizedPositive[] = {11730, 23327}; | ||
| static constexpr int ZCenterDigitizedNegative[] = {-11697, -23290}; | ||
| static constexpr int ZCenterDigitizedZero[] = {22}; |
There was a problem hiding this comment.
this is a bit odd as a single element array rather than a constexpr int but if you really like it this way I guess it's fine
| @@ -110,12 +134,51 @@ namespace Phase2L1GMT { | |||
| return uint((1 << 12) * coarseEta_->GetBinContent(coarseEta_->GetXaxis()->FindBin(mask)) / M_PI); | |||
| } | |||
|
|
|||
| std::vector<float> trackGainTheta(uint step, uint bitmask, uint K, bool is2D) { | |||
There was a problem hiding this comment.
could this be const? likewise the trackGainTheta2 getter
|
Milestone for this pull request has been moved to CMSSW_20_1_X. Please open a backport if it should also go in to CMSSW_20_0_X. |
PR description:
PR validation:
Ongoing ...