CMS 3D CMS Logo

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