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.MXNet.boostedJetMXNetJetTagsProducer_cfi import boostedJetMXNetJetTagsProducer
5 from RecoBTag.MXNet.Parameters.ParticleNet.V00.pfParticleNetPreprocessParams_cfi import pfParticleNetPreprocessParams, pfMassDecorrelatedParticleNetPreprocessParams
6 from RecoBTag.MXNet.pfParticleNetDiscriminatorsJetTags_cfi import pfParticleNetDiscriminatorsJetTags
7 from RecoBTag.MXNet.pfMassDecorrelatedParticleNetDiscriminatorsJetTags_cfi import pfMassDecorrelatedParticleNetDiscriminatorsJetTags
8 
9 pfParticleNetTagInfos = pfDeepBoostedJetTagInfos.clone(
10  use_puppiP4 = False
11 )
12 
13 pfParticleNetJetTags = boostedJetMXNetJetTagsProducer.clone(
14  preprocessParams = pfParticleNetPreprocessParams,
15  model_path = 'RecoBTag/Combined/data/ParticleNetAK8/General/V00/ParticleNet-symbol.json',
16  param_path = 'RecoBTag/Combined/data/ParticleNetAK8/General/V00/ParticleNet-0000.params',
17 )
18 
19 pfMassDecorrelatedParticleNetJetTags = boostedJetMXNetJetTagsProducer.clone(
20  preprocessParams = pfMassDecorrelatedParticleNetPreprocessParams,
21  model_path = 'RecoBTag/Combined/data/ParticleNetAK8/MD-2prong/V00/ParticleNet-symbol.json',
22  param_path = 'RecoBTag/Combined/data/ParticleNetAK8/MD-2prong/V00/ParticleNet-0000.params',
23  flav_names = ["probXbb", "probXcc", "probXqq", "probQCDbb", "probQCDcc",
24  "probQCDb", "probQCDc", "probQCDothers"],
25 )
26 
27 from CommonTools.PileupAlgos.Puppi_cff import puppi
28 from PhysicsTools.PatAlgos.slimming.primaryVertexAssociation_cfi import primaryVertexAssociation
29 
30 # This task is not used, useful only if we run it from RECO jets (RECO/AOD)
31 pfParticleNetTask = cms.Task(puppi, primaryVertexAssociation, pfParticleNetTagInfos,
32  pfParticleNetJetTags, pfMassDecorrelatedParticleNetJetTags, pfParticleNetDiscriminatorsJetTags)
33 
34 # declare all the discriminators
35 # nominal: probs
36 _pfParticleNetJetTagsProbs = ['pfParticleNetJetTags:' + flav_name
37  for flav_name in pfParticleNetJetTags.flav_names]
38 # nominal: meta-taggers
39 _pfParticleNetJetTagsMetaDiscrs = ['pfParticleNetDiscriminatorsJetTags:' + disc.name.value()
40  for disc in pfParticleNetDiscriminatorsJetTags.discriminators]
41 # mass-decorrelated: probs
42 _pfMassDecorrelatedParticleNetJetTagsProbs = ['pfMassDecorrelatedParticleNetJetTags:' + flav_name
43  for flav_name in pfMassDecorrelatedParticleNetJetTags.flav_names]
44 # mass-decorrelated: meta-taggers
45 _pfMassDecorrelatedParticleNetJetTagsMetaDiscrs = ['pfMassDecorrelatedParticleNetDiscriminatorsJetTags:' + disc.name.value()
46  for disc in pfMassDecorrelatedParticleNetDiscriminatorsJetTags.discriminators]
47 
48 _pfParticleNetJetTagsAll = _pfParticleNetJetTagsProbs + _pfParticleNetJetTagsMetaDiscrs + \
49  _pfMassDecorrelatedParticleNetJetTagsProbs + _pfMassDecorrelatedParticleNetJetTagsMetaDiscrs
Puppi_cff
primaryVertexAssociation_cfi