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

JER integration into conditions database #10448

Merged
merged 2 commits into from
Sep 30, 2015

Conversation

blinkseb
Copy link
Contributor

(This a a resubmission of #10350 targeting CMSSW 7.6.x and with corrections)

This PR adds the necessary machinery to store Jet energy Resolutions and associated Scale Factors to the conditions database.

Values are parsed from text files using the same format as Jet Energy Corrections text files. Two new records are added, JetResolutionRcd and JetResolutionScaleFactorRcd, storing respectively resolutions and scale factors. Both resolutions and scale factors are converted to a common object, JetResolutionObject, which is serialized into the corresponding records.

Facility are provided to create a database from text files [1] and to create text files from a database or a GT [2].

Users can access values using the classes JetResolution and JetResolutionScaleFactors. A static function is provided to hide the boilerplate to retrieve the object from the condition database. A demo analyzer is included as an how-to tutorial [3] and is ran as an unit-test for the package.

This depends also on two data files used for unit-testing. Corresponding PR is pending for inclusion on the cms-data org [4]. PR is merged.

This interface has been presented and validated at the JERC meeting on 07/23.

This will need to be backported into CMSSW 7.5.x and probably also 7.4.x

[1] https://github.com/blinkseb/cmssw/blob/665bd5d702f5ed976a898b7f8c426a5955eaf103/JetMETCorrections/Modules/test/JetResolutionDBWriter_cfg.py
[2] https://github.com/blinkseb/cmssw/blob/665bd5d702f5ed976a898b7f8c426a5955eaf103/JetMETCorrections/Modules/test/JetResolutionLocalDBReader_cfg.py
[3] https://github.com/blinkseb/cmssw/blob/665bd5d702f5ed976a898b7f8c426a5955eaf103/JetMETCorrections/Modules/plugins/JetResolutionDemo.cc
[4] #10350

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @blinkseb (Sébastien Brochet) for CMSSW_7_6_X.

JER integration into conditions database

It involves the following packages:

CondCore/JetMETPlugins
CondCore/Utilities
CondFormats/DataRecord
CondFormats/JetMETObjects
JetMETCorrections/Modules

@diguida, @cerminar, @monttj, @cmsbuild, @ggovi, @vadler, @mmusich can you please review it and eventually sign? Thanks.
@ghellwig, @apfeiffer1, @ahinzmann, @rappoccio, @mmarionncern, @TaiSakuma, @jdolen, @nhanvtran, @schoef, @mariadalfonso 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.

@blinkseb
Copy link
Contributor Author

blinkseb commented Aug 3, 2015

Is there any news on this? This is quite high priority for JME. Thanks!

The PR for data has been merged on cms-data so everything is available in latest IB.

@davidlange6
Copy link
Contributor

@cmsbuild, please test

@diguida
Copy link
Contributor

diguida commented Aug 7, 2015

@blinkseb sorry for late reply, looking into it.

std::shared_ptr<JetResolutionObject> m_object;
};

class JetResolutionScaleFactor {
Copy link
Contributor

Choose a reason for hiding this comment

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

@blinkseb I am a bit confused by this class. It is basically an observer for JetResolutionObject.
I would definitively not put it here, where you declare entity classes (observers fall in the control class domain).
See more comments on the implementation on each method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for the delay, I was in holidays.

Do you want me to move these classes into another files?

@blinkseb blinkseb force-pushed the jer_gt_rebased_76x branch 2 times, most recently from 3d793af to facd68e Compare September 8, 2015 17:21
@blinkseb
Copy link
Contributor Author

blinkseb commented Sep 8, 2015

As suggested by @diguida, I moved the classes JetResolution and JetResolutionScaleFactors into JetMETCorrections/Modules.

@schoef
Copy link
Contributor

schoef commented Sep 14, 2015

@diguida Could we please proceed with this? Anything wlese required from our side?

@cmsbuild
Copy link
Contributor

Pull request #10448 was updated. @diguida, @cerminar, @monttj, @cmsbuild, @ggovi, @vadler, @mmusich can you please check and sign again.

@mmusich
Copy link
Contributor

mmusich commented Sep 14, 2015

please test

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

-1
Tested at: facd68e
I found an error when building:

>> Compiling edm plugin /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-13-1100/src/JetMETCorrections/Modules/plugins/JetCorrectorProducers.cc 
>> Compiling edm plugin /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-13-1100/src/JetMETCorrections/Modules/plugins/JetResolutionDBReader.cc 
>> Compiling edm plugin /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-13-1100/src/JetMETCorrections/Modules/plugins/JetResolutionDBWriter.cc 
>> Compiling edm plugin /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-13-1100/src/JetMETCorrections/Modules/plugins/JetResolutionDemo.cc 
>> Compiling edm plugin /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-13-1100/src/JetMETCorrections/Modules/plugins/METCorrectorDBWriter.cc 
/tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-13-1100/src/JetMETCorrections/Modules/plugins/JetResolutionDemo.cc:12:63: fatal error: JetMETCorrections/Modules/interface/JetResolution.h: No such file or directory
 #include "JetMETCorrections/Modules/interface/JetResolution.h"
                                                               ^
compilation terminated.
/tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-13-1100/src/JetMETCorrections/Modules/plugins/JetResolutionDemo.cc:12:63: fatal error: JetMETCorrections/Modules/interface/JetResolution.h: No such file or directory
 #include "JetMETCorrections/Modules/interface/JetResolution.h"


you can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-10448/8064/summary.html

@blinkseb
Copy link
Contributor Author

I've updated the PR to fix build issues.

@cmsbuild
Copy link
Contributor

@blinkseb
Copy link
Contributor Author

Is there something else I need to do for this PR to be merged? Just let me know.

@mmusich
Copy link
Contributor

mmusich commented Sep 21, 2015

@blinkseb we are reviewing it. Thanks

@diguida
Copy link
Contributor

diguida commented Sep 25, 2015

+1

  • New condition object JetResolutionObject
  • Import and fetch macros able to manage the object
  • Two records associated to it
  • Two control classes defined for later use in client code.

Things to be fixed or possibly reviewed in later PR:

@blinkseb
Copy link
Contributor Author

Thanks for the review @diguida! I'll update the PR with the changes requested. Just one question about your latest point (dispatching of JetResolutionObject).

I tried to return a const ref but it's obviously not possible since the Handle is local to the function. What would you advise to return? Directly the Handle maybe?

@diguida
Copy link
Contributor

diguida commented Sep 29, 2015

@ggovi ping :-)

@diguida
Copy link
Contributor

diguida commented Sep 29, 2015

@blinkseb do not update this PR now, otherwise it has to be re-tested!
Make a new PR once this is included.
Concerning your question, the issue is how to manage objects delivered via EventSetup. The quick reply is: do not use them outside the context where the EventSetup makes them available to the clients.
I discussed this with @ggovi , and we agreed on this "quick summary".
I hope @Dr15Jones can confirm this is correct.

@ggovi
Copy link
Contributor

ggovi commented Sep 29, 2015

+1

@Dr15Jones
Copy link
Contributor

Seems reasonable

@diguida
Copy link
Contributor

diguida commented Sep 29, 2015

@monttj @vadler ping :-)

@diguida
Copy link
Contributor

diguida commented Sep 29, 2015

@Dr15Jones thanks for looking into that.

@monttj
Copy link
Contributor

monttj commented Sep 30, 2015

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@davidlange6
Copy link
Contributor

+1

cmsbuild added a commit that referenced this pull request Sep 30, 2015
JER integration into conditions database
@cmsbuild cmsbuild merged commit b8ac33e into cms-sw:CMSSW_7_6_X Sep 30, 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.

9 participants