46def standardReco(input):
47 """Returns a helper function which invokes the standard reco configuration for the container 'input'
48 (where input is external to the jet domain).
49
50 We group the definition of functions here rather than separately, so that we can change them
51 automatically to a void function in case we're in an Analysis release and we can not import upstream packages.
52
53 """
54
55 doNothingFunc = lambda *l:None
56 if isAnalysisRelease():
57 return doNothingFunc
58
59
60 if input=='CaloClusters':
61 def f(jetdef,spec):
62 from CaloRec.CaloRecoConfig import CaloRecoCfg
63 flags = jetdef._cflags
64 return CaloRecoCfg(flags) if flags.Jet.doUpstreamDependencies else None
65 elif input=='Tracks':
66 def f(jetdef,spec):
67 from InDetConfig.TrackRecoConfig import InDetTrackRecoCfg
68 flags = jetdef._cflags
69 return InDetTrackRecoCfg(flags) if flags.Jet.doUpstreamDependencies else None
70 elif input=="Muons":
71 def f(jetdef,spec):
72 from MuonConfig.MuonReconstructionConfig import MuonReconstructionCfg
73 flags = jetdef._cflags
74 return MuonReconstructionCfg(flags) if flags.Jet.doUpstreamDependencies else None
75 elif input=="PFlow":
76 def f(jetdef,spec):
77 if not jetdef._cflags.Jet.doUpstreamDependencies:
78 return None
79 from eflowRec.PFRun3Config import PFCfg
80 return PFCfg(jetdef._cflags)
81 elif input=="DressedWZ":
82 def f(jetdef,spec):
83 from DerivationFrameworkMCTruth.MCTruthCommonConfig import PreJetMCTruthAugmentationsCfg
84 return PreJetMCTruthAugmentationsCfg(jetdef._cflags,decorationDressing='dressedPhoton')
85 else:
86 f = doNothingFunc
87
88 return f
89