Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-17 23:11:05

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from RecoTauTag.RecoTau.TauDiscriminatorTools import noPrediscriminants
0004 from RecoTauTag.RecoTau.PATTauDiscriminantCutMultiplexer_cfi import *
0005 
0006 import RecoTauTag.RecoTau.patTauDiscriminationByMVAIsolationRun2_cfi as _mod
0007 # make sure to load the database containing the mva inputs before using the producers below
0008 # e.g. process.load('RecoTauTag.Configuration.loadRecoTauTagMVAsFromPrepDB_cfi') as in
0009 # RecoTauTag.Configuration.HPSPFTaus_cff
0010 
0011 patDiscriminationByIsolationMVArun2v1raw = _mod.patTauDiscriminationByMVAIsolationRun2.clone(
0012     # tau collection to discriminate
0013     PATTauProducer = 'replaceMeByTauCollectionToBeUsed', # in MiniAOD: slimmedTaus
0014     Prediscriminants = noPrediscriminants,
0015     loadMVAfromDB = True,
0016     inputFileName = "RecoTauTag/RecoTau/data/emptyMVAinputFile", # the filename for MVA if it is not loaded from DB
0017     mvaName = "replaceMeByNameOfMVATraining", # e.g. RecoTauTag_tauIdMVADBoldDMwLTv1
0018     mvaOpt = "replaceMeByMVAOption", # e.g. DBoldDMwLT
0019     # change these only if input isolation sums changed for the MVA training you want to use
0020     srcChargedIsoPtSum = 'chargedIsoPtSum',
0021     srcNeutralIsoPtSum = 'neutralIsoPtSum',
0022     srcPUcorrPtSum = 'puCorrPtSum',
0023     srcPhotonPtSumOutsideSignalCone = 'photonPtSumOutsideSignalCone',
0024     srcFootprintCorrection = 'footprintCorrection',
0025 )
0026 
0027 patDiscriminationByIsolationMVArun2v1 = patTauDiscriminantCutMultiplexer.clone(
0028     PATTauProducer = 'replaceMeByTauCollectionToBeUsed', # in MiniAOD: slimmedTaus
0029     Prediscriminants = noPrediscriminants,
0030     toMultiplex = 'patDiscriminationByIsolationMVArun2v1raw',
0031     loadMVAfromDB = True,
0032     mvaOutput_normalization = "replaceMeByNormalizationToBeUsedIfAny", # e.g. RecoTauTag_tauIdMVADBoldDMwLTv1_mvaOutput_normalization
0033     mapping = cms.VPSet(
0034         cms.PSet(
0035             category = cms.uint32(0),
0036             cut = cms.string("replaceMeByCut"), # e.g. RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff90
0037             variable = cms.string("pt"),
0038         )
0039     ),
0040     workingPoints = [
0041         "Eff80",
0042         "Eff70",
0043         "Eff60",
0044         "Eff50",
0045         "Eff40"
0046     ]
0047 )
0048 
0049 mvaIsolation2TaskRun2 = cms.Task(
0050    patDiscriminationByIsolationMVArun2v1raw
0051    , patDiscriminationByIsolationMVArun2v1
0052 )
0053 mvaIsolation2SeqRun2 = cms.Sequence(mvaIsolation2TaskRun2)