CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecoTauValidation_cfi.py
Go to the documentation of this file.
2 import Validation.RecoTau.ValidationUtils as Utils
3 import copy
4 import re
5 import os
6 
7 #from Validation.RecoTau.ValidationOptions_cff import *
8 
9 
10 """
11 
12  RecoTauValidation_cfi.py
13 
14  Contains the standard tau validation parameters. It is organized into
15  the following sections.
16 
17  DENOMINATOR
18 
19  Set common kinematic cuts (pt > 5 and eta < 2.5) on the denominator source.
20  Note that the denominator depends on the type of test (signal/background/e etc)
21 
22  The denominator kinematic cutter requires that
23 
24  HISTOGRAMS
25 
26  Produce numerator and denominator histgorams used to produce
27  tau efficiency plots
28 
29  Provides sequence:
30  TauValNumeratorAndDenominator
31  Requires:
32  tauValSelectedDenominator (filtered GenJet collection)
33 
34  EFFICIENCY
35 
36  Using numerator and denominators, calculate and store
37  the efficiency curves
38 
39  Provides sequence:
40  TauEfficiencies
41  Requires:
42  TauValNumeratorAndDenominator
43 
44  PLOTTING
45 
46  Plot curves calculated in efficiency, in both an overlay mode
47  showing overall performance for a release, and the indvidual
48  discriminator efficiency compared to a given release
49 
50  Provides sequence:
51  loadTau
52  plotTauValidation
53  loadAndPlotTauValidation
54 
55  Requires:
56  TauEfficiencies, external root file to compare to
57 
58  Plotting must be executed in a separate cmsRun job!
59 
60  UTILITIES
61 
62  Various scripts to automate things...
63 
64 
65 """
66 
67 """
68 
69 DENOMINATOR
70 
71 """
72 
73 kinematicSelectedTauValDenominatorCut = cms.string('pt > 5. && abs(eta) < 2.5')
74 denominator = cms.InputTag("kinematicSelectedTauValDenominator")
75 
76 """
77 
78 HISTOGRAMS
79 
80  Plot the pt/eta/energy/phi spectrum of PFTaus that pass
81  a series of PFTauDiscriminator cuts.
82 
83  These will be used as the numerator/denominators of the
84  efficiency calculations
85 """
86 
87 #Helper process to make future cloning easier
88 proc = cms.Process('helper')
89 
90 StandardMatchingParameters = cms.PSet(
91  DataType = cms.string('Leptons'),
92  MatchDeltaR_Leptons = cms.double(0.15),
93  MatchDeltaR_Jets = cms.double(0.3),
94  SaveOutputHistograms = cms.bool(False), #TRUE FOR TEST ONLY
95  #RefCollection = cms.InputTag("TauGenJetProducer","selectedGenTauDecaysToHadronsPt5Cumulative"),
96  RefCollection = denominator,
97  TauPtCut = cms.double(0.), #almost deprecated, since recoCuts provides more flexibility
98  recoCuts = cms.string(''), #filter reconstructed candidates. leave this empty to select all. or use sth like: pt > 20 & abs(eta) < 2.3
99  genCuts = cms.string(''), #filter generated candidates. leave this empty to select all. or use sth like: pt > 20 & abs(eta) < 2.3
100  chainCuts = cms.bool(False) #Decide whether to chain discriminators or not
101 )
102 
103 GenericTriggerSelectionParameters = cms.PSet(
104  andOr = cms.bool( False ),#specifies the logical combination of the single filters' (L1, HLT and DCS) decisions at top level (True=OR)
105  dbLabel = cms.string("PFTauDQMTrigger"),#specifies the label under which the DB payload is available from the ESSource or Global Tag
106  andOrHlt = cms.bool(True),#specifies the logical combination of the single HLT paths' decisions (True=OR)
107  hltInputTag = cms.InputTag("TriggerResults::HLT"),
108  #hltDBKey = cms.string('jetmet_highptjet'),#Tag of the record in the database, where IOV-based HLT paths are found. This record overwrites the configuration parameter hltPaths
109  hltPaths = cms.vstring('HLT_IsoMu*_eta*_LooseIsoPFTau*_v*','HLT_DoubleIsoPFTau*_Trk*_eta*_v*'),#Lists logical expressions of HLT paths, which should have accepted the event (fallback in case DB unaccessible)
110  errorReplyHlt = cms.bool(False),#specifies the desired return value of the HLT filter and the single HLT path filter in case of certain errors
111  verbosityLevel = cms.uint32(0) #0: complete silence (default), needed for T0 processing;
112 )
113 
114 proc.templateAnalyzer = cms.EDAnalyzer(
115  "TauTagValidation",
116  StandardMatchingParameters,
117  GenericTriggerSelection = GenericTriggerSelectionParameters,
118  ExtensionName = cms.string(""),
119  TauProducer = cms.InputTag(''),
120  discriminators = cms.VPSet(
121  )
122 )
123 
124 proc.RunHPSValidation = proc.templateAnalyzer.clone()
125 proc.RunHPSValidation.ExtensionName = ""
126 #RunHPSValidation.TauPtCut = cms.double(15.)
127 proc.RunHPSValidation.TauProducer = cms.InputTag('hpsPFTauProducer')
128 proc.RunHPSValidation.discriminators = cms.VPSet(
129  cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByDecayModeFinding"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)),
130  cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseChargedIsolation"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)),
131  cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseChargedIsolation"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)),
132  cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightChargedIsolation"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)),
133  cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolation"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)),
134  cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)),
135  cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)),
136  cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)),
137  cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)),
138  cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)),
139  cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)),
140  cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)),
141  cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)),
142  cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)),
143  cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)),
144  cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVAElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)),
145 )
146 
147 proc.TauValNumeratorAndDenominator = cms.Sequence(
148  proc.RunHPSValidation
149  )
150 
151 """
152 
153 EFFICIENCY
154 
155  Tau efficiency calculations
156 
157  Define the Efficiency curves to produce. Each
158  efficiency producer takes the numberator and denominator
159  histograms and the dependent variables.
160 """
161 
162 plotPset = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominator)
163 proc.efficiencies = cms.EDAnalyzer(
164  "TauDQMHistEffProducer",
165  plots = plotPset
166  )
167 
168 
169 ################################################
170 #
171 # Normalizes All the histograms
172 #
173 ################################################
174 
175 proc.normalizePlots = cms.EDAnalyzer(
176  "DQMHistNormalizer",
177  plotNamesToNormalize = cms.vstring('*_pTRatio_*','*_Size_*','*_SumPt_*','*_dRTauRefJet*'),
178  reference = cms.string('*_pTRatio_allHadronic')
179  )
180 
181 proc.TauEfficiencies = cms.Sequence(
182  proc.efficiencies*
183  proc.normalizePlots
184  )
185 
186 """
187 
188 PLOTTING
189 
190  loadTau: load two separate TauVal root files into the DQM
191  so the plotter can access them
192 
193 """
194 
195 loadTau = cms.EDAnalyzer("TauDQMFileLoader",
196  test = cms.PSet(
197  #inputFileNames = cms.vstring('/afs/cern.ch/user/f/friis/scratch0/MyValidationArea/310pre6NewTags/src/Validation/RecoTau/test/CMSSW_3_1_0_pre6_ZTT_0505Fixes.root'),
198  inputFileNames = cms.vstring('/opt/sbg/cms/ui4_data1/dbodin/CMSSW_3_5_1/src/TauID/QCD_recoFiles/TauVal_CMSSW_3_6_0_QCD.root'),
199  scaleFactor = cms.double(1.),
200  dqmDirectory_store = cms.string('test')
201  ),
202  reference = cms.PSet(
203  inputFileNames = cms.vstring('/opt/sbg/cms/ui4_data1/dbodin/CMSSW_3_5_1/src/TauID/QCD_recoFiles/TauVal_CMSSW_3_6_0_QCD.root'),
204  scaleFactor = cms.double(1.),
205  dqmDirectory_store = cms.string('reference')
206  )
207 )
208 
209 # Lots of junk to define the plot style
210 
211 # standard drawing stuff
212 xAxisStuff = cms.PSet(
213  xAxisTitle = cms.string('P_{T} / GeV'),
214  xAxisTitleOffset = cms.double(0.9),
215  xAxisTitleSize = cms.double(0.05)
216 )
217 xModifiers = [['pt',['xAxisTitle'],['P_{T} / GeV']],['eta',['xAxisTitle'],['#eta']],['phi',['xAxisTitle'],['#phi']],['pileup',['xAxisTitle'],['# of Reco Vertices']]]
218 
219 yAxisStuff =cms.PSet(
220  yScale = cms.string('linear'), # linear/log
221  minY_linear = cms.double(0.),
222  maxY_linear = cms.double(1.6),
223  minY_log = cms.double(0.001),
224  maxY_log = cms.double(1.8),
225  yAxisTitle = cms.string('#varepsilon'),
226  yAxisTitleOffset = cms.double(1.1),
227  yAxisTitleSize = cms.double(0.05)
228 )
229 yModifiers = [['efficiency',['yScale','yAxisTitle'],['linear','#varepsilon']],['fakeRate',['yScale','yAxisTitle'],['log','Fake rate']]]
230 
231 legStuff = cms.PSet(
232  posX = cms.double(0.50),
233  posY = cms.double(0.72),
234  sizeX = cms.double(0.39),
235  sizeY = cms.double(0.17),
236  header = cms.string(''),
237  option = cms.string('brNDC'),
238  borderSize = cms.int32(0),
239  fillColor = cms.int32(0)
240 )
241 legModifiers = [['efficiency',['posY','sizeY'],[0.72,0.17]],['efficiency_overlay',['posY','sizeY'],[0.66,0.23]]]
242 
243 drawOptStuff = cms.PSet(
244  markerColor = cms.int32(1),
245  markerSize = cms.double(1.),
246  markerStyle = cms.int32(20),
247  lineColor = cms.int32(1),
248  lineStyle = cms.int32(1),
249  lineWidth = cms.int32(2),
250  drawOption = cms.string('ex0'),
251  drawOptionLegend = cms.string('p')
252 )
253 drawOptModifiers = [['eff_overlay01',['markerColor','lineColor'],[1,1]],['eff_overlay02',['markerColor','lineColor'],[2,2]],['eff_overlay03',['markerColor','lineColor'],[3,3]],['eff_overlay04',['markerColor','lineColor'],[4,4]],['eff_overlay05',['markerColor','lineColor'],[6,6]],['eff_overlay06',['markerColor','lineColor'],[5,5]],['eff_overlay07',['markerColor','lineColor'],[7,7]],['eff_overlay08',['markerColor','lineColor'],[28,28]],['eff_overlay09',['markerColor','lineColor','markerStyle'],[2,2,29]],['eff_overlay010',['markerColor','lineColor','markerStyle'],[4,4,29]],['eff_overlay011',['markerColor','lineColor','markerStyle'],[6,6,29]]]
254 
255 standardDrawingStuff = cms.PSet(
256  canvasSizeX = cms.int32(640),
257  canvasSizeY = cms.int32(640),
258  indOutputFileName = cms.string('#PLOT#.png'),
259  xAxes = Utils.SpawnPSet(xModifiers,xAxisStuff),
260  yAxes = Utils.SpawnPSet(yModifiers,yAxisStuff),
261  legends = Utils.SpawnPSet(legModifiers,legStuff),
262  labels = cms.PSet(
263  pt = cms.PSet(
264  posX = cms.double(0.19),
265  posY = cms.double(0.77),
266  sizeX = cms.double(0.12),
267  sizeY = cms.double(0.04),
268  option = cms.string('brNDC'),
269  borderSize = cms.int32(0),
270  fillColor = cms.int32(0),
271  textColor = cms.int32(1),
272  textSize = cms.double(0.04),
273  textAlign = cms.int32(22),
274  text = cms.vstring('P_{T} > 5 GeV') #vstring not supported by SpawnPSet
275  ),
276  eta = cms.PSet(
277  posX = cms.double(0.19),
278  posY = cms.double(0.83),
279  sizeX = cms.double(0.12),
280  sizeY = cms.double(0.04),
281  option = cms.string('brNDC'),
282  borderSize = cms.int32(0),
283  fillColor = cms.int32(0),
284  textColor = cms.int32(1),
285  textSize = cms.double(0.04),
286  textAlign = cms.int32(22),
287  text = cms.vstring('-2.5 < #eta < +2.5')
288  )
289  ),
290  drawOptionSets = cms.PSet(
291  efficiency = cms.PSet(
292  test = cms.PSet(
293  markerColor = cms.int32(4),
294  markerSize = cms.double(1.),
295  markerStyle = cms.int32(20),
296  lineColor = cms.int32(1),
297  lineStyle = cms.int32(1),
298  lineWidth = cms.int32(1),
299  drawOption = cms.string('ep'),
300  drawOptionLegend = cms.string('p')
301  ),
302  reference = cms.PSet(
303  lineColor = cms.int32(1),
304  lineStyle = cms.int32(1),
305  lineWidth = cms.int32(1),
306  fillColor = cms.int32(41),
307  drawOption = cms.string('eBand'),
308  drawOptionLegend = cms.string('l')
309  )
310  )
311  ),
312  drawOptionEntries = Utils.SpawnPSet(drawOptModifiers,drawOptStuff)
313 )
314 
315 standardCompareTestAndReference = cms.PSet(
316  processes = cms.PSet(
317  test = cms.PSet(
318  dqmDirectory = cms.string('test'),
319  legendEntry = cms.string('no test label'),
320  type = cms.string('smMC') # Data/smMC/bsmMC/smSumMC
321  ),
322  reference = cms.PSet(
323  dqmDirectory = cms.string('reference'),
324  legendEntry = cms.string('no ref label'),
325  type = cms.string('smMC') # Data/smMC/bsmMC/smSumMC
326  )
327  ),
328 )
329 
330 
331 ##################################################
332 #
333 # The plotting of HPS Efficiencies
334 #
335 ##################################################
336 ## plotHPSEfficiencies = cms.EDAnalyzer("TauDQMHistPlotter",
337 ## standardDrawingStuff,
338 ## standardCompareTestAndReference,
339 ## drawJobs = Utils.SpawnDrawJobs(RunHPSValidation, plotPset),
340 ## outputFilePath = cms.string('./hpsPFTauProducer/'),
341 ## PrintToFile = cms.bool(True)
342 ## )
343 ## #clone for DQM
344 ## plotHPSEfficiencies2 = plotHPSEfficiencies.clone()
345 
346 
347 ##################################################
348 #
349 # The plotting of all the Shrinking cone leading pion efficiencies
350 #
351 ##################################################
352 ## plotPFTauHighEfficiencyEfficienciesLeadingPion = cms.EDAnalyzer("TauDQMHistPlotter",
353 ## standardDrawingStuff,
354 ## standardCompareTestAndReference,
355 ## drawJobs = Utils.SpawnDrawJobs(PFTausHighEfficiencyLeadingPionBothProngs, plotPset),
356 ## outputFilePath = cms.string('./shrinkingConePFTauProducerLeadingPion/'),
357 ## PrintToFile = cms.bool(True)
358 ## )
359 ## #clone for DQM
360 ## plotPFTauHighEfficiencyEfficienciesLeadingPion2 = plotPFTauHighEfficiencyEfficienciesLeadingPion.clone()
361 
362 
363 ## plotTauValidation = cms.Sequence(
364 ## plotPFTauHighEfficiencyEfficienciesLeadingPion
365 ## +plotHPSEfficiencies
366 ## )
367 
368 ## plotTauValidation2 = cms.Sequence(
369 ## plotPFTauHighEfficiencyEfficienciesLeadingPion2
370 ## +plotHPSEfficiencies2
371 ## )
372 
373 
374 ## loadAndPlotTauValidation = cms.Sequence(
375 ## loadTau
376 ## +plotTauValidation
377 ## )
378 
379 """
380 
381 UTILITIES
382 
383 """
384 
386  """ Helper class that applies a given function to all modules
387  in a sequence """
388  def __init__(self,function):
389  self.functor = function
390  def enter(self, module):
391  self.functor(module)
392  def leave(self, module):
393  pass
394 
396  input = re.sub('fixedConePFTauProducer', 'pfRecoTauProducer', input)
397  #fixedDiscriminationRegex = re.compile('fixedConePFTauDiscrimination( \w* )')
398  fixedDiscriminationRegex = re.compile('fixedConePFTauDiscrimination(\w*)')
399  input = fixedDiscriminationRegex.sub(r'pfRecoTauDiscrimination\1', input)
400  input = re.sub('shrinkingConePFTauProducer', 'pfRecoTauProducerHighEfficiency', input)
401  shrinkingDiscriminationRegex = re.compile('shrinkingConePFTauDiscrimination(\w*)')
402  input = shrinkingDiscriminationRegex.sub(r'pfRecoTauDiscrimination\1HighEfficiency', input)
403  return input
404 
405 
407  """ Converts a draw job defined to compare 31X named PFTau validtion efficiencies
408  to comapre a 31X to a 22X named validation """
409  # get the list of drawjobs { name : copyOfPSet }
410  if not hasattr(input, "drawJobs"):
411  return
412  myDrawJobs = input.drawJobs.parameters_()
413  for drawJobName, drawJobData in myDrawJobs.iteritems():
414  print drawJobData
415  if not drawJobData.plots.pythonTypeName() == "cms.PSet":
416  continue
417  pSetToInsert = cms.PSet(
418  standardEfficiencyParameters,
419  plots = cms.VPSet(
420  # test plot w/ modern names
421  cms.PSet(
422  dqmMonitorElements = drawJobData.plots.dqmMonitorElements,
423  process = cms.string('test'),
424  drawOptionEntry = cms.string('eff_overlay01'),
425  legendEntry = cms.string(input.processes.test.legendEntry.value())
426  ),
427  # ref plot w/ vintage name
428  cms.PSet(
429  # translate the name
430  dqmMonitorElements = cms.vstring(TranslateToLegacyProdNames(drawJobData.plots.dqmMonitorElements.value()[0])),
431  process = cms.string('reference'),
432  drawOptionEntry = cms.string('eff_overlay02'),
433  legendEntry = cms.string(input.processes.reference.legendEntry.value())
434  )
435  )
436  )
437  input.drawJobs.__setattr__(drawJobName, pSetToInsert)
438 
439 def MakeLabeler(TestLabel, ReferenceLabel):
440  def labeler(module):
441  if hasattr(module, 'processes'):
442  if module.processes.hasParameter(['test', 'legendEntry']) and module.processes.hasParameter([ 'reference', 'legendEntry']):
443  module.processes.test.legendEntry = TestLabel
444  module.processes.reference.legendEntry = ReferenceLabel
445  print "Set test label to %s and reference label to %s for plot producer %s" % (TestLabel, ReferenceLabel, module.label())
446  else:
447  print "ERROR in RecoTauValidation_cfi::MakeLabeler - trying to set test/reference label but %s does not have processes.(test/reference).legendEntry parameters!" % module.label()
448  return labeler
449 
450 def SetYmodulesToLog(matchingNames = []):
451  ''' set all modules whose name contains one of the matching names to log y scale'''
452  def yLogger(module):
453  ''' set a module to use log scaling in the yAxis'''
454  if hasattr(module, 'drawJobs'):
455  print "EK DEBUG"
456  drawJobParamGetter = lambda subName : getattr(module.drawJobs, subName)
457  #for subModule in [getattr(module.drawJobs, subModuleName) for subModuleName in dir(module.drawJobs)]:
458  attrNames = dir(module.drawJobs)
459  for subModuleName, subModule in zip(attrNames, map(drawJobParamGetter, attrNames)):
460  matchedNames = [name for name in matchingNames if subModuleName.find( name) > -1] # matching sub strings
461  if len(matchingNames) == 0:
462  matchedNames = ['take','everything','and','dont','bother']
463  if hasattr(subModule, "yAxis") and len(matchedNames):
464  print "Setting drawJob: ", subModuleName, " to log scale."
465  subModule.yAxis = cms.string('fakeRate') #'fakeRate' configuration specifies the log scaling
466  if len(matchingNames) == 0:
467  module.yAxes.efficiency.maxY_log = 40
468  module.yAxes.fakeRate.maxY_log = 40
469  return yLogger
470 
471 
472 def SetBaseDirectory(Directory):
473  def BaseDirectorizer(module):
474  newPath = Directory
475  #if module.hasParameter("outputFilePath"):
476  if hasattr(module, "outputFilePath"):
477  oldPath = module.outputFilePath.value()
478  newPath = os.path.join(newPath, oldPath)
479  if not os.path.exists(newPath):
480  os.makedirs(newPath)
481  print newPath
482  module.outputFilePath = cms.string("%s" % newPath)
483  return BaseDirectorizer
484 
486  if hasattr(module, 'drawJobs'):
487  #get draw job parameter names
488  drawJobs = module.drawJobs.parameterNames_()
489  for drawJob in drawJobs:
490  if drawJob != "TauIdEffStepByStep":
491  module.drawJobs.__delattr__(drawJob)
492  print "Removing comparison plot", drawJob
493 
494 def SetPlotDirectory(myPlottingSequence, directory):
495  myFunctor = ApplyFunctionToSequence(SetBaseDirectory(directory))
496  myPlottingSequence.visit(myFunctor)
497 
498 def SetTestAndReferenceLabels(myPlottingSequence, TestLabel, ReferenceLabel):
499  myFunctor = ApplyFunctionToSequence(MakeLabeler(TestLabel, ReferenceLabel))
500  myPlottingSequence.visit(myFunctor)
501 
502 def SetCompareToLegacyProductNames(myPlottingSequence):
503  myFunctor = ApplyFunctionToSequence(ConvertDrawJobToLegacyCompare)
504  myPlottingSequence.visit(myFunctor)
505 
506 def SetTestFileToPlot(myProcess, FileLoc):
507  myProcess.loadTau.test.inputFileNames = cms.vstring(FileLoc)
508 
509 def SetReferenceFileToPlot(myProcess, FileLoc):
510  if FileLoc == None:
511  del myProcess.loadTau.reference
512  else:
513  myProcess.loadTau.reference.inputFileNames = cms.vstring(FileLoc)
514 
515 def SetLogScale(myPlottingSequence):
517  myPlottingSequence.visit(myFunctor)
518 
519 def SetSmartLogScale(myPlottingSequence):
520  myFunctor = ApplyFunctionToSequence(SetYmodulesToLog(['Electron', 'Muon', 'Isolation', 'TaNC']))
521  myPlottingSequence.visit(myFunctor)
522 
523 def SetPlotOnlyStepByStep(myPlottingSequence):
524  myFunctor = ApplyFunctionToSequence(RemoveComparisonPlotCommands)
525  myPlottingSequence.visit(myFunctor)
526 
527 def SetValidationExtention(module, extension):
528  module.ExtensionName = module.ExtensionName.value()+extension
529 
530 def setBinning(module,pset):
531  if module._TypedParameterizable__type == 'TauTagValidation':
532  module.histoSettings = pset
533 
534 def setTrigger(module,pset):
535  if hasattr(module,'_TypedParameterizable__type') and module._TypedParameterizable__type == 'TauTagValidation':
536  setattr(module,'turnOnTrigger',cms.bool(True)) #Turns on trigger (in case is off)
537  for item in pset.parameters_().items():
538  setattr(module.GenericTriggerSelection,item[0],item[1])
dictionary map
Definition: Association.py:205
dbl *** dir
Definition: mlp_gen.cc:35