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
Fix r45Fraction_ calculation #10726
Fix r45Fraction_ calculation #10726
Conversation
A new Pull Request was created by @dertexaner for CMSSW_7_6_X. Fix r45Fraction_ calculation It involves the following packages: RecoMET/METAlgorithms @cmsbuild, @cvuosalo, @slava77 can you please review it and eventually sign? Thanks. |
@cmsbuild please test |
The tests are being triggered in jenkins. |
@dertexaner if I understand correctly, this resolves issues with uninitialized values and nans from divisions by zero, which are typically not happening. |
@slava77 Yes, this makes initializations cleaner and fixes the division of ints as it wasn't working properly. |
+1 Correcting a coding mistake to properly calculate the RBX HCAL noisy hits fraction. #10724, the 74X version of this PR, contains additional information about this fix. #10725, the 75X version, has already been approved by Reco. The code change is correct and necessary, and Jenkins tests against baseline CMSSW_7_6_X_2015-08-12-1100 show no significant differences, since the fix covers a case that rarely occurs in standard workflows. The message in this thread that "All checks have failed" is spurious since it refers to #10724 and not this PR. |
This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar |
+1 |
In a future PR, a useless block of code flagged by the static analyzer around line 85 in HcalNoiseAlgo.cc
Unless this code has some side effect I'm missing, it performs a bunch of iterations and calculations for nothing. If there is some important side effect, a comment explaining it should be added. Sorry I forgot to mention this issue earlier. |
this looks like a bug, actually (a = b; flip with b = a;) |
Yes, it looks like the code should be:
This value is the minimum electromagnetic fraction found in an HPD in the RBX, which is returned by the HPDEMF() method. With this bug, the noise filtering may not be working quite right. |
@slava77 @cvuosalo Indeed this calculation doesn't do anything. But I think this parameter is used for the RBXEMF which is then used at least in noise cleaning in HLT (http://cmslxr.fnal.gov/lxr/ident?v=CMSSW_7_4_6&_i=RBXEMF&_remember=1). Shall I submit another PR for this now? |
yes, if the code is used and the fix is needed, a separate PR is needed. |
@slava77 Upon closer inspection, I think this parameter is only used in HPDEMF() which is not used anywhere but it is stored in hcal noise summary anyway. Would it be more appropriate to submit the PR only for 75X and 76X ? |
yes, makes sense for just 75X/76X |
This is a simple bug-fix for the noisy hit fraction (r45Fraction_ ) calculation in CommonHcalNoiseRBXData.