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

update to PUPPI;speedup, low PU corr #11671

Merged
merged 3 commits into from
Oct 23, 2015

Conversation

nhanvtran
Copy link
Contributor

This update contains the code for PUPPI v9

Biggest updates are a speedup (and more speedup possibility in the future) and fixes for the low PU behavior.

Final v9 version will be ready after tuning is performed with the new HCAL/ECAL reconstruction fixes and new constants are committed.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 7, 2015

A new Pull Request was created by @nhanvtran for CMSSW_7_6_X.

update to PUPPI;speedup, low PU corr

It involves the following packages:

CommonTools/PileupAlgos

@cmsbuild, @cvuosalo, @vadler, @monttj, @slava77 can you please review it and eventually sign? Thanks.
@ahinzmann, @jdolen, @rappoccio this is something you requested to watch as well.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
If you are a L2 or a release manager you can ask for tests by saying 'please test' in the first line of a comment.
@Degano you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@@ -47,11 +47,7 @@ void PuppiContainer::initialize(const std::vector<RecoObj> &iRecoObjects) {
// float nom = sqrt((fRecoParticle.m)*(fRecoParticle.m) + (fRecoParticle.pt)*(fRecoParticle.pt)*(cosh(fRecoParticle.eta))*(cosh(fRecoParticle.eta))) + (fRecoParticle.pt)*sinh(fRecoParticle.eta);//hacked
// float denom = sqrt((fRecoParticle.m)*(fRecoParticle.m) + (fRecoParticle.pt)*(fRecoParticle.pt));//hacked
// float rapidity = log(nom/denom);//hacked
if (edm::isFinite(fRecoParticle.rapidity)){
Copy link
Contributor

Choose a reason for hiding this comment

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

please recover this isFinite check.
I'm OK if some other "random" is picked instead of reset_PtYPhiM(0, 99., 0, 0) or if it can be skipped,
but we should not let the pseudojet to crash on nans again

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@slava77 sorry it got dropped -- I put it back in

@slava77
Copy link
Contributor

slava77 commented Oct 13, 2015

@nhanvtran ping

@nhanvtran
Copy link
Contributor Author

@slava77
So sorry I dropped this, but I'm confused. From the line comments it looks like I put back in the isFinite. Did I miss anything else?


}
////////////////////////////////////////////////////////////////////////////////

//This code is probably a bit confusing
double PuppiAlgo::compute(std::vector<double> const &iVals,double iChi2) const {
// if(fAlgoId[0] == -1) return 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

remind me, please why this commented out code is needed here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@slava77 deleted

@slava77
Copy link
Contributor

slava77 commented Oct 19, 2015

On 10/19/15 2:48 PM, nhanvtran wrote:

@slava77 https://github.com/slava77
So sorry I dropped this, but I'm confused. From the line comments it
looks like I put back in the isFinite. Did I miss anything else?

Yes, you need to put the if with isFinite back in.
This helps avoid many T0 crashes.


Reply to this email directly or view it on GitHub
#11671 (comment).

@nhanvtran
Copy link
Contributor Author

@slava77
Ok the isFinite is back in

@slava77
Copy link
Contributor

slava77 commented Oct 20, 2015

@nhanvtran
Please push the changes to this PR branch

Thanks.

@nhanvtran
Copy link
Contributor Author

@slava77
sorry i realized i was committing to the wrong branch -- now they are in...

@cmsbuild
Copy link
Contributor

Pull request #11671 was updated. @cmsbuild, @cvuosalo, @vadler, @monttj, @slava77 can you please check and sign again.

@slava77
Copy link
Contributor

slava77 commented Oct 20, 2015

@cmsbuild please test

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/9054/console

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

double lAdjust = double(lNPV)/double(lNPV+0.5*fNCount[iAlgo]);
if(lAdjust > 0) {
fMedian[iAlgo] -= sqrt(ROOT::Math::chisquared_quantile(lAdjust,1.)*fRMS[iAlgo]);
fRMS[iAlgo] -= sqrt(ROOT::Math::chisquared_quantile(lAdjust,1.)*fRMS[iAlgo]);
Copy link
Contributor

Choose a reason for hiding this comment

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

it looks a bit odd that both the median and RMS are shifted by the same value.
Is this done correctly?
Also, copy-paste of the same multi-operand code is not good (use a temporary).

@slava77
Copy link
Contributor

slava77 commented Oct 21, 2015

+1

for #11671 bca6373

  • code changes are OK: mainly technical reorganization to process eta ranges more effectively.
  • jenkins tests pass and comparisons with baseline show no differences [puppi-related objects are not monitored in miniaod]
  • tested locally in "CMSSW_7_6_X_2015-10-19-1100 + Fix packed gen particle copy and move ctors #12000 " as a baseline (to avoid packed candidate internal issues): puppiNoLep and puppi are now faster, there are slightly more jets made with puppi candidates
    • timing: puppiNoLep and puppi time reduces by about 2/3 (the same for data 25 ns with PU~15 and for MC ttbar with PU35@25ns)
    • storage: slimmedJetsPuppi collection increases in size by slightly under 1%
    • based on ttbar PU35@25ns, manually checking the changes: a noticeable fraction of packedCandidates has a different puppiWeight, as a consequence, on average Sum(slimmedJetsPuppi.pt) has increased by about 0.7%, and there is an extra slimmedJetsPuppi jet in ~1/10 events.

davidlange6 added a commit that referenced this pull request Oct 23, 2015
update to PUPPI;speedup, low PU corr
@davidlange6 davidlange6 merged commit 9646719 into cms-sw:CMSSW_7_6_X Oct 23, 2015
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.

4 participants