|
def | __init__ (self, var_name="", axis_title="", bins=-1, name_old_rel="", name_new_rel="", test_tree=None, branch_old="", branch_new="", weight_old=None, weight_new=None, branch_sys_old="", branch_sys_new="") |
|
def | fill (self) |
|
def | pass_cut (self) |
|
def | get_old_histo (self) |
|
def | get_new_histo (self) |
|
def | get_old_var (self) |
|
def | get_new_var (self) |
|
def | get_old_weight (self) |
|
def | get_new_weight (self) |
|
def | finalize (self) |
|
def | name (self) |
|
Definition at line 91 of file CheckAppliedSFs.py.
◆ __init__()
def CheckAppliedSFs.SystematicComparer.__init__ |
( |
|
self, |
|
|
|
var_name = "" , |
|
|
|
axis_title = "" , |
|
|
|
bins = -1 , |
|
|
|
name_old_rel = "" , |
|
|
|
name_new_rel = "" , |
|
|
|
test_tree = None , |
|
|
|
branch_old = "" , |
|
|
|
branch_new = "" , |
|
|
|
weight_old = None , |
|
|
|
weight_new = None , |
|
|
|
branch_sys_old = "" , |
|
|
|
branch_sys_new = "" |
|
) |
| |
Definition at line 92 of file CheckAppliedSFs.py.
109 ReleaseComparer.__init__(self,
111 axis_title = axis_title,
112 bins = bins, bmin = 5.e-4, bmax = 4.,
113 name_old_rel =name_old_rel,
114 name_new_rel =name_new_rel,
115 test_tree = test_tree,
116 branch_old = branch_old,
117 branch_new = branch_new,
118 weight_old = weight_old,
119 weight_new = weight_new,
121 self.__sys_old = test_tree.GetLeaf(branch_sys_old)
122 self.__sys_new = test_tree.GetLeaf(branch_sys_new)
123 if not self.__sys_old:
124 raise NameError(
"Failed to retrieve "+branch_sys_old)
125 if not self.__sys_new:
126 raise NameError(
"Failed to retrieve "+branch_sys_new)
◆ fill()
def CheckAppliedSFs.SystematicComparer.fill |
( |
|
self | ) |
|
Reimplemented from CheckAppliedSFs.ReleaseComparer.
Definition at line 129 of file CheckAppliedSFs.py.
130 self.get_old_histo().
fill(value = math.fabs(self.get_old_var().GetValue() - self.__sys_old.GetValue()) / (self.get_old_var().GetValue()
if self.get_old_var().GetValue() != 0.
else 1.) ,
131 weight= self.get_old_weight())
132 self.get_new_histo().
fill(value = math.fabs(self.get_new_var().GetValue() - self.__sys_new.GetValue()) / (self.get_new_var().GetValue()
if self.get_new_var().GetValue() != 0.
else 1.),
133 weight= self.get_new_weight())
◆ finalize()
def CheckAppliedSFs.ReleaseComparer.finalize |
( |
|
self | ) |
|
|
inherited |
Definition at line 81 of file CheckAppliedSFs.py.
82 minimum =
min(self.get_old_histo().
min(), self.get_new_histo().
min()) - 0.01
83 maximum =
max(self.get_old_histo().
max(), self.get_new_histo().
max()) + 0.01
84 for H
in [ self.get_old_histo(), self.get_new_histo()]:
◆ get_new_histo()
def CheckAppliedSFs.ReleaseComparer.get_new_histo |
( |
|
self | ) |
|
|
inherited |
Definition at line 69 of file CheckAppliedSFs.py.
69 def get_new_histo(self):
70 return self.__new_histo
◆ get_new_var()
def CheckAppliedSFs.ReleaseComparer.get_new_var |
( |
|
self | ) |
|
|
inherited |
Definition at line 73 of file CheckAppliedSFs.py.
73 def get_new_var(self):
74 return self.__new_branch
◆ get_new_weight()
def CheckAppliedSFs.ReleaseComparer.get_new_weight |
( |
|
self | ) |
|
|
inherited |
Definition at line 78 of file CheckAppliedSFs.py.
78 def get_new_weight(self):
79 if isinstance(self.__new_weight, float):
return self.__new_weight
80 return self.__new_weight.GetValue()
◆ get_old_histo()
def CheckAppliedSFs.ReleaseComparer.get_old_histo |
( |
|
self | ) |
|
|
inherited |
Definition at line 67 of file CheckAppliedSFs.py.
67 def get_old_histo(self):
68 return self.__old_histo
◆ get_old_var()
def CheckAppliedSFs.ReleaseComparer.get_old_var |
( |
|
self | ) |
|
|
inherited |
Definition at line 71 of file CheckAppliedSFs.py.
71 def get_old_var(self):
72 return self.__old_branch
◆ get_old_weight()
def CheckAppliedSFs.ReleaseComparer.get_old_weight |
( |
|
self | ) |
|
|
inherited |
Definition at line 75 of file CheckAppliedSFs.py.
75 def get_old_weight(self):
76 if isinstance(self.__old_weight, float):
return self.__old_weight
77 return self.__old_weight.GetValue()
◆ name()
def CheckAppliedSFs.ReleaseComparer.name |
( |
|
self | ) |
|
|
inherited |
◆ pass_cut()
def CheckAppliedSFs.ReleaseComparer.pass_cut |
( |
|
self | ) |
|
|
inherited |
Definition at line 61 of file CheckAppliedSFs.py.
62 return self.__min_quality >= self.__quality_branch .GetValue()
and self.__quality_branch.GetValue() <= self.__max_quality
◆ __max_quality
CheckAppliedSFs.ReleaseComparer.__max_quality |
|
privateinherited |
◆ __min_quality
CheckAppliedSFs.ReleaseComparer.__min_quality |
|
privateinherited |
◆ __new_branch
CheckAppliedSFs.ReleaseComparer.__new_branch |
|
privateinherited |
◆ __new_histo
CheckAppliedSFs.ReleaseComparer.__new_histo |
|
privateinherited |
◆ __new_weight
CheckAppliedSFs.ReleaseComparer.__new_weight |
|
privateinherited |
◆ __old_branch
CheckAppliedSFs.ReleaseComparer.__old_branch |
|
privateinherited |
Direct access to the branch which are going to be compared.
Definition at line 13 of file CheckAppliedSFs.py.
◆ __old_histo
CheckAppliedSFs.ReleaseComparer.__old_histo |
|
privateinherited |
◆ __old_weight
CheckAppliedSFs.ReleaseComparer.__old_weight |
|
privateinherited |
◆ __quality_branch
CheckAppliedSFs.ReleaseComparer.__quality_branch |
|
privateinherited |
◆ __sys_new
CheckAppliedSFs.SystematicComparer.__sys_new |
|
private |
◆ __sys_old
CheckAppliedSFs.SystematicComparer.__sys_old |
|
private |
◆ __var_name
CheckAppliedSFs.ReleaseComparer.__var_name |
|
privateinherited |
The documentation for this class was generated from the following file: