Public Member Functions | |
def | __del__ (self) |
def | __init__ (self, variable, title, root_file, use_default_range=False, two_sigma_cap=False, height=1400, GEO_file='TkAlMapDesign_phase1_cfg.py', tracker='full', palette=2, do_tanh=False, check_tracker=True) |
def | analyse (self) |
Do all. More... | |
def | clean_up (self) |
Clean up. More... | |
def | detect_tracker_version (self) |
def | draw_cms_prelim (self) |
def | draw_color_bar (self) |
def | draw_event_info (self, y) |
def | draw_text (self) |
Draw functions. More... | |
def | draw_title (self) |
Titles and info. More... | |
def | draw_TPL (self) |
def | fill_colors (self) |
def | get_color_rgb (self, val) |
def | get_color_rgb_idx (self, val) |
def | load_geometry (self) |
def | load_tree (self) |
Load functions. More... | |
def | load_var (self) |
def | plot_variable_distribution (self, nbins=200, out_dir='.') |
Test functions. More... | |
def | prepare_map_colors (self) |
def | save (self, out_dir='.', extension='pdf') |
def | set_canvas (self) |
def | set_colorbar_axis (self) |
def | set_colorbar_colors (self) |
def | set_palette (self, palette) |
def | set_var (self, var, var_range=[None, None) |
def | setup_colors (self) |
Color setup. More... | |
Public Attributes | |
canvas | |
cfg_path | |
col_dic | |
color_bar | |
color_bar_axis | |
color_bar_colors | |
colors | |
data_path | |
default_range | |
do_tanh | |
GEO_file | |
tree = r_file.Get(tree_name) tree_tmp = r_file.Get(tree_name) tree = copy.deepcopy(tree_tmp) r_file.Close() More... | |
height | |
image_x1 | |
image_x2 | |
image_y1 | |
image_y2 | |
is_cleaned | |
max_val | |
mean_val | |
min_val | |
mod_val_dict | |
n_color_color_bar | |
palette | |
rgb_map | |
root_file | |
start_color_idx | |
std_val | |
title | |
TkAlMap_text_dict | |
TkAlMap_TPL_dict | |
tmp_file | |
tmp_file_name | |
tracker | |
tree | |
two_sigma_cap | |
val_list | |
else: if 'full' in self.tracker: print('Warning: Unknown module '+str(module)) r_file.Close() More... | |
var | |
var_max | |
var_min | |
var_name | |
var_scale | |
var_units | |
width | |
x_scale | |
y_scale | |
Definition at line 151 of file TkAlMap.py.
def TkAlMap.TkAlMap.__init__ | ( | self, | |
variable, | |||
title, | |||
root_file, | |||
use_default_range = False , |
|||
two_sigma_cap = False , |
|||
height = 1400 , |
|||
GEO_file = 'TkAlMapDesign_phase1_cfg.py' , |
|||
tracker = 'full' , |
|||
palette = 2 , |
|||
do_tanh = False , |
|||
check_tracker = True |
|||
) |
Definition at line 154 of file TkAlMap.py.
def TkAlMap.TkAlMap.__del__ | ( | self | ) |
def TkAlMap.TkAlMap.analyse | ( | self | ) |
Do all.
Definition at line 702 of file TkAlMap.py.
References TkAlMap.TkAlMap.do_tanh, TkAlMap.TkAlMap.draw_color_bar(), TkAlMap.TkAlMap.draw_text(), TkAlMap.TkAlMap.draw_TPL(), TkAlMap.TkAlMap.set_colorbar_axis(), TkAlMap.TkAlMap.set_colorbar_colors(), and TkAlMap.TkAlMap.setup_colors().
def TkAlMap.TkAlMap.clean_up | ( | self | ) |
Clean up.
Definition at line 746 of file TkAlMap.py.
References TkAlMap.TkAlMap.is_cleaned, print(), TkAlMap.TkAlMap.tmp_file, and TkAlMap.TkAlMap.tmp_file_name.
Referenced by TkAlMap.TkAlMap.__del__().
def TkAlMap.TkAlMap.detect_tracker_version | ( | self | ) |
Definition at line 474 of file TkAlMap.py.
References TkAlMap.TkAlMap.GEO_file, print(), str, HIPMonitorVariables.tree, AlignmentIORootBase.tree, HIPTwoBodyDecayAnalyzer.tree, TkOfflineVariables.tree, and TkAlMap.TkAlMap.tree.
def TkAlMap.TkAlMap.draw_cms_prelim | ( | self | ) |
Definition at line 626 of file TkAlMap.py.
References TkAlMap.TkAlMap.canvas, DMRplotter.DMRplotter.canvas, hippyaddtobaddatafiles.cd(), TkAlMap.TkAlMap.draw_event_info(), presentation.PageLayout.height, TkAlMap.TkAlMap.height, svgfig.Plot.height, svgfig.Frame.height, svgfig.Dots.height, TkAlMap.TkAlMap.image_x1, presentation.PageLayout.width, TkAlMap.TkAlMap.width, svgfig.Plot.width, svgfig.Frame.width, svgfig.Dots.width, and TkAlMap.TkAlMap.y_scale.
Referenced by TkAlMap.TkAlMap.draw_text().
def TkAlMap.TkAlMap.draw_color_bar | ( | self | ) |
Definition at line 681 of file TkAlMap.py.
References TkAlMap.TkAlMap.canvas, DMRplotter.DMRplotter.canvas, hippyaddtobaddatafiles.cd(), TkAlMap.TkAlMap.color_bar, TkAlMap.TkAlMap.color_bar_axis, and print().
Referenced by TkAlMap.TkAlMap.analyse().
def TkAlMap.TkAlMap.draw_event_info | ( | self, | |
y | |||
) |
Definition at line 648 of file TkAlMap.py.
References TkAlMap.TkAlMap.canvas, DMRplotter.DMRplotter.canvas, hippyaddtobaddatafiles.cd(), and TkAlMap.TkAlMap.image_x2.
Referenced by TkAlMap.TkAlMap.draw_cms_prelim().
def TkAlMap.TkAlMap.draw_text | ( | self | ) |
Draw functions.
Definition at line 661 of file TkAlMap.py.
References TkAlMap.TkAlMap.canvas, DMRplotter.DMRplotter.canvas, hippyaddtobaddatafiles.cd(), TkAlMap.TkAlMap.draw_cms_prelim(), TkAlMap.TkAlMap.draw_title(), print(), and TkAlMap.TkAlMap.TkAlMap_text_dict.
Referenced by TkAlMap.TkAlMap.analyse().
def TkAlMap.TkAlMap.draw_title | ( | self | ) |
Titles and info.
Definition at line 616 of file TkAlMap.py.
References TkAlMap.TkAlMap.canvas, DMRplotter.DMRplotter.canvas, hippyaddtobaddatafiles.cd(), TkAlMap.TkAlMap.image_x1, classes.PlotData.title, preexistingValidation.PreexistingValidation.title, alignment.Alignment.title, presentation.SubsectionBase.title, Geometry.title, TkAlMap.TkAlMap.title, and TkAlMap.TkAlMap.y_scale.
Referenced by TkAlMap.TkAlMap.draw_text().
def TkAlMap.TkAlMap.draw_TPL | ( | self | ) |
Definition at line 673 of file TkAlMap.py.
References TkAlMap.TkAlMap.canvas, DMRplotter.DMRplotter.canvas, hippyaddtobaddatafiles.cd(), print(), and TkAlMap.TkAlMap.TkAlMap_TPL_dict.
Referenced by TkAlMap.TkAlMap.analyse().
def TkAlMap.TkAlMap.fill_colors | ( | self | ) |
Definition at line 313 of file TkAlMap.py.
References TkAlMap.TkAlMap.get_color_rgb_idx(), TkAlMap.TkAlMap.max_val, TkAlMap.TkAlMap.min_val, TkAlMap.TkAlMap.mod_val_dict, print(), TkAlMap.TkAlMap.rgb_map, and TkAlMap.TkAlMap.TkAlMap_TPL_dict.
Referenced by TkAlMap.TkAlMap.setup_colors().
def TkAlMap.TkAlMap.get_color_rgb | ( | self, | |
val | |||
) |
Definition at line 263 of file TkAlMap.py.
References TkAlMap.TkAlMap.do_tanh, createfilelist.int, TkAlMap.TkAlMap.max_val, TkAlMap.TkAlMap.mean_val, TkAlMap.TkAlMap.min_val, TkAlMap.TkAlMap.palette, TkAlMap.TkAlMap.std_val, and str.
Referenced by TkAlMap.TkAlMap.get_color_rgb_idx().
def TkAlMap.TkAlMap.get_color_rgb_idx | ( | self, | |
val | |||
) |
Definition at line 307 of file TkAlMap.py.
References TkAlMap.TkAlMap.get_color_rgb(), and createfilelist.int.
Referenced by TkAlMap.TkAlMap.fill_colors().
def TkAlMap.TkAlMap.load_geometry | ( | self | ) |
Definition at line 506 of file TkAlMap.py.
References TkAlMap.TkAlMap.canvas, DMRplotter.DMRplotter.canvas, TkAlMap.TkAlMap.cfg_path, TkAlMap.TkAlMap.data_path, TkAlMap.TkAlMap.GEO_file, presentation.PageLayout.height, TkAlMap.TkAlMap.height, svgfig.Plot.height, svgfig.Frame.height, svgfig.Dots.height, createfilelist.int, SiStripPI.max, SiStripPI.min, FastTimerService_cff.range, fileinputsource_cfi.read, TkAlMap.read_TPLfile(), submitPVValidationJobs.split(), TkAlMap.TkAlMap.tracker, presentation.PageLayout.width, TkAlMap.TkAlMap.width, svgfig.Plot.width, svgfig.Frame.width, and svgfig.Dots.width.
def TkAlMap.TkAlMap.load_tree | ( | self | ) |
Load functions.
Definition at line 394 of file TkAlMap.py.
References print(), and TkAlMap.TkAlMap.root_file.
def TkAlMap.TkAlMap.load_var | ( | self | ) |
Definition at line 412 of file TkAlMap.py.
References print().
Referenced by TkAlMap.TkAlMap.setup_colors().
def TkAlMap.TkAlMap.plot_variable_distribution | ( | self, | |
nbins = 200 , |
|||
out_dir = '.' |
|||
) |
Test functions.
Definition at line 711 of file TkAlMap.py.
References join(), SiStripPI.max, TkAlMap.TkAlMap.mean_val, SiStripPI.min, print(), TkAlMap.TkAlMap.std_val, TkAlMap.TkAlMap.tracker, TkAlMap.TkAlMap.two_sigma_cap, TkAlMap.TkAlMap.val_list, TkAlMap.TkAlMap.var, TkAlMap.TkAlMap.var_name, and TkAlMap.TkAlMap.var_units.
def TkAlMap.TkAlMap.prepare_map_colors | ( | self | ) |
Definition at line 219 of file TkAlMap.py.
References print().
Referenced by TkAlMap.TkAlMap.setup_colors().
def TkAlMap.TkAlMap.save | ( | self, | |
out_dir = '.' , |
|||
extension = 'pdf' |
|||
) |
Definition at line 690 of file TkAlMap.py.
References TkAlMap.TkAlMap.canvas, DMRplotter.DMRplotter.canvas, TkAlMap.TkAlMap.default_range, join(), print(), TkAlMap.TkAlMap.tracker, TkAlMap.TkAlMap.two_sigma_cap, and TkAlMap.TkAlMap.var.
Referenced by SpecificationBuilder_cfi.Specification.saveAll().
def TkAlMap.TkAlMap.set_canvas | ( | self | ) |
Definition at line 207 of file TkAlMap.py.
References TkAlMap.TkAlMap.tracker, TkAlMap.TkAlMap.two_sigma_cap, and TkAlMap.TkAlMap.var.
def TkAlMap.TkAlMap.set_colorbar_axis | ( | self | ) |
Definition at line 331 of file TkAlMap.py.
References TkAlMap.TkAlMap.image_x1, TkAlMap.TkAlMap.image_x2, and print().
Referenced by TkAlMap.TkAlMap.analyse().
def TkAlMap.TkAlMap.set_colorbar_colors | ( | self | ) |
Definition at line 347 of file TkAlMap.py.
References TkAlMap.TkAlMap.image_x1, TkAlMap.TkAlMap.image_x2, TkAlMap.TkAlMap.max_val, TkAlMap.TkAlMap.min_val, TkAlMap.TkAlMap.n_color_color_bar, and print().
Referenced by TkAlMap.TkAlMap.analyse().
def TkAlMap.TkAlMap.set_palette | ( | self, | |
palette | |||
) |
Definition at line 252 of file TkAlMap.py.
def TkAlMap.TkAlMap.set_var | ( | self, | |
var, | |||
var_range = [None , |
|||
None | |||
) |
Definition at line 191 of file TkAlMap.py.
References print().
def TkAlMap.TkAlMap.setup_colors | ( | self | ) |
Color setup.
Definition at line 214 of file TkAlMap.py.
References TkAlMap.TkAlMap.fill_colors(), TkAlMap.TkAlMap.load_var(), and TkAlMap.TkAlMap.prepare_map_colors().
Referenced by TkAlMap.TkAlMap.analyse().
TkAlMap.TkAlMap.canvas |
Definition at line 210 of file TkAlMap.py.
Referenced by DisplayManager.DisplayManager.__del__(), DisplayManager.DisplayManager.Draw(), TkAlMap.TkAlMap.draw_cms_prelim(), TkAlMap.TkAlMap.draw_color_bar(), TkAlMap.TkAlMap.draw_event_info(), TkAlMap.TkAlMap.draw_text(), TkAlMap.TkAlMap.draw_title(), TkAlMap.TkAlMap.draw_TPL(), TkAlMap.TkAlMap.load_geometry(), and TkAlMap.TkAlMap.save().
TkAlMap.TkAlMap.cfg_path |
Definition at line 177 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.load_geometry().
TkAlMap.TkAlMap.col_dic |
Definition at line 225 of file TkAlMap.py.
TkAlMap.TkAlMap.color_bar |
Definition at line 367 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.draw_color_bar().
TkAlMap.TkAlMap.color_bar_axis |
Definition at line 338 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.draw_color_bar().
TkAlMap.TkAlMap.color_bar_colors |
Definition at line 171 of file TkAlMap.py.
TkAlMap.TkAlMap.colors |
Definition at line 222 of file TkAlMap.py.
TkAlMap.TkAlMap.data_path |
Definition at line 176 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.load_geometry().
TkAlMap.TkAlMap.default_range |
Definition at line 163 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.save().
TkAlMap.TkAlMap.do_tanh |
Definition at line 166 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.analyse(), and TkAlMap.TkAlMap.get_color_rgb().
TkAlMap.TkAlMap.GEO_file |
tree = r_file.Get(tree_name) tree_tmp = r_file.Get(tree_name) tree = copy.deepcopy(tree_tmp) r_file.Close()
Definition at line 158 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.detect_tracker_version(), and TkAlMap.TkAlMap.load_geometry().
TkAlMap.TkAlMap.height |
Definition at line 161 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.draw_cms_prelim(), and TkAlMap.TkAlMap.load_geometry().
TkAlMap.TkAlMap.image_x1 |
Definition at line 593 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.draw_cms_prelim(), TkAlMap.TkAlMap.draw_title(), TkAlMap.TkAlMap.set_colorbar_axis(), and TkAlMap.TkAlMap.set_colorbar_colors().
TkAlMap.TkAlMap.image_x2 |
Definition at line 594 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.draw_event_info(), TkAlMap.TkAlMap.set_colorbar_axis(), and TkAlMap.TkAlMap.set_colorbar_colors().
TkAlMap.TkAlMap.image_y1 |
Definition at line 595 of file TkAlMap.py.
TkAlMap.TkAlMap.image_y2 |
Definition at line 596 of file TkAlMap.py.
TkAlMap.TkAlMap.is_cleaned |
Definition at line 173 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.clean_up().
TkAlMap.TkAlMap.max_val |
Definition at line 169 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.fill_colors(), TkAlMap.TkAlMap.get_color_rgb(), and TkAlMap.TkAlMap.set_colorbar_colors().
TkAlMap.TkAlMap.mean_val |
Definition at line 445 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.get_color_rgb(), and TkAlMap.TkAlMap.plot_variable_distribution().
TkAlMap.TkAlMap.min_val |
Definition at line 170 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.fill_colors(), TkAlMap.TkAlMap.get_color_rgb(), and TkAlMap.TkAlMap.set_colorbar_colors().
TkAlMap.TkAlMap.mod_val_dict |
Definition at line 424 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.fill_colors().
TkAlMap.TkAlMap.n_color_color_bar |
Definition at line 181 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.set_colorbar_colors().
TkAlMap.TkAlMap.palette |
Definition at line 253 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.get_color_rgb().
TkAlMap.TkAlMap.rgb_map |
Definition at line 226 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.fill_colors().
TkAlMap.TkAlMap.root_file |
Definition at line 165 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.load_tree().
TkAlMap.TkAlMap.start_color_idx |
Definition at line 180 of file TkAlMap.py.
TkAlMap.TkAlMap.std_val |
Definition at line 446 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.get_color_rgb(), and TkAlMap.TkAlMap.plot_variable_distribution().
TkAlMap.TkAlMap.title |
Definition at line 162 of file TkAlMap.py.
Referenced by python.rootplot.root2matplotlib.HistStack.bar(), python.rootplot.root2matplotlib.HistStack.bar3d(), python.rootplot.root2matplotlib.HistStack.barcluster(), python.rootplot.root2matplotlib.HistStack.barh(), python.rootplot.root2matplotlib.HistStack.barstack(), MainPageGenerator.MainPageGenerator.CreateNewMainPage(), TkAlMap.TkAlMap.draw_title(), python.rootplot.root2matplotlib.HistStack.errorbar(), python.rootplot.root2matplotlib.HistStack.errorbarh(), Formatter.SimpleHTMLFormatter.headers(), python.rootplot.root2matplotlib.HistStack.histstack(), python.rootplot.root2matplotlib.Hist.show_titles(), python.rootplot.utilities.Hist.TGraph(), python.rootplot.utilities.Hist.TH1F(), python.rootplot.utilities.Hist2D.TH2F(), and python.rootplot.root2matplotlib.Hist2D.TH2F().
TkAlMap.TkAlMap.TkAlMap_text_dict |
Definition at line 603 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.draw_text().
TkAlMap.TkAlMap.TkAlMap_TPL_dict |
Definition at line 575 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.draw_TPL(), and TkAlMap.TkAlMap.fill_colors().
TkAlMap.TkAlMap.tmp_file |
Definition at line 403 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.clean_up().
TkAlMap.TkAlMap.tmp_file_name |
Definition at line 402 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.clean_up().
TkAlMap.TkAlMap.tracker |
Definition at line 159 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.load_geometry(), TkAlMap.TkAlMap.plot_variable_distribution(), TkAlMap.TkAlMap.save(), and TkAlMap.TkAlMap.set_canvas().
TkAlMap.TkAlMap.tree |
Definition at line 172 of file TkAlMap.py.
Referenced by eventstfile.Events.__iter__(), svgfig.SVG.__str__(), ZJetsTreeAnalyzer.ZJetsTreeAnalyzer.beginLoop(), tree.Tree.branch_(), MetTreeProducer.MetTreeProducer.declareVariables(), core.AutoFillTreeProducer.AutoFillTreeProducer.declareVariables(), TkAlMap.TkAlMap.detect_tracker_version(), core.AutoFillTreeProducer.AutoFillTreeProducer.fillTree(), SimpleTreeProducer.SimpleTreeProducer.process(), ZJetsTreeAnalyzer.ZJetsTreeAnalyzer.process(), MetTreeProducer.MetTreeProducer.process(), python.cmstools.EventTree.SetAlias(), eventstfile.Events.size(), eventstfile.Events.to(), tree.Tree.var(), and tree.Tree.vector().
TkAlMap.TkAlMap.two_sigma_cap |
Definition at line 164 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.plot_variable_distribution(), TkAlMap.TkAlMap.save(), and TkAlMap.TkAlMap.set_canvas().
TkAlMap.TkAlMap.val_list |
else: if 'full' in self.tracker: print('Warning: Unknown module '+str(module)) r_file.Close()
Definition at line 425 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.plot_variable_distribution().
TkAlMap.TkAlMap.var |
Definition at line 193 of file TkAlMap.py.
Referenced by tree.Tree.copyStructure(), TkAlMap.TkAlMap.plot_variable_distribution(), TkAlMap.TkAlMap.save(), and TkAlMap.TkAlMap.set_canvas().
TkAlMap.TkAlMap.var_max |
Definition at line 198 of file TkAlMap.py.
TkAlMap.TkAlMap.var_min |
Definition at line 197 of file TkAlMap.py.
TkAlMap.TkAlMap.var_name |
Definition at line 194 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.plot_variable_distribution().
TkAlMap.TkAlMap.var_scale |
Definition at line 196 of file TkAlMap.py.
TkAlMap.TkAlMap.var_units |
Definition at line 195 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.plot_variable_distribution().
TkAlMap.TkAlMap.width |
Definition at line 160 of file TkAlMap.py.
Referenced by python.rootplot.utilities.Hist.__init_TGraph(), python.rootplot.root2matplotlib.Hist.bar(), python.rootplot.root2matplotlib.Hist.barh(), python.rootplot.utilities.Hist.delete_bin(), TkAlMap.TkAlMap.draw_cms_prelim(), and TkAlMap.TkAlMap.load_geometry().
TkAlMap.TkAlMap.x_scale |
Definition at line 598 of file TkAlMap.py.
TkAlMap.TkAlMap.y_scale |
Definition at line 599 of file TkAlMap.py.
Referenced by TkAlMap.TkAlMap.draw_cms_prelim(), and TkAlMap.TkAlMap.draw_title().