Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-09 02:22:33

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from RecoBTag.FeatureTools.pfParticleTransformerAK4TagInfos_cfi import pfParticleTransformerAK4TagInfos
0004 
0005 from RecoBTag.ONNXRuntime.pfParticleTransformerAK4JetTags_cfi import pfParticleTransformerAK4JetTags
0006 from RecoBTag.ONNXRuntime.pfParticleTransformerAK4DiscriminatorsJetTags_cfi import pfParticleTransformerAK4DiscriminatorsJetTags
0007 from CommonTools.PileupAlgos.Puppi_cff import puppi
0008 from CommonTools.RecoAlgos.primaryVertexAssociation_cfi import primaryVertexAssociation
0009 
0010 # declare all the discriminators
0011 # probs
0012 _pfParticleTransformerAK4JetTagsProbs = ['pfParticleTransformerAK4JetTags:' + flav_name
0013                                  for flav_name in pfParticleTransformerAK4JetTags.flav_names]
0014 # meta-taggers
0015 _pfParticleTransformerAK4JetTagsMetaDiscrs = ['pfParticleTransformerAK4DiscriminatorsJetTags:' + disc.name.value()
0016                                       for disc in pfParticleTransformerAK4DiscriminatorsJetTags.discriminators]
0017 _pfParticleTransformerAK4JetTagsAll = _pfParticleTransformerAK4JetTagsProbs + _pfParticleTransformerAK4JetTagsMetaDiscrs
0018 
0019 
0020 
0021 # ==
0022 # This task is not used, useful only if we run it from RECO jets (RECO/AOD)
0023 pfParticleTransformerAK4Task = cms.Task(puppi, primaryVertexAssociation,
0024                              pfParticleTransformerAK4TagInfos, pfParticleTransformerAK4JetTags,
0025                              pfParticleTransformerAK4DiscriminatorsJetTags)
0026 # run from MiniAOD instead
0027 pfParticleTransformerAK4FromMiniAODTask = cms.Task(pfParticleTransformerAK4TagInfos,
0028                              pfParticleTransformerAK4JetTags,
0029                              pfParticleTransformerAK4DiscriminatorsJetTags)
0030 
0031 # === Negative tags ===
0032 pfNegativeParticleTransformerAK4TagInfos = pfParticleTransformerAK4TagInfos.clone(
0033     flip = True,
0034     secondary_vertices = 'inclusiveCandidateNegativeSecondaryVertices',
0035 )
0036 pfNegativeParticleTransformerAK4JetTags = pfParticleTransformerAK4JetTags.clone(
0037     src = 'pfNegativeParticleTransformerAK4TagInfos',
0038 )
0039 
0040 # probs
0041 _pfNegativeParticleTransformerAK4JetTagsProbs = ['pfNegativeParticleTransformerAK4JetTags:' + flav_name
0042                                  for flav_name in pfParticleTransformerAK4JetTags.flav_names]