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

Improve ElectronIDExternalProducer #46868

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Dr15Jones
Copy link
Contributor

@Dr15Jones Dr15Jones commented Dec 4, 2024

PR description:

  • made it a global module
  • updated helpers to have const member functions
  • reduced memory churn by setting values from ParameterSet during
    construction
  • fixed a 10 year old bug for case where CutBasedElectronID is supposed to retrieve the BeamSpot

PR validation:

Code compiles. Running a trivial RECO workflow did succeed.

NOTE: this should be a purely technical change and is not expected to change results for the cases we use.

This WILL change behavior IF an old version is used, but it returns the code to the behavior it had before the bug was introduced at the time this code was updated to call consumes.

fixes #46866

- made it a global module
- updated helpers to have const member functions
- reduced memory churn by setting values from ParameterSet during
  construction
Properly do consumes for beam spot if needed.
Switched to Event::get methods which will properly type check.
@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 4, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 4, 2024

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 4, 2024

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

It involves the following packages:

  • RecoEgamma/ElectronIdentification (reconstruction)

@jfernan2, @mandrenguyen can you please review it and eventually sign? Thanks.
@Prasant1993, @Sam-Harper, @a-kapoor, @afiqaize, @jainshilpi, @lgray, @missirol, @ram1123, @sameasy, @sobhatta, @valsdav, @varuns23 this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@Dr15Jones
Copy link
Contributor Author

There is an additional change I'd like to do. I would like to change CutBasedElectronID so it uses the strategy pattern for the versioning. That is, distinct value of version_ would be handled via polymorphism instead of large number of if statements. This would allow the parameters to be extracted at construction time instead of being called for each electron individually (which is time and memory intensive).

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 4, 2024

-1

Failed Tests: RelVals-INPUT
Size: This PR adds an extra 24KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-896277/43245/summary.html
COMMIT: 2f9814e
CMSSW: CMSSW_15_0_X_2024-12-04-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/46868/43245/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals-INPUT

  • 2024.303001DAS Error
  • 2024.300001DAS Error
  • 2024.203001DAS Error
Expand to see more relval errors ...
  • 2024.103001
  • 2024.302001
  • 2024.101001
  • 2024.102001
  • 2024.100001

Comparison Summary

There are some workflows for which there are errors in the baseline:
2024.202001 step 1
The results for the comparisons for these workflows could be incomplete
This means most likely that the IB is having errors in the relvals.The error does NOT come from this pull request

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 39 differences found in the comparisons
  • DQMHistoTests: Total files compared: 45
  • DQMHistoTests: Total histograms compared: 3393039
  • DQMHistoTests: Total failures: 1873
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3391146
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 44 files compared)
  • Checked 198 log files, 168 edm output root files, 45 DQM output files
  • TriggerResults: no differences found

@jfernan2
Copy link
Contributor

jfernan2 commented Dec 5, 2024

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 5, 2024

+1

Size: This PR adds an extra 24KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-896277/43269/summary.html
COMMIT: 2f9814e
CMSSW: CMSSW_15_0_X_2024-12-04-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/46868/43269/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

There are some workflows for which there are errors in the baseline:
2022.000001 step 1
2022.002001 step 1
2023.002001 step 1
2024.000001 step 1
2024.101001 step 1
2024.202001 step 1
2024.303001 step 1
The results for the comparisons for these workflows could be incomplete
This means most likely that the IB is having errors in the relvals.The error does NOT come from this pull request

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 32 differences found in the comparisons
  • DQMHistoTests: Total files compared: 39
  • DQMHistoTests: Total histograms compared: 2957317
  • DQMHistoTests: Total failures: 1526
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2955771
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 38 files compared)
  • Checked 174 log files, 144 edm output root files, 39 DQM output files
  • TriggerResults: found differences in 1 / 37 workflows

@jfernan2
Copy link
Contributor

jfernan2 commented Dec 5, 2024

There is an additional change I'd like to do. I would like to change CutBasedElectronID so it uses the strategy pattern for the versioning. That is, distinct value of version_ would be handled via polymorphism instead of large number of if statements. This would allow the parameters to be extracted at construction time instead of being called for each electron individually (which is time and memory intensive).

@Dr15Jones are you going to include that change in this PR? Thanks

@Dr15Jones
Copy link
Contributor Author

are you going to include that change in this PR? Thanks

I'm working on the changes but they are extensive. I'll probably have the code done today but I'm still trying to figure out a good way to test.

@Sam-Harper
Copy link
Contributor

Before too much effort is expended on this. My understanding is that this module died in Run 1. Is this being used somewhere? E/gamma has used VID since Run2 and this is deprecated to my understanding. Is there something I miss? Can we not just delete it?

@Dr15Jones
Copy link
Contributor Author

I discovered this module by running a Run3 workflow. The configuration header had

# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v 
# with command line options: step3 -s RAW2DIGI,L1Reco,RECO,RECOSIM,SKIM:LogError+LogErrorMonitor,PAT,NANO,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@nanoAODDQM --conditions auto:phase1_2024_realistic --datatier RECO,MINIAODSIM,NANOAODSIM,DQMIO -n 10 --eventcontent RECOSIM,MINIAODSIM,NANOEDMAODSIM,DQM --geometry DB:Extended --era Run3_2024 --customise Validation/Performance/TimeMemorySummary.customiseWithTimeMemorySummary --filein file:step2.root --fileout file:step3.root

@jfernan2
Copy link
Contributor

jfernan2 commented Dec 5, 2024

FYI: @SanghyunKo @cochando

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 7, 2024

Pull request #46868 was updated. @jfernan2, @mandrenguyen can you please check and sign again.

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 7, 2024

-1

Failed Tests: RelVals RelVals-INPUT AddOn
Size: This PR adds an extra 28KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-896277/43309/summary.html
COMMIT: 342e295
CMSSW: CMSSW_15_0_X_2024-12-07-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/46868/43309/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals

  • 135.4135.4_ZEEFS_13/step1_ZEEFS_13.log
  • 9.09.0_Higgs200ChargedTaus/step3_Higgs200ChargedTaus.log
  • 1306.01306.0_SingleMuPt1_UP15/step3_SingleMuPt1_UP15.log
Expand to see more relval errors ...

RelVals-INPUT

  • 159.01159.01_HydjetQ_reminiaodPbPb2022_INPUT/step2_HydjetQ_reminiaodPbPb2022_INPUT.log
  • 2500.0242500.024_NANOmcUL18reMINI/step2_NANOmcUL18reMINI.log
  • 2500.0232500.023_NANOmcUL17reMINI/step2_NANOmcUL17reMINI.log
Expand to see more relval errors ...

AddOn Tests

UNKNOWN
UNKNOWN
UNKNOWN

@Dr15Jones
Copy link
Contributor Author

The jobs are dying in python saying Validation.HGCalValidation.hgcalSimHitValidationEE_cfi is missing.

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 8, 2024

+1

Size: This PR adds an extra 28KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-896277/43318/summary.html
COMMIT: 342e295
CMSSW: CMSSW_15_0_X_2024-12-08-0000/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/46868/43318/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 2 lines to the logs
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 46
  • DQMHistoTests: Total histograms compared: 3510017
  • DQMHistoTests: Total failures: 417
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3509580
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 45 files compared)
  • Checked 202 log files, 172 edm output root files, 46 DQM output files
  • TriggerResults: no differences found

@jfernan2
Copy link
Contributor

jfernan2 commented Dec 9, 2024

@lnurfikri89 as JetMET RECO contact, please comment on;

So on this, I think we need to understand what JetMET are using this ancient ID for and whether they could move to another ID

@cms-sw/jetmet-pog-l2

@Dr15Jones
Copy link
Contributor Author

The comparisons from the test all look very good. The only differences are the standard HGCal inconsistencies seen in IB and PR tests.

@jfernan2
Copy link
Contributor

jfernan2 commented Dec 10, 2024

type egamma,jetmet
Waiting for JetMET and EGM conveners to comment

@jfernan2
Copy link
Contributor

assign jetmet-pog

@cmsbuild
Copy link
Contributor

New categories assigned: jetmet-pog

@alkaloge,@kirschen,@miquork you have been requested to review this Pull request/Issue and eventually sign? Thanks

@jfernan2
Copy link
Contributor

assign egamma-pog

@cmsbuild
Copy link
Contributor

New categories assigned: egamma-pog

@afiqaize,@RSalvatico you have been requested to review this Pull request/Issue and eventually sign? Thanks

@nurfikri89
Copy link
Contributor

@lnurfikri89 as JetMET RECO contact, please comment on;

So on this, I think we need to understand what JetMET are using this ancient ID for and whether they could move to another ID
@cms-sw/jetmet-pog-l2

@jfernan2 My apologies for taking a while to get back to you. I did not get a notification from github.

The JetPlusTrack collection (slimmedJPTJets) is not an official jet collection but it is included and maintained by @kodolova.

Hi @kodolova, there is a recommendation in this PR to remove ElectronIDExternalProducer [1], which produces very old electron IDs that are not supported by EGM. The JPTeidTight ID is consumed by JetPlusTrackProducer. Can you comment on this?

[1] #46868 (comment)

@kodolova
Copy link
Contributor

Hi, We can use any other ElectronIDProducer. What is proposed to use?

@SanghyunKo
Copy link
Contributor

@kodolova Hi, FYI, the default EGM cut-based IDs are produced using a VID module named egmGsfElectronIDs, and the names of each (Run 3) ID is listed in the cutBasedElectronID_Winter22_122X_V1_cff.py. So the name of the InputTag should be like egmGsfElectronIDs:cutBasedElectronID-RunIIIWinter22-V1-medium (or veto, loose, tight, depending on your needs).

@kodolova
Copy link
Contributor

That's ok. I will try to change.

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.

Event::getByToken bug in CutBasedElectronID
7 participants