Useful functions
In this chapter a brief overview of the most useful functions in the framework is presented. These functions are used very often by the convenors of this tutorial and are always recommended to be used.
Plotting
The basic plotting style can be set in your macro via the following two lines. They take care of canvas colors, font styles, etc... and should generally always be used when plotting is intended in the macro.
Basic string functions:
Basic marker, color and size settings for different reconstruction methods with
nameDet
being a string containing either one of:"PCM", "PHOS", "EMCal", "PCM-PHOS", "PCM-EMCal", "PCM-Dalitz", "PHOS-Dalitz", "EMCal-Dalitz", "EMCal high pT", "EMCal merged", "PCMOtherDataset"
. These colors should ALWAYS be used if the focus of a plot is to show multiple reconstruction methods! These styles have been used in all recent publications where our group was involved.Basic marker, color and size settings for different center of mass energies with a string containing the energy setting, i.e. "900GeV" or "8TeV". These colors should ALWAYS be used if the focus of a plot is to show multiple center of mass energy measurements of the same method together! These styles have been used in all recent publications where our group was involved.
Set plotting styles for graphs, histograms, TF1:
Canvas setup:
usually one directly sets the textsize in pixels for other plotting functions by using the canvas vertical pixel count (here 900) with:
Make and format legends quickly:
Calculation
Useful code
Cutting TGraphs to a certain x-range with while loop:
Last updated