CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
tauProducer_cfi.py
Go to the documentation of this file.
2 
3 patTaus = cms.EDProducer("PATTauProducer",
4  # input
5  tauSource = cms.InputTag("hpsPFTauProducer"),
6 
7  # add user data
8  userData = cms.PSet(
9  # add custom classes here
10  userClasses = cms.PSet(
11  src = cms.VInputTag('')
12  ),
13  # add doubles here
14  userFloats = cms.PSet(
15  src = cms.VInputTag('')
16  ),
17  # add ints here
18  userInts = cms.PSet(
19  src = cms.VInputTag('')
20  ),
21  # add candidate ptrs here
22  userCands = cms.PSet(
23  src = cms.VInputTag('')
24  ),
25  # add "inline" functions here
26  userFunctions = cms.vstring(),
27  userFunctionLabels = cms.vstring()
28  ),
29 
30  # jet energy corrections
31  addTauJetCorrFactors = cms.bool(False),
32  tauJetCorrFactorsSource = cms.VInputTag(cms.InputTag("patTauJetCorrFactors")),
33 
34  # embedding objects (for Calo- and PFTaus)
35  embedLeadTrack = cms.bool(False), ## embed in AOD externally stored leading track
36  embedSignalTracks = cms.bool(False), ## embed in AOD externally stored signal tracks
37  embedIsolationTracks = cms.bool(False), ## embed in AOD externally stored isolation tracks
38  # embedding objects (for PFTaus only)
39  embedLeadPFCand = cms.bool(False), ## embed in AOD externally stored leading PFCandidate
40  embedLeadPFChargedHadrCand = cms.bool(False), ## embed in AOD externally stored leading PFChargedHadron candidate
41  embedLeadPFNeutralCand = cms.bool(False), ## embed in AOD externally stored leading PFNeutral Candidate
42  embedSignalPFCands = cms.bool(False), ## embed in AOD externally stored signal PFCandidates
43  embedSignalPFChargedHadrCands = cms.bool(False), ## embed in AOD externally stored signal PFChargedHadronCandidates
44  embedSignalPFNeutralHadrCands = cms.bool(False), ## embed in AOD externally stored signal PFNeutralHadronCandidates
45  embedSignalPFGammaCands = cms.bool(False), ## embed in AOD externally stored signal PFGammaCandidates
46  embedIsolationPFCands = cms.bool(False), ## embed in AOD externally stored isolation PFCandidates
47  embedIsolationPFChargedHadrCands = cms.bool(False), ## embed in AOD externally stored isolation PFChargedHadronCandidates
48  embedIsolationPFNeutralHadrCands = cms.bool(False), ## embed in AOD externally stored isolation PFNeutralHadronCandidates
49  embedIsolationPFGammaCands = cms.bool(False), ## embed in AOD externally stored isolation PFGammaCandidates
50 
51  # embed IsoDeposits
52  isoDeposits = cms.PSet(
53  pfAllParticles = cms.InputTag("tauIsoDepositPFCandidates"),
54  pfChargedHadron = cms.InputTag("tauIsoDepositPFChargedHadrons"),
55  pfNeutralHadron = cms.InputTag("tauIsoDepositPFNeutralHadrons"),
56  pfGamma = cms.InputTag("tauIsoDepositPFGammas")
57  ),
58 
59  # user defined isolation variables the variables defined here will be accessible
60  # via pat::Tau::userIsolation(IsolationKeys key) with the key as defined in
61  # DataFormats/PatCandidates/interface/Isolation.h
62  #
63  # (set Pt thresholds for PFChargedHadrons (PFGammas) to 1.0 (1.5) GeV,
64  # matching the thresholds used when computing the tau iso. discriminators
65  # in RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByIsolation_cfi.py)
66  userIsolation = cms.PSet(
67  pfAllParticles = cms.PSet(
68  src = cms.InputTag("tauIsoDepositPFCandidates"),
69  deltaR = cms.double(0.5),
70  threshold = cms.double(0.)
71  ),
72  pfChargedHadron = cms.PSet(
73  src = cms.InputTag("tauIsoDepositPFChargedHadrons"),
74  deltaR = cms.double(0.5),
75  threshold = cms.double(0.)
76  ),
77  pfNeutralHadron = cms.PSet(
78  src = cms.InputTag("tauIsoDepositPFNeutralHadrons"),
79  deltaR = cms.double(0.5),
80  threshold = cms.double(0.)
81  ),
82  pfGamma = cms.PSet(
83  src = cms.InputTag("tauIsoDepositPFGammas"),
84  deltaR = cms.double(0.5),
85  threshold = cms.double(0.)
86  )
87  ),
88 
89  # tau ID (for efficiency studies)
90  addTauID = cms.bool(True),
91  tauIDSources = cms.PSet(
92  # configure many IDs as InputTag <someName> = <someTag>
93  # you can comment out those you don't want to save some
94  # disk space
95  decayModeFinding = cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding"),
96  byCombinedIsolationDeltaBetaCorrRaw = cms.InputTag("hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr"),
97  byVLooseCombinedIsolationDeltaBetaCorr = cms.InputTag("hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr"),
98  byLooseCombinedIsolationDeltaBetaCorr = cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr"),
99  byMediumCombinedIsolationDeltaBetaCorr = cms.InputTag("hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr"),
100  byTightCombinedIsolationDeltaBetaCorr = cms.InputTag("hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr"),
101  byIsolationMVAraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVAraw"),
102  byLooseIsolationMVA = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVA"),
103  byMediumIsolationMVA = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVA"),
104  byTightIsolationMVA = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVA"),
105  byIsolationMVA2raw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVA2raw"),
106  byLooseIsolationMVA2 = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVA2"),
107  byMediumIsolationMVA2 = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVA2"),
108  byTightIsolationMVA2 = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVA2"),
109  againstElectronLoose = cms.InputTag("hpsPFTauDiscriminationByLooseElectronRejection"),
110  againstElectronMedium = cms.InputTag("hpsPFTauDiscriminationByMediumElectronRejection"),
111  againstElectronTight = cms.InputTag("hpsPFTauDiscriminationByTightElectronRejection"),
112 # againstElectronMVA = cms.InputTag("hpsPFTauDiscriminationByMVAElectronRejection"),
113 # againstElectronMVA2raw = cms.InputTag("hpsPFTauDiscriminationByMVA2rawElectronRejection"),
114 # againstElectronMVA2category = cms.InputTag("hpsPFTauDiscriminationByMVA2rawElectronRejection:category"),
115 # againstElectronVLooseMVA2 = cms.InputTag("hpsPFTauDiscriminationByMVA2VLooseElectronRejection"),
116 # againstElectronLooseMVA2 = cms.InputTag("hpsPFTauDiscriminationByMVA2LooseElectronRejection"),
117 # againstElectronMediumMVA2 = cms.InputTag("hpsPFTauDiscriminationByMVA2MediumElectronRejection"),
118 # againstElectronTightMVA2 = cms.InputTag("hpsPFTauDiscriminationByMVA2TightElectronRejection"),
119  againstMuonLoose = cms.InputTag("hpsPFTauDiscriminationByLooseMuonRejection"),
120  againstMuonMedium = cms.InputTag("hpsPFTauDiscriminationByMediumMuonRejection"),
121  againstMuonTight = cms.InputTag("hpsPFTauDiscriminationByTightMuonRejection"),
122  againstMuonLoose2 = cms.InputTag("hpsPFTauDiscriminationByLooseMuonRejection2"),
123  againstMuonMedium2 = cms.InputTag("hpsPFTauDiscriminationByMediumMuonRejection2"),
124  againstMuonTight2 = cms.InputTag("hpsPFTauDiscriminationByTightMuonRejection2"),
125  byCombinedIsolationDeltaBetaCorrRaw3Hits = cms.InputTag("hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits"),
126  byLooseCombinedIsolationDeltaBetaCorr3Hits = cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"),
127  byMediumCombinedIsolationDeltaBetaCorr3Hits = cms.InputTag("hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"),
128  byTightCombinedIsolationDeltaBetaCorr3Hits = cms.InputTag("hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"),
129  againstElectronMVA3raw = cms.InputTag("hpsPFTauDiscriminationByMVA3rawElectronRejection"),
130  againstElectronMVA3category = cms.InputTag("hpsPFTauDiscriminationByMVA3rawElectronRejection:category"),
131  againstElectronLooseMVA3 = cms.InputTag("hpsPFTauDiscriminationByMVA3LooseElectronRejection"),
132  againstElectronMediumMVA3 = cms.InputTag("hpsPFTauDiscriminationByMVA3MediumElectronRejection"),
133  againstElectronTightMVA3 = cms.InputTag("hpsPFTauDiscriminationByMVA3TightElectronRejection"),
134  againstElectronVTightMVA3 = cms.InputTag("hpsPFTauDiscriminationByMVA3VTightElectronRejection"),
135  againstElectronDeadECAL = cms.InputTag("hpsPFTauDiscriminationByDeadECALElectronRejection")
136  ),
137 
138  # mc matching configurables
139  addGenMatch = cms.bool(True),
140  embedGenMatch = cms.bool(True),
141  genParticleMatch = cms.InputTag("tauMatch"),
142  addGenJetMatch = cms.bool(True),
143  embedGenJetMatch = cms.bool(True),
144  genJetMatch = cms.InputTag("tauGenJetMatch"),
145 
146  # efficiencies
147  addEfficiencies = cms.bool(False),
148  efficiencies = cms.PSet(),
149 
150  # resolution
151  addResolutions = cms.bool(False),
152  resolutions = cms.PSet()
153 )
154 
155 NoUpdateDiscriminators=False
156 try:
158 except ImportError:
159  NoUpdateDiscriminators=True
160 
161 if NoUpdateDiscriminators:
162  patTaus.tauIDSources = cms.PSet(
163  decayModeFinding = cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding"),
164  byVLooseCombinedIsolationDeltaBetaCorr = cms.InputTag("hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr"),
165  byLooseCombinedIsolationDeltaBetaCorr = cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr"),
166  byMediumCombinedIsolationDeltaBetaCorr = cms.InputTag("hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr"),
167  byTightCombinedIsolationDeltaBetaCorr = cms.InputTag("hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr"),
168  againstElectronLoose = cms.InputTag("hpsPFTauDiscriminationByLooseElectronRejection"),
169  againstElectronMedium = cms.InputTag("hpsPFTauDiscriminationByMediumElectronRejection"),
170  againstElectronTight = cms.InputTag("hpsPFTauDiscriminationByTightElectronRejection"),
171  againstElectronMVA = cms.InputTag("hpsPFTauDiscriminationByMVAElectronRejection"),
172  againstMuonLoose = cms.InputTag("hpsPFTauDiscriminationByLooseMuonRejection"),
173  againstMuonMedium = cms.InputTag("hpsPFTauDiscriminationByMediumMuonRejection"),
174  againstMuonTight = cms.InputTag("hpsPFTauDiscriminationByTightMuonRejection")
175  )