CMS 3D CMS Logo

tauTools.py
Go to the documentation of this file.
1 from __future__ import print_function
2 import FWCore.ParameterSet.Config as cms
3 
5 from PhysicsTools.PatAlgos.tools.helpers import cloneProcessingSnippet
8 
9 # applyPostFix function adapted to unscheduled mode
10 def applyPostfix(process, label, postfix):
11  result = None
12  if hasattr(process, label+postfix):
13  result = getattr(process, label + postfix)
14  else:
15  raise ValueError("Error in <applyPostfix>: No module of name = %s attached to process !!" % (label + postfix))
16  return result
17 
18 def _buildIDSourcePSet(tauType, idSources, postfix =""):
19  """ Build a PSet defining the tau ID sources to embed into the pat::Tau """
20  output = cms.PSet()
21  for label, discriminator in idSources:
22  wp = -99
23  if ";" in discriminator: #read from PFTauDiscriminatorContainer
24  discriminator, wp_str = discriminator.split(";")
25  wp = int(wp_str)
26  id = cms.PSet()
27  id.inputTag = cms.InputTag(discriminator.replace(":", postfix + ":"))
28  id.provenanceConfigLabel=cms.string("")
29  id.idLabel=cms.string("")
30  setattr(output, label, id)
31  return output
32 
33 def _switchToPFTau(process,
34  tauSource,
35  pfTauType,
36  idSources,
37  patTauLabel = "",
38  postfix = ""):
39  """internal auxiliary function to switch to **any** PFTau collection"""
40  print(' switching PAT Tau input to: ', tauSource)
41 
42  applyPostfix(process, "tauMatch" + patTauLabel, postfix).src = tauSource
43  applyPostfix(process, "tauGenJetMatch" + patTauLabel, postfix).src = tauSource
44 
45  applyPostfix(process, "tauIsoDepositPFCandidates" + patTauLabel, postfix).src = tauSource
46  applyPostfix(process, "tauIsoDepositPFCandidates" + patTauLabel, postfix).ExtractorPSet.tauSource = tauSource
47  applyPostfix(process, "tauIsoDepositPFChargedHadrons" + patTauLabel, postfix).src = tauSource
48  applyPostfix(process, "tauIsoDepositPFChargedHadrons" + patTauLabel, postfix).ExtractorPSet.tauSource = tauSource
49  applyPostfix(process, "tauIsoDepositPFNeutralHadrons" + patTauLabel, postfix).src = tauSource
50  applyPostfix(process, "tauIsoDepositPFNeutralHadrons" + patTauLabel, postfix).ExtractorPSet.tauSource = tauSource
51  applyPostfix(process, "tauIsoDepositPFGammas" + patTauLabel, postfix).src = tauSource
52  applyPostfix(process, "tauIsoDepositPFGammas" + patTauLabel, postfix).ExtractorPSet.tauSource = tauSource
53 
54  applyPostfix(process, "patTaus" + patTauLabel, postfix).tauSource = tauSource
55  # CV: reconstruction of tau lifetime information not enabled for tau collections other than 'hpsPFTauProducer' yet
56  applyPostfix(process, "patTaus" + patTauLabel, postfix).tauTransverseImpactParameterSource = ""
57  applyPostfix(process, "patTaus" + patTauLabel, postfix).tauIDSources = _buildIDSourcePSet(pfTauType, idSources, postfix)
58 
59  if hasattr(process, "cleanPatTaus" + patTauLabel + postfix):
60  getattr(process, "cleanPatTaus" + patTauLabel + postfix).preselection = preselection
61 
62 # Name mapping for classic tau ID sources (present for fixed and shrinkingCones)
63 classicTauIDSources = [
64  ("leadingTrackFinding", "DiscriminationByLeadingTrackFinding"),
65  ("leadingTrackPtCut", "DiscriminationByLeadingTrackPtCut"),
66  ("trackIsolation", "DiscriminationByTrackIsolation"),
67  ("ecalIsolation", "DiscriminationByECALIsolation"),
68  ("byIsolation", "DiscriminationByIsolation"),
69  ("againstElectron", "DiscriminationAgainstElectron"),
70  ("againstMuon", "DiscriminationAgainstMuon")
71 ]
72 
73 classicPFTauIDSources = [
74  ("leadingPionPtCut", "DiscriminationByLeadingPionPtCut"),
75  ("trackIsolationUsingLeadingPion", "DiscriminationByTrackIsolationUsingLeadingPion"),
76  ("ecalIsolationUsingLeadingPion", "DiscriminationByECALIsolationUsingLeadingPion"),
77  ("byIsolationUsingLeadingPion", "DiscriminationByIsolationUsingLeadingPion")
78 ]
79 
80 # Hadron-plus-strip(s) (HPS) Tau Discriminators
81 hpsTauIDSources = [
82  ("decayModeFindingNewDMs", "DiscriminationByDecayModeFindingNewDMs"),
83  ("decayModeFinding", "DiscriminationByDecayModeFinding"), # CV: kept for backwards compatibility
84  ("byLooseCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"),
85  ("byMediumCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"),
86  ("byTightCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"),
87  ("byCombinedIsolationDeltaBetaCorrRaw3Hits", "DiscriminationByRawCombinedIsolationDBSumPtCorr3Hits"),
88  ("byLooseCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03"),
89  ("byMediumCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03"),
90  ("byTightCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03"),
91  ("byPhotonPtSumOutsideSignalCone", "DiscriminationByPhotonPtSumOutsideSignalCone"),
92  ("chargedIsoPtSum", "ChargedIsoPtSum"),
93  ("neutralIsoPtSum", "NeutralIsoPtSum"),
94  ("puCorrPtSum", "PUcorrPtSum"),
95  ("neutralIsoPtSumWeight", "NeutralIsoPtSumWeight"),
96  ("footprintCorrection", "FootprintCorrection"),
97  ("photonPtSumOutsideSignalCone", "PhotonPtSumOutsideSignalCone"),
98  ("againstMuonLoose3", "DiscriminationByLooseMuonRejection3"),
99  ("againstMuonTight3", "DiscriminationByTightMuonRejection3"),
100  ("byIsolationMVArun2v1DBoldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBoldDMwLTraw"),
101  ("byVVLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT"),
102  ("byVLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"),
103  ("byLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"),
104  ("byMediumIsolationMVArun2v1DBoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"),
105  ("byTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBoldDMwLT"),
106  ("byVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"),
107  ("byVVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"),
108  ("byIsolationMVArun2v1DBnewDMwLTraw", "DiscriminationByIsolationMVArun2v1DBnewDMwLTraw"),
109  ("byVVLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVVLooseIsolationMVArun2v1DBnewDMwLT"),
110  ("byVLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"),
111  ("byLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"),
112  ("byMediumIsolationMVArun2v1DBnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"),
113  ("byTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByTightIsolationMVArun2v1DBnewDMwLT"),
114  ("byVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"),
115  ("byVVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"),
116  ("byIsolationMVArun2v1PWoldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWoldDMwLTraw"),
117  ("byVLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"),
118  ("byLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"),
119  ("byMediumIsolationMVArun2v1PWoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"),
120  ("byTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWoldDMwLT"),
121  ("byVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"),
122  ("byVVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"),
123  ("byIsolationMVArun2v1PWnewDMwLTraw", "DiscriminationByIsolationMVArun2v1PWnewDMwLTraw"),
124  ("byVLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"),
125  ("byLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"),
126  ("byMediumIsolationMVArun2v1PWnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"),
127  ("byTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByTightIsolationMVArun2v1PWnewDMwLT"),
128  ("byVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"),
129  ("byVVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"),
130  ("chargedIsoPtSumdR03", "ChargedIsoPtSumdR03"),
131  ("neutralIsoPtSumdR03", "NeutralIsoPtSumdR03"),
132  ("neutralIsoPtSumWeightdR03", "NeutralIsoPtSumWeightdR03"),
133  ("footprintCorrectiondR03", "FootprintCorrectiondR03"),
134  ("photonPtSumOutsideSignalConedR03", "PhotonPtSumOutsideSignalConedR03"),
135  ("byIsolationMVArun2v1DBdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw"),
136  ("byVVLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVVLooseIsolationMVArun2v1DBdR03oldDMwLT"),
137  ("byVLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"),
138  ("byLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"),
139  ("byMediumIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"),
140  ("byTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"),
141  ("byVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"),
142  ("byVVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"),
143  ("byIsolationMVArun2v1PWdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw"),
144  ("byVLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"),
145  ("byLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"),
146  ("byMediumIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"),
147  ("byTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"),
148  ("byVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"),
149  ("byVVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"),
150  ("againstElectronMVA6Raw", "DiscriminationByMVA6rawElectronRejection"),
151  ("againstElectronMVA6category", "DiscriminationByMVA6rawElectronRejection:category"),
152  ("againstElectronVLooseMVA6", "DiscriminationByMVA6VLooseElectronRejection"),
153  ("againstElectronLooseMVA6", "DiscriminationByMVA6LooseElectronRejection"),
154  ("againstElectronMediumMVA6", "DiscriminationByMVA6MediumElectronRejection"),
155  ("againstElectronTightMVA6", "DiscriminationByMVA6TightElectronRejection"),
156  ("againstElectronVTightMVA6", "DiscriminationByMVA6VTightElectronRejection"),
157  ("againstElectronDeadECAL", "DiscriminationByDeadECALElectronRejection"),
158 ]
159 
160 # switch to PFTau collection produced for fixed dR = 0.07 signal cone size
162  tauSource = cms.InputTag('fixedConePFTauProducer'),
163  patTauLabel = "",
164  postfix = ""):
165  fixedConeIDSources = copy.copy(classicTauIDSources)
166  fixedConeIDSources.extend(classicPFTauIDSources)
167 
168  _switchToPFTau(process, tauSource, 'fixedConePFTau', fixedConeIDSources,
169  patTauLabel = patTauLabel, postfix = postfix)
170 
171 # switch to PFTau collection produced for shrinking signal cone of size dR = 5.0/Et(PFTau)
173  tauSource = cms.InputTag('shrinkingConePFTauProducer'),
174  patTauLabel = "",
175  postfix = ""):
176  shrinkingIDSources = copy.copy(classicTauIDSources)
177  shrinkingIDSources.extend(classicPFTauIDSources)
178 
179  _switchToPFTau(process, tauSource, 'shrinkingConePFTau', shrinkingIDSources,
180  patTauLabel = patTauLabel, postfix = postfix)
181 
182 # switch to hadron-plus-strip(s) (HPS) PFTau collection
183 def switchToPFTauHPS(process,
184  tauSource = cms.InputTag('hpsPFTauProducer'),
185  patTauLabel = "",
186  jecLevels = [],
187  postfix = ""):
188 
189  _switchToPFTau(process, tauSource, 'hpsPFTau', hpsTauIDSources,
190  patTauLabel = patTauLabel, postfix = postfix)
191 
192  # CV: enable tau lifetime information for HPS PFTaus
193  applyPostfix(process, "patTaus" + patTauLabel, postfix).tauTransverseImpactParameterSource = tauSource.value().replace("Producer", "TransverseImpactParameters")
194 
195 
196  if hasattr(process, "cleanPatTaus" + patTauLabel + postfix):
197  getattr(process, "cleanPatTaus" + patTauLabel + postfix).preselection = preselection
198 
199 # Select switcher by string
201  pfTauType = None,
202  tauSource = cms.InputTag('hpsPFTauProducer'),
203  patTauLabel = "",
204  postfix = "" ):
205  mapping = {
206  'shrinkingConePFTau' : switchToPFTauShrinkingCone,
207  'fixedConePFTau' : switchToPFTauFixedCone,
208  'hpsPFTau' : switchToPFTauHPS
209  }
210  if not pfTauType in mapping.keys():
211  raise ValueError("Error in <switchToPFTauByType>: Undefined pfTauType = %s !!" % pfTauType)
212 
213  mapping[pfTauType](process, tauSource = tauSource,
214  patTauLabel = patTauLabel, postfix = postfix)
215 
217 
218  """ Add a new collection of taus. Takes the configuration from the
219  already configured standard tau collection as starting point;
220  replaces before calling addTauCollection will also affect the
221  new tau collections
222  """
223  _label='addTauCollection'
224  _defaultParameters=dicttypes.SortedKeysDict()
225  def __init__(self):
226  ConfigToolBase.__init__(self)
227  self.addParameter(self._defaultParameters, 'tauCollection',
228  self._defaultValue, 'Input tau collection', cms.InputTag)
229  self.addParameter(self._defaultParameters, 'algoLabel',
230  self._defaultValue, "label to indicate the tau algorithm (e.g.'hps')", str)
231  self.addParameter(self._defaultParameters, 'typeLabel',
232  self._defaultValue, "label to indicate the type of constituents (either 'PFTau' or 'Tau')", str)
233  self.addParameter(self._defaultParameters, 'doPFIsoDeposits',
234  True, "run sequence for computing particle-flow based IsoDeposits")
235  self.addParameter(self._defaultParameters, 'standardAlgo',
236  "hps", "standard algorithm label of the collection from which the clones " \
237  + "for the new tau collection will be taken from " \
238  + "(note that this tau collection has to be available in the event before hand)")
239  self.addParameter(self._defaultParameters, 'standardType',
240  "PFTau", "standard constituent type label of the collection from which the clones " \
241  + " for the new tau collection will be taken from "\
242  + "(note that this tau collection has to be available in the event before hand)")
243 
244  self._parameters=copy.deepcopy(self._defaultParameters)
245  self._comment = ""
246 
248  return self._defaultParameters
249 
250  def __call__(self,process,
251  tauCollection = None,
252  algoLabel = None,
253  typeLabel = None,
254  doPFIsoDeposits = None,
255  jetCorrLabel = None,
256  standardAlgo = None,
257  standardType = None):
258 
259  if tauCollection is None:
260  tauCollection = self._defaultParameters['tauCollection'].value
261  if algoLabel is None:
262  algoLabel = self._defaultParameters['algoLabel'].value
263  if typeLabel is None:
264  typeLabel = self._defaultParameters['typeLabel'].value
265  if doPFIsoDeposits is None:
266  doPFIsoDeposits = self._defaultParameters['doPFIsoDeposits'].value
267  if standardAlgo is None:
268  standardAlgo = self._defaultParameters['standardAlgo'].value
269  if standardType is None:
270  standardType = self._defaultParameters['standardType'].value
271 
272  self.setParameter('tauCollection', tauCollection)
273  self.setParameter('algoLabel', algoLabel)
274  self.setParameter('typeLabel', typeLabel)
275  self.setParameter('doPFIsoDeposits', doPFIsoDeposits)
276  self.setParameter('standardAlgo', standardAlgo)
277  self.setParameter('standardType', standardType)
278 
279  self.apply(process)
280 
281  def toolCode(self, process):
282  tauCollection = self._parameters['tauCollection'].value
283  algoLabel = self._parameters['algoLabel'].value
284  typeLabel = self._parameters['typeLabel'].value
285  doPFIsoDeposits = self._parameters['doPFIsoDeposits'].value
286  standardAlgo = self._parameters['standardAlgo'].value
287  standardType = self._parameters['standardType'].value
288 
289 
291  if typeLabel == 'Tau':
292  print("NO PF Isolation will be computed for CaloTau (this could be improved later)")
293  doPFIsoDeposits = False
294 
295 
297  def oldLabel(prefix = ''):
298  if prefix == '':
299  return "patTaus"
300  else:
301  return prefix + "PatTaus"
302 
303 
306  def capitalize(label):
307  return label[0].capitalize() + label[1:]
308 
309 
311  def newLabel(oldLabel):
312  newLabel = oldLabel
313  if ( oldLabel.find(standardAlgo) >= 0 and oldLabel.find(standardType) >= 0 ):
314  oldLabel = oldLabel.replace(standardAlgo, algoLabel).replace(standardType, typeLabel)
315  else:
316  oldLabel = oldLabel + capitalize(algoLabel + typeLabel)
317  return oldLabel
318 
319 
320  def addClone(hook, **replaceStatements):
321 
323  newModule = getattr(process, hook).clone(**replaceStatements)
324 
325 
326  def addPFIsoDepositClone(hook, **replaceStatements):
327  newModule = getattr(process, hook).clone(**replaceStatements)
328  newModuleIsoDepositExtractor = getattr(newModule, "ExtractorPSet")
329  setattr(newModuleIsoDepositExtractor, "tauSource", getattr(newModule, "src"))
330 
331 
332  addClone(oldLabel(), tauSource = tauCollection)
333 
334 
335  addClone(oldLabel('selected'), src = cms.InputTag(newLabel(oldLabel())))
336 
337 
338  addClone(oldLabel('clean'), src=cms.InputTag(newLabel(oldLabel('selected'))))
339 
340 
341  newTaus = getattr(process, newLabel(oldLabel()))
342 
343 
344  addClone('tauMatch', src = tauCollection)
345  addClone('tauGenJetMatch', src = tauCollection)
346 
347 
348  if doPFIsoDeposits:
349  addPFIsoDepositClone('tauIsoDepositPFCandidates', src = tauCollection)
350  addPFIsoDepositClone('tauIsoDepositPFChargedHadrons', src = tauCollection)
351  addPFIsoDepositClone('tauIsoDepositPFNeutralHadrons', src = tauCollection)
352  addPFIsoDepositClone('tauIsoDepositPFGammas', src = tauCollection)
353 
354 
355  def fixInputTag(x):
356  x.setModuleLabel(newLabel(x.moduleLabel))
357 
358 
359  fixInputTag(newTaus.genParticleMatch)
360  fixInputTag(newTaus.genJetMatch)
361  fixInputTag(newTaus.isoDeposits.pfAllParticles)
362  fixInputTag(newTaus.isoDeposits.pfNeutralHadron)
363  fixInputTag(newTaus.isoDeposits.pfChargedHadron)
364  fixInputTag(newTaus.isoDeposits.pfGamma)
365  fixInputTag(newTaus.userIsolation.pfAllParticles.src)
366  fixInputTag(newTaus.userIsolation.pfNeutralHadron.src)
367  fixInputTag(newTaus.userIsolation.pfChargedHadron.src)
368  fixInputTag(newTaus.userIsolation.pfGamma.src)
369 
370 
372  oldTaus = getattr(process, oldLabel())
373  switchToPFTauByType(process, pfTauType = algoLabel + typeLabel,
374  tauSource = getattr(newTaus, "tauSource"),
375  patTauLabel = capitalize(algoLabel + typeLabel))
376 
377 addTauCollection=AddTauCollection()
tauTools.AddTauCollection._parameters
_parameters
Definition: tauTools.py:244
tauTools._buildIDSourcePSet
def _buildIDSourcePSet(tauType, idSources, postfix="")
Definition: tauTools.py:18
tauTools.AddTauCollection.getDefaultParameters
def getDefaultParameters(self)
Definition: tauTools.py:247
tauTools.AddTauCollection.toolCode
def toolCode(self, process)
Definition: tauTools.py:281
tauTools.switchToPFTauHPS
def switchToPFTauHPS(process, tauSource=cms.InputTag('hpsPFTauProducer'), patTauLabel="", jecLevels=[], postfix="")
Definition: tauTools.py:183
ConfigToolBase
Definition: ConfigToolBase.py:1
tauTools.switchToPFTauFixedCone
def switchToPFTauFixedCone(process, tauSource=cms.InputTag('fixedConePFTauProducer'), patTauLabel="", postfix="")
Definition: tauTools.py:161
tauTools._switchToPFTau
def _switchToPFTau(process, tauSource, pfTauType, idSources, patTauLabel="", postfix="")
Definition: tauTools.py:33
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
tauTools.AddTauCollection._comment
_comment
Definition: tauTools.py:245
tauTools.AddTauCollection.__init__
def __init__(self)
Definition: tauTools.py:225
tauTools.applyPostfix
def applyPostfix(process, label, postfix)
Definition: tauTools.py:10
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
TauDiscriminatorTools
createfilelist.int
int
Definition: createfilelist.py:10
helpers
tauTools.switchToPFTauByType
def switchToPFTauByType(process, pfTauType=None, tauSource=cms.InputTag('hpsPFTauProducer'), patTauLabel="", postfix="")
Definition: tauTools.py:200
tauCleaner_cfi
tauTools.AddTauCollection._defaultParameters
_defaultParameters
Definition: tauTools.py:224
tauTools.switchToPFTauShrinkingCone
def switchToPFTauShrinkingCone(process, tauSource=cms.InputTag('shrinkingConePFTauProducer'), patTauLabel="", postfix="")
Definition: tauTools.py:172
tauTools.AddTauCollection
Definition: tauTools.py:216
tauTools.AddTauCollection.__call__
def __call__(self, process, tauCollection=None, algoLabel=None, typeLabel=None, doPFIsoDeposits=None, jetCorrLabel=None, standardAlgo=None, standardType=None)
Definition: tauTools.py:250
ConfigToolBase
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444