28def getMETRecoSequences(flags, purposes: List[str]):
29 """Create the full reconstruction sequences to run at the end of the event
30
31 Parameters
32 ----------
33 purposes : List[str]
34 The purpose keys given in the associated acceptedevts chain
35
36 Returns
37 -------
38 An OR containing the configured algorithms
39 A list of the required RoIs
40 A list of the required streams
41 """
42 ef_reco_algs = []
43 for purpose in purposes:
44 ef_reco_algs += [
45 alg for alg in _algs_by_purpose.get(purpose, []) if alg not in ef_reco_algs
46 ]
47 seqname = f"{''.join(purposes)}EndOfEventRecoSequence"
48
49 merged_ca = ComponentAccumulator()
50 merged_ca.addSequence(parOR(seqname), primary=True)
51 max_step_idx = 0
52 for alg in ef_reco_algs:
53 cfg = AlgConfig.fromRecoDict(**stringToMETRecoDict(alg))
54 step_output = cfg.make_reco_algs(flags, **cfg.interpret_reco_dict())
55 max_step_idx =
max(max_step_idx, step_output.max_step_idx)
56 for ca in step_output.steps:
57 merged_ca.merge(ca, seqname)
58
59 rois = [caloFSRoI]
60 if max_step_idx > 1:
61
62 rois.append(trkFSRoI)
63
64 streams = ["Main", "VBFDelayed"]
65 return merged_ca, rois, streams