Go to the documentation of this file.00001 import FWCore.ParameterSet.Config as cms
00002 import Validation.RecoTau.ValidationUtils as Utils
00003 from Validation.RecoTau.RecoTauValidation_cfi import ApplyFunctionToSequence, SetValidationExtention
00004 import PhysicsTools.PatAlgos.tools.helpers as helpers
00005
00006 proc = cms.Process('helper')
00007
00008 proc.load('Validation.RecoTau.dataTypes.ValidateTausOnZTT_cff')
00009
00010 procAttributes = dir(proc)
00011 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorZTT, 'FastSim')
00012 helpers.cloneProcessingSnippet( proc, proc.TauEfficienciesZTT, 'FastSim')
00013 proc.produceDenominatorZTTFastSim = helpers.cloneProcessingSnippet( proc, proc.produceDenominatorZTT, 'FastSim')
00014
00015
00016 zttLabeler = lambda module : SetValidationExtention(module, 'FastSim')
00017 zttModifier = ApplyFunctionToSequence(zttLabeler)
00018 proc.TauValNumeratorAndDenominatorZTTFastSim.visit(zttModifier)
00019
00020
00021 proc.efficienciesZTTFastSim.plots = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominatorZTTFastSim)
00022
00023
00024 newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('FastSim') != -1), dir(proc) )
00025
00026
00027 for newAttr in newProcAttributes:
00028 locals()[newAttr] = getattr(proc,newAttr)
00029
00030 produceDenominator = produceDenominatorZTTFastSim
00031
00032 runTauValidationBatchMode = cms.Sequence(
00033 produceDenominatorZTTFastSim
00034 +TauValNumeratorAndDenominatorZTTFastSim
00035 )
00036
00037 runTauValidation = cms.Sequence(
00038 runTauValidationBatchMode
00039 +TauEfficienciesZTTFastSim
00040 )
00041