ATLAS Offline Software
Functions
python.TriggerMatchingCommonConfig Namespace Reference

Functions

def read_trig_list_file (fname)
 
def AddRun2TriggerMatchingToSlimmingHelper (**kwargs)
 
def AddLegacyL1JetRoIsToSlimmingHelper (**kwargs)
 
def AddjFexRoIsToSlimmingHelper (**kwargs)
 
def TriggerMatchingCommonRun2Cfg (flags, name, **kwargs)
 
def TriggerMatchingCommonRun2ToRun3Cfg (flags, **kwargs)
 
def TriggerMatchingCommonRun3Cfg (flags, **kwargs)
 

Function Documentation

◆ AddjFexRoIsToSlimmingHelper()

def python.TriggerMatchingCommonConfig.AddjFexRoIsToSlimmingHelper ( **  kwargs)

Definition at line 60 of file TriggerMatchingCommonConfig.py.

60 def AddjFexRoIsToSlimmingHelper(**kwargs):
61  slimmingHelper = kwargs['SlimmingHelper']
62  slimmingHelper.AppendToDictionary.update(
63  {
64  "L1_jFexSRJetRoI":"xAOD::jFexSRJetRoIContainer",
65  "L1_jFexSRJetRoIAux":"xAOD::jFexSRJetRoIAuxContainer"
66  }
67  )
68  slimmingHelper.AllVariables += ["L1_jFexSRJetRoI"]
69 
70 

◆ AddLegacyL1JetRoIsToSlimmingHelper()

def python.TriggerMatchingCommonConfig.AddLegacyL1JetRoIsToSlimmingHelper ( **  kwargs)

Definition at line 50 of file TriggerMatchingCommonConfig.py.

51  slimmingHelper = kwargs['SlimmingHelper']
52  slimmingHelper.AppendToDictionary.update(
53  {
54  "LVL1JetRoIs":"xAOD::JetRoIContainer",
55  "LVL1JetRoIsAux":"xAOD::JetRoIAuxContainer"
56  }
57  )
58  slimmingHelper.AllVariables += ["LVL1JetRoIs"]
59 

◆ AddRun2TriggerMatchingToSlimmingHelper()

def python.TriggerMatchingCommonConfig.AddRun2TriggerMatchingToSlimmingHelper ( **  kwargs)
Adds the trigger matching info to the slimming helper

Definition at line 29 of file TriggerMatchingCommonConfig.py.

30  """Adds the trigger matching info to the slimming helper"""
31 
32  slimmingHelper = kwargs['SlimmingHelper']
33  triggerList = kwargs['TriggerList']
34  containerPrefix = kwargs['OutputContainerPrefix']
35 
36  outputContainers = [
37  "{0}{1}".format(containerPrefix, chain).replace(".", "_")
38  for chain in triggerList
39  ]
40 
41  slimmingHelper.AllVariables += outputContainers
42  for cont in outputContainers:
43  slimmingHelper.AppendToDictionary.update(
44  {
45  cont: "xAOD::TrigCompositeContainer",
46  cont + "Aux": "AOD::AuxContainerBase!",
47  }
48  )
49 

◆ read_trig_list_file()

def python.TriggerMatchingCommonConfig.read_trig_list_file (   fname)
Read a text file containing a list of triggers

Returns the list of triggers held in the file

Definition at line 15 of file TriggerMatchingCommonConfig.py.

15 def read_trig_list_file(fname):
16  """Read a text file containing a list of triggers
17 
18  Returns the list of triggers held in the file
19  """
20  triggers = []
21  with open(PathResolver.FindCalibFile(fname)) as fp:
22  for line in fp:
23  line = line.strip()
24  if line == "" or line.startswith("#"):
25  continue
26  triggers.append(line)
27  return triggers
28 

◆ TriggerMatchingCommonRun2Cfg()

def python.TriggerMatchingCommonConfig.TriggerMatchingCommonRun2Cfg (   flags,
  name,
**  kwargs 
)
Configure the common trigger matching for run 2 DAODs using the run 2 analysis formalism (matching happens during derivation)

Definition at line 71 of file TriggerMatchingCommonConfig.py.

71 def TriggerMatchingCommonRun2Cfg(flags, name, **kwargs):
72  """Configure the common trigger matching for run 2 DAODs using the run 2 analysis formalism (matching happens during derivation)"""
73 
74  acc = ComponentAccumulator()
75 
76  # Create trigger matching decorations
77  from DerivationFrameworkTrigger.TriggerMatchingToolConfig import TriggerMatchingToolCfg
78  PhysCommonTriggerMatchingTool = acc.getPrimaryAndMerge(TriggerMatchingToolCfg(flags, name=name, **kwargs))
79  CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
80  outputContainerPrefix = kwargs['OutputContainerPrefix']
81  acc.addEventAlgo(CommonAugmentation(f"{outputContainerPrefix}TriggerMatchingKernel",
82  AugmentationTools=[PhysCommonTriggerMatchingTool]))
83 
84  return(acc)
85 

◆ TriggerMatchingCommonRun2ToRun3Cfg()

def python.TriggerMatchingCommonConfig.TriggerMatchingCommonRun2ToRun3Cfg (   flags,
**  kwargs 
)
Covert run 2 trigger navigation data these data into the run 3 formalism (matching happens from DAOD)

Definition at line 86 of file TriggerMatchingCommonConfig.py.

86 def TriggerMatchingCommonRun2ToRun3Cfg(flags, **kwargs):
87  """Covert run 2 trigger navigation data these data into the run 3 formalism (matching happens from DAOD)"""
88 
89  acc = ComponentAccumulator()
90 
91  if not flags.Trigger.doEDMVersionConversion:
92  return(acc)
93 
94  from AthenaCommon.Logging import logging
95  msg = logging.getLogger('TriggerMatchingCommonRun2ToRun3Cfg')
96  msg.info('doEDMVersionConversion is True, now scheduling conversion of Run 2 trigger navigation to Run 3')
97 
98  from TrigNavTools.NavConverterConfig import NavConverterCfg
99 
100  # And then run the run 3 slimming on the output of NavConverter
101  triggerList = kwargs['TriggerList']
102  acc.merge(NavConverterCfg(flags, chainsList = triggerList))
103  from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import TrigNavSlimmingMTDerivationCfg
104  acc.merge(TrigNavSlimmingMTDerivationCfg(flags,chainsFilter=triggerList))
105 
106  return(acc)
107 
108 

◆ TriggerMatchingCommonRun3Cfg()

def python.TriggerMatchingCommonConfig.TriggerMatchingCommonRun3Cfg (   flags,
**  kwargs 
)
Configure the common trigger matching for run 3 DAODs using the run 3 formalism (matching happens from DAOD)

Definition at line 109 of file TriggerMatchingCommonConfig.py.

109 def TriggerMatchingCommonRun3Cfg(flags, **kwargs):
110  """Configure the common trigger matching for run 3 DAODs using the run 3 formalism (matching happens from DAOD)"""
111 
112  if flags.Trigger.EDMVersion != 3:
113  raise ValueError('This configuration can only be used for Run 3 trigger navigation')
114 
115  triggerList = kwargs['TriggerList']
116 
117  acc = ComponentAccumulator()
118 
119  # Run 3 trigger navigation slimming proposal for in-DAOD trigger matching.
120  from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import TrigNavSlimmingMTDerivationCfg
121  acc.merge(TrigNavSlimmingMTDerivationCfg(flags,chainsFilter=triggerList))
122 
123  return(acc)
replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:310
python.TriggerMatchingCommonConfig.TriggerMatchingCommonRun2Cfg
def TriggerMatchingCommonRun2Cfg(flags, name, **kwargs)
Definition: TriggerMatchingCommonConfig.py:71
PathResolver::FindCalibFile
static std::string FindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.h:63
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:342
vtune_athena.format
format
Definition: vtune_athena.py:14
TrigNavSlimmingMTConfig.TrigNavSlimmingMTDerivationCfg
def TrigNavSlimmingMTDerivationCfg(flags, chainsFilter=[])
Definition: TrigNavSlimmingMTConfig.py:54
python.TriggerMatchingCommonConfig.AddjFexRoIsToSlimmingHelper
def AddjFexRoIsToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:60
python.TriggerMatchingCommonConfig.AddRun2TriggerMatchingToSlimmingHelper
def AddRun2TriggerMatchingToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:29
python.TriggerMatchingCommonConfig.TriggerMatchingCommonRun2ToRun3Cfg
def TriggerMatchingCommonRun2ToRun3Cfg(flags, **kwargs)
Definition: TriggerMatchingCommonConfig.py:86
TriggerMatchingToolConfig.TriggerMatchingToolCfg
def TriggerMatchingToolCfg(ConfigFlags, name, UseTypedScoringTool=False, **kwargs)
Definition: PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/python/TriggerMatchingToolConfig.py:19
python.TriggerMatchingCommonConfig.read_trig_list_file
def read_trig_list_file(fname)
Definition: TriggerMatchingCommonConfig.py:15
Trk::open
@ open
Definition: BinningType.h:40
python.TriggerMatchingCommonConfig.AddLegacyL1JetRoIsToSlimmingHelper
def AddLegacyL1JetRoIsToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:50
python.TriggerMatchingCommonConfig.TriggerMatchingCommonRun3Cfg
def TriggerMatchingCommonRun3Cfg(flags, **kwargs)
Definition: TriggerMatchingCommonConfig.py:109
python.NavConverterConfig.NavConverterCfg
def NavConverterCfg(flags, chainsList=[], runTheChecker=False)
Definition: NavConverterConfig.py:12