CMS 3D CMS Logo

PFRecoTauDiscriminationByMVAIsolation2_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
5 
6 chargedIsoPtSum = pfRecoTauDiscriminationByIsolation.clone(
7  PFTauProducer = cms.InputTag('pfTauProducer'),
8  ApplyDiscriminationByECALIsolation = cms.bool(False),
9  ApplyDiscriminationByTrackerIsolation = cms.bool(True),
10  applyOccupancyCut = cms.bool(False),
11  applySumPtCut = cms.bool(False),
12  applyDeltaBetaCorrection = cms.bool(False),
13  storeRawSumPt = cms.bool(True),
14  storeRawPUsumPt = cms.bool(False),
15  customOuterCone = cms.double(0.5),
16  isoConeSizeForDeltaBeta = cms.double(0.8),
17  verbosity = cms.int32(0)
18 )
19 neutralIsoPtSum = pfRecoTauDiscriminationByIsolation.clone(
20  PFTauProducer = cms.InputTag('pfTauProducer'),
21  ApplyDiscriminationByECALIsolation = cms.bool(True),
22  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
23  applyOccupancyCut = cms.bool(False),
24  applySumPtCut = cms.bool(False),
25  applyDeltaBetaCorrection = cms.bool(False),
26  storeRawSumPt = cms.bool(True),
27  storeRawPUsumPt = cms.bool(False),
28  customOuterCone = cms.double(0.5),
29  isoConeSizeForDeltaBeta = cms.double(0.8),
30  verbosity = cms.int32(0)
31 )
32 puCorrPtSum = pfRecoTauDiscriminationByIsolation.clone(
33  PFTauProducer = cms.InputTag('pfTauProducer'),
34  ApplyDiscriminationByECALIsolation = cms.bool(False),
35  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
36  applyOccupancyCut = cms.bool(False),
37  applySumPtCut = cms.bool(False),
38  applyDeltaBetaCorrection = cms.bool(True),
39  storeRawSumPt = cms.bool(False),
40  storeRawPUsumPt = cms.bool(True),
41  customOuterCone = cms.double(0.5),
42  isoConeSizeForDeltaBeta = cms.double(0.8),
43  verbosity = cms.int32(0)
44 )
45 
46 discriminationByIsolationMVA2raw = cms.EDProducer("PFRecoTauDiscriminationByIsolationMVA2",
47 
48  # tau collection to discriminate
49  PFTauProducer = cms.InputTag('pfTauProducer'),
50 
51  # Require leading pion ensures that:
52  # 1) these is at least one track above threshold (0.5 GeV) in the signal cone
53  # 2) a track OR a pi-zero in the signal cone has pT > 5 GeV
54  Prediscriminants = requireLeadTrack,
55  loadMVAfromDB = cms.bool(True),
56  inputFileName = cms.FileInPath("RecoTauTag/RecoTau/data/emptyMVAinputFile"), # the filename for MVA if it is not loaded from DB
57  mvaName = cms.string("tauIdMVAnewDMwLT"),
58  mvaOpt = cms.string("newDMwLT"),
59 
60  # NOTE: tau lifetime reconstruction sequence needs to be run before
61  srcTauTransverseImpactParameters = cms.InputTag(''),
62 
63  srcChargedIsoPtSum = cms.InputTag('chargedIsoPtSum'),
64  srcNeutralIsoPtSum = cms.InputTag('neutralIsoPtSum'),
65  srcPUcorrPtSum = cms.InputTag('puCorrPtSum'),
66 
67  verbosity = cms.int32(0)
68 )
69 
70 discriminationByIsolationMVA2VLoose = recoTauDiscriminantCutMultiplexer.clone(
71  PFTauProducer = cms.InputTag('pfTauProducer'),
72  Prediscriminants = requireLeadTrack,
73  toMultiplex = cms.InputTag('discriminationByIsolationMVA2raw'),
74  key = cms.InputTag('discriminationByIsolationMVA2raw:category'),
75  loadMVAfromDB = cms.bool(True),
76  mapping = cms.VPSet(
77  cms.PSet(
78  category = cms.uint32(0),
79  cut = cms.string("newDMwLTEff80"),
80  variable = cms.string("pt"),
81  )
82  )
83 )
84 discriminationByIsolationMVA2Loose = discriminationByIsolationMVA2VLoose.clone()
85 discriminationByIsolationMVA2Loose.mapping[0].cut = cms.string("newDMwLTEff70")
86 discriminationByIsolationMVA2Medium = discriminationByIsolationMVA2VLoose.clone()
87 discriminationByIsolationMVA2Medium.mapping[0].cut = cms.string("newDMwLTEff60")
88 discriminationByIsolationMVA2Tight = discriminationByIsolationMVA2VLoose.clone()
89 discriminationByIsolationMVA2Tight.mapping[0].cut = cms.string("newDMwLTEff50")
90 discriminationByIsolationMVA2VTight = discriminationByIsolationMVA2VLoose.clone()
91 discriminationByIsolationMVA2VTight.mapping[0].cut = cms.string("newDMwLTEff40")
92 
93 mvaIsolation2Seq = cms.Sequence(
94  chargedIsoPtSum
95  + neutralIsoPtSum
96  + puCorrPtSum
97  + discriminationByIsolationMVA2raw
98  + discriminationByIsolationMVA2VLoose
99  + discriminationByIsolationMVA2Loose
100  + discriminationByIsolationMVA2Medium
101  + discriminationByIsolationMVA2Tight
102  + discriminationByIsolationMVA2VTight
103 )