Skip to content
Toni Sculac edited this page Oct 6, 2017 · 4 revisions

Installation and running

Plotter_v2 is installed when you scram the ZZAnalysis code. It creates two executables "run_plotter" and "run_yields" which you need to run from Plotter_v2 folder. In order to produce all the plots you need to specify the path to all the trees that are going to be processed in run_plotter.cpp. Once you do this you need to recompile by running "scram b" from ZZAnalysis/ folder. It is highly recommended to download the files locally as the executables run even 10 times faster than when the files are on a remote location. Same procedure applies to run_yields executable.

Plotter

This part produces all the plots used in HZZ4l group to present the results. The procedure is divided in two parts. First part produces all the histograms needed for plotting and stores them into a root file. You only need to do this procedure once, you should comment it out later as it is a very time consuming path. Do not forget to recompile once you comment something out. The second part of the tool produces plots from these histogram files. There are several options you can specify. You can edit the run_plotter file in any way to produce the plots that you like. Functions of object Plotter are:

  • Plotter( double lumi); constructor which takes the total luminosity as input

  • void MakeHistograms( TString input_file ); Function that will create all needed histograms for plotting for a given root file

  • void MakeHistogramsZX( TString data_file, TString fake_rates); Function that creates Z+X histograms for given data root file and fake rate file

  • void MakeM4lZX(); Function that creates Z+X shapes for M4l plots given the shape functions are provided in M4lZX.cpp file

  • void SetBlinding( float bln_dn, float bln_up); Function to set blinding if one is needed. It will blind area between [bln_dn,bln_up]. Has overload with 2 blindings (bl1_dn, bln1_up, bln2_dn, bln2_up). Has to be called before MakeHistograms.

  • void FillInclusive(); Function that fills inclusive histogram (inclusive in final state and category)

  • void Save(); Function that saves all the histograms in ROOT_files/Unblinded.root and in ROOT_files/Blinded.root

  • void GetHistos( TString root_file); Gets all the histograms from root_file so you can plot them.

  • void plot_1D_single( TString blinding, TString variable_name, TString save_path, int final_state, int category); Plots a single 1D histogram of a given variable for a given blinding, final state and category. Saves it in save_path.

  • void plot_1D_all_cat( TString blinding, TString variable_name, TString save_path); Plots all 1D histograms of a given variable per category for inclusive final state. Saves it in save_path.

  • void plot_1D_all_fs( TString blinding, TString variable_name, TString save_path); Plots all 1D histograms of a given variable per final state for inclusive category. Saves it in save_path.

  • void plot_2D_single( TString blinding, TString variable_name, TString save_path, int category); Plots a single 2D COLZ plot of a given variable for a given blinding and category. Saves it in save_path.

  • void plot_2D_error_single( TString blinding, TString variable_name, TString save_path, int category); Plots a single 2D plot with errors of a given variable for a given blinding and category. Saves it in save_path.

  • void plot_2D_error_all_cat( TString blinding, TString variable_name, TString save_path); Plots a all 2D plot with errors of a given variable for a given blinding. Saves it in save_path.

Currently supports this variable names:

  • 1D: M4lMain, M4lMainZoomed, M4lMainHighMass, MZ1, MZ1_M4L118130, MZ2, MZ2_M4L118130, KD, KD_M4L118130, D1jet, D1jet_M4L118130, D2jet, D2jet_M4L118130, DWH, DWH_M4L118130, DZH, DZH_M4L118130, DVH, DVH_M4L118130
  • 2D: MZ1vsMZ2, MZ1vsMZ2_M4L118130
  • 2D_error: KDvsM4l, KDvsM4lZoomed, KDvsM4lHighMass, D1jetvsM4lZoomed, D2jetvsM4lZoomed, DWHvsM4lZoomed, DZHvsM4lZoomed, DVHvsM4lZoomed

Yields

Yields part produces all the plots used in HZZ4l group to parametrise the normalisation of yields. The procedure is divided in two parts. First part produces all the TGraphs and fits the to functions. It stores all of this into a root file. You only need to do this procedure once, you should comment it out later as it is a very time consuming path. Do not forget to recompile once you comment something out. The second part of the tool produces plots from these fits. There are several options you can specify. You can edit the run_yields file in any way to produce the plots, latex and yaml outputs. Functions of object Yields are:

  • Yields( double lumi); constructor which takes the total luminosity as input

  • void MakeHistograms( TString input_file ); Function that will create all needed histograms for fitting for a given root file

  • void FillInclusive(); Function that fills inclusive histogram (inclusive in final state and category)

  • void Save(); Function that saves all the histograms in ROOT_files/Yields.root

  • void GetHistos( TString root_file); Gets all the histograms from root_file so you can plot them.

  • void Calculate_SS_ZX_Yields( TString data_file, TString fake_rates); Calculates Z+X yields per category and final state given you provide data root file and fake rates.

  • void Print( TString root_file); Prints on screen all the yields for given root file.

  • void Print( TString root_file, float dn, float up); Prints on screen all the yields for given root file for mass range [dn,up].

  • void FillGraphs( TString root_file, float dn, float up ); Draws all the fits for a given root file for mass range [dn,up]

  • void PrintLatexTables( TString root_file, float dn, float up ); Prints all yields in latex table format for mass range [dn,up]

  • void PrepareYamlFiles( TString root_file, TString sqrt_s, float dn, float up ); Produces yaml files for mass range [dn,up]. You need to specify string for sqrt_s.