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

Protect default PAT jet configuration (80X) #13605

Merged

Conversation

ferencek
Copy link
Contributor

@ferencek ferencek commented Mar 4, 2016

This PR addresses the problem reported in https://hypernews.cern.ch/HyperNews/CMS/get/edmFramework/3631.html by protecting the default PAT jet configuration from being modified inadvertently.

Update (Mar. 17, 2016): Rebased to b981663 on the CMSSW_8_0_X branch with

process.patJetsPuppi.userData.userInts.src = cms.VInputTag(cms.InputTag(""))

(introduced in #13641 but now redundant) removed from PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py.

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 4, 2016

A new Pull Request was created by @ferencek (Dinko Ferenček) for CMSSW_8_0_X.

It involves the following packages:

PhysicsTools/PatAlgos

@cvuosalo, @monttj, @cmsbuild, @slava77, @vadler, @davidlange6 can you please review it and eventually sign? Thanks.
@TaiSakuma, @imarches, @ahinzmann, @acaudron, @mmarionncern, @rappoccio, @jdolen, @nhanvtran, @schoef, @ferencek, @gpetruc, @mariadalfonso, @pvmulder this is something you requested to watch as well.
@slava77, @Degano, @smuzaffar you are the release manager for this.

cms-bot commands are list here #13028

@ferencek ferencek changed the title Protect default PAT jet configurations Protect default PAT jet configuration Mar 4, 2016
@slava77
Copy link
Contributor

slava77 commented Mar 4, 2016

@cmsbuild please test
@ferencek please make a PR for 81X

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 4, 2016

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/11724/console

@ferencek ferencek changed the title Protect default PAT jet configuration Protect default PAT jet configuration (80X) Mar 4, 2016
@ferencek
Copy link
Contributor Author

ferencek commented Mar 5, 2016

@slava77, 81X PR submitted (#13606)

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 5, 2016

@cvuosalo
Copy link
Contributor

cvuosalo commented Mar 8, 2016

For workflow 134.911_RunSinglePh2015D, a comparison against baseline CMSSW_8_0_1 shows that the effect of this PR on the config of the PAT/RECO step is only four small changes to patJetsPuppi parameters:

addTagInfos = cms.bool(True),  --> addTagInfos = cms.bool(False),
userFloats = cms.PSet(
src = cms.VInputTag(cms.InputTag("")) -->  src = cms.VInputTag("")
),

and then these two parameters are set to null:

userFunctionLabels = cms.vstring('vtxMass', 'vtxNtracks', 'vtx3DVal', 'vtx3DSig', 'vtxPx', 'vtxPy', 'vtxPz', 'vtxPosX', 'vtxPosY', 'vtxPosZ'),
userFunctions = cms.vstring('?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.M):(0)', '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).numberOfSourceCandidatePtrs):(0)', '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").flightDistance(0).value):(0)', '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").flightDistance(0).significance):(0)', '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.x):(0)', '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.y):(0)', '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.z):(0)', '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.x):(0)', '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.y):(0)', '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.z):(0)'),

becoming

userFunctionLabels = cms.vstring(),
userFunctions = cms.vstring(),

@ferencek
Copy link
Contributor Author

ferencek commented Mar 8, 2016

Hi Carl,

Thanks for the summary. These changes are expected. Also, there should be
some changes in MiniAOD where puppi jets would no longer store extra info
effectively reset by this PR.

-Dinko

(Sent from my phone. Please excuse the brevity, spelling, and punctuation.)
On Mar 8, 2016 9:09 PM, "Carl Vuosalo" notifications@github.com wrote:

For workflow 134.911_RunSinglePh2015D, a comparison against baseline
CMSSW_8_0_1 shows that the effect of this PR on the config of the PAT/RECO
step is only four small changes to patJetsPuppi parameters:

addTagInfos = cms.bool(True), --> addTagInfos = cms.bool(False),
src = cms.VInputTag(cms.InputTag("")) --> src = cms.VInputTag("")

and then these two parameters are set to null:

userFunctionLabels = cms.vstring('vtxMass', 'vtxNtracks', 'vtx3DVal',
'vtx3DSig', 'vtxPx',
'vtxPy', 'vtxPz', 'vtxPosX', 'vtxPosY', 'vtxPosZ'),
userFunctions =
cms.vstring('?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.M):(0)',

'?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).numberOfSourceCandidatePtrs):(0)',

'?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").flightDistance(0).value):(0)',

'?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").flightDistance(0).significance):(0)',

'?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.x):(0)',

'?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.y):(0)',

'?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.z):(0)',

'?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.x):(0)',

'?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.y):(0)',

'?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.z):(0)'),

becoming

userFunctionLabels = cms.vstring(),
userFunctions = cms.vstring(),


Reply to this email directly or view it on GitHub
#13605 (comment).

@cvuosalo
Copy link
Contributor

cvuosalo commented Mar 8, 2016

@ahinzmann, @schoef: Could you please check the results of this PR (see above)? We see that this PR causes patJetsPuppi to have its addTagInfos parameter set to False even though its tagInfoSources parameter is still set with several values, which appears to be an inconsistency. What are the correct parameter values for patJetsPuppi?

@ferencek
Copy link
Contributor Author

ferencek commented Mar 8, 2016

@cvuosalo, regarding addTagInfos, this is the standard PAT behaviour. Whenever b-tag discriminators are added to jets, corresponding TagInfos are added to the list of tagInfoSources but addTagInfos remains set to False since TagInfos are a bit heavy to store. What is enabled by default is the storage of b-tag discriminator through setting of addBTagInfo and addDiscriminators to True.

@slava77
Copy link
Contributor

slava77 commented Mar 9, 2016

@ferencek
it sounds like the tagInfoSources are added indiscriminately.
it would be better to not set the tagInfoSources if they are not needed.

@ferencek
Copy link
Contributor Author

ferencek commented Mar 9, 2016

Hi Slava,

This goes beyond the scope of this PR.

While I get your point, this is how PAT, more specifically jetTools.py,
used to behave since its inception. The point is that jetTools.py adds all
the TagInfos associated with the added b-tag discriminators and it is then
left to the user to decide whether to actually add the TagInfos or not.
Figuring out later what TagInfos need to be added to have a consistent set
of TagInfos and discriminators would be a bit complicated. Note that the
fact that addTagInfos is not one of the input arguments to the
switchJetCollection and addJetCollection functions is not an exception. All
of the userData is also left to the user to be configured outside these
functions.

Best,
Dinko

(Sent from my phone. Please excuse the brevity, spelling, and punctuation.)
On Mar 9, 2016 2:13 AM, "Slava Krutelyov" notifications@github.com wrote:

@ferencek https://github.com/ferencek
it sounds like the tagInfoSources are added indiscriminately.
it would be better to not set the tagInfoSources if they are not needed.


Reply to this email directly or view it on GitHub
#13605 (comment).

@cvuosalo
Copy link
Contributor

cvuosalo commented Mar 9, 2016

+1

For #13605 ab0002c

Protecting PAT jet configuration from undesired modification.

The code change is satisfactory, and Jenkins tests against baseline CMSSW_8_0_X_2016-03-04-1100 show no significant differences, as expected, except for the differences caused by the additional PRs Jenkins included in the tests. A check of the RECO config shows the expected changes due to this PR, as discussed above.

@cvuosalo
Copy link
Contributor

cvuosalo commented Mar 9, 2016

Addendum: An extended test of workflow 134.911_RunSinglePh2015D with 70 events against baseline CMSSW_8_0_1 shows no significant differences.

@cmsbuild
Copy link
Contributor

Pull request #13605 was updated. @cvuosalo, @monttj, @cmsbuild, @slava77, @vadler, @davidlange6 can you please check and sign again.

@davidlange6
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/11941/console

davidlange6 added a commit that referenced this pull request Mar 17, 2016
…SSW_8_0_1

Protect default PAT jet configuration (80X)
@davidlange6 davidlange6 merged commit bd2081e into cms-sw:CMSSW_8_0_X Mar 17, 2016
@ferencek ferencek deleted the ProtectPATJetDefaults_from-CMSSW_8_0_1 branch March 17, 2016 11:13
@cmsbuild
Copy link
Contributor

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