Add function to refine FastSim DeepJet discriminators #40550
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR description:
Requires: cms-data/PhysicsTools-NanoAOD#14
This PR adds a function that uses a regression neural network to refine the DeepJet discriminators of CHS jets in NanoAOD for FastSim to better match FullSim. The function can be called by including the option
--customise PhysicsTools/NanoAOD/jetsAK4_CHS_cff.nanoAOD_refineFastSim_bTagDeepFlavin the cmsDriver command and requires the ONNX model added in the above mentioned PR to cms-data. The original values are copied to new variables named with the suffix "unrefined".Due to a bug in ONNX runtime 1.10.0 (see here) graph optimization has to be disabled to evaluate the model. The corresponding option is implemented in BaseMVAValueMapProducer for the ONNX backend.
The technique has been presented at the FastSim Days 2022 Workshop.
A complete set of commands to produce NanoAOD files with refined DeepJet discriminators is:
cmsDriver.py TTbar_13TeV_TuneCUETP8M1_cfi --relval 100000,1000 -s GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid,L1,DIGI2RAW,L1Reco,RECO,VALIDATION:@standardValidation,DQM:@standardDQMFS -n 10 --conditions auto:run2_mc --beamspot Realistic25ns13TeV2016Collision --datatier GEN-SIM-DIGI-RECO,DQMIO --eventcontent FEVTDEBUGHLT,DQM --fast --era Run2_2016 GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid,L1,DIGI2RAW,L1Reco,RECO,VALIDATION:@standardValidation,DQM:@standardDQMFScmsDriver.py step3 -s PAT --era Run2_2016 -n -1 --conditions auto:run2_mc --mc --datatier MINIAODSIM --eventcontent MINIAODSIM --filein file:TTbar_13TeV_TuneCUETP8M1_cfi_GEN_SIM_RECOBEFMIX_DIGI_L1_DIGI2RAW_L1Reco_RECO_VALIDATION_DQM.root --fastcmsDriver.py --python_filename NanoAODrefined_cfg.py --eventcontent NANOAODSIM --fast --customise Configuration/DataProcessing/Utils.addMonitoring,PhysicsTools/NanoAOD/jetsAK4_CHS_cff.nanoAOD_refineFastSim_bTagDeepFlav --datatier NANOAODSIM --fileout file:step3_NANO.root --conditions auto:run2_mc --step NANO --filein "file:step3_PAT.root" --era run2_nanoAOD_106Xv2 --mc -n -1PR validation:
The neural network has been trained on GEN-synchronized FastSim/FullSim jet pairs from SUSY simplified model T1tttt events and has been validated also in TTbar events. In both cases, considerably improved agreement with the FullSim output and an improvement in correlations among output observables and external parameters is seen.
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:
Before submitting your pull requests, make sure you followed this checklist: