22 ):
23
24 self.__old_branch = test_tree.GetLeaf(branch_old)
25 self.__new_branch = test_tree.GetLeaf(branch_new)
26 if not self.__old_branch:
27 raise NameError("Could not find "+branch_old+" in the Tree")
28
29 if not self.__new_branch:
30 raise NameError("Could not find "+branch_new+" in the Tree")
31
32 self.__old_weight = 1. if not weight_old else test_tree.GetLeaf(weight_old)
33 self.__new_weight = 1. if not weight_new else test_tree.GetLeaf(weight_new)
34 if weight_old and not self.__old_weight:
35 raise NameError("Could not find "+weight_old+" in the Tree")
36 if weight_new and not self.__new_weight:
37 raise NameError("Could not find "+weight_new+" in the Tree")
38
39 self.__quality_branch = test_tree.GetLeaf("Muon_quality")
40 if branch_old.find("HighPt") != -1 : self.__quality_branch = test_tree.GetLeaf("Muon_isHighPt")
41 if branch_old.find("LowPt") != -1 : self.__quality_branch = test_tree.GetLeaf("Muon_isLowPt")
42
43 self.__min_quality = 0 if branch_old.find("HighPt") != -1 and branch_old.find("LowPt") != -1 else 1
44 self.__max_quality = 2
45 if branch_old.find("Medium") != -1: self.__max_quality = 1
46 if branch_old.find("Tight") != -1: self.__max_quality = 0
47
48
49 self.__var_name = var_name
50 self.__old_histo = DiagnosticHisto(
51 name = "%s_%s"%(name_old_rel, var_name),
52 axis_title = axis_title,
53 bins = bins, bmin = bmin, bmax = bmax,
54 bin_width = bin_width, bdir = bdir, log_binning = log_binning)
55 self.__new_histo = DiagnosticHisto(
56 name = "%s_%s"%(name_new_rel, var_name),
57 axis_title = axis_title,
58 bins = bins, bmin = bmin, bmax = bmax,
59 bin_width = bin_width, bdir = bdir, log_binning = log_binning)
60