CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PATTauDiscriminationByMVAIsolationRun2_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 from RecoTauTag.RecoTau.TauDiscriminatorTools import noPrediscriminants
5 
6 import RecoTauTag.RecoTau.patTauDiscriminationByMVAIsolationRun2_cfi as _mod
7 # make sure to load the database containing the mva inputs before using the producers below
8 # e.g. process.load('RecoTauTag.Configuration.loadRecoTauTagMVAsFromPrepDB_cfi') as in
9 # RecoTauTag.Configuration.HPSPFTaus_cff
10 
11 patDiscriminationByIsolationMVArun2v1raw = _mod.patTauDiscriminationByMVAIsolationRun2.clone(
12  # tau collection to discriminate
13  PATTauProducer = 'replaceMeByTauCollectionToBeUsed', # in MiniAOD: slimmedTaus
14  Prediscriminants = noPrediscriminants,
15  loadMVAfromDB = True,
16  inputFileName = "RecoTauTag/RecoTau/data/emptyMVAinputFile", # the filename for MVA if it is not loaded from DB
17  mvaName = "replaceMeByNameOfMVATraining", # e.g. RecoTauTag_tauIdMVADBoldDMwLTv1
18  mvaOpt = "replaceMeByMVAOption", # e.g. DBoldDMwLT
19  # change these only if input isolation sums changed for the MVA training you want to use
20  srcChargedIsoPtSum = 'chargedIsoPtSum',
21  srcNeutralIsoPtSum = 'neutralIsoPtSum',
22  srcPUcorrPtSum = 'puCorrPtSum',
23  srcPhotonPtSumOutsideSignalCone = 'photonPtSumOutsideSignalCone',
24  srcFootprintCorrection = 'footprintCorrection',
25 )
26 
27 patDiscriminationByIsolationMVArun2v1 = patTauDiscriminantCutMultiplexer.clone(
28  PATTauProducer = 'replaceMeByTauCollectionToBeUsed', # in MiniAOD: slimmedTaus
29  Prediscriminants = noPrediscriminants,
30  toMultiplex = 'patDiscriminationByIsolationMVArun2v1raw',
31  loadMVAfromDB = True,
32  mvaOutput_normalization = "replaceMeByNormalizationToBeUsedIfAny", # e.g. RecoTauTag_tauIdMVADBoldDMwLTv1_mvaOutput_normalization
33  mapping = cms.VPSet(
34  cms.PSet(
35  category = cms.uint32(0),
36  cut = cms.string("replaceMeByCut"), # e.g. RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff90
37  variable = cms.string("pt"),
38  )
39  ),
40  workingPoints = [
41  "Eff80",
42  "Eff70",
43  "Eff60",
44  "Eff50",
45  "Eff40"
46  ]
47 )
48 
49 mvaIsolation2TaskRun2 = cms.Task(
50  patDiscriminationByIsolationMVArun2v1raw
51  , patDiscriminationByIsolationMVArun2v1
52 )
53 mvaIsolation2SeqRun2 = cms.Sequence(mvaIsolation2TaskRun2)