1 import FWCore.ParameterSet.Config
as cms
3 from RecoBTag.FeatureTools.pfDeepBoostedJetTagInfos_cfi
import pfDeepBoostedJetTagInfos
4 from RecoBTag.ONNXRuntime.boostedJetONNXJetTagsProducer_cfi
import boostedJetONNXJetTagsProducer
5 from RecoBTag.ONNXRuntime.particleNetSonicJetTagsProducer_cfi
import particleNetSonicJetTagsProducer
as _particleNetSonicJetTagsProducer
6 from RecoBTag.ONNXRuntime.pfParticleNetDiscriminatorsJetTags_cfi
import pfParticleNetDiscriminatorsJetTags
7 from RecoBTag.ONNXRuntime.pfMassDecorrelatedParticleNetDiscriminatorsJetTags_cfi
import pfMassDecorrelatedParticleNetDiscriminatorsJetTags
8 from Configuration.ProcessModifiers.particleNetSonicTriton_cff
import particleNetSonicTriton
9 from Configuration.ProcessModifiers.particleNetPTSonicTriton_cff
import particleNetPTSonicTriton
11 pfParticleNetTagInfos = pfDeepBoostedJetTagInfos.clone(
15 pfParticleNetJetTags = boostedJetONNXJetTagsProducer.clone(
16 src =
'pfParticleNetTagInfos',
17 preprocess_json =
'RecoBTag/Combined/data/ParticleNetAK8/General/V01/preprocess.json',
18 model_path =
'RecoBTag/Combined/data/ParticleNetAK8/General/V01/modelfile/model.onnx',
19 flav_names = [
"probTbcq",
"probTbqq",
"probTbc",
"probTbq",
"probTbel",
"probTbmu",
"probTbta",
20 "probWcq",
"probWqq",
"probZbb",
"probZcc",
"probZqq",
"probHbb",
"probHcc",
21 "probHqqqq",
"probQCDbb",
"probQCDcc",
"probQCDb",
"probQCDc",
"probQCDothers"],
24 particleNetSonicTriton.toReplaceWith(pfParticleNetJetTags, _particleNetSonicJetTagsProducer.clone(
25 src =
'pfParticleNetTagInfos',
26 preprocess_json =
'RecoBTag/Combined/data/ParticleNetAK8/General/V01/preprocess.json',
28 timeout = cms.untracked.uint32(300),
29 mode = cms.string(
"Async"),
30 modelName = cms.string(
"particlenet"),
31 modelConfigPath = cms.FileInPath(
"RecoBTag/Combined/data/models/particlenet/config.pbtxt"),
32 modelVersion = cms.string(
""),
33 verbose = cms.untracked.bool(
False),
34 allowedTries = cms.untracked.uint32(0),
35 useSharedMemory = cms.untracked.bool(
True),
36 compression = cms.untracked.string(
""),
38 flav_names = pfParticleNetJetTags.flav_names,
41 (particleNetSonicTriton & particleNetPTSonicTriton).toModify(pfParticleNetJetTags,
42 preprocess_json =
'RecoBTag/Combined/data/ParticleNetAK8/General/V01/preprocess_PT.json',
44 modelName =
"particlenet_PT",
45 modelConfigPath = cms.FileInPath(
"RecoBTag/Combined/data/models/particlenet_PT/config.pbtxt"),
49 pfMassDecorrelatedParticleNetJetTags = boostedJetONNXJetTagsProducer.clone(
50 src =
'pfParticleNetTagInfos',
51 preprocess_json =
'RecoBTag/Combined/data/ParticleNetAK8/MD-2prong/V01/preprocess.json',
52 model_path =
'RecoBTag/Combined/data/ParticleNetAK8/MD-2prong/V01/modelfile/model.onnx',
53 flav_names = [
"probXbb",
"probXcc",
"probXqq",
"probQCDbb",
"probQCDcc",
54 "probQCDb",
"probQCDc",
"probQCDothers"],
57 particleNetSonicTriton.toReplaceWith(pfMassDecorrelatedParticleNetJetTags, _particleNetSonicJetTagsProducer.clone(
58 src =
'pfParticleNetTagInfos',
59 preprocess_json =
'RecoBTag/Combined/data/ParticleNetAK8/MD-2prong/V01/preprocess.json',
61 timeout = cms.untracked.uint32(300),
62 modelName = cms.string(
"particlenet_AK8_MD-2prong"),
63 mode = cms.string(
"Async"),
64 modelConfigPath = cms.FileInPath(
"RecoBTag/Combined/data/models/particlenet_AK8_MD-2prong/config.pbtxt"),
65 modelVersion = cms.string(
""),
66 verbose = cms.untracked.bool(
False),
67 allowedTries = cms.untracked.uint32(0),
69 flav_names = pfMassDecorrelatedParticleNetJetTags.flav_names,
72 (particleNetSonicTriton & particleNetPTSonicTriton).toModify(pfMassDecorrelatedParticleNetJetTags,
73 preprocess_json =
'RecoBTag/Combined/data/ParticleNetAK8/MD-2prong/V01/preprocess_PT.json',
75 modelName =
"particlenet_AK8_MD-2prong_PT",
76 modelConfigPath = cms.FileInPath(
"RecoBTag/Combined/data/models/particlenet_AK8_MD-2prong_PT/config.pbtxt"),
80 pfParticleNetMassRegressionJetTags = boostedJetONNXJetTagsProducer.clone(
81 src =
'pfParticleNetTagInfos',
82 preprocess_json =
'RecoBTag/Combined/data/ParticleNetAK8/MassRegression/V01/preprocess.json',
83 model_path =
'RecoBTag/Combined/data/ParticleNetAK8/MassRegression/V01/modelfile/model.onnx',
84 flav_names = [
"mass"],
87 particleNetSonicTriton.toReplaceWith(pfParticleNetMassRegressionJetTags, _particleNetSonicJetTagsProducer.clone(
88 src =
'pfParticleNetTagInfos',
89 preprocess_json =
'RecoBTag/Combined/data/ParticleNetAK8/MassRegression/V01/preprocess.json',
91 timeout = cms.untracked.uint32(300),
92 modelName = cms.string(
"particlenet_AK8_MassRegression"),
93 mode = cms.string(
"Async"),
94 modelConfigPath = cms.FileInPath(
"RecoBTag/Combined/data/models/particlenet_AK8_MassRegression/config.pbtxt"),
95 modelVersion = cms.string(
""),
96 verbose = cms.untracked.bool(
False),
97 allowedTries = cms.untracked.uint32(0),
99 flav_names = pfParticleNetMassRegressionJetTags.flav_names,
102 (particleNetSonicTriton & particleNetPTSonicTriton).toModify(pfParticleNetMassRegressionJetTags,
103 preprocess_json =
'RecoBTag/Combined/data/ParticleNetAK8/MassRegression/V01/preprocess_PT.json',
105 modelName =
"particlenet_AK8_MassRegression_PT",
106 modelConfigPath = cms.FileInPath(
"RecoBTag/Combined/data/models/particlenet_AK8_MassRegression_PT/config.pbtxt"),
114 pfParticleNetTask = cms.Task(puppi, primaryVertexAssociation, pfParticleNetTagInfos,
115 pfParticleNetJetTags, pfMassDecorrelatedParticleNetJetTags, pfParticleNetMassRegressionJetTags,
116 pfParticleNetDiscriminatorsJetTags, pfMassDecorrelatedParticleNetDiscriminatorsJetTags)
120 _pfParticleNetJetTagsProbs = [
'pfParticleNetJetTags:' + flav_name
121 for flav_name
in pfParticleNetJetTags.flav_names]
124 _pfParticleNetJetTagsMetaDiscrs = [
'pfParticleNetDiscriminatorsJetTags:' + disc.name.value()
125 for disc
in pfParticleNetDiscriminatorsJetTags.discriminators]
127 _pfMassDecorrelatedParticleNetJetTagsProbs = [
'pfMassDecorrelatedParticleNetJetTags:' + flav_name
128 for flav_name
in pfMassDecorrelatedParticleNetJetTags.flav_names]
131 _pfMassDecorrelatedParticleNetJetTagsMetaDiscrs = [
'pfMassDecorrelatedParticleNetDiscriminatorsJetTags:' + disc.name.value()
132 for disc
in pfMassDecorrelatedParticleNetDiscriminatorsJetTags.discriminators]
134 _pfParticleNetMassRegressionOutputs = [
'pfParticleNetMassRegressionJetTags:' + flav_name
135 for flav_name
in pfParticleNetMassRegressionJetTags.flav_names]
137 _pfParticleNetJetTagsAll = _pfParticleNetJetTagsProbs + _pfParticleNetJetTagsMetaDiscrs + \
138 _pfMassDecorrelatedParticleNetJetTagsProbs + _pfMassDecorrelatedParticleNetJetTagsMetaDiscrs
140 _pfParticleNetMassCorrelatedJetTagsAll = _pfParticleNetJetTagsProbs + _pfParticleNetJetTagsMetaDiscrs