Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:24:29

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from RecoBTag.FeatureTools.pfDeepBoostedJetTagInfos_cfi import pfDeepBoostedJetTagInfos
0004 from RecoBTag.ONNXRuntime.boostedJetONNXJetTagsProducer_cfi import boostedJetONNXJetTagsProducer
0005 from RecoBTag.FeatureTools.ParticleNetFeatureEvaluator_cfi import ParticleNetFeatureEvaluator
0006 from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK8DiscriminatorsJetTags_cfi import pfParticleNetFromMiniAODAK8DiscriminatorsJetTags
0007 from RecoBTag.ONNXRuntime.particleNetSonicJetTagsProducer_cfi import particleNetSonicJetTagsProducer as _particleNetSonicJetTagsProducer
0008 from Configuration.ProcessModifiers.particleNetSonicTriton_cff import particleNetSonicTriton
0009 
0010 pfParticleNetFromMiniAODAK8TagInfos = ParticleNetFeatureEvaluator.clone(
0011     jets = "slimmedJetsAK8",
0012     jet_radius = 0.8,
0013     min_jet_pt = 180,
0014     min_jet_eta = 0.,
0015     max_jet_eta = 2.5,
0016 )
0017 
0018 
0019 pfParticleNetFromMiniAODAK8JetTags = boostedJetONNXJetTagsProducer.clone(
0020     src = 'pfParticleNetFromMiniAODAK8TagInfos',
0021     preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK8/preprocess.json',
0022     model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK8/modelfile/model.onnx',
0023     flav_names = ['probHtt','probHtm','probHte','probHbb', 'probHcc', 'probHqq', 'probHgg','probQCD2hf','probQCD1hf','probQCD0hf','masscorr'],
0024 )
0025 
0026 particleNetSonicTriton.toReplaceWith(pfParticleNetFromMiniAODAK8JetTags, _particleNetSonicJetTagsProducer.clone(
0027     src = 'pfParticleNetFromMiniAODAK8TagInfos',
0028     preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK8/preprocess.json',
0029     Client = cms.PSet(
0030         timeout = cms.untracked.uint32(300),
0031         mode = cms.string("Async"),
0032         modelName = cms.string("particleNetFromMiniAODAK8"),
0033         modelConfigPath = cms.FileInPath("RecoBTag/Combined/data/models/particleNetFromMiniAODAK8/config.pbtxt"),
0034         modelVersion = cms.string(""),
0035         verbose = cms.untracked.bool(False),
0036         allowedTries = cms.untracked.uint32(0),
0037         useSharedMemory = cms.untracked.bool(True),
0038         compression = cms.untracked.string(""),
0039     ),
0040     flav_names = pfParticleNetFromMiniAODAK8JetTags.flav_names,
0041 ))
0042 
0043 pfParticleNetFromMiniAODAK8Task = cms.Task( pfParticleNetFromMiniAODAK8TagInfos, pfParticleNetFromMiniAODAK8JetTags)
0044 
0045 # declare all the discriminators
0046 # probs
0047 _pfParticleNetFromMiniAODAK8JetTagsProbs = ['pfParticleNetFromMiniAODAK8JetTags:' + flav_name
0048                                  for flav_name in pfParticleNetFromMiniAODAK8JetTags.flav_names]
0049 _pfParticleNetFromMiniAODAK8JetTagsMetaDiscr = ['pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:' + disc.name.value()
0050                                  for disc in pfParticleNetFromMiniAODAK8DiscriminatorsJetTags.discriminators]
0051 
0052 _pfParticleNetFromMiniAODAK8JetTagsAll = _pfParticleNetFromMiniAODAK8JetTagsProbs + _pfParticleNetFromMiniAODAK8JetTagsMetaDiscr