CMS 3D CMS Logo

pfParticleNetFromMiniAODAK4_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
7 
8 pfParticleNetFromMiniAODAK4CHSCentralTagInfos = ParticleNetFeatureEvaluator.clone(
9  jets = "slimmedJets",
10  jet_radius = 0.4,
11  min_jet_pt = 15,
12  min_jet_eta = 0.,
13  max_jet_eta = 2.5,
14 )
15 
16 pfParticleNetFromMiniAODAK4CHSForwardTagInfos = ParticleNetFeatureEvaluator.clone(
17  jets = "slimmedJets",
18  jet_radius = 0.4,
19  min_jet_pt = 15,
20  min_jet_eta = 2.5,
21  max_jet_eta = 4.7,
22 )
23 
24 pfParticleNetFromMiniAODAK4PuppiCentralTagInfos = ParticleNetFeatureEvaluator.clone(
25  jets = "slimmedJetsPuppi",
26  jet_radius = 0.4,
27  min_jet_pt = 15,
28  min_jet_eta = 0.,
29  max_jet_eta = 2.5,
30 )
31 
32 pfParticleNetFromMiniAODAK4PuppiForwardTagInfos = ParticleNetFeatureEvaluator.clone(
33  jets = "slimmedJetsPuppi",
34  jet_radius = 0.4,
35  min_jet_pt = 15,
36  min_jet_eta = 2.5,
37  max_jet_eta = 4.7,
38 )
39 
40 
41 pfParticleNetFromMiniAODAK4CHSCentralJetTags = boostedJetONNXJetTagsProducer.clone(
42  src = 'pfParticleNetFromMiniAODAK4CHSCentralTagInfos',
43  preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/CHS/Central/preprocess.json',
44  model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/CHS/Central/particle-net.onnx',
45  flav_names = ['probmu','probele','probtaup1h0p','probtaup1h1p','probtaup1h2p','probtaup3h0p','probtaup3h1p','probtaum1h0p','probtaum1h1p','probtaum1h2p','probtaum3h0p','probtaum3h1p','probb','probc','probuds','probg','ptcorr','ptreshigh','ptreslow','ptnu'],
46 )
47 
48 pfParticleNetFromMiniAODAK4CHSForwardJetTags = boostedJetONNXJetTagsProducer.clone(
49  src = 'pfParticleNetFromMiniAODAK4CHSForwardTagInfos',
50  preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/CHS/Forward/preprocess.json',
51  model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/CHS/Forward/particle-net.onnx',
52  flav_names = ['probq','probg','ptcorr','ptreshigh','ptreslow','ptnu'],
53 )
54 
55 pfParticleNetFromMiniAODAK4PuppiCentralJetTags = boostedJetONNXJetTagsProducer.clone(
56  src = 'pfParticleNetFromMiniAODAK4PuppiCentralTagInfos',
57  preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/PUPPI/Central/preprocess.json',
58  model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/PUPPI/Central/particle-net.onnx',
59  flav_names = ['probmu','probele','probtaup1h0p','probtaup1h1p','probtaup1h2p','probtaup3h0p','probtaup3h1p','probtaum1h0p','probtaum1h1p','probtaum1h2p','probtaum3h0p','probtaum3h1p','probb','probc','probuds','probg','ptcorr','ptreshigh','ptreslow','ptnu'],
60 )
61 
62 pfParticleNetFromMiniAODAK4PuppiForwardJetTags = boostedJetONNXJetTagsProducer.clone(
63  src = 'pfParticleNetFromMiniAODAK4PuppiForwardTagInfos',
64  preprocess_json = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/PUPPI/Forward/preprocess.json',
65  model_path = 'RecoBTag/Combined/data/ParticleNetFromMiniAODAK4/PUPPI/Forward/particle-net.onnx',
66  flav_names = ['probq','probg','ptcorr','ptreshigh','ptreslow','ptnu'],
67 )
68 
69 pfParticleNetFromMiniAODAK4CHSTask = cms.Task( pfParticleNetFromMiniAODAK4CHSCentralTagInfos, pfParticleNetFromMiniAODAK4CHSForwardTagInfos, pfParticleNetFromMiniAODAK4CHSCentralJetTags, pfParticleNetFromMiniAODAK4CHSForwardJetTags)
70 pfParticleNetFromMiniAODAK4PuppiTask = cms.Task( pfParticleNetFromMiniAODAK4PuppiCentralTagInfos, pfParticleNetFromMiniAODAK4PuppiForwardTagInfos, pfParticleNetFromMiniAODAK4PuppiCentralJetTags, pfParticleNetFromMiniAODAK4PuppiForwardJetTags)
71 
72 # declare all the discriminators
73 # probs
74 _pfParticleNetFromMiniAODAK4CHSCentralJetTagsProbs = ['pfParticleNetFromMiniAODAK4CHSCentralJetTags:' + flav_name
75  for flav_name in pfParticleNetFromMiniAODAK4CHSCentralJetTags.flav_names]
76 _pfParticleNetFromMiniAODAK4CHSForwardJetTagsProbs = ['pfParticleNetFromMiniAODAK4CHSForwardJetTags:' + flav_name
77  for flav_name in pfParticleNetFromMiniAODAK4CHSForwardJetTags.flav_names]
78 _pfParticleNetFromMiniAODAK4PuppiCentralJetTagsProbs = ['pfParticleNetFromMiniAODAK4PuppiCentralJetTags:' + flav_name
79  for flav_name in pfParticleNetFromMiniAODAK4PuppiCentralJetTags.flav_names]
80 _pfParticleNetFromMiniAODAK4PuppiForwardJetTagsProbs = ['pfParticleNetFromMiniAODAK4PuppiForwardJetTags:' + flav_name
81  for flav_name in pfParticleNetFromMiniAODAK4PuppiForwardJetTags.flav_names]
82 
83 _pfParticleNetFromMiniAODAK4CHSCentralJetTagsMetaDiscr = ['pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:' + disc.name.value()
84  for disc in pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags.discriminators]
85 _pfParticleNetFromMiniAODAK4CHSForwardJetTagsMetaDiscr = ['pfParticleNetFromMiniAODAK4CHSForwardDiscriminatorsJetTags:' + disc.name.value()
86  for disc in pfParticleNetFromMiniAODAK4CHSForwardDiscriminatorsJetTags.discriminators]
87 _pfParticleNetFromMiniAODAK4PuppiCentralJetTagsMetaDiscr = ['pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags:' + disc.name.value()
88  for disc in pfParticleNetFromMiniAODAK4PuppiCentralDiscriminatorsJetTags.discriminators]
89 _pfParticleNetFromMiniAODAK4PuppiForwardJetTagsMetaDiscr = ['pfParticleNetFromMiniAODAK4PuppiForwardDiscriminatorsJetTags:' + disc.name.value()
90  for disc in pfParticleNetFromMiniAODAK4PuppiForwardDiscriminatorsJetTags.discriminators]
91 
92 _pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll = _pfParticleNetFromMiniAODAK4CHSCentralJetTagsProbs + _pfParticleNetFromMiniAODAK4CHSCentralJetTagsMetaDiscr
93 _pfParticleNetFromMiniAODAK4CHSForwardJetTagsAll = _pfParticleNetFromMiniAODAK4CHSForwardJetTagsProbs + _pfParticleNetFromMiniAODAK4CHSForwardJetTagsMetaDiscr
94 _pfParticleNetFromMiniAODAK4PuppiCentralJetTagsAll = _pfParticleNetFromMiniAODAK4PuppiCentralJetTagsProbs + _pfParticleNetFromMiniAODAK4PuppiCentralJetTagsMetaDiscr
95 _pfParticleNetFromMiniAODAK4PuppiForwardJetTagsAll = _pfParticleNetFromMiniAODAK4PuppiForwardJetTagsProbs + _pfParticleNetFromMiniAODAK4PuppiForwardJetTagsMetaDiscr