ATLAS Offline Software
Functions | Variables
python.HLT.MET.EndOfEvent Namespace Reference

Functions

def getMETRecoSequences (flags, List[str] purposes)
 

Variables

 _algs_by_purpose
 

Function Documentation

◆ getMETRecoSequences()

def python.HLT.MET.EndOfEvent.getMETRecoSequences (   flags,
List[str purposes 
)
Create the full reconstruction sequences to run at the end of the event

Parameters
----------
purposes : List[str]
    The purpose keys given in the associated acceptedevts chain

Returns
-------
An OR containing the configured algorithms
A list of the required RoIs
A list of the required streams

Definition at line 28 of file EndOfEvent.py.

28 def getMETRecoSequences(flags, purposes: List[str]):
29  """Create the full reconstruction sequences to run at the end of the event
30 
31  Parameters
32  ----------
33  purposes : List[str]
34  The purpose keys given in the associated acceptedevts chain
35 
36  Returns
37  -------
38  An OR containing the configured algorithms
39  A list of the required RoIs
40  A list of the required streams
41  """
42  ef_reco_algs = []
43  for purpose in purposes:
44  ef_reco_algs += [
45  alg for alg in _algs_by_purpose.get(purpose, []) if alg not in ef_reco_algs
46  ]
47  seqname = f"{''.join(purposes)}EndOfEventRecoSequence"
48 
49  merged_ca = ComponentAccumulator()
50  merged_ca.addSequence(parOR(seqname), primary=True)
51  max_step_idx = 0
52  for alg in ef_reco_algs:
53  cfg = AlgConfig.fromRecoDict(**stringToMETRecoDict(alg))
54  step_output = cfg.make_reco_algs(flags, **cfg.interpret_reco_dict())
55  max_step_idx = max(max_step_idx, step_output.max_step_idx)
56  for ca in step_output.steps:
57  merged_ca.merge(ca, seqname)
58 
59  rois = [caloFSRoI]
60  if max_step_idx > 1:
61  # If we have more than one step then we also need the FS tracking RoI
62  rois.append(trkFSRoI)
63 
64  streams = ["Main", "VBFDelayed"]
65  return merged_ca, rois, streams

Variable Documentation

◆ _algs_by_purpose

python.HLT.MET.EndOfEvent._algs_by_purpose
private

Definition at line 12 of file EndOfEvent.py.

max
#define max(a, b)
Definition: cfImp.cxx:41
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.HLT.MET.EndOfEvent.getMETRecoSequences
def getMETRecoSequences(flags, List[str] purposes)
Definition: EndOfEvent.py:28
python.JetAnalysisCommon.parOR
parOR
Definition: JetAnalysisCommon.py:271
python.HLT.MET.ConfigHelpers.stringToMETRecoDict
dict[str, Any] stringToMETRecoDict(str string, bool onlyRecoKeys=False)
Definition: ConfigHelpers.py:74