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

feat: allow for not sorting during PATJetUpdater call #32297

Merged
merged 1 commit into from Dec 15, 2020

Conversation

andrzejnovak
Copy link
Contributor

Allow for running updateJetCollection without resorting the jets. This is to be used when i.e. updating subjet btag discriminators, but they are already ordered/matched to FatJets.

Does not modify the default behaviour.

@alefisico

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32297/20113

  • This PR adds an extra 36KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32297/20116

  • This PR adds an extra 36KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @andrzejnovak (Andrzej Novak) for master.

It involves the following packages:

PhysicsTools/PatAlgos

@perrotta, @jpata, @cmsbuild, @santocch, @slava77 can you please review it and eventually sign? Thanks.
@rappoccio, @gouskos, @JyothsnaKomaragiri, @ahinzmann, @smoortga, @schoef, @mmarionncern, @jdamgov, @jdolen, @nhanvtran, @gkasieczka, @clelange, @emilbols, @hatakeyamak, @ferencek, @gpetruc, @andrzejnovak, @mariadalfonso, @seemasharmafnal this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@perrotta
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 27, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

-1

Tested at: d5ab218

CMSSW: CMSSW_11_3_X_2020-11-26-2300
SCRAM_ARCH: slc7_amd64_gcc900
You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-45c264/11093/summary.html

I found follow errors while testing this PR

Failed tests: HeaderConsistency ClangBuild

  • Clang:

I found compilation error while trying to compile with clang. Command used:

USER_CUDA_FLAGS='--expt-relaxed-constexpr' USER_CXXFLAGS='-Wno-register -fsyntax-only' scram build -k -j 32 COMPILER='llvm compile'

>> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_3_X_2020-11-26-2300/src/PhysicsTools/PatAlgos/plugins/RecoMETExtractor.cc
>> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_3_X_2020-11-26-2300/src/PhysicsTools/PatAlgos/plugins/StringResolutionProviderESProducer.cc
>> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_3_X_2020-11-26-2300/src/PhysicsTools/PatAlgos/plugins/TauJetCorrFactorsProducer.cc
>> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_3_X_2020-11-26-2300/src/PhysicsTools/PatAlgos/plugins/TrackAndVertexUnpacker.cc
>> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_3_X_2020-11-26-2300/src/PhysicsTools/PatAlgos/plugins/VertexAssociationProducer.cc
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_3_X_2020-11-26-2300/src/PhysicsTools/PatAlgos/plugins/PATTriggerProducer.cc:45:21: error: call to implicitly-deleted default constructor of 'pat::PATTriggerProducer::ModuleLabelToPathAndFlags'
PATTriggerProducer::PATTriggerProducer(const ParameterSet& iConfig)
                    ^
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_3_X_2020-11-26-2300/src/PhysicsTools/PatAlgos/plugins/PATTriggerProducer.h:145:39: note: default constructor of 'ModuleLabelToPathAndFlags' is implicitly deleted because field 'empty_' of const-qualified type 'const std::vector' would not be initialized
      const std::vector empty_;
                                      ^


@cmsbuild
Copy link
Contributor

Comparison not run due to Build errors/Fireworks only changes/No short matrix requested (RelVals and Igprof tests were also skipped)

@perrotta
Copy link
Contributor

+1

  • It ended up that this will only involve some (private? future?) nanoAOD production, while the change is completely transparent to reco: let assign xpog for evaluating it, then
  • Jenkins tetst pass and show no differences wrt the baseline, as expected

@perrotta
Copy link
Contributor

assign xpog

@cmsbuild
Copy link
Contributor

New categories assigned: xpog

@fgolf,@mariadalfonso,@gouskos you have been requested to review this Pull request/Issue and eventually sign? Thanks

@santocch
Copy link

+1

@silviodonato
Copy link
Contributor

kind reminder @cms-sw/xpog-l2

@andrzejnovak
Copy link
Contributor Author

I suppose this is not a critical PR to have in asap, but at the same time the change is trivial.

@mariadalfonso
Copy link
Contributor

I suppose this is not a critical PR to have in asap, but at the same time the change is trivial.

@andrzejnovak

I'm trying to figure out the case when you need to switch on/off this sorting.

in the default nano in 10_6 PATJetUpdater is called 6 times.
Any of this case follow your need or not of sorting ?

process.patJetsReapplyJEC = cms.EDProducer("PATJetUpdater",
process.updatedJets = cms.EDProducer("PATJetUpdater",
process.updatedJetsAK8 = cms.EDProducer("PATJetUpdater",
process.updatedPatJets = cms.EDProducer("PATJetUpdater",
process.updatedPatJetsAK8WithDeepInfo = cms.EDProducer("PATJetUpdater",
process.updatedPatJetsTransientCorrectedAK8WithDeepInfo = cms.EDProducer("PATJetUpdater",

@andrzejnovak
Copy link
Contributor Author

@mariadalfonso No, at the moment this is not needed for any central workflow, but if we wanted to re-calculate btags also for subjets like it currently does for fatjets, it would get used (pt sorting the subjets would mess up the subject link to FatJet_subjetIdx)

@alefisico
Copy link
Contributor

I suppose this is not a critical PR to have in asap, but at the same time the change is trivial.

@andrzejnovak

I'm trying to figure out the case when you need to switch on/off this sorting.

in the default nano in 10_6 PATJetUpdater is called 6 times.
Any of this case follow your need or not of sorting ?

process.patJetsReapplyJEC = cms.EDProducer("PATJetUpdater",
process.updatedJets = cms.EDProducer("PATJetUpdater",
process.updatedJetsAK8 = cms.EDProducer("PATJetUpdater",
process.updatedPatJets = cms.EDProducer("PATJetUpdater",
process.updatedPatJetsAK8WithDeepInfo = cms.EDProducer("PATJetUpdater",
process.updatedPatJetsTransientCorrectedAK8WithDeepInfo = cms.EDProducer("PATJetUpdater",

If I can add something here, in the case when we were trying to run the AK8 jet collection with the new PUPPI tune from miniAOD, we would need to include this small fix as part of that PR to correctly handle the link between the subjet collection and the jet collection.

@mariadalfonso
Copy link
Contributor

I suppose this is not a critical PR to have in asap, but at the same time the change is trivial.

@andrzejnovak
I'm trying to figure out the case when you need to switch on/off this sorting.
in the default nano in 10_6 PATJetUpdater is called 6 times.
Any of this case follow your need or not of sorting ?
process.patJetsReapplyJEC = cms.EDProducer("PATJetUpdater",
process.updatedJets = cms.EDProducer("PATJetUpdater",
process.updatedJetsAK8 = cms.EDProducer("PATJetUpdater",
process.updatedPatJets = cms.EDProducer("PATJetUpdater",
process.updatedPatJetsAK8WithDeepInfo = cms.EDProducer("PATJetUpdater",
process.updatedPatJetsTransientCorrectedAK8WithDeepInfo = cms.EDProducer("PATJetUpdater",

If I can add something here, in the case when we were trying to run the AK8 jet collection with the new PUPPI tune from miniAOD, we would need to include this small fix as part of that PR to correctly handle the link between the subjet collection and the jet collection.

Hi @alefisico
is it possible to have the PR related to the addition of the AK8 jet collection with the new PUPPI tune?
at least we have a way to validate this reordering before merging

Maria

@andrzejnovak
Copy link
Contributor Author

@mariadalfonso I am not sure what you mean. The only way you can detect something wrong has happened in this case is if you try to access the subjet collection and expect a specific ordering. i.e when the subjet index is explicitly used somewhere else like the linking to FatJets. I am not sure, but I think that's currently beyond the scope of the nano dqm.

In the current CMSSW, calling updateJetCollection on the subjet collection, when creating Nano will unset the order given in

[1]

and therefore the values in [2] will point to different jets than intended.

The effect is visible if one calculates the dR(FatJet, Subjet) for the subjets linked via the index in [2] In orange you see the result when the subjet collection is pT sorted after the update.

image

IIUC [1] is called in MINI production and not called again in Nano so the stored subjet collection is not pT ordered in neither MINI nor Nano. However, if it was needed to update the subjet collection in nano, like it is for regular jets [3] this would sort the subjet collection, scrambling the values in [2].

[1] https://github.com/cms-sw/cmssw/blob/master/PhysicsTools/PatAlgos/python/slimming/applySubstructure_cff.py#L156-L194
[2] https://github.com/cms-sw/cmssw/blob/master/PhysicsTools/NanoAOD/python/jets_cff.py#L474-L478
[3] https://github.com/cms-sw/cmssw/blob/master/PhysicsTools/NanoAOD/python/nano_cff.py#L161

@silviodonato
Copy link
Contributor

kind reminder @cms-sw/xpog-l2

@mariadalfonso
Copy link
Contributor

+xpog

update the PATJetUpdater in view of future use of subject, see offline validation here
#32297 (comment)

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@silviodonato
Copy link
Contributor

+1

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

7 participants