Skip to content

dteague/WZConfigPlotting

 
 

Repository files navigation

TODO: explain style and all the inputs

Table of Contents

How to Run

This repo uses argparse so to see all options, just run ./make_hist.py --help

The required options are -i and -a for input and analysis respectively.

  • -s [Selection]: is not required because defaults to finding PlotObject info from the PlotObject/<Analysi>.json file. Specify Selection to pick a selection specific histogram
  • l [Luminosity]: This defaults to -1 or all samples are unit normalization. Give in pb-1
  • c [Channel]: Default is "all" (actual word "all"), but can change this
  • sig [Signal]: choose which sample to make your signal

The Samples that will be made into the graph are specified in the drawObj array in the make_hist.py code. This must be changed to the samples you want.

./make_hist.py -i 4top_files.root -a ThreeLep -l 35.9 -o outie.root -sig '2016' --no_ratio

Styles

All of the information for the style is in the StyleHelper.py file. The StyleHelper does 2 main things:

  1. Give style to the bars in the stack plot
  2. Give root attributes to different objects

For the giving style, this is done with PlotGroup file in the ADM. The actual string that is used to give the style is the Style string in the py file and it is blocked into 3 compontents:

  1. Describe the fill type of the stack [fill, nofill, hatched]
  2. Describe the color of the stack and line (described in full in the color section)
  3. Describe the line type [thick, dotdash, dash, largedash, finedash] default is leaving black

This style string has these 3 components put into a string with each component seperated by a dash or:

fill-red

nofill-springgreen-dotdash

etc.

The Second part of the code is to give a certain object some formatting based on root commands, such as hist.GetXaxis().SetTitle("blah"). This is done by putting the command in the Attributes section of the style.py file in this repo for a given object. The command can be a chained together. Examples are:

"GetXaxis.SetTitle" : "Hello"

"GetXaxis().SetTitleOffset" : 1.3

Colors

Red

color name hex
ff9999 lightsalmon 0xff9999
ff6666 salmon 0xff6666
cc6666 indianred 0xcc6666
cc0033 crimson 0xcc0033
cc3333 firebrick 0xcc3333
ff0000 red 0xff0000
990000 darkred 0x990000
ff9933 coral 0xff9933
ff6633 tomato 0xff6633

orange

color name hex
ff3300 orangered 0xff3300
ffcc00 gold 0xffcc00
ff9900 orange 0xff9900

yellow

color name hex
ffffcc lemonchiffon 0xffffcc
ffff99 khaki 0xffff99
cccc66 darkkhaki 0xcccc66
ffff00 yellow 0xffff00

green

color name hex
66ff00 lawngreen 0x66ff00
99ff00 chartreuse 0x99ff00
33cc33 limegreen 0x33cc33
00ff00 lime 0x00ff00
339933 forestgreen 0x339933
009900 green 0x009900
006600 darkgreen 0x006600
99ff33 greenyellow 0x99ff33
99cc33 yellowgreen 0x99cc33
00ff66 springgreen 0x00ff66
00ff99 mediumspringgreen 0x00ff99
99ff99 palegreen 0x99ff99
99cc99 darkseagreen 0x99cc99
33cc66 mediumseagreen 0x33cc66
339966 seagreen 0x339966
999900 olive 0x999900
666633 darkolivegreen 0x666633
669933 olivedrab 0x669933

cyan

color name hex
ccffff lightcyan 0xccffff
00ffff cyan 0x00ffff
66ffcc aquamarine 0x66ffcc
66cc99 mediumaquamarine 0x66cc99
99ffff paleturquoise 0x99ffff
33ffcc turquoise 0x33ffcc
33cccc mediumturquoise 0x33cccc
00cccc darkturquoise 0x00cccc
339999 lightseagreen 0x339999
669999 cadetblue 0x669999
009999 darkcyan 0x009999
009966 teal 0x009966

blue

color name hex
99ccff lightskyblue 0x99ccff
00ccff deepskyblue 0x00ccff
99cccc lightsteelblue 0x99cccc
3399ff dodgerblue 0x3399ff
6699ff cornflowerblue 0x6699ff
3399cc steelblue 0x3399cc
3366cc royalblue 0x3366cc
0000ff blue 0x0000ff
0000cc mediumblue 0x0000cc
000099 darkblue 0x000099
000066 navy 0x000066
003366 midnightblue 0x003366
6666ff mediumslateblue 0x6666ff
6666cc slateblue 0x6666cc
333399 darkslateblue 0x333399

purple

color name hex
ffccff lavender 0xffccff
cc99cc plum 0xcc99cc
ff99ff violet 0xff99ff
cc66cc orchid 0xcc66cc
ff00ff magenta 0xff00ff
cc33cc mediumorchid 0xcc33cc
9966cc mediumpurple 0x9966cc
9933ff blueviolet 0x9933ff
9900cc darkviolet 0x9900cc
9933cc darkorchid 0x9933cc
990099 darkmagenta 0x990099
990066 purple 0x990066
660099 indigo 0x660099

pink

color name hex
ffcccc pink 0xffcccc
ff99cc lightpink 0xff99cc
ff66cc hotpink 0xff66cc
ff0099 deeppink 0xff0099
cc6699 palevioletred 0xcc6699
cc3399 mediumvioletred 0xcc3399

white/grey/black

color name hex
ffffff white 0xffffff
cccccc lightgray 0xcccccc
999999 darkgray 0x999999
666666 dimgray 0x666666
666699 slategray 0x666699
336666 darkslategray 0x336666
000000 black 0x000000

brown

color name hex
ffcc99 navajowhite 0xffcc99
cccc99 tan 0xcccc99
cc9999 rosybrown 0xcc9999
ff9966 sandybrown 0xff9966
cc9900 goldenrod 0xcc9900
cc9933 peru 0xcc9933
cc6633 chocolate 0xcc6633
993300 saddlebrown 0x993300
996633 sienna 0x996633
993333 brown 0x993333
660000 maroon 0x660000

About

Plotting code for WZ analysis, based on JSON config files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Shell 0.2%