CMS 3D CMS Logo

pfParticleNetFromMiniAODAK8_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 from RecoBTag.FeatureTools.pfDeepBoostedJetTagInfos_cfi import pfDeepBoostedJetTagInfos
4 from RecoBTag.ONNXRuntime.boostedJetONNXJetTagsProducer_cfi import boostedJetONNXJetTagsProducer
5 from RecoBTag.FeatureTools.ParticleNetFeatureEvaluator_cfi import ParticleNetFeatureEvaluator
6 from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK8DiscriminatorsJetTags_cfi import pfParticleNetFromMiniAODAK8DiscriminatorsJetTags
7 from RecoBTag.ONNXRuntime.particleNetSonicJetTagsProducer_cfi import particleNetSonicJetTagsProducer as _particleNetSonicJetTagsProducer
8 from Configuration.ProcessModifiers.particleNetSonicTriton_cff import particleNetSonicTriton
9 
10 pfParticleNetFromMiniAODAK8TagInfos = ParticleNetFeatureEvaluator.clone(
11  jets = "slimmedJetsAK8",
12  jet_radius = 0.8,
13  min_jet_pt = 180,
14  min_jet_eta = 0.,
15  max_jet_eta = 2.5,
16 )
17 
18 
19 pfParticleNetFromMiniAODAK8JetTags = boostedJetONNXJetTagsProducer.clone(
20  src = 'pfParticleNetFromMiniAODAK8TagInfos',
21  preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK8/preprocess.json',
22  model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK8/modelfile/model.onnx',
23  flav_names = ['probHtt','probHtm','probHte','probHbb', 'probHcc', 'probHqq', 'probHgg','probQCD2hf','probQCD1hf','probQCD0hf','masscorr'],
24 )
25 
26 particleNetSonicTriton.toReplaceWith(pfParticleNetFromMiniAODAK8JetTags, _particleNetSonicJetTagsProducer.clone(
27  src = 'pfParticleNetFromMiniAODAK8TagInfos',
28  preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK8/preprocess.json',
29  Client = cms.PSet(
30  timeout = cms.untracked.uint32(300),
31  mode = cms.string("Async"),
32  modelName = cms.string("particleNetFromMiniAODAK8"),
33  modelConfigPath = cms.FileInPath("RecoBTag/Combined/data/models/particleNetFromMiniAODAK8/config.pbtxt"),
34  modelVersion = cms.string(""),
35  verbose = cms.untracked.bool(False),
36  allowedTries = cms.untracked.uint32(0),
37  useSharedMemory = cms.untracked.bool(True),
38  compression = cms.untracked.string(""),
39  ),
40  flav_names = pfParticleNetFromMiniAODAK8JetTags.flav_names,
41 ))
42 
43 pfParticleNetFromMiniAODAK8Task = cms.Task( pfParticleNetFromMiniAODAK8TagInfos, pfParticleNetFromMiniAODAK8JetTags)
44 
45 # declare all the discriminators
46 # probs
47 _pfParticleNetFromMiniAODAK8JetTagsProbs = ['pfParticleNetFromMiniAODAK8JetTags:' + flav_name
48  for flav_name in pfParticleNetFromMiniAODAK8JetTags.flav_names]
49 _pfParticleNetFromMiniAODAK8JetTagsMetaDiscr = ['pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:' + disc.name.value()
50  for disc in pfParticleNetFromMiniAODAK8DiscriminatorsJetTags.discriminators]
51 
52 _pfParticleNetFromMiniAODAK8JetTagsAll = _pfParticleNetFromMiniAODAK8JetTagsProbs + _pfParticleNetFromMiniAODAK8JetTagsMetaDiscr