CMS 3D CMS Logo

taus_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
3 from PhysicsTools.NanoAOD.nano_eras_cff import run3_nanoAOD_124
4 from PhysicsTools.NanoAOD.simpleCandidateFlatTableProducer_cfi import simpleCandidateFlatTableProducer
5 from PhysicsTools.NanoAOD.simpleGenParticleFlatTableProducer_cfi import simpleGenParticleFlatTableProducer
6 from PhysicsTools.NanoAOD.simplePATTauFlatTableProducer_cfi import simplePATTauFlatTableProducer
7 
8 from PhysicsTools.JetMCAlgos.TauGenJets_cfi import tauGenJets
9 from PhysicsTools.JetMCAlgos.TauGenJetsDecayModeSelectorAllHadrons_cfi import tauGenJetsSelectorAllHadrons
10 
11 from PhysicsTools.PatAlgos.patTauSignalCandidatesProducer_cfi import patTauSignalCandidatesProducer
12 
13 
14 
15 # Original DeepTau v2p5 in 12_4_X doesn't include WPs in MINIAOD
16 # Import thresholds here to define WPs manually from raw scores
17 from RecoTauTag.RecoTau.tauIdWPsDefs import WORKING_POINTS_v2p5
18 
19 finalTaus = cms.EDFilter("PATTauRefSelector",
20  src = cms.InputTag("slimmedTaus"),
21  cut = cms.string("pt > 18 && ((tauID('decayModeFindingNewDMs') > 0.5 && (tauID('byLooseCombinedIsolationDeltaBetaCorr3Hits') || (tauID('chargedIsoPtSumdR03')+max(0.,tauID('neutralIsoPtSumdR03')-0.072*tauID('puCorrPtSum'))<2.5) || tauID('byVVVLooseDeepTau2017v2p1VSjet') || tauID('byVVVLooseDeepTau2018v2p5VSjet'))) || (?isTauIDAvailable('byUTagCHSVSjetraw')?tauID('byUTagCHSVSjetraw'):-1) > {} || (?isTauIDAvailable('byUTagPUPPIVSjetraw')?tauID('byUTagPUPPIVSjetraw'):-1) > {})".format(0.05, 0.05))
22 )
23 
24 run3_nanoAOD_124.toModify(
25  finalTaus,
26  cut = cms.string("pt > 18 && ((tauID('decayModeFindingNewDMs') > 0.5 && (tauID('byLooseCombinedIsolationDeltaBetaCorr3Hits') || (tauID('chargedIsoPtSumdR03')+max(0.,tauID('neutralIsoPtSumdR03')-0.072*tauID('puCorrPtSum'))<2.5) || tauID('byVVVLooseDeepTau2017v2p1VSjet') || (tauID('byDeepTau2018v2p5VSjetraw') > {}))) || (?isTauIDAvailable('byUTagCHSVSjetraw')?tauID('byUTagCHSVSjetraw'):-1) > {} || (?isTauIDAvailable('byUTagPUPPIVSjetraw')?tauID('byUTagPUPPIVSjetraw'):-1) > {})".format(WORKING_POINTS_v2p5["jet"]["VVVLoose"], 0.05, 0.05))
27 )
28 
29 
30 def _tauIdWPMask(pattern, choices, doc="", from_raw=False, wp_thrs=None):
31  if from_raw:
32  assert wp_thrs is not None, "wp_thrs argument in _tauIdWPMask() is None, expect it to be dict-like"
33 
34  var_definition = []
35  for wp_name in choices:
36  if not isinstance(wp_thrs[wp_name], float):
37  raise TypeError("Threshold for WP=%s is not a float number." % wp_name)
38  wp_definition = "test_bit(tauID('{}')-{}+1,0)".format(pattern, wp_thrs[wp_name])
39  var_definition.append(wp_definition)
40  var_definition = " + ".join(var_definition)
41  var_definition = ("?isTauIDAvailable('%s')?(" % pattern) + var_definition + "):0"
42  else:
43  var_definition = " + ".join(["tauID('%s')" % (pattern % c) for c in choices])
44  var_definition = ("?isTauIDAvailable('%s')?(" % (pattern % choices[0])) + var_definition + "):0"
45 
46  doc = doc + ": "+", ".join(["%d = %s" % (i,c) for (i,c) in enumerate(choices, start=1)])
47  return Var(var_definition, "uint8", doc=doc)
48 
49 
50 tauTable = simplePATTauFlatTableProducer.clone(
51  src = cms.InputTag("linkedObjects","taus"),
52  name= cms.string("Tau"),
53  doc = cms.string("slimmedTaus after basic selection (" + finalTaus.cut.value()+")")
54 )
55 
56 _tauVarsBase = cms.PSet(P4Vars,
57  charge = Var("charge", "int16", doc="electric charge"),
58  jetIdx = Var("?hasUserCand('jet')?userCand('jet').key():-1", "int16", doc="index of the associated jet (-1 if none)"),
59  eleIdx = Var("?overlaps('electrons').size()>0?overlaps('electrons')[0].key():-1", "int16", doc="index of first matching electron"),
60  muIdx = Var("?overlaps('muons').size()>0?overlaps('muons')[0].key():-1", "int16", doc="index of first matching muon"),
61  svIdx1 = Var("?overlaps('vertices').size()>0?overlaps('vertices')[0].key():-1", "int16", doc="index of first matching secondary vertex"),
62  svIdx2 = Var("?overlaps('vertices').size()>1?overlaps('vertices')[1].key():-1", "int16", doc="index of second matching secondary vertex"),
63  nSVs = Var("?hasOverlaps('vertices')?overlaps('vertices').size():0", "uint8", doc="number of secondary vertices in the tau"),
64  decayMode = Var("decayMode()", "uint8"),
65  idDecayModeOldDMs = Var("(?isTauIDAvailable('decayModeFinding')?tauID('decayModeFinding'):-1) > 0", bool),
66  idDecayModeNewDMs = Var("(?isTauIDAvailable('decayModeFindingNewDMs')?tauID('decayModeFindingNewDMs'):-1) > 0", bool),
67  leadTkPtOverTauPt = Var("?leadChargedHadrCand.isNonnull()?leadChargedHadrCand.pt/pt:1",float, doc="pt of the leading track divided by tau pt",precision=10),
68  leadTkDeltaEta = Var("?leadChargedHadrCand.isNonnull()?(leadChargedHadrCand.eta - eta):0",float, doc="eta of the leading track, minus tau eta",precision=8),
69  leadTkDeltaPhi = Var("?leadChargedHadrCand.isNonnull()?deltaPhi(leadChargedHadrCand.phi, phi):0",float, doc="phi of the leading track, minus tau phi",precision=8),
70 
71  # lazyEval=True: leadChargedHadrCand() returns the base type `reco::CandidatePtr`, needs to be dynamically casted to PackedCandidate to call dxy() / dz()
72  dxy = Var("?leadChargedHadrCand.isNonnull()?leadChargedHadrCand().dxy():0",float, doc="d_{xy} of lead track with respect to PV, in cm (with sign)",precision=10, lazyEval=True),
73  dz = Var("?leadChargedHadrCand.isNonnull()?leadChargedHadrCand().dz():0",float, doc="d_{z} of lead track with respect to PV, in cm (with sign)",precision=14, lazyEval=True),
74 
75  # these are too many, we may have to suppress some
76  rawIso = Var("?isTauIDAvailable('byCombinedIsolationDeltaBetaCorrRaw3Hits')?tauID('byCombinedIsolationDeltaBetaCorrRaw3Hits'):-1", float, doc = "combined isolation (deltaBeta corrections)", precision=10),
77  rawIsodR03 = Var("?isTauIDAvailable('chargedIsoPtSumdR03')?(tauID('chargedIsoPtSumdR03')+max(0.,tauID('neutralIsoPtSumdR03')-0.072*tauID('puCorrPtSum'))):-1", float, doc = "combined isolation (deltaBeta corrections, dR=0.3)", precision=10),
78  chargedIso = Var("?isTauIDAvailable('chargedIsoPtSum')?tauID('chargedIsoPtSum'):-1", float, doc = "charged isolation", precision=10),
79  neutralIso = Var("?isTauIDAvailable('neutralIsoPtSum')?tauID('neutralIsoPtSum'):-1", float, doc = "neutral (photon) isolation", precision=10),
80  puCorr = Var("?isTauIDAvailable('puCorrPtSum')?tauID('puCorrPtSum'):-1", float, doc = "pileup correction", precision=10),
81  photonsOutsideSignalCone = Var("?isTauIDAvailable('photonPtSumOutsideSignalCone')?tauID('photonPtSumOutsideSignalCone'):-1", float, doc = "sum of photons outside signal cone", precision=10),
82 
83  idAntiMu = _tauIdWPMask("againstMuon%s3", choices=("Loose","Tight"), doc= "Anti-muon discriminator V3: "),
84  idAntiEleDeadECal = Var("(?isTauIDAvailable('againstElectronDeadECAL')?tauID('againstElectronDeadECAL'):-1) > 0", bool, doc = "Anti-electron dead-ECal discriminator"),
85 
86 )
87 
88 _deepTauVars2017v2p1 = cms.PSet(
89  rawDeepTau2017v2p1VSe = Var("?isTauIDAvailable('byDeepTau2017v2p1VSeraw')?tauID('byDeepTau2017v2p1VSeraw'):-1", float, doc="byDeepTau2017v2p1VSe raw output discriminator (deepTau2017v2p1)", precision=10),
90  rawDeepTau2017v2p1VSmu = Var("?isTauIDAvailable('byDeepTau2017v2p1VSmuraw')?tauID('byDeepTau2017v2p1VSmuraw'):-1", float, doc="byDeepTau2017v2p1VSmu raw output discriminator (deepTau2017v2p1)", precision=10),
91  rawDeepTau2017v2p1VSjet = Var("?isTauIDAvailable('byDeepTau2017v2p1VSjetraw')?tauID('byDeepTau2017v2p1VSjetraw'):-1", float, doc="byDeepTau2017v2p1VSjet raw output discriminator (deepTau2017v2p1)", precision=10),
92  idDeepTau2017v2p1VSe = _tauIdWPMask("by%sDeepTau2017v2p1VSe",
93  choices=("VVVLoose","VVLoose","VLoose","Loose","Medium","Tight","VTight","VVTight"),
94  doc="byDeepTau2017v2p1VSe ID working points (deepTau2017v2p1)"),
95  idDeepTau2017v2p1VSmu = _tauIdWPMask("by%sDeepTau2017v2p1VSmu",
96  choices=("VLoose", "Loose", "Medium", "Tight"),
97  doc="byDeepTau2017v2p1VSmu ID working points (deepTau2017v2p1)"),
98  idDeepTau2017v2p1VSjet = _tauIdWPMask("by%sDeepTau2017v2p1VSjet",
99  choices=("VVVLoose","VVLoose","VLoose","Loose","Medium","Tight","VTight","VVTight"),
100  doc="byDeepTau2017v2p1VSjet ID working points (deepTau2017v2p1)"),
101 )
102 _deepTauVars2018v2p5 = cms.PSet(
103  rawDeepTau2018v2p5VSe = Var("?isTauIDAvailable('byDeepTau2018v2p5VSeraw')?tauID('byDeepTau2018v2p5VSeraw'):-1", float, doc="byDeepTau2018v2p5VSe raw output discriminator (deepTau2018v2p5)", precision=10),
104  rawDeepTau2018v2p5VSmu = Var("?isTauIDAvailable('byDeepTau2018v2p5VSmuraw')?tauID('byDeepTau2018v2p5VSmuraw'):-1", float, doc="byDeepTau2018v2p5VSmu raw output discriminator (deepTau2018v2p5)", precision=10),
105  rawDeepTau2018v2p5VSjet = Var("?isTauIDAvailable('byDeepTau2018v2p5VSjetraw')?tauID('byDeepTau2018v2p5VSjetraw'):-1", float, doc="byDeepTau2018v2p5VSjet raw output discriminator (deepTau2018v2p5)", precision=10),
106  idDeepTau2018v2p5VSe = _tauIdWPMask("by%sDeepTau2018v2p5VSe",
107  choices=("VVVLoose","VVLoose","VLoose","Loose","Medium","Tight","VTight","VVTight"),
108  doc="byDeepTau2018v2p5VSe ID working points (deepTau2018v2p5)"),
109  idDeepTau2018v2p5VSmu = _tauIdWPMask("by%sDeepTau2018v2p5VSmu",
110  choices=("VLoose", "Loose", "Medium", "Tight"),
111  doc="byDeepTau2018v2p5VSmu ID working points (deepTau2018v2p5)"),
112  idDeepTau2018v2p5VSjet = _tauIdWPMask("by%sDeepTau2018v2p5VSjet",
113  choices=("VVVLoose","VVLoose","VLoose","Loose","Medium","Tight","VTight","VVTight"),
114  doc="byDeepTau2018v2p5VSjet ID working points (deepTau2018v2p5)"),
115 )
116 
117 _UTagCHS = cms.PSet(
118  decayModePNet = Var("?isTauIDAvailable('byUTagCHSDecayMode')?tauID('byUTagCHSDecayMode'):-1", "int16",doc="decay mode of the highest tau score of ParticleNet (CHS Jets)"),
119  rawPNetVSe = Var("?isTauIDAvailable('byUTagCHSVSeraw')?tauID('byUTagCHSVSeraw'):-1", float, doc="raw output of ParticleNetVsE discriminator (PNet 2023 - CHS Jets)", precision=10),
120  rawPNetVSmu = Var("?isTauIDAvailable('byUTagCHSVSmuraw')?tauID('byUTagCHSVSmuraw'):-1", float, doc="raw output of ParticleNetVsMu discriminator (PNet 2023 - CHS Jets)", precision=10),
121  rawPNetVSjet = Var("?isTauIDAvailable('byUTagCHSVSjetraw')?tauID('byUTagCHSVSjetraw'):-1", float, doc="raw output of ParticleNetVsJet discriminator (PNet 2023 - CHS Jets)", precision=10),
122  ptCorrPNet = Var("?isTauIDAvailable('byUTagCHSPtCorr')?tauID('byUTagCHSPtCorr'):1", float, doc="pt correction (PNet 2023 - CHS Jets)", precision=10),
123  qConfPNet = Var("?isTauIDAvailable('byUTagCHSQConf')?tauID('byUTagCHSQConf'):0", float, doc="signed charge confidence (PNet 2023 - CHS Jets)", precision=10),
124  probDM0PNet = Var("?isTauIDAvailable('byUTagCHSProb1h0pi0')?tauID('byUTagCHSProb1h0pi0'):-1", float, doc="normalised probablity of decayMode 0, 1h+0pi0 (PNet 2023 - CHS Jets)", precision=10),
125  probDM1PNet = Var("?isTauIDAvailable('byUTagCHSProb1h1pi0')?tauID('byUTagCHSProb1h1pi0'):-1", float, doc="normalised probablity of decayMode 1, 1h+1pi0 (PNet 2023 - CHS Jets)", precision=10),
126  probDM2PNet = Var("?isTauIDAvailable('byUTagCHSProb1h2pi0')?tauID('byUTagCHSProb1h2pi0'):-1", float, doc="normalised probablity of decayMode 2, 1h+2pi0 (PNet 2023 - CHS Jets)", precision=10),
127  probDM10PNet = Var("?isTauIDAvailable('byUTagCHSProb3h0pi0')?tauID('byUTagCHSProb3h0pi0'):-1", float, doc="normalised probablity of decayMode 10, 3h+0pi0 (PNet 2023 - CHS Jets)", precision=10),
128  probDM11PNet = Var("?isTauIDAvailable('byUTagCHSProb3h1pi0')?tauID('byUTagCHSProb3h1pi0'):-1", float, doc="normalised probablity of decayMode 11, 3h+1pi0 (PNet 2023 - CHS Jets)", precision=10),
129 )
130 
131 _UTagPUPPI = cms.PSet(
132  decayModeUParT= Var("?isTauIDAvailable('byUTagPUPPIDecayMode')?tauID('byUTagPUPPIDecayMode'):-1", "int16",doc="decay mode of the highest tau score of Unified ParT 2024 (PUPPI Jets)"),
133  rawUParTVSe = Var("?isTauIDAvailable('byUTagPUPPIVSeraw')?tauID('byUTagPUPPIVSeraw'):-1", float, doc="raw output of UParTVsE discriminator (Unified ParT 2024 - PUPPI Jets)", precision=10),
134  rawUParTVSmu = Var("?isTauIDAvailable('byUTagPUPPIVSmuraw')?tauID('byUTagPUPPIVSmuraw'):-1", float, doc="raw output of UParTVsMu discriminator (Unified ParT 2024 - PUPPI Jets)", precision=10),
135  rawUParTVSjet = Var("?isTauIDAvailable('byUTagPUPPIVSjetraw')?tauID('byUTagPUPPIVSjetraw'):-1", float, doc="raw output of UParTVsJet discriminator (Unified ParT 2024 - PUPPI Jets)", precision=10),
136  ptCorrUParT= Var("?isTauIDAvailable('byUTagPUPPIPtCorr')?tauID('byUTagPUPPIPtCorr'):1", float, doc="pt correction (Unified ParT 2024 - PUPPI Jets)", precision=10),
137  qConfUParT= Var("?isTauIDAvailable('byUTagPUPPIQConf')?tauID('byUTagPUPPIQConf'):0", float, doc="signed charge confidence (Unified ParT 2024 - PUPPI Jets)", precision=10),
138  probDM0UParT= Var("?isTauIDAvailable('byUTagPUPPIProb1h0pi0')?tauID('byUTagPUPPIProb1h0pi0'):-1", float, doc="normalised probablity of decayMode 0, 1h+0pi0 (Unified ParT 2024 - PUPPI Jets)", precision=10),
139  probDM1UParT= Var("?isTauIDAvailable('byUTagPUPPIProb1h1pi0')?tauID('byUTagPUPPIProb1h1pi0'):-1", float, doc="normalised probablity of decayMode 1, 1h+1pi0 (Unified ParT 2024 - PUPPI Jets)", precision=10),
140  probDM2UParT= Var("?isTauIDAvailable('byUTagPUPPIProb1h2pi0')?tauID('byUTagPUPPIProb1h2pi0'):-1", float, doc="normalised probablity of decayMode 2, 1h+2pi0 (Unified ParT 2024 - PUPPI Jets)", precision=10),
141  probDM10UParT= Var("?isTauIDAvailable('byUTagPUPPIProb3h0pi0')?tauID('byUTagPUPPIProb3h0pi0'):-1", float, doc="normalised probablity of decayMode 10, 3h+0pi0 (Unified ParT 2024 - PUPPI Jets)", precision=10),
142  probDM11UParT= Var("?isTauIDAvailable('byUTagPUPPIProb3h1pi0')?tauID('byUTagPUPPIProb3h1pi0'):-1", float, doc="normalised probablity of decayMode 11, 3h+1pi0 (Unified ParT 2024 - PUPPI Jets)", precision=10),
143 )
144 
145 _variablesMiniV2 = cms.PSet(
146  _tauVarsBase,
147  _deepTauVars2017v2p1,
148  _deepTauVars2018v2p5,
149  _UTagCHS,
150  _UTagPUPPI
151 )
152 
153 tauTable.variables = _variablesMiniV2
154 
155 run3_nanoAOD_124.toModify(
156  tauTable.variables,
157  idDeepTau2018v2p5VSe = _tauIdWPMask("byDeepTau2018v2p5VSeraw",
158  choices=("VVVLoose","VVLoose","VLoose","Loose","Medium","Tight","VTight","VVTight"),
159  doc="byDeepTau2018v2p5VSe ID working points (deepTau2018v2p5)",
160  from_raw=True, wp_thrs=WORKING_POINTS_v2p5["e"]),
161  idDeepTau2018v2p5VSmu = _tauIdWPMask("byDeepTau2018v2p5VSmuraw",
162  choices=("VLoose", "Loose", "Medium", "Tight"),
163  doc="byDeepTau2018v2p5VSmu ID working points (deepTau2018v2p5)",
164  from_raw=True, wp_thrs=WORKING_POINTS_v2p5["mu"]),
165  idDeepTau2018v2p5VSjet = _tauIdWPMask("byDeepTau2018v2p5VSjetraw",
166  choices=("VVVLoose","VVLoose","VLoose","Loose","Medium","Tight","VTight","VVTight"),
167  doc="byDeepTau2018v2p5VSjet ID working points (deepTau2018v2p5)",
168  from_raw=True, wp_thrs=WORKING_POINTS_v2p5["jet"])
169 )
170 
171 tauSignalCands = patTauSignalCandidatesProducer.clone(
172  src = tauTable.src,
173  storeLostTracks = True
174 )
175 
176 tauSignalCandsTable = simpleCandidateFlatTableProducer.clone(
177  src = cms.InputTag("tauSignalCands"),
178  cut = cms.string("pt > 0."),
179  name = cms.string("TauProd"),
180  doc = cms.string("tau signal candidates"),
181  variables = cms.PSet(
182  P3Vars,
183  pdgId = Var("pdgId", int, doc="PDG code assigned by the event reconstruction (not by MC truth)"),
184  tauIdx = Var("status", "int16", doc="index of the mother tau"),
185  #trkPt = Var("?daughter(0).hasTrackDetails()?daughter(0).bestTrack().pt():0", float, precision=-1, doc="pt of associated track"), #MB: better to store ratio over cand pt?
186  )
187 )
188 
189 tauGenJetsForNano = tauGenJets.clone(
190  GenParticles = "finalGenParticles",
191  includeNeutrinos = False
192 )
193 
194 tauGenJetsSelectorAllHadronsForNano = tauGenJetsSelectorAllHadrons.clone(
195  src = "tauGenJetsForNano"
196 )
197 
198 genVisTaus = cms.EDProducer("GenVisTauProducer",
199  src = cms.InputTag("tauGenJetsSelectorAllHadronsForNano"),
200  srcGenParticles = cms.InputTag("finalGenParticles")
201 )
202 
203 genVisTauTable = simpleGenParticleFlatTableProducer.clone(
204  src = cms.InputTag("genVisTaus"),
205  cut = cms.string("pt > 10."),
206  name = cms.string("GenVisTau"),
207  doc = cms.string("gen hadronic taus "),
208  variables = cms.PSet(
209  pt = Var("pt", float,precision=8),
210  phi = Var("phi", float,precision=8),
211  eta = Var("eta", float,precision=8),
212  mass = Var("mass", float,precision=8),
213  charge = Var("charge", "int16"),
214  status = Var("status", "uint8", doc="Hadronic tau decay mode. 0=OneProng0PiZero, 1=OneProng1PiZero, 2=OneProng2PiZero, 10=ThreeProng0PiZero, 11=ThreeProng1PiZero, 15=Other"),
215  genPartIdxMother = Var("?numberOfMothers>0?motherRef(0).key():-1", "int16", doc="index of the mother particle"),
216  )
217 )
218 
219 tausMCMatchLepTauForTable = cms.EDProducer("MCMatcher", # cut on deltaR, deltaPt/Pt; pick best by deltaR
220  src = tauTable.src, # final reco collection
221  matched = cms.InputTag("finalGenParticles"), # final mc-truth particle collection
222  mcPdgId = cms.vint32(11,13), # one or more PDG ID (11 = electron, 13 = muon); absolute values (see below)
223  checkCharge = cms.bool(False), # True = require RECO and MC objects to have the same charge
224  mcStatus = cms.vint32(), # PYTHIA status code (1 = stable, 2 = shower, 3 = hard scattering)
225  maxDeltaR = cms.double(0.3), # Minimum deltaR for the match
226  maxDPtRel = cms.double(0.5), # Minimum deltaPt/Pt for the match
227  resolveAmbiguities = cms.bool(True), # Forbid two RECO objects to match to the same GEN object
228  resolveByMatchQuality = cms.bool(True), # False = just match input in order; True = pick lowest deltaR pair first
229 )
230 
231 tausMCMatchHadTauForTable = cms.EDProducer("MCMatcher", # cut on deltaR, deltaPt/Pt; pick best by deltaR
232  src = tauTable.src, # final reco collection
233  matched = cms.InputTag("genVisTaus"), # generator level hadronic tau decays
234  mcPdgId = cms.vint32(15), # one or more PDG ID (15 = tau); absolute values (see below)
235  checkCharge = cms.bool(False), # True = require RECO and MC objects to have the same charge
236  mcStatus = cms.vint32(), # CV: no *not* require certain status code for matching (status code corresponds to decay mode for hadronic tau decays)
237  maxDeltaR = cms.double(0.3), # Maximum deltaR for the match
238  maxDPtRel = cms.double(1.), # Maximum deltaPt/Pt for the match
239  resolveAmbiguities = cms.bool(True), # Forbid two RECO objects to match to the same GEN object
240  resolveByMatchQuality = cms.bool(True), # False = just match input in order; True = pick lowest deltaR pair first
241 )
242 
243 tauMCTable = cms.EDProducer("CandMCMatchTableProducer",
244  src = tauTable.src,
245  mcMap = cms.InputTag("tausMCMatchLepTauForTable"),
246  mcMapVisTau = cms.InputTag("tausMCMatchHadTauForTable"),
247  objName = tauTable.name,
248  objType = tauTable.name, #cms.string("Tau"),
249  branchName = cms.string("genPart"),
250  docString = cms.string("MC matching to status==2 taus"),
251 )
252 
253 
254 tauTask = cms.Task(finalTaus)
255 tauTablesTask = cms.Task(tauTable)
256 tauSignalCandsTask = cms.Task(tauSignalCands,tauSignalCandsTable)
257 tauTablesTask.add(tauSignalCandsTask)
258 
259 genTauTask = cms.Task(tauGenJetsForNano,tauGenJetsSelectorAllHadronsForNano,genVisTaus,genVisTauTable)
260 tauMCTask = cms.Task(genTauTask,tausMCMatchLepTauForTable,tausMCMatchHadTauForTable,tauMCTable)
261 
def Var(expr, valtype, doc=None, precision=-1, lazyEval=False)
Definition: common_cff.py:17
static std::string join(char **cmd)
Definition: RemoteFile.cc:21
def _tauIdWPMask(pattern, choices, doc="", from_raw=False, wp_thrs=None)
Tables for final output and docs ##########################.
Definition: taus_cff.py:30