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

code-cleaning in RecoMET/METProducers/python #4259

Merged
merged 3 commits into from Jun 20, 2014

Conversation

TaiSakuma
Copy link
Contributor

This PR deletes old definitions of CaloMETs, which were replaced with new definitions at #3942.

This PR also deletes aliases, which became optional at #4006, from several MET definitions.

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @TaiSakuma (Tai Sakuma) for CMSSW_7_2_X.

code-cleaning in RecoMET/METProducers/python

It involves the following packages:

CommonTools/ParticleFlow
RecoMET/METProducers

@nclopezo, @monttj, @cmsbuild, @StoyanStoynev, @slava77, @vadler, @Degano can you please review it and eventually sign? Thanks.
@nhanvtran 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

@@ -4,7 +4,7 @@
from RecoMET.METProducers.PFMET_cfi import *

# Should the name be changed se it is similar to pfMet from reco ??
pfMET = pfMet.clone(alias="pfMET")
pfMET = pfMet.clone()
Copy link
Contributor

Choose a reason for hiding this comment

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

(this refers to all)
Does it make sense to remove aliases for common names completely?
Some analysis scripts in fwlite rely on these.
What's the strategy now? Let people set the aliases manually?
pfMET.phi() is much simpler to use in fwlite tree draw than the full branch name

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Pull request #4259 was updated. @nclopezo, @cmsbuild, @Degano, @StoyanStoynev, @slava77 can you please check and sign again.

@TaiSakuma
Copy link
Contributor Author

@slava77, I didn't correctly understand what aliases do.

(I will put a link to twiki here so I can find it later https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookFWLite)

I will keep the aliases.

I changes the aliases of CaloMETs.

I thought about to making the aliases of CaloMETs all capitals as in the aliases for several other METs. But it will become harder to recognize, e.g., CALOMETBEFO. So I made them the same as the module names.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

@StoyanStoynev
Copy link
Contributor

Looking into it

@StoyanStoynev
Copy link
Contributor

@TaiSakuma could you change the first letter of the aliases to capital (letter) to avoid introducing yet another convention. Note that there are several cases like yours in RecoMET/METProducers/python - either all letters are capital or the first one is capital. You may also consider putting comments if you like (see genMetTrue_cfi.py) - useful in a longer run.

@slava77
Copy link
Contributor

slava77 commented Jun 18, 2014

I prefer lower case, actually.
module instances should start from lower case and aliases in most cases should just match the module names

@TaiSakuma
Copy link
Contributor Author

@StoyanStoynev, @slava77, if the aliases are the same as the names of the modules, I think that would be simple and convenient. I will make the aliases and the names of all module in RecoMET/METProducers/python the same. is it ok?

@StoyanStoynev
Copy link
Contributor

The only reason I don't like exact matching is that the uniqueness of the string pattern is broken
and thus it is harder when searching for it (even if it is alias we are talking about). Anyway it is hardly
an issue, Slava has his point, so I have no objections.

@slava77
Copy link
Contributor

slava77 commented Jun 19, 2014

The story with capitalization really goes to the coding style/rules that we have: types can start from a capital letter, instances (collection names included) start from lower case.
Clearly not all aliases can have the module name because some modules produce multiple products and in some cases we want to preserve backward compatibility in aliases by keeping aliases the same even if the producer modules have changed.

@StoyanStoynev
Copy link
Contributor

@TaiSakuma are you making more changes? Other than that all is fine, no diffs expected and none observed (Jenkins; local tests on 21c65e0 with CMSSW_7_2_X_2014-06-17-1400).

@TaiSakuma
Copy link
Contributor Author

@StoyanStoynev, I think that I am done for this PR.

I will change aliases of other METs to uniform the convention of the capitalization as a separate PR later.

@StoyanStoynev
Copy link
Contributor

  • 1
    Based on the above discussion.

@StoyanStoynev
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_2_X IBs unless changes (tests are also fine).

ktf added a commit that referenced this pull request Jun 20, 2014
code-cleaning in RecoMET/METProducers/python
@ktf ktf merged commit 14eaaf1 into cms-sw:CMSSW_7_2_X Jun 20, 2014
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

5 participants