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
Use PFMETCollection in scouting PF producer #14588
Conversation
A new Pull Request was created by @duanders (Dustin Anderson) for CMSSW_8_0_X. It involves the following packages: HLTrigger/JetMET @Martin-Grunewald, @perrotta, @cmsbuild, @fwyzard, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are list here #13028 |
please test |
The tests are being triggered in jenkins. |
just for the record, what changed to trigger the need for this change? |
@@ -118,7 +118,7 @@ void HLTScoutingPFProducer::produce(edm::StreamID sid, edm::Event & iEvent, edm: | |||
} | |||
|
|||
//get MET | |||
Handle<reco::METCollection> metCollection; | |||
Handle<reco::PFMETCollection> metCollection; | |||
std::auto_ptr<double> outMetPt(new double(-999)); | |||
std::auto_ptr<double> outMetPhi(new double(-999)); | |||
if(doMet && iEvent.getByToken(metCollection_, metCollection)){ |
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.
(this does not need to be fixed in this PR, but please consider addressing it in the future)
why do you do use
outMetPt.reset(new double(metCollection->front().pt()));
instead of simply
*outMetPt = metCollection->front().pt();
?
The effect should be the same, but it would save freeing and reallocating memory.
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.
@fwyzard I agree, this should be changed in the future.
I think that we moved from |
+1 |
This pull request is fully signed and it will be integrated in one of the next CMSSW_8_0_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @Degano, @smuzaffar |
+1 |
The scouting PF producer is no longer able to access reco::PFMETCollections using reco::METCollection. This PR fixes the producer so that it looks for a reco::PFMETCollection.
This affects the online HLT menu, so should be integrated quickly if possible.