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

[HGCAL trigger] Mainly seeding and frontend Concentrator updates #28385

Merged
merged 17 commits into from Nov 22, 2019

Conversation

jbsauvan
Copy link
Contributor

PR description:

This PR includes several updates, which have been done mainly for the choice of the concentrator algorithms to be implemented in hardware.

  • Add cluster seeding in the x-y space. Can now choose to seed in the (default) r-phi space or x-y space
  • Optimization of the cluster shape variables used for cluster identification
  • Add framework for cluster energy interpretations and implement the EM interpretation
  • Update trigger geometry and Concentrator to deal with a "decentralized" concentrator architecture
  • Add energy compression for SuperTriggerCells
  • Add combinations of concentrator algorithms

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.

scram b code-checks
scram b code-format

Test V9, V10, V11 workflows (though the HGCAL trigger is still disconnected for V11).

runTheMatrix.py -w upgrade -l 20034.0 --maxSteps=2
runTheMatrix.py -w upgrade -l 20434.0 --maxSteps=2
runTheMatrix.py -w upgrade -l 22034.0 --maxSteps=2

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.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28385/12716

  • This PR adds an extra 220KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @jbsauvan (Jean-Baptiste Sauvan) for master.

It involves the following packages:

DataFormats/L1THGCal
L1Trigger/L1THGCal
L1Trigger/L1THGCalUtilities

@cmsbuild, @rekovic, @benkrikler, @kpedro88 can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @amarini, @rovere, @lgray this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@kpedro88
Copy link
Contributor

please test with cms-data/L1Trigger-L1THGCal#16

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 12, 2019

The tests are being triggered in jenkins.
Tested with other pull request(s) cms-data/L1Trigger-L1THGCal#16
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/3442/console Started: 2019/11/12 20:26

@@ -55,6 +57,54 @@ class HGCalHistoSeedingImpl {
};
using Histogram = HistogramT<Bin>;

class Navigator {
public:
enum AxisType { Bounded, Circular };
Copy link
Contributor

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")) {
Copy link
Contributor

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) {
Copy link
Contributor

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);
Copy link
Contributor

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;
Copy link
Contributor

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()));
Copy link
Contributor

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) {
Copy link
Contributor

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?

Copy link
Contributor Author

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use HGCalTriggerTools::kScintillatorPseudoThicknessIndex_

Copy link
Contributor

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

Copy link
Contributor Author

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)
Copy link
Contributor

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')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2023 -> 2026

@cmsbuild
Copy link
Contributor

-1

Tested at: 5c7ffa5

You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-815f79/3442/summary.html

I found follow errors while testing this PR

Failed tests: ClangBuild

  • Clang:

I found compilation warning while trying to compile with clang. Command used:

USER_CUDA_FLAGS='--expt-relaxed-constexpr' USER_CXXFLAGS='-Wno-register -fsyntax-only' scram build -k -j 32 COMPILER='llvm compile'

See details on the summary page.

@cmsbuild
Copy link
Contributor

Comparison not run due to Build errors/Fireworks only changes/No short matrix requested (RelVals and Igprof tests were also skipped)

@kpedro88
Copy link
Contributor

Clang complained about:

/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_0_X_2019-11-12-1100/src/L1Trigger/L1THGCal/src/backend/HGCalHistoSeedingImpl.cc:527:26: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_0_X_2019-11-12-1100/src/L1Trigger/L1THGCal/src/backend/HGCalHistoSeedingImpl.cc:529:26: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_0_X_2019-11-12-1100/src/L1Trigger/L1THGCal/src/backend/HGCalHistoSeedingImpl.cc:530:26: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]

(I actually haven't seen that one before...)

jbsauvan added a commit to jbsauvan/cmssw that referenced this pull request Nov 13, 2019
@jbsauvan
Copy link
Contributor Author

Thanks @kpedro88
I've implemented the corrections. I still have to validate them, then I'll push the commit.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-815f79/3572/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2936360
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2936017
  • DQMHistoTests: Total skipped: 341
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 147 log files, 16 edm output root files, 34 DQM output files

@kpedro88
Copy link
Contributor

+upgrade

@kpedro88
Copy link
Contributor

@rekovic @benkrikler please check and review or sign

@rekovic
Copy link
Contributor

rekovic commented Nov 22, 2019

+1

@cmsbuild
Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbsauvan @rekovic why was constexpr removed?

Copy link
Contributor Author

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

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, will do

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit eb40634 into cms-sw:master Nov 22, 2019
jbsauvan added a commit to PFCal-dev/cmssw that referenced this pull request Dec 10, 2019
jbsauvan added a commit to PFCal-dev/cmssw that referenced this pull request Dec 10, 2019
jbsauvan added a commit to PFCal-dev/cmssw that referenced this pull request Dec 15, 2019
jbsauvan added a commit to PFCal-dev/cmssw that referenced this pull request Dec 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants