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

code updates to add a noise correlation factor between adjacent time slices for HB and HE channels #31064

Merged
merged 9 commits into from Aug 13, 2020

Conversation

TaeunKwon
Copy link
Contributor

@TaeunKwon TaeunKwon commented Aug 5, 2020

PR description:

This PR updates MAHI to add a pedestal correlation factor between adjacent time slices to pedestal covariance matrix for HB and HE channels. A new class member is introduced in class HBHEChannelInfo to take and pass over the noise correlation factor to MAHI. This PR corresponds to the previously merged PR, which introduces the pedestal correlation factor to HcalSiPMParametersRcd tag for Run-3 MC scenario. The motivation and effect of changes by this PR are shown in presentation by Taeun Kwon.

links of igprof report for CPU time measurements are given below. (Please see slide 15 and 19 of above presentation for the details)

igprof report for RECO without the pedestal correlation factor:
https://ktaeun.web.cern.ch/ktaeun/cgi-bin/igprof-navigator/igreport_RECO

igprof report for RECO with the pedestal correlation factor:
https://ktaeun.web.cern.ch/ktaeun/cgi-bin/igprof-navigator/igreport_RECO_NoiseCorrelation

igprof report for RECO without the pedestal correlation factor with PU:
https://ktaeun.web.cern.ch/ktaeun/cgi-bin/igprof-navigator/igreport_RECO_wPU

igprof report for RECO with the pedestal correlation factor with PU:
https://ktaeun.web.cern.ch/ktaeun/cgi-bin/igprof-navigator/igreport_RECO_NoiseCorrelation_wPU

links of igprof reports for DIGI are given below for the measurment of HLT timing cost change.
The sample used here : TTbar RelVal w/o PU

igprof report for DIGI without the pedestal correlation factor:
10.44 sec / 1000 evts taken for mahiFit:minimization module.
https://ktaeun.web.cern.ch/ktaeun/cgi-bin/igprof-navigator/igreport_DIGI_woNC

igprof report for DIGI with the pedestal correlation factor:
11.25 sec / 1000 evts taken for mahiFit:minimization module.
https://ktaeun.web.cern.ch/ktaeun/cgi-bin/igprof-navigator/igreport_DIGI_wNC

This PR is expected to affect on the HLT timing cost by 7~8% of time spent on mahiFit:minimization module.

PR validation:

A basic technical test was performed: runTheMatrix.py -l limited -i all --ibeos

if this PR is a backport please specify the original PR and why you need to backport that PR:

This PR is not a backport and shouldn't be backported.

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 5, 2020

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 5, 2020

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31064/17576

  • This PR adds an extra 40KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 5, 2020

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 5, 2020

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31064/17577

  • This PR adds an extra 40KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 5, 2020

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

It involves the following packages:

DataFormats/HcalRecHit
RecoLocalCalo/HcalRecAlgos
RecoLocalCalo/HcalRecProducers

@perrotta, @jpata, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@rchatter, @rovere, @argiro, @apsallid, @mariadalfonso, @abdoulline this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 5, 2020

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 5, 2020

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31064/17581

  • This PR adds an extra 40KB to repository

@cmsbuild
Copy link
Contributor

+1
Tested at: 600bf92
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ce097e/8720/summary.html
CMSSW: CMSSW_11_2_X_2020-08-11-2300
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 2396 differences found in the comparisons
  • DQMHistoTests: Total files compared: 35
  • DQMHistoTests: Total histograms compared: 2612401
  • DQMHistoTests: Total failures: 18169
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2594183
  • DQMHistoTests: Total skipped: 48
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.004 KiB( 34 files compared)
  • DQMHistoSizes: changed ( 10224.0 ): 0.004 KiB MessageLogger/Warnings
  • Checked 149 log files, 22 edm output root files, 35 DQM output files

@slava77
Copy link
Contributor

slava77 commented Aug 12, 2020

current status from my review side:

@slava77
Copy link
Contributor

slava77 commented Aug 12, 2020

here is a chi2 plot (from the bin-by-bin DQM outputs, after suppressing the large "overflow" bin)

2021 case (wf 11634)
wf11634_chi2_HB

2023 case (wf 12434), which is supposedly dominated by noise
wf12434_chi2_HB

The 2023 is more "self-consistent" fitting of the noise alone, but the behavior (increased chi2) seems to be the same as in the 2021 case, which was investigated in more detail in the DPG talk linked in the PR description.
Was the correlation meant to reduce the chi2 (from first principles)? (I'm trying to understand if the sign in the correlation term is right)

@TaeunKwon
Copy link
Contributor Author

Thanks for the clarification!

it looks like the igprof links in the pr description were updated (a note to confirm it would be nice)

I'm sorry, I updated igprof report for DIGI and CPU time increased after the Noise correlation factor as expected. I will leave a note next time.

an update to the study initially linked in the PR, but using 2023 or 2024 setup instead of 2021 (which has little noise) is expected

The analysis in the presentation was done in 2024 setup with conditions of phase1_2024_realistic GT to test extreme case with large noise.

in #31064 (comment) the behavior of the fit in 2023 setup is unclear, perhaps it will become clear after the above item is clear

I'm so sorry I think I missed your question in the comment. For the energy of hits, the increase of energy of Hits in low energy region is expected and we observed that it causes the increase of the number of Jets. But we expect that it will be fine because newly emerged Jets after the noise correlation factor has lower Pt, less than 20 GeV. Distributions of Jet Pt and nJets are in my slide. If you think it would be better to have more checks, please let me know.

@TaeunKwon
Copy link
Contributor Author

Was the correlation meant to reduce the chi2 (from first principles)? (I'm trying to understand if the sign in the correlation term is right)

No, the noise correlation factor increases the chi2 value of the fit. But as discussed in the DPG talk, chi2 value before the correlation was too small, considering chi2/ndof. So, the conclusion was the increase of chi2 value is okay because it makes the mean of chi2/ndof more closer to 1.

@slava77
Copy link
Contributor

slava77 commented Aug 12, 2020

an update to the study initially linked in the PR, but using 2023 or 2024 setup instead of 2021 (which has little noise) is expected

The analysis in the presentation was done in 2024 setup with conditions of phase1_2024_realistic GT to test extreme case with large noise.

Ah, sorry, I was "mislead" by 2021 in the introductory slide.
OK for this item then.

@slava77
Copy link
Contributor

slava77 commented Aug 12, 2020

Was the correlation meant to reduce the chi2 (from first principles)? (I'm trying to understand if the sign in the correlation term is right)

No, the noise correlation factor increases the chi2 value of the fit. But as discussed in the DPG talk, chi2 value before the correlation was too small, considering chi2/ndof. So, the conclusion was the increase of chi2 value is okay because it makes the mean of chi2/ndof more closer to 1.

Thank you for clarifying. When I read the slides on this part, it just seemed a bit more observational than from first principles.
For some future follow up it may be useful to have simplified injection tests where the input signal is well understood (Gaussian noise, properly unbiased pulse shape).

@TaeunKwon
Copy link
Contributor Author

Thank you for clarifying. When I read the slides on this part, it just seemed a bit more observational than from first principles.
For some future follow up it may be useful to have simplified injection tests where the input signal is well understood (Gaussian noise, properly unbiased pulse shape).

Thanks for the suggestion, we will include such tests in further updates.

@slava77
Copy link
Contributor

slava77 commented Aug 12, 2020

+1

for #31064 600bf92

  • code changes are in line with the PR description and the follow up review
  • jenkins tests pass and comparisons with the baseline show differences only in Run3 workflows, starting from HBHE rechit variables, propagating downstream. The HBHE changes seen in the tests are in line with the studies shown in the DPG meeting (slides linked in the PR description). The igprof show that some increase in CPU time is expected, partly from the MAHI fit itself and partly from somewhat minor increase in energy of the reconstructed hits leading to possibly more work in the downstream modules. In reports for HLT and offline with PU the cost increase in calling MahiFit::phase1Apply is about 7%, which translates to about 0.1% of offline reco time.

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

@qliphy
Copy link
Contributor

qliphy commented Aug 13, 2020

+1

@cmsbuild cmsbuild merged commit 38b2bdb into cms-sw:master Aug 13, 2020
@mariadalfonso
Copy link
Contributor

As a note for everybody.
The correlation is not properly implemented.

It's calculated in minimumBias where the main noise contribution is on the diagonal is the dark current, while in the hard scattering the photo statistics term dominate.
Should be derived and applied in reference to the pedval term.

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

7 participants