CMS 3D CMS Logo

pfParticleTransformerAK4_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 from RecoBTag.FeatureTools.pfParticleTransformerAK4TagInfos_cfi import pfParticleTransformerAK4TagInfos
4 
5 from RecoBTag.ONNXRuntime.pfParticleTransformerAK4JetTags_cfi import pfParticleTransformerAK4JetTags
6 from RecoBTag.ONNXRuntime.pfParticleTransformerAK4DiscriminatorsJetTags_cfi import pfParticleTransformerAK4DiscriminatorsJetTags
7 from CommonTools.PileupAlgos.Puppi_cff import puppi
8 from CommonTools.RecoAlgos.primaryVertexAssociation_cfi import primaryVertexAssociation
9 
10 # declare all the discriminators
11 # probs
12 _pfParticleTransformerAK4JetTagsProbs = ['pfParticleTransformerAK4JetTags:' + flav_name
13  for flav_name in pfParticleTransformerAK4JetTags.flav_names]
14 # meta-taggers
15 _pfParticleTransformerAK4JetTagsMetaDiscrs = ['pfParticleTransformerAK4DiscriminatorsJetTags:' + disc.name.value()
16  for disc in pfParticleTransformerAK4DiscriminatorsJetTags.discriminators]
17 _pfParticleTransformerAK4JetTagsAll = _pfParticleTransformerAK4JetTagsProbs + _pfParticleTransformerAK4JetTagsMetaDiscrs
18 
19 
20 
21 # ==
22 # This task is not used, useful only if we run it from RECO jets (RECO/AOD)
23 pfParticleTransformerAK4Task = cms.Task(puppi, primaryVertexAssociation,
24  pfParticleTransformerAK4TagInfos, pfParticleTransformerAK4JetTags,
25  pfParticleTransformerAK4DiscriminatorsJetTags)
26 # run from MiniAOD instead
27 pfParticleTransformerAK4FromMiniAODTask = cms.Task(pfParticleTransformerAK4TagInfos,
28  pfParticleTransformerAK4JetTags,
29  pfParticleTransformerAK4DiscriminatorsJetTags)
30 
31 # === Negative tags ===
32 pfNegativeParticleTransformerAK4TagInfos = pfParticleTransformerAK4TagInfos.clone(
33  flip = True,
34  secondary_vertices = 'inclusiveCandidateNegativeSecondaryVertices',
35 )
36 pfNegativeParticleTransformerAK4JetTags = pfParticleTransformerAK4JetTags.clone(
37  src = 'pfNegativeParticleTransformerAK4TagInfos',
38 )
39 
40 # probs
41 _pfNegativeParticleTransformerAK4JetTagsProbs = ['pfNegativeParticleTransformerAK4JetTags:' + flav_name
42  for flav_name in pfParticleTransformerAK4JetTags.flav_names]