CMS 3D CMS Logo

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 # make sure to load the database containing the mva inputs before using the producers below
7 # e.g. process.load('RecoTauTag.Configuration.loadRecoTauTagMVAsFromPrepDB_cfi') as in
8 # RecoTauTag.Configuration.HPSPFTaus_cff
9 
10 patDiscriminationByIsolationMVArun2v1raw = cms.EDProducer("PATTauDiscriminationByMVAIsolationRun2",
11 
12  # tau collection to discriminate
13  PATTauProducer = cms.InputTag('replaceMeByTauCollectionToBeUsed'), # in MiniAOD: slimmedTaus
14  Prediscriminants = noPrediscriminants,
15  loadMVAfromDB = cms.bool(True),
16  inputFileName = cms.FileInPath("RecoTauTag/RecoTau/data/emptyMVAinputFile"), # the filename for MVA if it is not loaded from DB
17  mvaName = cms.string("replaceMeByNameOfMVATraining"), # e.g. RecoTauTag_tauIdMVADBoldDMwLTv1
18  mvaOpt = cms.string("replaceMeByMVAOption"), # e.g. DBoldDMwLT
19 
20  # change these only if input isolation sums changed for the MVA training you want to use
21  srcChargedIsoPtSum = cms.string('chargedIsoPtSum'),
22  srcNeutralIsoPtSum = cms.string('neutralIsoPtSum'),
23  srcPUcorrPtSum = cms.string('puCorrPtSum'),
24  srcPhotonPtSumOutsideSignalCone = cms.string('photonPtSumOutsideSignalCone'),
25  srcFootprintCorrection = cms.string('footprintCorrection'),
26 
27  verbosity = cms.int32(0)
28 )
29 
30 patDiscriminationByIsolationMVArun2v1 = patTauDiscriminantCutMultiplexer.clone(
31  PATTauProducer = cms.InputTag('replaceMeByTauCollectionToBeUsed'), # in MiniAOD: slimmedTaus
32  Prediscriminants = noPrediscriminants,
33  toMultiplex = cms.InputTag('patDiscriminationByIsolationMVArun2v1raw'),
34  loadMVAfromDB = cms.bool(True),
35  mvaOutput_normalization = cms.string("replaceMeByNormalizationToBeUsedIfAny"), # e.g. RecoTauTag_tauIdMVADBoldDMwLTv1_mvaOutput_normalization
36  mapping = cms.VPSet(
37  cms.PSet(
38  category = cms.uint32(0),
39  cut = cms.string("replaceMeByCut"), # e.g. RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff90
40  variable = cms.string("pt"),
41  )
42  ),
43  workingPoints = cms.vstring(
44  "Eff80",
45  "Eff70",
46  "Eff60",
47  "Eff50",
48  "Eff40"
49  )
50 )
51 
52 mvaIsolation2TaskRun2 = cms.Task(
53  patDiscriminationByIsolationMVArun2v1raw
54  , patDiscriminationByIsolationMVArun2v1
55 )
56 mvaIsolation2SeqRun2 = cms.Sequence(mvaIsolation2TaskRun2)
PATTauDiscriminantCutMultiplexer_cfi
TauDiscriminatorTools