helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorZTT, 'FastSim') #clones the sequence inside the process with ZTT postfix helpers.cloneProcessingSnippet( proc, proc.TauEfficienciesZTT, 'FastSim') #clones the sequence inside the process with ZTT postfix proc.produceDenominatorZTTFastSim = helpers.cloneProcessingSnippet( proc, proc.produceDenominatorZTT, 'FastSim') #adds to TauValNumeratorAndDenominator modules in the sequence FastSim to the extention name zttLabeler = lambda module: SetValidationExtention(module, 'FastSim') zttModifier = ApplyFunctionToSequence(zttLabeler) proc.TauValNumeratorAndDenominatorZTTFastSim.visit(zttModifier) #Sets the correct naming to efficiency histograms proc.efficienciesZTTFastSim.plots = Utils.SetPlotSequence( proc.TauValNumeratorAndDenominatorZTTFastSim) #checks what's new in the process (the cloned sequences and modules in them) newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('FastSim') != -1), dir(proc)) #spawns a local variable with the same name as the proc attribute, needed for future process.load for newAttr in newProcAttributes: locals()[newAttr] = getattr(proc, newAttr) produceDenominator = produceDenominatorZTTFastSim runTauValidationBatchMode = cms.Sequence( produceDenominatorZTTFastSim + TauValNumeratorAndDenominatorZTTFastSim)
#cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)) ) proc.TauValNumeratorAndDenominator = cms.Sequence(proc.RunHPSValidation) """ EFFICIENCY Tau efficiency calculations Define the Efficiency curves to produce. Each efficiency producer takes the numberator and denominator histograms and the dependent variables. """ plotPset = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominator) from DQMServices.Core.DQMEDHarvester import DQMEDHarvester proc.efficiencies = DQMEDHarvester("TauDQMHistEffProducer", plots=plotPset) ################################################ # # Normalizes All the histograms # ################################################ proc.normalizePlots = cms.EDAnalyzer( "DQMHistNormalizer", plotNamesToNormalize=cms.vstring('*_pTRatio_*', '*_Size_*', '*_SumPt_*', '*_dRTauRefJet*'), reference=cms.string('*_pTRatio_allHadronic'))