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

Modernize some EGamma Reco modules #35021

Merged
merged 12 commits into from Sep 1, 2021

Conversation

Dr15Jones
Copy link
Contributor

PR description:

  • added remaining esConsumes calls.
  • updated helper classes to use ConsumesCollector.
  • Applied some code modernization
  • reworked LowPtGsfElectronIDProducer to be more efficient

PR validation:

Code compiles. None of the changes are meant to change behavior.

const std::string version_;
const std::string versionName_;
enum class Version { V0, V1 };
Version version_;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This addition avoid doing a string comparison for each module*electron on the version name.

std::ostringstream os;
os << "Problem accessing rho collection for low-pT electrons" << std::endl;
throw cms::Exception("InvalidHandle", os.str());
}

double rho = *hRho;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Handles have condition logic when dereferencing so best not do dereference in tight loop.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35021/24881

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @Dr15Jones (Chris Jones) for master.

It involves the following packages:

  • RecoEcal/EgammaClusterProducers (reconstruction)
  • RecoEcal/EgammaCoreTools (reconstruction)
  • RecoEgamma/EgammaElectronAlgos (reconstruction)
  • RecoEgamma/EgammaElectronProducers (reconstruction)
  • RecoEgamma/EgammaPhotonAlgos (reconstruction)
  • TrackingTools/GsfTracking (reconstruction)

@jpata, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@felicepantaleo, @jainshilpi, @argiro, @thomreis, @varuns23, @JanFSchulte, @lgray, @simonepigazzini, @Sam-Harper, @GiacomoSguazzoni, @rovere, @VinInn, @bellan, @ebrondol, @mtosi, @dgulhan, @rchatter, @sobhatta, @lecriste, @afiqaize, @gpetruc, @mmusich, @ram1123 this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

-1

Failed Tests: RelVals AddOn
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-9ff3a4/18041/summary.html
COMMIT: 18f1955
CMSSW: CMSSW_12_1_X_2021-08-25-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/35021/18041/install.sh to create a dev area with all the needed externals and cmssw changes.

CMS StaticAnalyzer warnings: There are 2 EventSetupRecord::get warnings. See https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-9ff3a4/18041/llvm-analysis/esrget-sa.txt for details.

RelVals

----- Begin Fatal Exception 26-Aug-2021 07:35:23 CEST-----------------------
An exception of category 'ESGetTokenWrongTransition' occurred while
   [0] Processing  stream begin Run run: 160960 stream: 0
   [1] Calling method for module GEDPhotonProducer/'photons'
Exception Message:
The transition ID stored in the ESGetToken does not match the
transition where the token is being used. The associated record
type is: EcalClusterEnergyCorrectionParametersRcd
For producers, filters and analyzers this transition ID is
set as a template parameter to the call to the esConsumes
function that creates the token. Event is the default transition.
Other possibilities are BeginRun, EndRun, BeginLuminosityBlock,
or EndLuminosityBlock. You may need multiple tokens if you want to
get the same data in multiple transitions. The transition ID has a
different meaning in ESProducers. For ESProducers, the transition
ID identifies the function that produces the EventSetup data (often
there is one function named produce but there can be multiple
functions with different names). For ESProducers, the ESGetToken
must be used in the function associated with the ESConsumesCollector
returned by the setWhatProduced function.
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 26-Aug-2021 07:35:45 CEST-----------------------
An exception of category 'ESGetTokenWrongTransition' occurred while
   [0] Processing  stream begin Run run: 1 stream: 0
   [1] Calling method for module GEDPhotonProducer/'photons'
Exception Message:
The transition ID stored in the ESGetToken does not match the
transition where the token is being used. The associated record
type is: EcalClusterEnergyCorrectionParametersRcd
For producers, filters and analyzers this transition ID is
set as a template parameter to the call to the esConsumes
function that creates the token. Event is the default transition.
Other possibilities are BeginRun, EndRun, BeginLuminosityBlock,
or EndLuminosityBlock. You may need multiple tokens if you want to
get the same data in multiple transitions. The transition ID has a
different meaning in ESProducers. For ESProducers, the transition
ID identifies the function that produces the EventSetup data (often
there is one function named produce but there can be multiple
functions with different names). For ESProducers, the ESGetToken
must be used in the function associated with the ESConsumesCollector
returned by the setWhatProduced function.
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 26-Aug-2021 07:35:46 CEST-----------------------
An exception of category 'ESGetTokenWrongTransition' occurred while
   [0] Processing  stream begin Run run: 1 stream: 0
   [1] Calling method for module GEDPhotonProducer/'photons'
Exception Message:
The transition ID stored in the ESGetToken does not match the
transition where the token is being used. The associated record
type is: EcalClusterEnergyCorrectionParametersRcd
For producers, filters and analyzers this transition ID is
set as a template parameter to the call to the esConsumes
function that creates the token. Event is the default transition.
Other possibilities are BeginRun, EndRun, BeginLuminosityBlock,
or EndLuminosityBlock. You may need multiple tokens if you want to
get the same data in multiple transitions. The transition ID has a
different meaning in ESProducers. For ESProducers, the transition
ID identifies the function that produces the EventSetup data (often
there is one function named produce but there can be multiple
functions with different names). For ESProducers, the ESGetToken
must be used in the function associated with the ESConsumesCollector
returned by the setWhatProduced function.
----- End Fatal Exception -------------------------------------------------
Expand to see more relval errors ...

AddOn Tests

----- Begin Fatal Exception 26-Aug-2021 07:36:16 CEST-----------------------
An exception of category 'ESGetTokenWrongTransition' occurred while
   [0] Processing  stream begin Run run: 1 stream: 1
   [1] Calling method for module GEDPhotonProducer/'photons'
Exception Message:
The transition ID stored in the ESGetToken does not match the
transition where the token is being used. The associated record
type is: EcalClusterEnergyCorrectionParametersRcd
For producers, filters and analyzers this transition ID is
set as a template parameter to the call to the esConsumes
function that creates the token. Event is the default transition.
Other possibilities are BeginRun, EndRun, BeginLuminosityBlock,
or EndLuminosityBlock. You may need multiple tokens if you want to
get the same data in multiple transitions. The transition ID has a
different meaning in ESProducers. For ESProducers, the transition
ID identifies the function that produces the EventSetup data (often
there is one function named produce but there can be multiple
functions with different names). For ESProducers, the ESGetToken
must be used in the function associated with the ESConsumesCollector
returned by the setWhatProduced function.
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 26-Aug-2021 07:36:14 CEST-----------------------
An exception of category 'ESGetTokenWrongTransition' occurred while
   [0] Processing  stream begin Run run: 1 stream: 1
   [1] Calling method for module GEDPhotonProducer/'photons'
Exception Message:
The transition ID stored in the ESGetToken does not match the
transition where the token is being used. The associated record
type is: EcalClusterEnergyCorrectionParametersRcd
For producers, filters and analyzers this transition ID is
set as a template parameter to the call to the esConsumes
function that creates the token. Event is the default transition.
Other possibilities are BeginRun, EndRun, BeginLuminosityBlock,
or EndLuminosityBlock. You may need multiple tokens if you want to
get the same data in multiple transitions. The transition ID has a
different meaning in ESProducers. For ESProducers, the transition
ID identifies the function that produces the EventSetup data (often
there is one function named produce but there can be multiple
functions with different names). For ESProducers, the ESGetToken
must be used in the function associated with the ESConsumesCollector
returned by the setWhatProduced function.
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 26-Aug-2021 07:36:24 CEST-----------------------
An exception of category 'ESGetTokenWrongTransition' occurred while
   [0] Processing  stream begin Run run: 1 stream: 2
   [1] Calling method for module GEDPhotonProducer/'photons'
Exception Message:
The transition ID stored in the ESGetToken does not match the
transition where the token is being used. The associated record
type is: EcalClusterEnergyCorrectionParametersRcd
For producers, filters and analyzers this transition ID is
set as a template parameter to the call to the esConsumes
function that creates the token. Event is the default transition.
Other possibilities are BeginRun, EndRun, BeginLuminosityBlock,
or EndLuminosityBlock. You may need multiple tokens if you want to
get the same data in multiple transitions. The transition ID has a
different meaning in ESProducers. For ESProducers, the transition
ID identifies the function that produces the EventSetup data (often
there is one function named produce but there can be multiple
functions with different names). For ESProducers, the ESGetToken
must be used in the function associated with the ESConsumesCollector
returned by the setWhatProduced function.
----- End Fatal Exception -------------------------------------------------
Expand to see more addon errors ...

@thomreis
Copy link
Contributor

Looks like there is some overlap with PR #35019

@makortel
Copy link
Contributor

The test error could be fixed with de70d49

(after that I could close #35019 in favor of this one)

…ducer::beginRun()

It is called unconditionally from GEDPhotonProducer::produce(), I can
not see how the call from beginRun() could do anything additional
except it would require different set ESGetTokens wihtin
PhotonEnergyCorrector etc compared to other users.
@cmsbuild
Copy link
Contributor

Pull request #35021 was updated. @jpata, @cmsbuild, @slava77 can you please check and sign again.

@Dr15Jones
Copy link
Contributor Author

please test

@slava77
Copy link
Contributor

slava77 commented Aug 28, 2021

abort test

30hrs since the last request doesn't look healthy

@slava77
Copy link
Contributor

slava77 commented Aug 28, 2021

@cmsbuild please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-9ff3a4/18122/summary.html
COMMIT: d73e61c
CMSSW: CMSSW_12_1_X_2021-08-27-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/35021/18122/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: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 39
  • DQMHistoTests: Total histograms compared: 3000352
  • DQMHistoTests: Total failures: 12
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3000318
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 38 files compared)
  • Checked 165 log files, 37 edm output root files, 39 DQM output files
  • TriggerResults: no differences found

@Dr15Jones
Copy link
Contributor Author

Ping @cms-sw/reconstruction-l2

@slava77
Copy link
Contributor

slava77 commented Sep 1, 2021

+reconstruction

for #35021 d73e61c

  • code changes are technical, in line with the PR description and the follow up review
  • jenkins tests pass and comparisons with the baseline show no relevant differences

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 1, 2021

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

@perrotta
Copy link
Contributor

perrotta commented Sep 1, 2021

+1

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

6 participants