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
bsunanda:Run2 alca14 Get rid of unused variables and avoid explicit names #9062
Conversation
A new Pull Request was created by @bsunanda for CMSSW_7_5_X. bsunanda:Run2 alca13 Get rid of unused variables and avoid explicit names It involves the following packages: Calibration/HcalAlCaRecoProducers @diguida, @danduggan, @cerminar, @cmsbuild, @nclopezo, @deguio, @mmusich can you please review it and eventually sign? Thanks. |
@cmsbuild please test |
1 similar comment
@cmsbuild please test |
The tests are being triggered in jenkins. |
itr!=ph.end(); ++itr) { | ||
if (itr->pt() >= minPtPhoton_) return ok; | ||
} | ||
return false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bsunanda IIUC the tests you perform are:
- Test if the Photon collection is empty: return false if so;
- Check the requirement for minimum pT: at least one PFJet should have pt larger than the threshold, otherwise return false;
- Check the requirement for minimum pT: at least one Photon should have pt larger than the threshold. If so, return true, otherwise false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - we need events with at least one high pt jet and one high pt photon. The assumption of ordering was found to be incorrect - so the code is optimized this way.
From: Salvatore Di Guida [notifications@github.com]
Sent: 13 May 2015 10:17
To: cms-sw/cmssw
Cc: Sunanda Banerjee
Subject: Re: [cmssw] bsunanda:Run2 alca13 Get rid of unused variables and avoid explicit names (#9062)
In Calibration/HcalAlCaRecoProducers/src/AlCaGammaJetProducer.cchttps://github.com//pull/9062#discussion_r30210248:
- // Check the requirement for minimum pT
- if (ph.size() == 0) return false;
- bool ok(false);
- for (reco::PFJetCollection::const_iterator itr=jt.begin();
itr!=jt.end(); ++itr) {
- if (itr->pt() >= minPtJet_) {
ok = true;
break;
- }
- }
- if (!ok) return ok;
- for (reco::PhotonCollection::const_iterator itr=ph.begin();
itr!=ph.end(); ++itr) {
- if (itr->pt() >= minPtPhoton_) return ok;
- }
- return false;
}
@bsunandahttps://github.com/bsunanda IIUC the tests you perform are:
- Test if the Photon collection is empty: return false if so;
- Check the requirement for minimum pT: at least one PFJet should have pt larger than the threshold, otherwise return false;
- Check the requirement for minimum pT: at least one Photon should have pt larger than the threshold. If so, return true, otherwise false.
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/9062/files#r30210248.
This pull request is fully signed and it will be integrated in one of the next CMSSW_7_5_X IBs unless changes (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @nclopezo, @smuzaffar |
+1 |
bsunanda:Run2 alca14 Get rid of unused variables and avoid explicit names
Remove some of the unused variables. Avoid using explicit names in the name of the products. Correct the selection function to avoid assumptions in warning. Change some getByLabel with getByToken. Use LogDebug in the DQM code.