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

Add use of unsubtracted jets in RecoBTag info producers #44422

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

stahlleiton
Copy link
Contributor

PR description:

While using constituent subtracted (CS) jets in PbPb collisions, which runs the underlying event subtraction particle-by-particle defined in ref, it was observed that the b-tagging performance decreased due to some of the displaced tracks being zero'd out by the subtraction algorithm. The solution to recover the b-tagging performance when using CS jets was to use instead the unsubtracted particles in the b-tag info producers.

So this PR implements a jet matcher by deltaR that allows to match CS jet collections to unsubtracted jet collections and creates an association map between these two collections. This map is then later added to the Deep Boosted, Deep Flavour and the Particle Transformer tag info producers to access the unsubtracted jet associated to the CS jet and use the unsubtrated particles instead. The logic is defined such that if the map is not provided (default behavior), the particles of the input jet collection is always used as currently done.

PR validation:

This PR was validated in CMSSW_13_2_10 using a TTbar sample.

If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:

@mandrenguyen

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 15, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-44422/39493

  • This PR adds an extra 32KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @stahlleiton for master.

It involves the following packages:

  • RecoBTag/FeatureTools (reconstruction)
  • RecoJets/JetProducers (reconstruction)

@mandrenguyen, @cmsbuild, @jfernan2 can you please review it and eventually sign? Thanks.
@jdolen, @andrzejnovak, @hqucms, @demuller, @AlexDeMoor, @seemasharmafnal, @emilbols, @JyothsnaKomaragiri, @Senphy, @gkasieczka, @nhanvtran, @missirol, @ahinzmann, @Ming-Yan, @clelange, @jdamgov, @mariadalfonso, @rappoccio, @AnnikaStein, @schoef, @yslai this is something you requested to watch as well.
@sextonkennedy, @antoniovilela, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@mandrenguyen
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-e2e33c/38205/summary.html
COMMIT: 4e1f0e4
CMSSW: CMSSW_14_1_X_2024-03-17-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/44422/38205/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@mandrenguyen
Copy link
Contributor

+reconstruction
No changes to comparisons as this map is not used in default workflows.

@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. @antoniovilela, @rappoccio, @sextonkennedy (and backports should be raised in the release meeting by the corresponding L2)

@antoniovilela
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 453f2c1 into cms-sw:master Mar 18, 2024
11 checks passed
@stahlleiton stahlleiton deleted the UnsubJetsForBTag_CMSSW_14_1_X branch March 18, 2024 17:48
@mandrenguyen
Copy link
Contributor

type btv

@@ -324,6 +335,7 @@ void DeepBoostedJetTagInfoProducer::fillDescriptions(edm::ConfigurationDescripti
desc.add<edm::InputTag>("secondary_vertices", edm::InputTag("inclusiveCandidateSecondaryVertices"));
desc.add<edm::InputTag>("pf_candidates", edm::InputTag("particleFlow"));
desc.add<edm::InputTag>("jets", edm::InputTag("ak8PFJetsPuppi"));
desc.addUntracked<edm::InputTag>("unsubjet_map", {});
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed during ORP meeting Apr 2nd:

why is this untracked? Doesn't this change physics?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made it untracked to avoid crashing existing configurations (since it would require the presence of the variable). I can try to make a new PR by changing it to tracked and changing the corresponding python configuration files that use these modules.

Copy link
Contributor

Choose a reason for hiding this comment

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

I can try to make a new PR by changing it to tracked and changing the corresponding python configuration files that use these modules.

Please do. Also for the HLT configuration do not change the python configuration directly, but use HLTrigger/Configuration/python/customizeHLTforCMSSW.py

Copy link
Contributor Author

@stahlleiton stahlleiton Apr 2, 2024

Choose a reason for hiding this comment

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

ok, so just to be sure I understood:

Instead of changing the files: https://github.com/cms-sw/cmssw/blob/master/HLTrigger/Configuration/python/HLT_75e33/modules/hltPfDeepFlavourTagInfos_cfi.py and https://github.com/cms-sw/cmssw/blob/master/HLTrigger/Configuration/python/HLT_75e33/modules/hltPfDeepFlavourTagInfosModEta2p4_cfi.py

I change instead the file: https://github.com/cms-sw/cmssw/blob/master/HLTrigger/Configuration/python/customizeHLTforCMSSW.py

adding:

def customizeHLTfor44222(process):
"""
Customisation for running HLT with the updated btag info producers from PR 44054
"""
for type in ["DeepFlavourTagInfoProducer", "ParticleTransformerAK4TagInfoProducer", "DeepBoostedJetTagInfoProducer"]:
for producer in producers_by_type(process, type):
if not hasattr(producer, 'unsubjet_map'):
producer.unsubjet_map = edm::InputTag("")
return process

right?

Copy link
Contributor

Choose a reason for hiding this comment

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

right?

no, if the change is only for modules in the folder HLTrigger/Configuration/pythong/HLT_75e33 (which entails only phase-2 HLT menu, not yet supported on confDB) it's fine to change them by hand. The issue arises only for the modules employed in the standard Run3 menu (e.g. HLTrigger/Configuration/python/HLT_GRun_cff.py). If those are covered by the default value provided in the fillDescriptions (for all use-cases) there is no need of customization functions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, done in : #44591

Copy link
Contributor

@Martin-Grunewald Martin-Grunewald Apr 2, 2024

Choose a reason for hiding this comment

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

14_0_4 parsing has those parameters present as UNTRACKED.
Thus also an entry in the customisation routine is needed to just remove the parameter by name.
Note it does not have to be present in the py config because fillDescriptions inserts the empty InputTag anyway. It is just that if it finds an untracked version with this PR, then it will fail!
Ie, when we update the HLT menus to 14_0_4 template (as in our devel branches)!

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.

7 participants