ATLAS Offline Software
AFPPostProcessing.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 #
4 
5 def tefficiency2th(inputs):
6  rv = []
7  for group in inputs:
8  rv.extend(histo.CreateHistogram() for histo in group[1])
9  return rv
10 def relative_difference(inputs):
11  assert len(inputs) == 1, 'Only a single match group per output is expected'
12  matches, histos = inputs[0]
13  assert len(histos) == 2, 'Exactly two inputs are required'
14  a, b = histos
15  result = a.Clone()
16  result.Add(b, -1)
17  divisor = a.Clone()
18  divisor.Add(b)
19  result.Divide(divisor)
20  result.GetYaxis().SetTitle("(Front - End) / (Front + End)")
21  result.SetTitle((result.GetTitle()+", Relative Difference"))
22  return [result]
AFPPostProcessing.tefficiency2th
def tefficiency2th(inputs)
Definition: AFPPostProcessing.py:5
AFPPostProcessing.relative_difference
def relative_difference(inputs)
Definition: AFPPostProcessing.py:10