Skip to content

Latest commit

 

History

History
236 lines (200 loc) · 15.8 KB

README.md

File metadata and controls

236 lines (200 loc) · 15.8 KB

Description of the executables provided in JetMETAnalysis/JetUtilities

jet_inspect_histos_x

PURPOSE:

This simple yet powerful tool allows you to plot histograms created by jet_response_analyzer_x or jet_mass_analyzer_x. The response for different files & algorithms can also be compared (will look good for maximum two though!).

Exploits ObjectLoader to display the response in different bins of variables to be specified. Different files (inputs), algorithms (algs), or variables (e.g. differen Eta / pT ranges) can be overlayed.

If different files are to be overlayed, specify a space-separated list as an argument to the -inputs option.

If different algorithms should be compared, specify a space-separated list as an arguments to the -algs option.

If different variables should be compared, specify a space-separated list as an argument to the -variables option.

A variable has the following syntax:

<quantity>:Var1:...:VarN

and the (only!) assumption is that histograms are stored with names as

quantity_<Var1><min>to<max>:...:<VarN><min>to<max>

e.g. "RelRsp_JetEta0to1.4_RefPt20to27"

Example Variables:
  • RelRsp:RefPt
    • corresponds to the relative response as a function of reference (e.g. genJet) pT; one response histogram will be created for each found RefPt bin.
  • AbsRsp:JetEta:RefPt
    • corresponds to the absolute response as a function of jet eta and reference pT; one response histogram will be created for each found JetEta and RefPt bin. The response distributions belonging to the same eta bin will be drawn in a separate canvas by default.
  • RelRsp:JetEta@0:RefPt
    • corresponds to the relative response as a function of reference pT, in whichever eta bin contains '0'.
  • RelRsp:JetEta#1:RefPt@25
    • the '#1' indicates that JetEta should be considered the second variable (index 0->1): corresponds to the relative response as a function of eta, in whichever RefPt bin contains '25'.
PARAMETERS:

The options are summarized in the following table:

Parameter Type Default Description
inputs vstring list of ROOT input files
algs vstring "ktcalo" list of algorithms
variables vstring "AbsRsp:RefPt" variables to be plotted, in the format quantity:var1[:...[:varN]]
npercanvas int 0 number of histograms per canvas, 0=all
norm bool 0 normalize all histograms to 1.0 if set to true
mean bool 0 draw a line for the histogram mean if set to true
median bool 0 draw a line for the histogram median if set to true
peak bool 0 draw a line for the histogram fit peak if set to true (and if the histogram has been fit)
logx bool 0 display x-axis logarithmically if set to true
logy bool 0 display y-axis logarithmically if set to true
prefix string "" prefix for the canvas / created plot file (constructed automatically if "")
batch bool 0 execute in batch mode (no graphics are being displayed, but plot files are created!)
formats vstring - indicate for which formats (ps, eps, pdf, png, jpg) each canvas should be saved. (if empty and batch is true, add pdf automatically!)

EXAMPLES:
jet_inspect_histos_x -inputs JRA_f.root -algs kt4calo -variables RelRsp:RefPt

jet_inspect_graphs_x

PURPOSE:

The tool allows you to plot graphs created by jet_response_and_resolution_x (actually, any application which conforms with the expected naming convention of the TGraphError objects!). Just like in jet_inspect_histos_x, multiple graphs can be overlayed on the same canvas.

PARAMETERS:

The options are summarized in the following table (some lesser used options may be missing from this table):

Parameter Type Default Description
inputs vstring list of ROOT input files
algs vstring "ak5calo" list of algorithms
variables vstring "RelRspVsRefPt" variables to be plotted, in the format quantityVsVar1[:...[:VarN]]
leglabels vstring - provide legend labels (constructed automatically if empty)
tdrlabels vstring "" place text somwhere in the pad, format: "[x:y:]text"
tdrautobins bool false automatically label the graphs based on their variable names and ranges
drawrange bool false Draw the range
leginplot bool true if false the legend is placed outside of the pad
drawlegend bool true turn on or off the drawing of the legend
legx double 0.5 override the legend x position
legy double 0.9 override the legend y position
legw double 0.4 override the legend width
extraleglabels int 0 the number of legend labels that do not have an associated graph
text string "" (depricated) place text somwhere in the pad, format: "[x:y:]text"
logx bool 0 display x-axis logarithmically if set to true
logy bool 0 display y-axis logarithmically if set to true
ymin float -1.0 y-axis minimum if larger than 0.0, 0.0/0.01 otherwise, based on logy*false/true
ymax float -1.0 y-axis maximum if larger than 0.0, as determined by ROOT otherwise
nocolor bool false request plots to be drawn in black and white only (with adjusted marker styles)
overlay bool true indicate wether all graphs should be overlayed (default) or if each should be drawn in its own pad
prefix string "" prefix for the canvas / created plot file (constructed automatically if "")
suffix string "" suffix for the canvas
opath string "" output path for the plot files
formats vstring - indicate for which formats (ps, eps, pdf, png, jpg) each canvas should be saved. (if empty and batch is true, add pdf automatically!)
batch bool 0 execute in batch mode (no graphics are being displayed, but plot files are created!)
residual int -1 if the value is greater than -1 a residual pad is drawn and the value of this variable determines the type of error shown
resmcdata bool false tells the program that the residual will be between a MC and data sample
defmcdata int "" tells the program which of the graphs is the MC and which of them is the data
interpolate bool false tells the program to interpolate between the points when calculating the residual plots
mgname string "" overrides the graph name
tdr bool false use the newest drawing style for CMS
override bool false Normally the program will only allow multiple inputs, algs, or variables, but not multiple of more than one of those. This will override that protection, but should be used with caution.
removeFit bool false remove the fits associated with the graphs so that they are not drawn

EXAMPLES:
jet_inspect_graphs_x -inputs JRA_g.root -algs sc5pf sc5calo
jet_inspect_graphs_x -inputs JRA_f_g.root -algs sc5pf sc7pf
jet_inspect_graphs_x -inputs JRA_g.root,JRA_fastsim_g.root -algs ak5pf -variables AbsRspVsRefPt:JetEta@0
jet_inspect_graphs_x -inputs JRA_f_g.root -variables RelRspVsRefPt:JetEta@0 RelRsVsRefPt:JetEta@2

NAME MAPPING:

This table will help you map the input variable names to the output graph names. These should just be used as examples as there are a great many options.

Variable TGraphErrors name(s)
RspVsRefPt RspVsRefPt
ResVsRefPt:JetEta ResVsRefPt_JetEta0to1.4
ResVsRefPt_JetEta1.4to2.6
RspVsJetEta:RefPt RspVsJetEta_RefPt20to27
RspVsJetEta_RefPt27to35

jet_inspect_profiles_x

PURPOSE:

Make profiles with this tool, e.g. of the response vs eta/pT. Useful for quick closure tests. You can supply different inputs, algorithms, and/or selections. E.g. you can compare different samples, different algorithms, or different kinematic regions.

PARAMETERS:

The complete list of parameters is the following:

Parameter Type Default Description
inputs vstring list of ROOT input files
algs vstring "ak5pf" list of algorithms (e.g. 'ak5jptl2l3')
selections vstring "" list of selections (e.g. 'refpt>20.')
varexpr string "jtpt/refpt:jteta" variable expression describing 2D histo grom which profile is derived.
treename string "t" name of the ROOT tree.
nbinsx int 50 number of bins in x.
xmin double -5.0 minimum value on x-axis.
xmax double 5.0 maximum value on x-axis.
nbinsy int 50 number of bins in y.
ymin double 0.0 minimum value on y-axis.
ymax double 1.2 maximum value on y-axis.
logx bool false whether the x-axis should be displayed in log scale.
logy bool false whether the y-axis should be displayed in log scale.
xtitle string "jet #eta" x-axis title
ytitle string "p_{T}/p_{T}^{REF}" y-axis title
colors vint "" line colors for each of the profiles.
labels vstring "" legend labels for each of the profiles.
hlines vstring "" where to draw horizontal lines, specify [:<line_style>], e.g. "1.01:2"
output string "profile" name of canvas / output file(s).
batch bool 0 execute in batch mode (no graphics are being displayed, but plot files are created)
formats vstring - indicate for which formats (ps, eps, pdf, png, jpg) each canvas should be saved. (if empty and batch is true, add pdf automatically!)

EXAMPLES:
jet_inspect_profiles_x -inputs JRA.root
jet_inspect_profiles_x -inputs JRA.root -selections "refpt>20.&&refpt<50." "refpt>100.&refpt<300." -labels "20<p_{T}<50" "100<p_{T}<300"
jet_inspect_profiles_x config/jip_vseta.config config/jip_ptrsp.config -inputs JRA.root

jet_add_histos_x

PURPOSE:

This code takes in a file formatted in the style of jet_response_analyzer_x, adds together a set of histograms within a given set of ranges, and then outputs a file with all of histograms which weren't added together plus this summed histograms. The original intention for this code was to be able to piece together the pThat distributions. This would allow the user to check that multiple datasets had been stitched together appropriately. That being said, there is no reason this code couldn't be used to add together other histograms.

PARAMETERS:
Parameter Type Default Description
input string ROOT input file
output string "" output filename
algs string "" list of algorithms (e.g. 'ak5jptl2l3')
variables string "pThat:JetEta:RefPt" list of variables/histograms to sum
sranges string "pThat:JetEta!:RefPt!" list of ranges to sum over (can be multiple ranges per list of variables)
prefix string "" prefix for the summed histogram(s)
suffix string "" suffix for the summed histogram(s)
fill bool false set options for a filled histogram
colors string "" colors for the summed histogram(s)
fillstyles string "" fill styles for the summed histogram(s)
markstyles string "" marker styles for the summed histogram(s)
rebin int 1 rebin the summed histogram(s)
norm bool false normalize the summed histogram(s) to 1.0
verbose bool false print additional information to the screen
EXAMPLES:
jet_add_histos_x -input jra.root

jet_make_animation_x.cc

PURPOSE:

This program makes an animated gif out of an input set of images. This is helpful when viewing a large set of sequential images.

PARAMETERS:
Parameter Type Default Description
inputs vstring list of input images
outputDir string "./" the directory for the output GIF
outputName string "animation.gif" name of the output GIF
loop bool true loop the animated GIF?
delay int 0 the delay on one image before the next image appears (10*NN milliseconds delay)
lastdelay int 0 the delay on the last image before the next loop (10*NN milliseconds delay)
repeats int -1 the number of times to repeat the loop
EXAMPLES:
jet_make_animation_x -inputs image1.gif image2.gif image3.gif