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

JetCorrector in Event #5141

Merged
merged 3 commits into from Sep 9, 2014
Merged

Conversation

Dr15Jones
Copy link
Contributor

At the request of David Lange @davidlange6 I implemented a solution to the consumes problem with JetCorrector.

Previously, JetCorrector was an EventSetup object yet to do its work it had member functions which took the edm::Event as a parameter. Given that the JetCorrector was doing 'hidden' gets from the Event it meant any module using the JetCorrector was unable to make all the necessary consumes calls.

This implementation avoids the consumes problem by having a new reco::JetCorrector which is an Event product. Therefore the module which makes the reco::JetCorrector can do the needed gets from the Event and knows which consumes calls are needed. This also simplifies the use of reco::JetCorrector since users no longer have to pass a edm::Event and edm::EventSetup to the methods of the class.

Moved the implementation of the JetCorrector so that the needed
class can be obtained from the Event rather than the EventSetup.
This is needed since
1) having an EventSetup class access data from the Event is against
 CMSSW rules
2) it is not possible to make the needed 'consumes' call with the
 previous design.
The new implementation lives in the namespace reco while the old
implementation is still in the global namespace until the old
can be removed.
The ChainedJetCorrectorProducer is the equivalent to the previous
JetCorrectionESChain but for the Event based reco::JetCorrector.
@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2014

A new Pull Request was created by @Dr15Jones (Chris Jones) for CMSSW_7_2_X.

JetCorrector in Event

It involves the following packages:

JetMETCorrections/Algorithms
JetMETCorrections/JetCorrector
JetMETCorrections/Modules

The following packages do not have a category, yet:

JetMETCorrections/JetCorrector

@cmsbuild, @vadler, @nclopezo, @ktf, @monttj can you please review it and eventually sign? Thanks.
@nhanvtran, @TaiSakuma, @mmarionncern, @schoef 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.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2014

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2014

@vadler
Copy link

vadler commented Sep 3, 2014

@Dr15Jones : Great, thanx! I will check as soon as possible.
I guess, the new implementations do not substitute the old code completely and the consumes migration is still needed there, right?

@Dr15Jones
Copy link
Contributor Author

@vadler David had suggested that I only write the new Event data product and the Producers which make the new items. All modules which use the old JetCorrector still need to be modified to use the new 'reco::JetCorrector' and all configurations using the old modules need to be changed to use the new EDProducers.

@Dr15Jones
Copy link
Contributor Author

@vadler I also wanted to note that I couldn't find any working 'test' configuration of the existing JetCorrector so I was never able to create a test of the new reco::JetCorrector.

@Dr15Jones
Copy link
Contributor Author

@vadler ping?

@vadler
Copy link

vadler commented Sep 9, 2014

+1
@Dr15Jones : I still need to find the out, where exactly the replacements for the old version have to happen.
Is it for everything defined in JetMETCorrections/Modules/src/SealModule.cc ?

@Dr15Jones
Copy link
Contributor Author

@vadler Basically, every piece of code which requests or uses a JetCorrector has to be changed. I'd suggest doing a

git grep JetCorrector

to find those cases. The use tends to be pretty far reaching.

@Dr15Jones Dr15Jones deleted the JetCorrectorInEvent branch September 15, 2014 13:25
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

4 participants