ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
python.MuonsExtraTriggerConfig.MuonExtraTriggerHelper Class Reference
Collaboration diagram for python.MuonsExtraTriggerConfig.MuonExtraTriggerHelper:

Public Member Functions

def __init__ (self, flags, existingTriggerHelper)
 
def FindExtraChainsRun2 (self)
 
def Run2MatchAugmentationCfg (self, flags, name="PhysCommonTrigMatchExtraMuons")
 
def AddRun2MatchingToSlimmingHelper (self, SlimmingHelper, OutputContainerPrefix="TrigMatch_")
 

Public Attributes

 flags
 
 extraChainList
 Allow for an additional include-list without polluting PHYS. More...
 
 existingTriggerHelper
 

Detailed Description

Definition at line 14 of file MuonsExtraTriggerConfig.py.

Constructor & Destructor Documentation

◆ __init__()

def python.MuonsExtraTriggerConfig.MuonExtraTriggerHelper.__init__ (   self,
  flags,
  existingTriggerHelper 
)

Definition at line 15 of file MuonsExtraTriggerConfig.py.

15  def __init__(self, flags, existingTriggerHelper):
16  self.flags = flags
17  TriggerAPI.setConfigFlags(flags)
18  self.extraChainList = []
19  self.existingTriggerHelper = existingTriggerHelper
20  self.FindExtraChainsRun2()
21 

Member Function Documentation

◆ AddRun2MatchingToSlimmingHelper()

def python.MuonsExtraTriggerConfig.MuonExtraTriggerHelper.AddRun2MatchingToSlimmingHelper (   self,
  SlimmingHelper,
  OutputContainerPrefix = "TrigMatch_" 
)

Definition at line 61 of file MuonsExtraTriggerConfig.py.

61  def AddRun2MatchingToSlimmingHelper(self,SlimmingHelper,
62  OutputContainerPrefix = "TrigMatch_"):
63  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = SlimmingHelper,
64  OutputContainerPrefix = OutputContainerPrefix,
65  TriggerList = self.extraChainList)
66 

◆ FindExtraChainsRun2()

def python.MuonsExtraTriggerConfig.MuonExtraTriggerHelper.FindExtraChainsRun2 (   self)

Definition at line 23 of file MuonsExtraTriggerConfig.py.

23  def FindExtraChainsRun2(self):
24 
25  md = GetFileMD(self.flags.Input.Files)
26  hlt_menu = md.get('TriggerMenu', {}).get('HLTChains', None)
27 
28  if self.flags.Trigger.EDMVersion <= 2:
29 
30  # Trigger API for Runs 1, 2
31  allperiods = TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017 | TriggerPeriod.y2018 | TriggerPeriod.future2e34
32  trig_bmu = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.mu_bphys, livefraction=0.8)
33 
34 
35  extra_file = read_trig_list_file("DerivationFrameworkMuons/run2ExtraMatchingTriggers.txt")
36 
37 
38  trigger_names_full = list(set(trig_bmu+extra_file))
39 
40  if hlt_menu:
41  for chain_name in hlt_menu:
42  if chain_name in trigger_names_full:
43  self.extraChainList.append(chain_name)
44  else: # No means to filter based on in-file metadata
45  self.extraChainList = trigger_names_full
46 
47  # remove overlap with the existing chains
48  self.extraChainList = [c for c in self.extraChainList if c not in self.existingTriggerHelper.Run2TriggerNamesNoTau and c not in self.existingTriggerHelper.Run2TriggerNamesTau ]
49 

◆ Run2MatchAugmentationCfg()

def python.MuonsExtraTriggerConfig.MuonExtraTriggerHelper.Run2MatchAugmentationCfg (   self,
  flags,
  name = "PhysCommonTrigMatchExtraMuons" 
)

Definition at line 51 of file MuonsExtraTriggerConfig.py.

51  def Run2MatchAugmentationCfg(self, flags, name="PhysCommonTrigMatchExtraMuons"):
52  acc = ComponentAccumulator()
54  flags,
55  name = name,
56  OutputContainerPrefix = "TrigMatch_",
57  ChainNames = self.extraChainList))
58  return acc
59 

Member Data Documentation

◆ existingTriggerHelper

python.MuonsExtraTriggerConfig.MuonExtraTriggerHelper.existingTriggerHelper

Definition at line 19 of file MuonsExtraTriggerConfig.py.

◆ extraChainList

python.MuonsExtraTriggerConfig.MuonExtraTriggerHelper.extraChainList

Allow for an additional include-list without polluting PHYS.

Merge and remove duplicates Now reduce the list based on the content of the first input AOD

Definition at line 18 of file MuonsExtraTriggerConfig.py.

◆ flags

python.MuonsExtraTriggerConfig.MuonExtraTriggerHelper.flags

Definition at line 16 of file MuonsExtraTriggerConfig.py.


The documentation for this class was generated from the following file:
python.AutoConfigFlags.GetFileMD
def GetFileMD(filenames, allowEmpty=True, maxLevel='peeker')
Definition: AutoConfigFlags.py:65
python.TriggerMatchingCommonConfig.TriggerMatchingCommonRun2Cfg
def TriggerMatchingCommonRun2Cfg(flags, name, **kwargs)
Definition: TriggerMatchingCommonConfig.py:91
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
python.TriggerMatchingCommonConfig.AddRun2TriggerMatchingToSlimmingHelper
def AddRun2TriggerMatchingToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:49
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
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.read_trig_list_file
def read_trig_list_file(fname)
Definition: TriggerListsHelper.py:9
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127