CMS 3D CMS Logo

pfParticleNet_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.ONNXRuntime.pfParticleNetDiscriminatorsJetTags_cfi import pfParticleNetDiscriminatorsJetTags
6 from RecoBTag.ONNXRuntime.pfMassDecorrelatedParticleNetDiscriminatorsJetTags_cfi import pfMassDecorrelatedParticleNetDiscriminatorsJetTags
7 
8 pfParticleNetTagInfos = pfDeepBoostedJetTagInfos.clone(
9  use_puppiP4 = False
10 )
11 
12 pfParticleNetJetTags = boostedJetONNXJetTagsProducer.clone(
13  src = 'pfParticleNetTagInfos',
14  preprocess_json = 'RecoBTag/Combined/data/ParticleNetAK8/General/V01/preprocess.json',
15  model_path = 'RecoBTag/Combined/data/ParticleNetAK8/General/V01/particle-net.onnx',
16  flav_names = ["probTbcq", "probTbqq", "probTbc", "probTbq", "probTbel", "probTbmu", "probTbta",
17  "probWcq", "probWqq", "probZbb", "probZcc", "probZqq", "probHbb", "probHcc",
18  "probHqqqq", "probQCDbb", "probQCDcc", "probQCDb", "probQCDc", "probQCDothers"],
19 )
20 
21 pfMassDecorrelatedParticleNetJetTags = boostedJetONNXJetTagsProducer.clone(
22  src = 'pfParticleNetTagInfos',
23  preprocess_json = 'RecoBTag/Combined/data/ParticleNetAK8/MD-2prong/V01/preprocess.json',
24  model_path = 'RecoBTag/Combined/data/ParticleNetAK8/MD-2prong/V01/particle-net.onnx',
25  flav_names = ["probXbb", "probXcc", "probXqq", "probQCDbb", "probQCDcc",
26  "probQCDb", "probQCDc", "probQCDothers"],
27 )
28 
29 from CommonTools.PileupAlgos.Puppi_cff import puppi
30 from PhysicsTools.PatAlgos.slimming.primaryVertexAssociation_cfi import primaryVertexAssociation
31 
32 # This task is not used, useful only if we run it from RECO jets (RECO/AOD)
33 pfParticleNetTask = cms.Task(puppi, primaryVertexAssociation, pfParticleNetTagInfos,
34  pfParticleNetJetTags, pfMassDecorrelatedParticleNetJetTags, pfParticleNetDiscriminatorsJetTags)
35 
36 # declare all the discriminators
37 # nominal: probs
38 _pfParticleNetJetTagsProbs = ['pfParticleNetJetTags:' + flav_name
39  for flav_name in pfParticleNetJetTags.flav_names]
40 # nominal: meta-taggers
41 _pfParticleNetJetTagsMetaDiscrs = ['pfParticleNetDiscriminatorsJetTags:' + disc.name.value()
42  for disc in pfParticleNetDiscriminatorsJetTags.discriminators]
43 # mass-decorrelated: probs
44 _pfMassDecorrelatedParticleNetJetTagsProbs = ['pfMassDecorrelatedParticleNetJetTags:' + flav_name
45  for flav_name in pfMassDecorrelatedParticleNetJetTags.flav_names]
46 # mass-decorrelated: meta-taggers
47 _pfMassDecorrelatedParticleNetJetTagsMetaDiscrs = ['pfMassDecorrelatedParticleNetDiscriminatorsJetTags:' + disc.name.value()
48  for disc in pfMassDecorrelatedParticleNetDiscriminatorsJetTags.discriminators]
49 
50 _pfParticleNetJetTagsAll = _pfParticleNetJetTagsProbs + _pfParticleNetJetTagsMetaDiscrs + \
51  _pfMassDecorrelatedParticleNetJetTagsProbs + _pfMassDecorrelatedParticleNetJetTagsMetaDiscrs
Puppi_cff
primaryVertexAssociation_cfi