ATLAS Offline Software
Functions
python.SUSYToolsConfig Namespace Reference

Functions

def SUSY20EventCleaningToolCfg (flags, cleaningLevel="TightBad")
 
def SUSY20DTTriggerSkimmingToolCfg (flags, name, **kwargs)
 

Function Documentation

◆ SUSY20DTTriggerSkimmingToolCfg()

def python.SUSYToolsConfig.SUSY20DTTriggerSkimmingToolCfg (   flags,
  name,
**  kwargs 
)
Configure the DT trigger skimming tool for SUSY20 derivations

Definition at line 52 of file SUSYToolsConfig.py.

52 def SUSY20DTTriggerSkimmingToolCfg(flags, name, **kwargs):
53 
54  """Configure the DT trigger skimming tool for SUSY20 derivations"""
55 
56  # Trigger API for Run-1 and Run-2
57  if flags.Trigger.EDMVersion <= 2:
58 
59  from TriggerMenuMT.TriggerAPI.TriggerAPI import TriggerAPI
60  from TriggerMenuMT.TriggerAPI.TriggerEnums import TriggerPeriod, TriggerType
61 
62  allperiods = TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017 | TriggerPeriod.y2018 | TriggerPeriod.future2e34
63 
64  TriggerAPI.setConfigFlags(flags)
65  el_trig = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType = TriggerType.el_single, livefraction = 0.8)
66  mu_trig = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType = TriggerType.mu_single, livefraction = 0.8)
67  g_trig = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType = TriggerType.g_single, livefraction = 0.8)
68  xe_trig = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType = TriggerType.xe, livefraction = 0.8)
69 
70  # Additional unprescaled met triggers for 2015
71  xe_trig += ['HLT_xe70', 'HLT_xe70_tc_lcw', 'HLT_noalg_L1J400', 'HLT_noalg_L1J420', 'HLT_noalg_L1J450']
72 
73  # Merge and remove duplicates
74  triggers = el_trig + mu_trig + g_trig + xe_trig
75  triggers = sorted(list(set(triggers)))
76 
77  # Run-3 and beyond
78  else:
79 
80  from TriggerMenuMT.TriggerAPI.TriggerEnums import TriggerType
81  from DerivationFrameworkPhys.TriggerListsHelper import getTapisSession
82 
83  # TriggerAPI Session based trigger lists
84  session = getTapisSession(flags)
85  triggers = set()
86  triggers = session.getLowestUnprescaled(triggerType = TriggerType.el_single, livefraction = 0.8).union(triggers)
87  triggers = session.getLowestUnprescaled(triggerType = TriggerType.mu_single, livefraction = 0.8).union(triggers)
88  triggers = session.getLowestUnprescaled(triggerType = TriggerType.g_single, livefraction = 0.8).union(triggers)
89  triggers = session.getLowestUnprescaled(triggerType = TriggerType.xe, livefraction = 0.8).union(triggers)
90 
91  # Additional unprescaled triggers
92  triggers.update( ['HLT_e26_lhtight_ivarloose_L1EM22VHI', 'HLT_e60_lhmedium_L1EM22VHI', 'HLT_e140_lhloose_L1EM22VHI', 'HLT_e300_etcut_L1EM22VHI'] )
93  triggers.update( ['HLT_g140_loose_L1EM22VHI', 'HLT_g300_etcut_L1EM22VHI'] )
94  triggers.update( ['HLT_mu60_L1MU14FCH'] )
95  triggers.update( ['HLT_xe55_cell_xe70_tcpufit_xe90_pfsum_vssk_L1XE50', 'HLT_xe55_cell_xe70_tcpufit_xe95_pfsum_cssk_L1XE50', 'HLT_xe60_cell_xe95_pfsum_cssk_L1XE50', 'HLT_xe65_cell_xe100_mhtpufit_pf_L1XE50', 'HLT_xe65_cell_xe105_mhtpufit_em_L1XE50', 'HLT_xe75_cell_xe65_tcpufit_xe90_trkmht_L1XE50'] )
96 
97  # Merge and remove duplicates
98  triggers = sorted(list(set(list(triggers))))
99 
100  acc = ComponentAccumulator()
101  TriggerSkimmingTool = CompFactory.DerivationFramework.TriggerSkimmingTool
102  acc.addPublicTool(TriggerSkimmingTool
103  (
104  name,
105  TriggerListAND = [],
106  TriggerListOR = triggers,
107  **kwargs
108  ),
109  primary = True
110  )
111 
112  return acc

◆ SUSY20EventCleaningToolCfg()

def python.SUSYToolsConfig.SUSY20EventCleaningToolCfg (   flags,
  cleaningLevel = "TightBad" 
)
Configure the event/jet cleaning tool for SUSY20 derivations

Definition at line 11 of file SUSYToolsConfig.py.

11 def SUSY20EventCleaningToolCfg(flags, cleaningLevel = "TightBad"):
12 
13  """Configure the event/jet cleaning tool for SUSY20 derivations"""
14 
15  acc = ComponentAccumulator()
16 
17  from JetSelectorTools.JetSelectorToolsConfig import EventCleaningToolCfg, JetCleaningToolCfg
18 
19  JetCleaningTool = acc.popToolsAndMerge(JetCleaningToolCfg(
20  flags,
21  name = "SUSY20JetCleaningTool_" + cleaningLevel + "_EMTopo",
22  jetdef = "AntiKt4EMTopo",
23  cleaningLevel = cleaningLevel,
24  useDecorations = False
25  ))
26  acc.addPublicTool(JetCleaningTool)
27 
28  EventCleaningTool = acc.popToolsAndMerge(EventCleaningToolCfg(
29  flags,
30  name = "SUSY20EventCleaningTool_" + cleaningLevel + "_EMTopo",
31  cleaningLevel = cleaningLevel
32  ))
33  EventCleaningTool.JetCleanPrefix = "DFCommonJets_"
34  EventCleaningTool.JetContainer = "AntiKt4EMTopoJets"
35  EventCleaningTool.JetCleaningTool = JetCleaningTool
36  EventCleaningTool.DoDecorations = True
37  acc.addPublicTool(EventCleaningTool)
38 
39  EventCleanAlg = CompFactory.EventCleaningTestAlg(
40  name = "SUSY20EventCleaningTestAlg_" + cleaningLevel + "_EMTopo",
41  EventCleaningTool = EventCleaningTool,
42  JetCollectionName = "AntiKt4EMTopoJets",
43  EventCleanPrefix = "DFCommonJets_",
44  CleaningLevel = cleaningLevel,
45  doEvent = True
46  )
47  acc.addEventAlgo(EventCleanAlg)
48 
49  return acc
50 
51 # SUSY20 trigger skimming
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.JetSelectorToolsConfig.EventCleaningToolCfg
def EventCleaningToolCfg(ConfigFlags, name, cleaningLevel)
Definition: JetSelectorToolsConfig.py:14
python.JetSelectorToolsConfig.JetCleaningToolCfg
def JetCleaningToolCfg(ConfigFlags, name, jetdef, cleaningLevel, useDecorations)
Definition: JetSelectorToolsConfig.py:6
python.SUSYToolsConfig.SUSY20DTTriggerSkimmingToolCfg
def SUSY20DTTriggerSkimmingToolCfg(flags, name, **kwargs)
Definition: SUSYToolsConfig.py:52
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.SUSYToolsConfig.SUSY20EventCleaningToolCfg
def SUSY20EventCleaningToolCfg(flags, cleaningLevel="TightBad")
Definition: SUSYToolsConfig.py:11
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
python.TriggerListsHelper.getTapisSession
def getTapisSession(flags)
Definition: TriggerListsHelper.py:32