Go to the documentation of this file.00001
00002 '''
00003
00004 Modify a process to produce Validation plots for reco::Taus
00005
00006
00007 '''
00008
00009 import FWCore.ParameterSet.Config as cms
00010 import Validation.RecoTau.tools.prototypes as proto
00011
00012
00013 def validate(process, algorithm, algorithm_info, sequence,
00014 discriminators=None, suffix=""):
00015 '''
00016 Given a producer and a list of discriminators,
00017 construct a sequence that selects taus passing each discriminator
00018 in turn and then plots quantities of the filtered taus.
00019
00020 These new modules will be added to the [sequence].
00021 '''
00022
00023
00024
00025 builder = proto.make_process_adder(process, sequence)
00026
00027
00028 raw_plots = proto.tau_plotter.clone(
00029 src = cms.InputTag(algorithm_info['producer'])
00030 )
00031
00032
00033 builder(algorithm + suffix + "Select" + "noSelection" + "Plots", raw_plots)
00034
00035 current_tau_src = algorithm_info['producer']
00036
00037 for discriminator in discriminators:
00038 selector = proto.tau_disc_selector.clone(
00039 src = cms.InputTag(current_tau_src),
00040 discriminator = cms.InputTag(discriminator)
00041 )
00042
00043 current_tau_src = algorithm + suffix + "Select" + discriminator
00044 builder(current_tau_src, selector)
00045
00046 plotter = proto.tau_plotter.clone(
00047 src = cms.InputTag(current_tau_src)
00048 )
00049 builder(current_tau_src + "Plots", plotter)