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

Fix bug in sign of cot(alpha) in qbin() methods, needed for CPEGeneric errors #25195

Merged
merged 1 commit into from
Nov 27, 2018

Conversation

pmaksim1
Copy link
Contributor

This PR fixes a longstanding software bug that was introduced when we implemented the Phase I FPix. The FPix template entries for IP related tracks are folded into one quadrant of positive (cotalpha, cotbeta) space and sign flips are used fix signed quantities. The subtlety is that one can get negative values (cotalpha, cotbeta) from cosmic rays that must also be included. Therefore the flipping is governed by flags that depend on the local magnetic fields. The different cases are handled by the signs of cota/cotb and the flags flip_x/flip_y. This is done correctly in the interpolation code for the template reco, but in the qbin method (used for generic reco) in the template and generror code, the reference to cotalpha was not changed to cota [sign corrected] in a consistent way. This causes the interpolation fraction xxratio to be outside the 0-1 range and sometimes produces crazy results. Because of the way that everything is signed, FPix R1P1, R1P2, and R2P1 are affected. The effect is on the RecHit errors in this panels.

This has been tested by @VinInn .

…d by the error calculation in PixelCPEGeneric
@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

@pmaksim1
Copy link
Contributor Author

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @pmaksim1 (Petar Maksimovic) for master.

It involves the following packages:

CondFormats/SiPixelTransient

@ggovi, @perrotta, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@mmusich, @seemasharmafnal, @VinInn this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@perrotta
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 11, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/31587/console Started: 2018/11/11 09:10

@cmsbuild
Copy link
Contributor

@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-25195/31587/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 8507 differences found in the comparisons
  • DQMHistoTests: Total files compared: 32
  • DQMHistoTests: Total histograms compared: 3013827
  • DQMHistoTests: Total failures: 6572
  • DQMHistoTests: Total nulls: 4
  • DQMHistoTests: Total successes: 3007054
  • DQMHistoTests: Total skipped: 197
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.039 KiB( 31 files compared)
  • DQMHistoSizes: changed ( 136.788 ): 0.043 KiB JetMET/SUSYDQM
  • DQMHistoSizes: changed ( 136.85 ): -0.004 KiB JetMET/SUSYDQM
  • Checked 134 log files, 14 edm output root files, 32 DQM output files

@perrotta
Copy link
Contributor

type bugfix

@perrotta
Copy link
Contributor

@pmaksim1 could you or someone from the Tracking POG provide the usual validation based on some larger sample than the automatically run jenkins tests? Link to a presentation in a POG or anywhere else will also be fine. Thank you!

@pmaksim1
Copy link
Contributor Author

Sure, but it may take a bit. Would 10k events be enough? We established that there was a bug in the logic and that the strange errors observed by Vincenzo are gone. However we haven't studied the impact on other things.

@perrotta
Copy link
Contributor

perrotta commented Nov 12, 2018 via email

@pmaksim1
Copy link
Contributor Author

Copy that. We're on it.

@ggovi
Copy link
Contributor

ggovi commented Nov 13, 2018

+1

@cmantill
Copy link
Contributor

Hi,

We run a tracking validation workflow for TTbar events (10K) comparing with and without this PR. Plots are here:
There is maybe a small difference in track efficiency at eta ~ -2 here: http://cmantill.web.cern.ch/cmantill/pixel/validation_PR25195/plots

We have not find any significant differences yet but maybe someone may have a better intuition on this.

@perrotta
Copy link
Contributor

Thank you @cmantill for providing the comparisons.

A part a few fluctuations here and there, what looks sistematically different with respect to the baseline is that efficiencies and fakerates decrease at eta<-2 for very low pt (pt<200 MeV) tracks: there are no significant changes for pt>0.9,instead.

Is this expected, given the fix applied?

@VinInn
Copy link
Contributor

VinInn commented Nov 19, 2018

interesting: may I ask which workflow was used? it looks a phase0 one (which should be unaffected by the change).
-1

@cmantill
Copy link
Contributor

This was run using GT=auto:phase1_2017_realistic and with a TT workflow with runTheMatrix (runTheMatrix.py -e -n -l 10024.3)

@VinInn
Copy link
Contributor

VinInn commented Nov 19, 2018

i.e. trackingOnlyRun2 (phase1 geometry, phase0 reco)
please use
10024.1 TTbar_13TeV_TuneCUETP8M1_2017_GenSimFull+DigiFull_2017+RecoFull_trackingOnly_2017+HARVESTFull_trackingOnly_2017

@cmantill
Copy link
Contributor

OK sorry about that! submitted jobs now and will post results here asap.

@cmantill
Copy link
Contributor

I posted comparison plots with this workflow here: http://cmantill.web.cern.ch/cmantill/pixel/validation_PR25195_Tracking/plots/

@perrotta
Copy link
Contributor

@cmantill : could you please check if the very same events were used for the two samples A and B?
The number of tracking particles (e.g.) is rather different in the two cases:

Number of TrackingParticles (after cuts) | 399704 | 411460

@cmantill
Copy link
Contributor

I think some of jobs did not finish, so I resubmitted them. Now both should have all stats and same # of tracking particles
http://cmantill.web.cern.ch/cmantill/pixel/validation_PR25195_Tracking_All/

@perrotta
Copy link
Contributor

Latest comparisons attached in #25195 (comment) show just small fluctuations in the results, with no particular trend on them. As such the bug fix can be considered ready for being accepted.

Before doing so: @VinInn @cmantill is the issue that was reported for the comparisons in #25195 (comment) understood by now? Perhaps also those comparisons could profit of being checked whether there were unfinished jobs which bias the result? Would it be worth to re-run them based on the very same events in the baseline and baseline+PR? Please let us know.

@perrotta
Copy link
Contributor

Ping @VinInn @cmantill: could you please answer to my #25195 (comment)?
For me this PR is fine as such, and if you have no issues with it any more I would sign it for reco

@VinInn
Copy link
Contributor

VinInn commented Nov 26, 2018

is ok for what I am concerned, BUT I am not the official validator.
I have no answer to why it produces such small (apparently random) diffs

@perrotta
Copy link
Contributor

Thank you Vincenzo! You are not the official validator, but the super-expert that wrote "-1" here above in this thread: I just wanted to be sure that there are no complains any more from your side ;-)

@perrotta
Copy link
Contributor

+1

  • It fixes the signs of cota/cotb in a couple of places in the SiPixelTemplate code where it was missed.
  • The bug affected the RecHit errors, giving some crazy value to them in a few rare case.
  • Jenkins tests show no relevant changes in the final results, with some fluctuation visible here and there compatible with the code change

@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. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 8524867 into cms-sw:master Nov 27, 2018
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