CMS 3D CMS Logo

pfDeepBoostedJet_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.pfDeepBoostedJetTags_cfi import pfDeepBoostedJetTags as _pfDeepBoostedJetTags
5 from RecoBTag.ONNXRuntime.Parameters.DeepBoostedJet.V02.pfDeepBoostedJetPreprocessParams_cfi import pfDeepBoostedJetPreprocessParams
6 from RecoBTag.ONNXRuntime.Parameters.DeepBoostedJet.V02.pfMassDecorrelatedDeepBoostedJetPreprocessParams_cfi import pfMassDecorrelatedDeepBoostedJetPreprocessParams
7 from RecoBTag.ONNXRuntime.pfDeepBoostedDiscriminatorsJetTags_cfi import pfDeepBoostedDiscriminatorsJetTags
8 from RecoBTag.ONNXRuntime.pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags_cfi import pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags
9 
10 # nominal DeepAK8
11 pfDeepBoostedJetTags = _pfDeepBoostedJetTags.clone(
12  preprocessParams = pfDeepBoostedJetPreprocessParams,
13  model_path = 'RecoBTag/Combined/data/DeepBoostedJet/V02/full/resnet.onnx',
14  debugMode = False, # debug
15 )
16 
17 # mass-decorrelated DeepAK8
18 pfMassDecorrelatedDeepBoostedJetTags = _pfDeepBoostedJetTags.clone(
19  preprocessParams = pfMassDecorrelatedDeepBoostedJetPreprocessParams,
20  model_path = 'RecoBTag/Combined/data/DeepBoostedJet/V02/decorrelated/resnet.onnx',
21  debugMode = False, # debug
22 )
23 
24 from CommonTools.PileupAlgos.Puppi_cff import puppi
25 from PhysicsTools.PatAlgos.slimming.primaryVertexAssociation_cfi import primaryVertexAssociation
26 
27 # This task is not used, useful only if we run DeepFlavour from RECO
28 # jets (RECO/AOD)
29 pfDeepBoostedJetTask = cms.Task(puppi, primaryVertexAssociation,
30  pfDeepBoostedJetTagInfos, pfDeepBoostedJetTags, pfMassDecorrelatedDeepBoostedJetTags,
31  pfDeepBoostedDiscriminatorsJetTags, pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags)
32 
33 # declare all the discriminators
34 # nominal: probs
35 _pfDeepBoostedJetTagsProbs = ['pfDeepBoostedJetTags:' + flav_name
36  for flav_name in pfDeepBoostedJetTags.flav_names]
37 # nominal: meta-taggers
38 _pfDeepBoostedJetTagsMetaDiscrs = ['pfDeepBoostedDiscriminatorsJetTags:' + disc.name.value()
39  for disc in pfDeepBoostedDiscriminatorsJetTags.discriminators]
40 
41 # mass-decorrelated: probs
42 _pfMassDecorrelatedDeepBoostedJetTagsProbs = ['pfMassDecorrelatedDeepBoostedJetTags:' + flav_name
43  for flav_name in pfMassDecorrelatedDeepBoostedJetTags.flav_names]
44 # mass-decorrelated: meta-taggers
45 _pfMassDecorrelatedDeepBoostedJetTagsMetaDiscrs = ['pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:' + disc.name.value()
46  for disc in pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags.discriminators]
47 
48 _pfDeepBoostedJetTagsAll = _pfDeepBoostedJetTagsProbs + _pfDeepBoostedJetTagsMetaDiscrs + \
49  _pfMassDecorrelatedDeepBoostedJetTagsProbs + _pfMassDecorrelatedDeepBoostedJetTagsMetaDiscrs
Puppi_cff
primaryVertexAssociation_cfi