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
[HGCAL trigger] Mainly seeding and frontend Concentrator updates #28385
[HGCAL trigger] Mainly seeding and frontend Concentrator updates #28385
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28385/12716
|
A new Pull Request was created by @jbsauvan (Jean-Baptiste Sauvan) for master. It involves the following packages: DataFormats/L1THGCal @cmsbuild, @rekovic, @benkrikler, @kpedro88 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test with cms-data/L1Trigger-L1THGCal#16 |
The tests are being triggered in jenkins. |
@@ -55,6 +57,54 @@ class HGCalHistoSeedingImpl { | |||
}; | |||
using Histogram = HistogramT<Bin>; | |||
|
|||
class Navigator { | |||
public: | |||
enum AxisType { Bounded, Circular }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to use enum class
} else { | ||
throw cms::Exception("HGCTriggerParameterError") << "Unknown Multiclustering type '" << typeMulticluster << "'"; | ||
} | ||
|
||
for (auto interpretationPset : conf.getParameter<std::vector<edm::ParameterSet>>("energy_interpretations")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const auto&
scale_corrections_coeff_ = conf.getParameter<std::vector<double>>("scale_correction_coeff"); | ||
dr_bylayer_ = conf.getParameter<std::vector<double>>("dr_bylayer"); | ||
|
||
if (scale_corrections_coeff_.size() != 2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
magic number 2 should be named constant
} | ||
} | ||
} | ||
energy += scale_corrections_coeff_.at(1) * fabs(cluster3d.eta()) + scale_corrections_coeff_.at(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use std::abs()
rather than fabs()
l1tModulesMapping_(conf.getParameter<edm::FileInPath>("L1TModulesMapping")), | ||
l1tLinksMapping_(conf.getParameter<edm::FileInPath>("L1TLinksMapping")) { | ||
unsigned ntc_per_wafer = 48; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const
for (const auto& id_tc : triggerCells) { | ||
if (!pass(*id_tc.second, c3d)) | ||
continue; | ||
tc_energy_z.emplace_back(std::make_pair(id_tc.second->energy(), id_tc.second->position().z())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't need make_pair
with emplace_back
void HGCalConcentratorSuperTriggerCellImpl::createAllTriggerCells( | ||
std::unordered_map<unsigned, SuperTriggerCell>& STCs, std::vector<l1t::HGCalTriggerCell>& trigCellVecOutput) const { | ||
std::unordered_map<unsigned, SuperTriggerCell>& STCs, std::vector<l1t::HGCalTriggerCell>& trigCellVecOutput) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this no longer const?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot recall exactly why. Maybe it was needed to be non-const in an intermediate version. Anyway I added the const back.
if (triggerTools_.isSilicon(c.detId())) { | ||
thickness = triggerTools_.thicknessIndex(c.detId(), true); | ||
} else if (triggerTools_.isScintillator(c.detId())) { | ||
thickness = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use HGCalTriggerTools::kScintillatorPseudoThicknessIndex_
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, since this pattern of "check if silicon, use thickness index, otherwise for scintillator use pseudo index" is repeated various times in the trigger code, it seems like it should just all be absorbed into the thicknessIndex()
tool function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed your suggestion and absorbed this in the trigger tool function.
ntuple_sequence = cms.Sequence(tmpseq) | ||
for vfe,truth_prod,backend1,backend2,selector,ntuple in self.truth_chain: | ||
truth_prod_name = '{0}{1}'.format(vfe, truth_prod) | ||
backend1_name = '{0}{1}{2}'.format(vfe, truth_prod, backend1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could just chain these together to reduce duplication, e.g.
backend1_name = truth_prod_name+'{0}'.format(backend1)
(etc.)
process.load('FWCore.MessageService.MessageLogger_cfi') | ||
process.load('Configuration.EventContent.EventContent_cff') | ||
process.load('SimGeneral.MixingModule.mixNoPU_cfi') | ||
process.load('Configuration.Geometry.GeometryExtended2023D35Reco_cff') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2023 -> 2026
-1 Tested at: 5c7ffa5 You can see the results of the tests here: I found follow errors while testing this PR Failed tests: ClangBuild
I found compilation warning while trying to compile with clang. Command used:
See details on the summary page. |
Comparison not run due to Build errors/Fireworks only changes/No short matrix requested (RelVals and Igprof tests were also skipped) |
Clang complained about:
(I actually haven't seen that one before...) |
Thanks @kpedro88 |
Comparison is ready Comparison Summary:
|
+upgrade |
@rekovic @benkrikler please check and review or sign |
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
static constexpr uint32_t kWaferOffset_ = 3; | ||
static constexpr uint32_t kWaferMask_ = 0x7; | ||
static constexpr uint32_t kLinkMask_ = 0x7; | ||
static const unsigned kNDataSize_ = 128; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for noticing. Looks like I had modified these lines when const
was used and when I rebased I missed the constexpr
. I will change back to constexpr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbsauvan please propose it in a small update PR, I will merge this one for the time being
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, will do
+1 |
PR description:
This PR includes several updates, which have been done mainly for the choice of the concentrator algorithms to be implemented in hardware.
Depends on external cms-data/L1Trigger-L1THGCal#16
Right after this PR is merged, an other one will follow which integrates the HFNose into the HGCAL TPG.
(FYI @mariadalfonso)
PR validation:
Standard code checks and formatting.
Test V9, V10, V11 workflows (though the HGCAL trigger is still disconnected for V11).
Additionally each of these commits have been validated by looking at their impact on standard object distributions, and have also been validated with performance studies.