Skip to content

Conversation

@thomreis
Copy link
Contributor

@thomreis thomreis commented Jan 16, 2026

PR description:

This PR fixes an issue where status flags of non-existing rechits are accessed. This resulted in the number of digis stored in the output collection being non-deterministic.
In addition an option to run the spike cleaning algorithm with potentially different (tighter) settings than in the EcalRecHitProducer was added.
Refactoring of the code improved the execution time by removing calculations for uncalibrated rechits below the amplitude threshold.

PR validation:

With the fix the output digis collection contains the same number of elements every time the code runs.
Adding tighter spike killer thresholds results in fewer digis being stored as expected.
Passed most matrix tests (some failed at the DBS step).

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 16, 2026

cms-bot internal usage

@thomreis
Copy link
Contributor Author

type ecal

@cmsbuild cmsbuild added the ecal label Jan 16, 2026
@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49852/47526

@thomreis
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @thomreis for master.

It involves the following packages:

  • HLTrigger/Configuration (hlt)
  • HLTrigger/special (hlt)

@Martin-Grunewald, @mmusich can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @ReyerBand, @argiro, @missirol, @mmusich, @rchatter, @thomreis, @wang0jin this is something you requested to watch as well.
@ftenchini, @mandrenguyen, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@mmusich
Copy link
Contributor

mmusich commented Jan 16, 2026

Refactoring of the code improved the execution time by removing

@thomreis the PR description is incomplete. Please check, fix.

true >> (edm::ParameterDescription<edm::InputTag>(
"barrelHitCollection", edm::InputTag("ecalRecHit", "EcalRecHitsEB"), true) and
edm::ParameterDescription<edm::InputTag>(
"endcapHitCollection", edm::InputTag("ecalRecHit", "EcalRecHitsEE"), true)));
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure confDB plays nice with this. @Martin-Grunewald FYI

psd0.add<double>("e4e1_b_endcap", -0.0125);
psd0.add<double>("e4e1_a_endcap", 0.02);
psd0.add<double>("cThreshold_double", 10);
desc.ifValue(edm::ParameterDescription<bool>("cleanReco", false, true),
Copy link
Contributor

Choose a reason for hiding this comment

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

as above.

desc.add<edm::InputTag>("endcapHitCollection", edm::InputTag("ecalRecHit", "EcalRecHitsEE"));
desc.add<unsigned int>("statusThreshold", 3);
desc.add<bool>("useRecoFlag", false);
desc.ifValue(edm::ParameterDescription<bool>("useRecoFlag", false, true),
Copy link
Contributor

Choose a reason for hiding this comment

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

This does not work with ConfDB!

psd0.add<double>("e4e1_b_endcap", -0.0125);
psd0.add<double>("e4e1_a_endcap", 0.02);
psd0.add<double>("cThreshold_double", 10);
desc.ifValue(edm::ParameterDescription<bool>("cleanReco", false, true),
Copy link
Contributor

Choose a reason for hiding this comment

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

This does not work with ConfDB.

@Martin-Grunewald
Copy link
Contributor

Sorry, what do you want to achieve here?

For ConfDb, there is a unique set of top-level module parameters enforced. You can not have variants!
However, inside a PSet parameter, you can have different parameters. Could you restructure this way?

@cmsbuild
Copy link
Contributor

-1

Failed Tests: UnitTests RelVals RelVals-INPUT AddOn
Size: This PR adds an extra 32KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a23385/50687/summary.html
COMMIT: bd3add5
CMSSW: CMSSW_16_1_X_2026-01-16-1100/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/49852/50687/install.sh to create a dev area with all the needed externals and cmssw changes.

Failed Unit Tests

I found 3 errors in the following unit tests:

---> test test_HIonFullOutput had ERRORS
---> test test_SpecialFullOutput had ERRORS
---> test test_GRunFullOutput had ERRORS

Failed RelVals

----- Begin Fatal Exception 16-Jan-2026 17:34:02 CET-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=HLTEcalPhiSymFilter label='hltEcalPhiSymFilter'
Exception Message:
Illegal parameters found in configuration.  The parameters are named:
 'barrelHitCollection'
 'endcapHitCollection'
You could be trying to use parameter names that are not
allowed for this plugin, or they could be misspelled, or these parameters
need to be defined in the fillDescriptions() method of the plugin.
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 16-Jan-2026 17:33:58 CET-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=HLTEcalPhiSymFilter label='hltEcalPhiSymFilter'
Exception Message:
Illegal parameters found in configuration.  The parameters are named:
 'barrelHitCollection'
 'endcapHitCollection'
You could be trying to use parameter names that are not
allowed for this plugin, or they could be misspelled, or these parameters
need to be defined in the fillDescriptions() method of the plugin.
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 16-Jan-2026 17:22:53 CET-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=HLTEcalPhiSymFilter label='hltEcalPhiSymFilter'
Exception Message:
Illegal parameters found in configuration.  The parameters are named:
 'barrelHitCollection'
 'endcapHitCollection'
You could be trying to use parameter names that are not
allowed for this plugin, or they could be misspelled, or these parameters
need to be defined in the fillDescriptions() method of the plugin.
----- End Fatal Exception -------------------------------------------------
Expand to see more relval errors ...

Failed RelVals-INPUT

  • 2025.00200012025.0020001_RunEGamma02025D_10k/step2_RunEGamma02025D_10k.log
  • 142.0142.0_RunHIPhysicsRawPrime2023A/step2_RunHIPhysicsRawPrime2023A.log
  • 2025.00000012025.0000001_RunZeroBias2025B_10k/step2_RunZeroBias2025B_10k.log
Expand to see more relval errors ...

Failed AddOn Tests

----- Begin Fatal Exception 16-Jan-2026 17:17:32 CET-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=HLTEcalPhiSymFilter label='hltEcalPhiSymFilter'
Exception Message:
Illegal parameters found in configuration.  The parameters are named:
 'barrelHitCollection'
 'endcapHitCollection'
You could be trying to use parameter names that are not
allowed for this plugin, or they could be misspelled, or these parameters
need to be defined in the fillDescriptions() method of the plugin.
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 16-Jan-2026 17:17:56 CET-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=HLTEcalPhiSymFilter label='hltEcalPhiSymFilter'
Exception Message:
Illegal parameters found in configuration.  The parameters are named:
 'barrelHitCollection'
 'endcapHitCollection'
You could be trying to use parameter names that are not
allowed for this plugin, or they could be misspelled, or these parameters
need to be defined in the fillDescriptions() method of the plugin.
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 16-Jan-2026 17:17:32 CET-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=HLTEcalPhiSymFilter label='hltEcalPhiSymFilter'
Exception Message:
Illegal parameters found in configuration.  The parameters are named:
 'barrelHitCollection'
 'endcapHitCollection'
You could be trying to use parameter names that are not
allowed for this plugin, or they could be misspelled, or these parameters
need to be defined in the fillDescriptions() method of the plugin.
----- End Fatal Exception -------------------------------------------------
Expand to see more addon errors ...

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Pull request #49852 was updated. @Martin-Grunewald, @cmsbuild, @mmusich can you please check and sign again.

@mmusich
Copy link
Contributor

mmusich commented Jan 19, 2026

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 28KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a23385/50725/summary.html
COMMIT: 5c71693
CMSSW: CMSSW_16_1_X_2026-01-19-1100/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/49852/50725/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 12 differences found in the comparisons
  • DQMHistoTests: Total files compared: 52
  • DQMHistoTests: Total histograms compared: 4025536
  • DQMHistoTests: Total failures: 68
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 4025448
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 51 files compared)
  • Checked 222 log files, 193 edm output root files, 52 DQM output files
  • TriggerResults: no differences found

@mmusich
Copy link
Contributor

mmusich commented Jan 20, 2026

+hlt

@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. @ftenchini, @mandrenguyen, @sextonkennedy (and backports should be raised in the release meeting by the corresponding L2)

@mandrenguyen
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit e37014e into cms-sw:master Jan 21, 2026
10 checks passed
@thomreis thomreis deleted the phisymfilter-swisscross branch January 21, 2026 09:33
setattr(prod, 'cleanReco', cms.bool(False))
if not hasattr(prod, 'cleaningConfig'):
from RecoLocalCalo.EcalRecAlgos.ecalCleaningAlgo import cleaningAlgoConfig
setattr(prod, 'cleaningConfig', cleaningAlgoConfig)
Copy link
Contributor

Choose a reason for hiding this comment

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

The cleaningConfig imported here is arsing from a ~12 year old file: https://github.com/cms-sw/cmssw/blob/master/RecoLocalCalo/EcalRecAlgos/python/ecalCleaningAlgo.py while what you code in the fillDescriptions method down below seems way more up-to-date (and as used elsewhere). So I assume we should use the latter.
Also, since fillDescriptions provides both cleanReco as well as cleaningConfig, there should not be the need for any of the customisation above, correct? Of course, the PRs are already merged, but just to clarify on the settings!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the missing parameters in existing menus are filled in from the default values in the fillDescriptions then this customization not needed indeed.
The cleaning parameters from fillDescriptions are the up to date ones and the ones from cleaningAlgoConfig were just meant as placeholders under the assumption that cleanReco would be False whenever cleaningConfig was not present.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the clarification!

Copy link
Contributor

Choose a reason for hiding this comment

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

indeed

diff --git a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py
index ac5d2bcd684..b110405746b 100644
--- a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py
+++ b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py
@@ -228,6 +228,6 @@ def customizeHLTforCMSSW(process, menuType="GRun"):
     # process = customizeHLTfor49436(process)
 
     process = customizeHLTfor49799(process)
-    process = customizeHLTfor49852(process)
+    #process = customizeHLTfor49852(process)
 
     return process

passes addOnTests.py just fine.

Of course, the PRs are already merged, but just to clarify on the settings!

shall we remove it now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can be removed yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And the backport #49924

thomreis added a commit to thomreis/cmssw that referenced this pull request Jan 23, 2026
cmsbuild added a commit that referenced this pull request Jan 24, 2026
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.

5 participants