-
Notifications
You must be signed in to change notification settings - Fork 0
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
vhbb heppy: added factorized JEC #78
vhbb heppy: added factorized JEC #78
Conversation
I appreciate if you can take a look and give your opinion @bianchini @arizzi |
any comments? also cc @cbernet |
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.
Thanks Joosep!
As far as I can see from the code this looks ok.
Did you validate that everything is working as expected on the physics side?
I have only a few comments related to python code formatting and documentation.
Cheers, Colin
@@ -6,7 +6,7 @@ | |||
class JetReCalibrator: | |||
def __init__(self,globalTag,jetFlavour,doResidualJECs,jecPath,upToLevel=3, | |||
calculateSeparateCorrections=False, | |||
calculateType1METCorrection=False, type1METParams={'jetPtThreshold':15., 'skipEMfractionThreshold':0.9, 'skipMuons':True} ): | |||
calculateType1METCorrection=False, type1METParams={'jetPtThreshold':15., 'skipEMfractionThreshold':0.9, 'skipMuons':True}, factorizedJetCorrections=["Total"] ): |
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.
could you please break the line that is too long, and also add to the constructor docstring the possible values for factorizedJetCorrections?
@@ -58,7 +68,7 @@ def __init__(self,globalTag,jetFlavour,doResidualJECs,jecPath,upToLevel=3, | |||
for i in [self.L1JetPar,self.L2JetPar,self.L3JetPar,self.ResJetPar]: self.vParL3Res.push_back(i) | |||
self.separateJetCorrectors["L1L2L3Res"] = ROOT.FactorizedJetCorrector(self.vParL3Res) | |||
|
|||
def getCorrection(self,jet,rho,delta=0,corrector=None): | |||
def getCorrection(self,jet,rho,delta=0,corrector=None,uncertainty="Total"): |
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.
please add a docstring
self.JetUncertainty.setJetEta(jet.eta()) | ||
self.JetUncertainty.setJetPt(corr * jet.pt() * jet.rawFactor()) | ||
JetUncertainty = self.factorizedUncertainties[uncertainty] | ||
if not JetUncertainty: raise RuntimeError("Jet energy scale uncertainty shifts requested, but not available") |
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.
please break line:
if not JetUncertainty:
blah
apologies, I missed this thread. Do I understand correctly that the default list being ["Total"] the default behaviour is to not compute factorized JECs ? if so, then it is ok for me |
Yes, |
@cbernet thanks, I'll implement your suggestions. The physics were tested and reported at a CMS meeting with no big complaints. For docstrings, I don't suppose you have a style suggestion? I'm using what the Sublime Text pluging AutoDocstring has by default (google [1]). [1] https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html |
Thanks Joosep. For the docstrings, I use the epytext format:
http://epydoc.sourceforge.net/epytext.html <http://epydoc.sourceforge.net/epytext.html>
which is then parsed with pydoctor to get:
http://fcc-support-heppy.web.cern.ch/fcc-support-heppy/ <http://fcc-support-heppy.web.cern.ch/fcc-support-heppy/>
and e.g. http://fcc-support-heppy.web.cern.ch/fcc-support-heppy/heppy.framework.analyzer.Analyzer.html <http://fcc-support-heppy.web.cern.ch/fcc-support-heppy/heppy.framework.analyzer.Analyzer.html>
It’s not complete yet, but I’m slowly making progress.
If you can use this format that’s nice, but please don’t get too worried about this.
I would just like the docstrings to be there and I can convert them later on.
… Le 7 déc. 2016 à 11:12, Joosep Pata ***@***.***> a écrit :
@cbernet <https://github.com/cbernet> thanks, I'll implement your suggestions. The physics were tested and reported at a CMS meeting with no big complaints. For docstrings, I don't suppose you have a style suggestion? I'm using what the Sublime Text pluging AutoDocstring has by default (google [1]).
[1] https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html <https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#78 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AD8ku_WLFyv_8U80z302wGEqWJi70fBSks5rFoaHgaJpZM4K9u89>.
|
@cbernet I've added docstrings and improved formatting. As a side note I also tried building this repo in the CERN gitlab CI, it works. |
any news on this? can you merge? will you (@cbernet) port to CMSSW_8_0_24 or should we do it? |
From VHbb code (issue vhbb#566), add possibility to do factorized JEC uncertainties.