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  mvaName = cms.string("tauIdMVAnewDMwLT"),
72  mvaOpt = cms.string("newDMwLT"),
73 
74  # NOTE: tau lifetime reconstruction sequence needs to be run before
75  srcTauTransverseImpactParameters = cms.InputTag(''),
76 
77  srcChargedIsoPtSum = cms.InputTag('chargedIsoPtSum'),
78  srcNeutralIsoPtSum = cms.InputTag('neutralIsoPtSum'),
79  srcPUcorrPtSum = cms.InputTag('puCorrPtSum'),
80  srcPhotonPtSumOutsideSignalCone = cms.InputTag('photonPtSumOutsideSignalCone'),
81  srcFootprintCorrection = cms.InputTag('footprintCorrection')
82 )
83 
84 discriminationByIsolationMVArun2v1VLoose = recoTauDiscriminantCutMultiplexer.clone(
85  PFTauProducer = cms.InputTag('pfTauProducer'),
86  Prediscriminants = requireLeadTrack,
87  toMultiplex = cms.InputTag('discriminationByIsolationMVArun2v1raw'),
88  key = cms.InputTag('discriminationByIsolationMVArun2v1raw:category'),
89  loadMVAfromDB = cms.bool(True),
90  mapping = cms.VPSet(
91  cms.PSet(
92  category = cms.uint32(0),
93  cut = cms.string("newDMwLTEff80"),
94  variable = cms.string("pt"),
95  )
96  )
97 )
98 discriminationByIsolationMVArun2v1Loose = discriminationByIsolationMVArun2v1VLoose.clone()
99 discriminationByIsolationMVArun2v1Loose.mapping[0].cut = cms.string("newDMwLTEff70")
100 discriminationByIsolationMVArun2v1Medium = discriminationByIsolationMVArun2v1VLoose.clone()
101 discriminationByIsolationMVArun2v1Medium.mapping[0].cut = cms.string("newDMwLTEff60")
102 discriminationByIsolationMVArun2v1Tight = discriminationByIsolationMVArun2v1VLoose.clone()
103 discriminationByIsolationMVArun2v1Tight.mapping[0].cut = cms.string("newDMwLTEff50")
104 discriminationByIsolationMVArun2v1VTight = discriminationByIsolationMVArun2v1VLoose.clone()
105 discriminationByIsolationMVArun2v1VTight.mapping[0].cut = cms.string("newDMwLTEff40")
106 
107 mvaIsolation2SeqRun2 = cms.Sequence(
108  chargedIsoPtSum
109  + neutralIsoPtSum
110  + puCorrPtSum
111  + photonPtSumOutsideSignalCone
112  + footprintCorrection
113  + discriminationByIsolationMVArun2v1raw
114  + discriminationByIsolationMVArun2v1VLoose
115  + discriminationByIsolationMVArun2v1Loose
116  + discriminationByIsolationMVArun2v1Medium
117  + discriminationByIsolationMVArun2v1Tight
118  + discriminationByIsolationMVArun2v1VTight
119 )