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.pfParticleNetAK4DiscriminatorsJetTags_cfi
import pfParticleNetAK4DiscriminatorsJetTags
7 from Configuration.ProcessModifiers.particleNetSonicTriton_cff
import particleNetSonicTriton
8 from Configuration.ProcessModifiers.particleNetPTSonicTriton_cff
import particleNetPTSonicTriton
10 pfParticleNetAK4TagInfos = pfDeepBoostedJetTagInfos.clone(
11 jets =
"ak4PFJetsCHS",
18 pfParticleNetAK4TagInfosForRECO = pfParticleNetAK4TagInfos.clone(
23 pfParticleNetAK4JetTags = boostedJetONNXJetTagsProducer.clone(
24 src =
'pfParticleNetAK4TagInfos',
25 preprocess_json =
'RecoBTag/Combined/data/ParticleNetAK4/CHS/V00/preprocess.json',
26 model_path =
'RecoBTag/Combined/data/ParticleNetAK4/CHS/V00/modelfile/model.onnx',
27 flav_names = [
"probb",
"probbb",
"probc",
"probcc",
"probuds",
"probg",
"probundef",
"probpu"],
30 pfParticleNetAK4JetTagsForRECO = pfParticleNetAK4JetTags.clone(
31 src =
'pfParticleNetAK4TagInfosForRECO',
34 pfParticleNetAK4DiscriminatorsJetTagsForRECO = pfParticleNetAK4DiscriminatorsJetTags.clone()
35 for discriminator
in pfParticleNetAK4DiscriminatorsJetTagsForRECO.discriminators:
36 for num
in discriminator.numerator:
37 num.setModuleLabel(
"pfParticleNetAK4JetTagsForRECO");
38 for den
in discriminator.denominator:
39 den.setModuleLabel(
"pfParticleNetAK4JetTagsForRECO");
41 particleNetSonicTriton.toReplaceWith(pfParticleNetAK4JetTags, _particleNetSonicJetTagsProducer.clone(
42 src =
'pfParticleNetAK4TagInfos',
43 preprocess_json =
'RecoBTag/Combined/data/ParticleNetAK4/CHS/V00/preprocess.json',
45 timeout = cms.untracked.uint32(300),
46 mode = cms.string(
"Async"),
47 modelName = cms.string(
"particlenet_AK4"),
48 modelConfigPath = cms.FileInPath(
"RecoBTag/Combined/data/models/particlenet_AK4/config.pbtxt"),
49 modelVersion = cms.string(
""),
50 verbose = cms.untracked.bool(
False),
51 allowedTries = cms.untracked.uint32(0),
52 useSharedMemory = cms.untracked.bool(
True),
53 compression = cms.untracked.string(
""),
55 flav_names = pfParticleNetAK4JetTags.flav_names,
58 (particleNetSonicTriton & particleNetPTSonicTriton).toModify(pfParticleNetAK4JetTags,
59 preprocess_json =
'RecoBTag/Combined/data/ParticleNetAK4/CHS/V00/preprocess_PT.json',
61 modelName =
"particlenet_AK4_PT",
62 modelConfigPath = cms.FileInPath(
"RecoBTag/Combined/data/models/particlenet_AK4_PT/config.pbtxt"),
70 pfParticleNetAK4Task = cms.Task(puppi, primaryVertexAssociation, pfParticleNetAK4TagInfos,
71 pfParticleNetAK4JetTags, pfParticleNetAK4DiscriminatorsJetTags)
72 pfParticleNetAK4TaskForRECO = cms.Task(puppi, primaryVertexAssociation, pfParticleNetAK4TagInfosForRECO,
73 pfParticleNetAK4JetTagsForRECO, pfParticleNetAK4DiscriminatorsJetTagsForRECO)
77 _pfParticleNetAK4JetTagsProbs = [
'pfParticleNetAK4JetTags:' + flav_name
78 for flav_name
in pfParticleNetAK4JetTags.flav_names]
80 _pfParticleNetAK4JetTagsMetaDiscrs = [
'pfParticleNetAK4DiscriminatorsJetTags:' + disc.name.value()
81 for disc
in pfParticleNetAK4DiscriminatorsJetTags.discriminators]
82 _pfParticleNetAK4JetTagsAll = _pfParticleNetAK4JetTagsProbs + _pfParticleNetAK4JetTagsMetaDiscrs
86 pfNegativeParticleNetAK4TagInfos = pfParticleNetAK4TagInfos.clone(
89 secondary_vertices =
'inclusiveCandidateNegativeSecondaryVertices',
92 pfNegativeParticleNetAK4JetTags = pfParticleNetAK4JetTags.clone(
93 src =
'pfNegativeParticleNetAK4TagInfos',
97 _pfNegativeParticleNetAK4JetTagsProbs = [
'pfNegativeParticleNetAK4JetTags:' + flav_name
98 for flav_name
in pfNegativeParticleNetAK4JetTags.flav_names]