Add a matching (named [algorithm]+"Matcher") between each algorithm (the keys
in [algorithms]) and the [genjets] collection. A ref selection of each
collection in [algorithms] containing only those with valid matches is
produced in [algorithm]+"GenMatched"
The function modifies the input algorithms dictionary and adds they keys
['matcher'], ['matched_collection'], which point to the new modules.
00023 :
00024 '''
00025 Add a matching (named [algorithm]+"Matcher") between each algorithm (the keys
00026 in [algorithms]) and the [genjets] collection. A ref selection of each
00027 collection in [algorithms] containing only those with valid matches is
00028 produced in [algorithm]+"GenMatched"
00029
00030 The function modifies the input algorithms dictionary and adds they keys
00031 ['matcher'], ['matched_collection'], which point to the new modules.
00032
00033 '''
00034 builder = proto.make_process_adder(process, sequence)
00035 for algorithm in algorithms.keys():
00036
00037 matcher = proto.tau_truth_matcher.clone(
00038 src = cms.InputTag(algorithms[algorithm]['producer']),
00039 matched = cms.InputTag(genjets)
00040 )
00041 matcher_name = algorithm+"Matcher"
00042 algorithms[algorithm]['matcher'] = matcher_name
00043 builder(matcher_name, matcher)
00044
00045 match_selector = proto.tau_matched_selector.clone(
00046 src = cms.InputTag(algorithms[algorithm]['producer']),
00047 matching = cms.InputTag(matcher_name)
00048 )
00049 selector_name = algorithm + "GenMatched"
00050 algorithms[algorithm]['matched_collection'] = selector_name
00051 builder(selector_name, match_selector)