12def JETM42KernelCfg(flags, name='JETM42Kernel', **kwargs):
13 """Configure the derivation framework driving algorithm (kernel) for JETM42"""
14 acc = ComponentAccumulator()
15
16 from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
17 acc.merge(PhysCommonAugmentationsCfg(
18 flags,
19 TriggerListsHelper = kwargs['TriggerListsHelper'],
20 ))
21
22 thinningToolsArgs = {
23 'DiTauLowPtThinningToolName' : "PHYSDiTauLowPtThinningTool",
24 }
25
26 from DerivationFrameworkPhys.PhysCommonThinningConfig import PhysCommonThinningCfg
27
28 acc.merge(PhysCommonThinningCfg(flags, StreamName = kwargs['StreamName'], **thinningToolsArgs))
29
30 thinningTools = []
31 for key in thinningToolsArgs:
32 thinningTools.append(acc.getPublicTool(thinningToolsArgs[key]))
33
34
35 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
36 acc.addEventAlgo(DerivationKernel(name, ThinningTools = thinningTools))
37
38
39 from JetRecConfig.JetRecConfig import JetRecCfg, getInputAlgs
40 from JetRecConfig.StandardJetConstits import stdConstitDic as cst, standardReco, stdInputExtDic as inpext
41 from ROOT import xAODType
42
43
44
45
46
47 from JetRecConfig.JetDefinition import JetDefinition, JetInputConstitSeq, JetInputExternal
48 from JetRecConfig.StandardSmallRJets import standardghosts, flavourghosts, truthmods, clustermods
49
50 inpext["TC422"] = JetInputExternal("CaloTopoClusters422", xAODType.CaloCluster, algoBuilder= standardReco("CaloClusters"))
51 inpext["TopoTowers"] = JetInputExternal("CaloCalAllTopoTowers", xAODType.CaloCluster, algoBuilder= standardReco("CaloClusters"))
52 cst["EMTopo422"] = JetInputConstitSeq("EMTopo422", xAODType.CaloCluster, ["EM"],
53 "CaloTopoClusters422", "EMTopoClusters422", jetinputtype="EMTopo",
54 )
55 cst["EMTopo422SK"] = JetInputConstitSeq("EMTopo422SK", xAODType.CaloCluster, ["EM","SK"],
56 "CaloTopoClusters422", "EMTopoClusters422SK", jetinputtype="EMTopo",
57 )
58 cst["TopoTower"] = JetInputConstitSeq("TopoTower", xAODType.CaloCluster, ["EM"],
59 "CaloCalAllTopoTowers", "TopoTowers", jetinputtype="TopoTower",
60 )
61 cst["TopoTowerSK"] = JetInputConstitSeq("TopoTowerSK", xAODType.CaloCluster, ["EM","SK"],
62 "CaloCalAllTopoTowers", "TopoTowersSK", jetinputtype="TopoTower",
63 )
64 algs = getInputAlgs(cst["EMTopo422"], flags=flags)
65 algs += getInputAlgs(cst["EMTopo422SK"], flags=flags)
66 algs += getInputAlgs(cst["TopoTower"], flags=flags)
67 algs += getInputAlgs(cst["TopoTowerSK"], flags=flags)
68
69 AntiKt4EMTopo422 = JetDefinition("AntiKt",0.4,cst["EMTopo422"],
70 ghostdefs = standardghosts+["TrackLRT"]+flavourghosts,
71 modifiers = truthmods+clustermods+("Filter:15000","LArHVCorr",),
72 lock = True,
73 )
74 AntiKt4EMTopo422SK = JetDefinition("AntiKt",0.4,cst["EMTopo422SK"],
75 ghostdefs = standardghosts+["TrackLRT"]+flavourghosts,
76 modifiers = truthmods+clustermods+("Filter:15000","LArHVCorr",),
77 lock = True,
78 )
79 AntiKt4TopoTowers = JetDefinition("AntiKt",0.4,cst["TopoTower"],
80 ghostdefs = standardghosts+["TrackLRT"]+flavourghosts,
81 modifiers = truthmods+clustermods+("Filter:15000","LArHVCorr",),
82 lock = True,
83 )
84 AntiKt4TopoTowersSK = JetDefinition("AntiKt",0.4,cst["TopoTowerSK"],
85 ghostdefs = standardghosts+["TrackLRT"]+flavourghosts,
86 modifiers = truthmods+clustermods+("Filter:15000","LArHVCorr",),
87 lock = True,
88 )
89
90 jetList = [AntiKt4EMTopo422, AntiKt4EMTopo422SK, AntiKt4TopoTowers, AntiKt4TopoTowersSK]
91
92 for jd in jetList:
93 acc.merge(JetRecCfg(flags,jd))
94
95
96 augmentationTools = []
97
98
99 skimmingTools = []
100
101
102 thinningTools = []
103
104
105 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
106 acc.addEventAlgo(DerivationKernel(name, AugmentationTools = augmentationTools, ThinningTools = thinningTools, SkimmingTools = skimmingTools))
107 return acc
108
109