37 toBeEmulatedTriggers: list,
38 InputChain_EMTopo: str,
39 InputJetContainer_EMTopo: str,
40 InputJetContainer_EMTopoPresel: str,
41 InputChain_PFlow: str,
42 InputJetContainer_PFlow: str,
43 InputJetContainer_PFlowPresel: str,
44 **kwargs) -> ComponentAccumulator:
45 assert isinstance(toBeEmulatedTriggers, list)
46 assert isinstance(InputChain_EMTopo, str)
47 assert isinstance(InputJetContainer_EMTopo, str)
48 assert isinstance(InputJetContainer_EMTopoPresel, str)
49 assert isinstance(InputChain_PFlow, str)
50 assert isinstance(InputJetContainer_PFlow, str)
51 assert isinstance(InputJetContainer_PFlowPresel, str)
53 if len(InputChain_EMTopo) == 0:
54 InputChain_EMTopo =
'HLT_j45_subjesgsc_ftf_L1J15'
55 if len(InputJetContainer_EMTopo) == 0:
56 InputJetContainer_EMTopo =
'HLT_AntiKt4EMTopoJets_subjesIS'
57 if len(InputJetContainer_EMTopoPresel) == 0:
58 InputJetContainer_EMTopoPresel =
'HLT_AntiKt4EMTopoJets_subjesIS'
59 if len(InputChain_PFlow) == 0:
60 InputChain_PFlow =
'HLT_j[234][05]_.*pf_ftf_[0b].*[ft]_L1.*'
61 if len(InputJetContainer_PFlow) == 0:
62 InputJetContainer_PFlow =
'HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf'
63 if len(InputJetContainer_PFlowPresel) == 0:
64 InputJetContainer_PFlowPresel =
'HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf'
68 for chain
in toBeEmulatedTriggers:
70 chainParts = [
'L1item:' + chainDict[
'L1item']]
71 for chainPart
in chainDict[
'chainParts']:
75 partDefinition +=
'L1threshold:' + chainPart[
'L1threshold']
76 partDefinition +=
'|name:' + chainPart[
'chainPartName']
77 partDefinition +=
'|multiplicity:' + chainPart[
'multiplicity']
78 partDefinition +=
'|threshold:' + chainPart[
'threshold']
79 partDefinition +=
'|etaRange:' + chainPart[
'etaRange']
80 partDefinition +=
'|jvt:' + (chainPart[
'jvt']
if chainPart[
'jvt']
else '-99999')
81 partDefinition +=
'|tagger:' + chainPart[
'bTag']
82 partDefinition +=
'|jetpresel:' + chainPart[
'trkpresel']
83 partDefinition +=
'|dijetmass:' + (chainPart[
'hypoScenario'][len(
'DJMASS'):]
if (
'DJMASS' in chainPart[
'hypoScenario'])
else 'None')
84 partDefinition +=
'|isPFlow:' + (
'True' if (chainPart[
'constitType'] ==
'pf')
else 'False')
85 partDefinition +=
'|isShared:' + (
'True' if (
'SHARED' in chainPart[
'chainPartName'])
else 'False')
86 chainParts.append(partDefinition)
87 chainName = chain.name
if isinstance(chain, ChainProp)
else chain
88 chainDefinitions[chainName] = chainParts
98 kwargs.setdefault(
'EmulatedChainDefinitions', chainDefinitions)
99 kwargs.setdefault(
'TrigDecisionTool', tdt)
100 kwargs.setdefault(
'InputChain', InputChain_PFlow)
103 JetContainerName=InputJetContainer_PFlow)))
106 JetContainerName=InputJetContainer_EMTopoPresel)))
108 from TrigBjetHypo.TrigBjetBtagHypoTool
import bTaggingWP
109 from TrigBjetHypo.TrigBjetBtagHypoTool
import bbTaggingWP
111 working_points = {
"newTagger" : 1.234 }
112 working_points.update(bTaggingWP)
113 working_points.update(bbTaggingWP)
115 kwargs.setdefault(
'WorkingPoints', working_points)
116 kwargs.setdefault(
'FTD_Remapping',
117 {
"DL1d20210519r22_pu" :
"DL1dEMUL_pu",
118 "DL1d20210519r22_pc" :
"DL1dEMUL_pc",
119 "DL1d20210519r22_pb" :
"DL1dEMUL_pb"})
121 acc.setPrivateTools(CompFactory.Trig.TrigBtagEmulationTool(
'TrigBtagEmulationTool', **kwargs))