-
Notifications
You must be signed in to change notification settings - Fork 184
/
Copy path_plotting_8h.html
1485 lines (1379 loc) · 73.2 KB
/
_plotting_8h.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<title>CombineHarvester: CombineTools/interface/Plotting.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 70px;">
<td style="padding-left: 0.5em;">
<div id="projectname">CombineHarvester
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.svg"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_plotting_8h.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">Plotting.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include <map></code><br />
<code>#include <string></code><br />
<code>#include <iostream></code><br />
<code>#include <vector></code><br />
<code>#include <cmath></code><br />
<code>#include "TStyle.h"</code><br />
<code>#include "TGraph.h"</code><br />
<code>#include "TGraph2D.h"</code><br />
<code>#include "TCanvas.h"</code><br />
<code>#include "TPad.h"</code><br />
<code>#include "TLatex.h"</code><br />
<code>#include "TAxis.h"</code><br />
<code>#include "TList.h"</code><br />
<code>#include "TH1F.h"</code><br />
<code>#include "TLegend.h"</code><br />
<code>#include "TColor.h"</code><br />
<code>#include "TROOT.h"</code><br />
<code>#include "TFrame.h"</code><br />
<code>#include "TTree.h"</code><br />
<code>#include "TFile.h"</code><br />
<code>#include "TLine.h"</code><br />
<code>#include "TMultiGraph.h"</code><br />
<code>#include "THStack.h"</code><br />
</div>
<p><a href="_plotting_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Pad and axis histogram creation</div></td></tr>
<tr class="memitem:aa098641a0337d718d1074531133b884f"><td class="memItemLeft" align="right" valign="top">std::vector< TPad * > </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#aa098641a0337d718d1074531133b884f">OnePad</a> ()</td></tr>
<tr class="memdesc:aa098641a0337d718d1074531133b884f"><td class="mdescLeft"> </td><td class="mdescRight">Just creates a single pad filling the entire canvas. <a href="_plotting_8h.html#aa098641a0337d718d1074531133b884f">More...</a><br /></td></tr>
<tr class="separator:aa098641a0337d718d1074531133b884f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aec780e8b3dd08b4a37dd94abc30f42c0"><td class="memItemLeft" align="right" valign="top">std::vector< TPad * > </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#aec780e8b3dd08b4a37dd94abc30f42c0">TwoPadSplit</a> (double split_point, double gap_low, double gap_high)</td></tr>
<tr class="memdesc:aec780e8b3dd08b4a37dd94abc30f42c0"><td class="mdescLeft"> </td><td class="mdescRight">Create two pads, split horizontally, on the current canvas split. <a href="_plotting_8h.html#aec780e8b3dd08b4a37dd94abc30f42c0">More...</a><br /></td></tr>
<tr class="separator:aec780e8b3dd08b4a37dd94abc30f42c0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad137f606f878b7d25aeb2dde1b970ce9"><td class="memItemLeft" align="right" valign="top">TH1 * </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#ad137f606f878b7d25aeb2dde1b970ce9">CreateAxisHist</a> (TH1 *src, double xmin=0, double xmax=-1)</td></tr>
<tr class="memdesc:ad137f606f878b7d25aeb2dde1b970ce9"><td class="mdescLeft"> </td><td class="mdescRight">Create an empty TH1 from another TH1 for drawing the axes. <a href="_plotting_8h.html#ad137f606f878b7d25aeb2dde1b970ce9">More...</a><br /></td></tr>
<tr class="separator:ad137f606f878b7d25aeb2dde1b970ce9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aaeb0dadc50435965db936e967dde2799"><td class="memItemLeft" align="right" valign="top">std::vector< TH1 * > </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#aaeb0dadc50435965db936e967dde2799">CreateAxisHists</a> (unsigned n, TH1 *src, double xmin=0, double xmax=-1)</td></tr>
<tr class="memdesc:aaeb0dadc50435965db936e967dde2799"><td class="mdescLeft"> </td><td class="mdescRight">Create multiple axis TH1s from another TH1. <a href="_plotting_8h.html#aaeb0dadc50435965db936e967dde2799">More...</a><br /></td></tr>
<tr class="separator:aaeb0dadc50435965db936e967dde2799"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac4830bcc5449ac3275bf66ac389fe4ee"><td class="memItemLeft" align="right" valign="top">TH1 * </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#ac4830bcc5449ac3275bf66ac389fe4ee">CreateAxisHist</a> (TGraph *src, bool at_limits)</td></tr>
<tr class="memdesc:ac4830bcc5449ac3275bf66ac389fe4ee"><td class="mdescLeft"> </td><td class="mdescRight">Create an empty TH1 from a TGraph for drawing the axes. <a href="_plotting_8h.html#ac4830bcc5449ac3275bf66ac389fe4ee">More...</a><br /></td></tr>
<tr class="separator:ac4830bcc5449ac3275bf66ac389fe4ee"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6c102d23f1264e7b30aed6f76ce6c740"><td class="memItemLeft" align="right" valign="top">std::vector< TH1 * > </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#a6c102d23f1264e7b30aed6f76ce6c740">CreateAxisHists</a> (unsigned n, TGraph *src, bool at_limits)</td></tr>
<tr class="memdesc:a6c102d23f1264e7b30aed6f76ce6c740"><td class="mdescLeft"> </td><td class="mdescRight">Create multiple axis TH1s from a TGraph. <a href="_plotting_8h.html#a6c102d23f1264e7b30aed6f76ce6c740">More...</a><br /></td></tr>
<tr class="separator:a6c102d23f1264e7b30aed6f76ce6c740"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aafd63f976dd4c5ae271062e0f91c2681"><td class="memItemLeft" align="right" valign="top">TH1 * </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#aafd63f976dd4c5ae271062e0f91c2681">GetAxisHist</a> (TPad *pad)</td></tr>
<tr class="memdesc:aafd63f976dd4c5ae271062e0f91c2681"><td class="mdescLeft"> </td><td class="mdescRight">Finds the TH1 used to draw the axes on a given TPad. <a href="_plotting_8h.html#aafd63f976dd4c5ae271062e0f91c2681">More...</a><br /></td></tr>
<tr class="separator:aafd63f976dd4c5ae271062e0f91c2681"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Object extraction and manipulation</div></td></tr>
<tr class="memitem:a526842799b4de3a542d8114989dba48d"><td class="memItemLeft" align="right" valign="top">TH1 * </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#a526842799b4de3a542d8114989dba48d">MakeRatioHist</a> (TH1 *num, TH1 *den, bool num_err, bool den_err)</td></tr>
<tr class="memdesc:a526842799b4de3a542d8114989dba48d"><td class="mdescLeft"> </td><td class="mdescRight">Create a new histogram by dividing one by the other. <a href="_plotting_8h.html#a526842799b4de3a542d8114989dba48d">More...</a><br /></td></tr>
<tr class="separator:a526842799b4de3a542d8114989dba48d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9359e5d70c59b3cd3ec03c4c7b449d1f"><td class="memItemLeft" align="right" valign="top">TGraph </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#a9359e5d70c59b3cd3ec03c4c7b449d1f">TGraphFromTree</a> (TTree *tree, TString const &xvar, TString const &yvar, TString const &selection="")</td></tr>
<tr class="memdesc:a9359e5d70c59b3cd3ec03c4c7b449d1f"><td class="mdescLeft"> </td><td class="mdescRight">Create a TGraph from entries in a TTree. <a href="_plotting_8h.html#a9359e5d70c59b3cd3ec03c4c7b449d1f">More...</a><br /></td></tr>
<tr class="separator:a9359e5d70c59b3cd3ec03c4c7b449d1f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afd3d99fcf4abb2cc459734f0d7ce44e6"><td class="memItemLeft" align="right" valign="top">TGraph2D </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#afd3d99fcf4abb2cc459734f0d7ce44e6">TGraph2DFromTree</a> (TTree *tree, TString const &xvar, TString const &yvar, TString const &zvar, TString const &selection="")</td></tr>
<tr class="memdesc:afd3d99fcf4abb2cc459734f0d7ce44e6"><td class="mdescLeft"> </td><td class="mdescRight">Create a TGraph2D from entries in a TTree. <a href="_plotting_8h.html#afd3d99fcf4abb2cc459734f0d7ce44e6">More...</a><br /></td></tr>
<tr class="separator:afd3d99fcf4abb2cc459734f0d7ce44e6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af2524f9f02ac66a16164c87bfc149628"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#af2524f9f02ac66a16164c87bfc149628">ReZeroTGraph</a> (TGraph *gr)</td></tr>
<tr class="memdesc:af2524f9f02ac66a16164c87bfc149628"><td class="mdescLeft"> </td><td class="mdescRight">Shift all the graph y-values upwards such that there are no negative values and the minimum point is at zero. <a href="_plotting_8h.html#af2524f9f02ac66a16164c87bfc149628">More...</a><br /></td></tr>
<tr class="separator:af2524f9f02ac66a16164c87bfc149628"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Plot decoration (colours, styles, text and legends)</div></td></tr>
<tr class="memitem:addb5de4f8e6a8a5fa83d7d824d3d9934"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#addb5de4f8e6a8a5fa83d7d824d3d9934">CreateTransparentColor</a> (int color, float alpha)</td></tr>
<tr class="memdesc:addb5de4f8e6a8a5fa83d7d824d3d9934"><td class="mdescLeft"> </td><td class="mdescRight">Create a transparent version of a colour. <a href="_plotting_8h.html#addb5de4f8e6a8a5fa83d7d824d3d9934">More...</a><br /></td></tr>
<tr class="separator:addb5de4f8e6a8a5fa83d7d824d3d9934"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac22871e6dbf88fd29fa06f8a2cfb5f8d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#ac22871e6dbf88fd29fa06f8a2cfb5f8d">SetupTwoPadSplitAsRatio</a> (std::vector< TPad * > const &pads, TH1 *upper, TH1 *lower, TString y_title, bool y_centered, float y_min, float y_max)</td></tr>
<tr class="memdesc:ac22871e6dbf88fd29fa06f8a2cfb5f8d"><td class="mdescLeft"> </td><td class="mdescRight">Set a few style options for a two-pad setup used to show a data-MC comparison and ratio plot. <a href="_plotting_8h.html#ac22871e6dbf88fd29fa06f8a2cfb5f8d">More...</a><br /></td></tr>
<tr class="separator:ac22871e6dbf88fd29fa06f8a2cfb5f8d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a293279a5520769bf993d81e4dc070709"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#a293279a5520769bf993d81e4dc070709">SetupTwoPadSplitAsRatio</a> (std::vector< TPad * > const &pads, TString y_title, bool y_centered, float y_min, float y_max)</td></tr>
<tr class="memdesc:a293279a5520769bf993d81e4dc070709"><td class="mdescLeft"> </td><td class="mdescRight">Set a few style options for a two-pad setup used to show a data-MC comparison and ratio plot. <a href="_plotting_8h.html#a293279a5520769bf993d81e4dc070709">More...</a><br /></td></tr>
<tr class="separator:a293279a5520769bf993d81e4dc070709"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a976a4920cd03f97ded8454279c895a32"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#a976a4920cd03f97ded8454279c895a32">StandardAxes</a> (TAxis *xaxis, TAxis *yaxis, TString var, TString units)</td></tr>
<tr class="memdesc:a976a4920cd03f97ded8454279c895a32"><td class="mdescLeft"> </td><td class="mdescRight">Sets standard x- and y-axis titles with given units. <a href="_plotting_8h.html#a976a4920cd03f97ded8454279c895a32">More...</a><br /></td></tr>
<tr class="separator:a976a4920cd03f97ded8454279c895a32"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a434781fa740199ba94f267d8263cc1a2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#a434781fa740199ba94f267d8263cc1a2">UnitAxes</a> (TAxis *xaxis, TAxis *yaxis, TString var, TString units)</td></tr>
<tr class="memdesc:a434781fa740199ba94f267d8263cc1a2"><td class="mdescLeft"> </td><td class="mdescRight">Sets standard x- and y-axis titles when histograms are drawn divided by bin width. <a href="_plotting_8h.html#a434781fa740199ba94f267d8263cc1a2">More...</a><br /></td></tr>
<tr class="separator:a434781fa740199ba94f267d8263cc1a2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a658a1da4505b61eb5a0f0db01c01e161"><td class="memItemLeft" align="right" valign="top">TLegend * </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#a658a1da4505b61eb5a0f0db01c01e161">PositionedLegend</a> (double width, double height, int pos, double offset)</td></tr>
<tr class="memdesc:a658a1da4505b61eb5a0f0db01c01e161"><td class="mdescLeft"> </td><td class="mdescRight">Create a legend with fixed height, width and positioning. <a href="_plotting_8h.html#a658a1da4505b61eb5a0f0db01c01e161">More...</a><br /></td></tr>
<tr class="separator:a658a1da4505b61eb5a0f0db01c01e161"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa8adc566a12b3c090d1e1ff3330f7c98"><td class="memItemLeft" align="right" valign="top">TLine * </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#aa8adc566a12b3c090d1e1ff3330f7c98">DrawHorizontalLine</a> (TPad *pad, TLine *line, double yval)</td></tr>
<tr class="memdesc:aa8adc566a12b3c090d1e1ff3330f7c98"><td class="mdescLeft"> </td><td class="mdescRight">Use an existing TLine to draw a new horizontal line across the current frame. <a href="_plotting_8h.html#aa8adc566a12b3c090d1e1ff3330f7c98">More...</a><br /></td></tr>
<tr class="separator:aa8adc566a12b3c090d1e1ff3330f7c98"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a39767958a52b4be5820816be7b1bb9bf"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#a39767958a52b4be5820816be7b1bb9bf">DrawTitle</a> (TPad *pad, TString text, int align)</td></tr>
<tr class="memdesc:a39767958a52b4be5820816be7b1bb9bf"><td class="mdescLeft"> </td><td class="mdescRight">Draw text in the top-margin region of a TPad. <a href="_plotting_8h.html#a39767958a52b4be5820816be7b1bb9bf">More...</a><br /></td></tr>
<tr class="separator:a39767958a52b4be5820816be7b1bb9bf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac9a2d10dbb78251b4757aba40f73fa68"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#ac9a2d10dbb78251b4757aba40f73fa68">DrawCMSLogo</a> (TPad *pad, TString cmsText, TString extraText, int iPosX, float relPosX, float relPosY, float relExtraDY)</td></tr>
<tr class="memdesc:ac9a2d10dbb78251b4757aba40f73fa68"><td class="mdescLeft"> </td><td class="mdescRight">Draw the CMS logo and subtitle in the new style. <a href="_plotting_8h.html#ac9a2d10dbb78251b4757aba40f73fa68">More...</a><br /></td></tr>
<tr class="separator:ac9a2d10dbb78251b4757aba40f73fa68"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a99344cc5028c90aaafacea9ec5eab9d2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#a99344cc5028c90aaafacea9ec5eab9d2">DrawCMSLogo</a> (TPad *pad, TString cmsText, TString extraText, int iPosX)</td></tr>
<tr class="memdesc:a99344cc5028c90aaafacea9ec5eab9d2"><td class="mdescLeft"> </td><td class="mdescRight">Call DrawCMSLogo with some sensible defaults for the positioning parameters. <a href="_plotting_8h.html#a99344cc5028c90aaafacea9ec5eab9d2">More...</a><br /></td></tr>
<tr class="separator:a99344cc5028c90aaafacea9ec5eab9d2"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Axis adjustment and overlap checks</div></td></tr>
<tr class="memitem:a94fa210a8324e72a82327860972746eb"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#a94fa210a8324e72a82327860972746eb">GetPadYMax</a> (TPad *pad, double x_min, double x_max)</td></tr>
<tr class="memdesc:a94fa210a8324e72a82327860972746eb"><td class="mdescLeft"> </td><td class="mdescRight">Find the maximum value of all drawn objects in a given x-axis range. <a href="_plotting_8h.html#a94fa210a8324e72a82327860972746eb">More...</a><br /></td></tr>
<tr class="separator:a94fa210a8324e72a82327860972746eb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afa343295bd66905121be203cb7c7cc03"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#afa343295bd66905121be203cb7c7cc03">GetPadYMax</a> (TPad *pad)</td></tr>
<tr class="memdesc:afa343295bd66905121be203cb7c7cc03"><td class="mdescLeft"> </td><td class="mdescRight">Call <a class="el" href="_plotting_8h.html#a94fa210a8324e72a82327860972746eb" title="Find the maximum value of all drawn objects in a given x-axis range.">GetPadYMax(TPad*, double, double)</a> with the full range of the given TPad. <a href="_plotting_8h.html#afa343295bd66905121be203cb7c7cc03">More...</a><br /></td></tr>
<tr class="separator:afa343295bd66905121be203cb7c7cc03"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5f529c55b51440415c95a200a9e0708f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#a5f529c55b51440415c95a200a9e0708f">FixTopRange</a> (TPad *pad, double fix_y, double fraction)</td></tr>
<tr class="memdesc:a5f529c55b51440415c95a200a9e0708f"><td class="mdescLeft"> </td><td class="mdescRight">Adjusts the y-axis maximum on the pad such that the specified y-value is positioned a fixed fraction from this new maximum. <a href="_plotting_8h.html#a5f529c55b51440415c95a200a9e0708f">More...</a><br /></td></tr>
<tr class="separator:a5f529c55b51440415c95a200a9e0708f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0d9c9cc36ba7c24dcdca74b6173a0335"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#a0d9c9cc36ba7c24dcdca74b6173a0335">FixBoxPadding</a> (TPad *pad, TBox *box, double frac)</td></tr>
<tr class="memdesc:a0d9c9cc36ba7c24dcdca74b6173a0335"><td class="mdescLeft"> </td><td class="mdescRight">Modify the pad y-axis range to ensure there is at least a given gap between a particular TBox and the highest drawn element in the x-axis range of this box. <a href="_plotting_8h.html#a0d9c9cc36ba7c24dcdca74b6173a0335">More...</a><br /></td></tr>
<tr class="separator:a0d9c9cc36ba7c24dcdca74b6173a0335"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3ab873b129878269a347a387a5f6ff4b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_plotting_8h.html#a3ab873b129878269a347a387a5f6ff4b">FixOverlay</a> ()</td></tr>
<tr class="memdesc:a3ab873b129878269a347a387a5f6ff4b"><td class="mdescLeft"> </td><td class="mdescRight">Just re-draws the axes on the current TPad. <a href="_plotting_8h.html#a3ab873b129878269a347a387a5f6ff4b">More...</a><br /></td></tr>
<tr class="separator:a3ab873b129878269a347a387a5f6ff4b"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="aa098641a0337d718d1074531133b884f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa098641a0337d718d1074531133b884f">◆ </a></span>OnePad()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector< TPad * > OnePad </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Just creates a single pad filling the entire canvas. </p>
<p>Exists just to provide a similar output interface to <a class="el" href="_plotting_8h.html#aec780e8b3dd08b4a37dd94abc30f42c0" title="Create two pads, split horizontally, on the current canvas split.">TwoPadSplit()</a></p>
<dl class="section return"><dt>Returns</dt><dd>A vector containing a single pointer to the newly created TPad </dd></dl>
<p class="definition">Definition at line <a class="el" href="_plotting_8h_source.html#l00459">459</a> of file <a class="el" href="_plotting_8h_source.html">Plotting.h</a>.</p>
</div>
</div>
<a id="aec780e8b3dd08b4a37dd94abc30f42c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec780e8b3dd08b4a37dd94abc30f42c0">◆ </a></span>TwoPadSplit()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector< TPad * > TwoPadSplit </td>
<td>(</td>
<td class="paramtype">double </td>
<td class="paramname"><em>split_point</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>gap_low</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>gap_high</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create two pads, split horizontally, on the current canvas split. </p>
<p>Note that both pads will actually cover the full area of the canvas. We create the appearance of two separated pads by adjusting the top and bottom margins, and then making the background of each pad transparent.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">split_point</td><td>Fraction of the canvas that should be occuplied by the lower pad. </td></tr>
<tr><td class="paramname">gap_low</td><td>The top margin of the lower pad (with respect to the split point), given as a fraction of the input canvas height </td></tr>
<tr><td class="paramname">gap_high</td><td>The bottom margin of the upper pad (with respect to the split point), given as a fraction of the input canvas height</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A vector of pointers to the new pads: [0] = upper, [1] = lower. The current pad (<code>gPad</code>) will be set to the upper one. </dd></dl>
<p class="definition">Definition at line <a class="el" href="_plotting_8h_source.html#l00468">468</a> of file <a class="el" href="_plotting_8h_source.html">Plotting.h</a>.</p>
</div>
</div>
<a id="ad137f606f878b7d25aeb2dde1b970ce9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad137f606f878b7d25aeb2dde1b970ce9">◆ </a></span>CreateAxisHist() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">TH1 * CreateAxisHist </td>
<td>(</td>
<td class="paramtype">TH1 * </td>
<td class="paramname"><em>src</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>xmin</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>xmax</em> = <code>-1</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create an empty TH1 from another TH1 for drawing the axes. </p>
<p>A copy of the input TH1 is made, and all bin contents and errors are removed.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">src</td><td>TH1 input </td></tr>
<tr><td class="paramname">xmin</td><td>adjust the minimum of the drawn range of the x-axis </td></tr>
<tr><td class="paramname">xmax</td><td>adjust the maximum of the drawn range of the x-axis (only if <code>xmax > xmin</code>)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An empty TH1 with axes built from the input TH1 </dd></dl>
<p class="definition">Definition at line <a class="el" href="_plotting_8h_source.html#l00485">485</a> of file <a class="el" href="_plotting_8h_source.html">Plotting.h</a>.</p>
</div>
</div>
<a id="aaeb0dadc50435965db936e967dde2799"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaeb0dadc50435965db936e967dde2799">◆ </a></span>CreateAxisHists() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector< TH1 * > CreateAxisHists </td>
<td>(</td>
<td class="paramtype">unsigned </td>
<td class="paramname"><em>n</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TH1 * </td>
<td class="paramname"><em>src</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>xmin</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>xmax</em> = <code>-1</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create multiple axis TH1s from another TH1. </p>
<p>Just calls <a class="el" href="_plotting_8h.html#ad137f606f878b7d25aeb2dde1b970ce9" title="Create an empty TH1 from another TH1 for drawing the axes.">CreateAxisHist(TH1*, double, double)</a> multiple times.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">n</td><td>Number of histograms to make </td></tr>
<tr><td class="paramname">src</td><td>TH1 input </td></tr>
<tr><td class="paramname">xmin</td><td>adjust the minimum of the drawn range of the x-axis </td></tr>
<tr><td class="paramname">xmax</td><td>adjust the maximum of the drawn range of the x-axis (only if <code>xmax > xmin</code>) </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_plotting_8h_source.html#l00494">494</a> of file <a class="el" href="_plotting_8h_source.html">Plotting.h</a>.</p>
</div>
</div>
<a id="ac4830bcc5449ac3275bf66ac389fe4ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4830bcc5449ac3275bf66ac389fe4ee">◆ </a></span>CreateAxisHist() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">TH1 * CreateAxisHist </td>
<td>(</td>
<td class="paramtype">TGraph * </td>
<td class="paramname"><em>src</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>at_limits</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create an empty TH1 from a TGraph for drawing the axes. </p>
<p>This function just draws the input TGraph on a temporary TCanvas and extracts the internal TH1 that ROOT creates to do this. In this process the x- and y-axis ranges are computing automatically.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">src</td><td>TGraph input </td></tr>
<tr><td class="paramname">at_limits</td><td>By default the x-axis range will go beyond the min and max x-values found in the TGraph. Set this option to true to fix the range to these min/max values.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An empty TH1 with axes built from the input TGraph </dd></dl>
<p class="definition">Definition at line <a class="el" href="_plotting_8h_source.html#l00503">503</a> of file <a class="el" href="_plotting_8h_source.html">Plotting.h</a>.</p>
</div>
</div>
<a id="a6c102d23f1264e7b30aed6f76ce6c740"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c102d23f1264e7b30aed6f76ce6c740">◆ </a></span>CreateAxisHists() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector< TH1 * > CreateAxisHists </td>
<td>(</td>
<td class="paramtype">unsigned </td>
<td class="paramname"><em>n</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TGraph * </td>
<td class="paramname"><em>src</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>at_limits</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create multiple axis TH1s from a TGraph. </p>
<p>Just calls <a class="el" href="_plotting_8h.html#ac4830bcc5449ac3275bf66ac389fe4ee" title="Create an empty TH1 from a TGraph for drawing the axes.">CreateAxisHist(TGraph*, bool)</a> multiple times.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">n</td><td>Number of histograms to make </td></tr>
<tr><td class="paramname">src</td><td>TGraph input </td></tr>
<tr><td class="paramname">at_limits</td><td>By default the x-axis range will go beyond the min and max x-values found in the TGraph. Set this option to true to fix the range to these min/max values. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_plotting_8h_source.html#l00528">528</a> of file <a class="el" href="_plotting_8h_source.html">Plotting.h</a>.</p>
</div>
</div>
<a id="aafd63f976dd4c5ae271062e0f91c2681"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aafd63f976dd4c5ae271062e0f91c2681">◆ </a></span>GetAxisHist()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">TH1 * GetAxisHist </td>
<td>(</td>
<td class="paramtype">TPad * </td>
<td class="paramname"><em>pad</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Finds the TH1 used to draw the axes on a given TPad. </p>
<p>Should be able to find a TH1 regardless of whether a TH1, THStack or TGraph was used to define the axes.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pad</td><td>The TPad to search</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the axis TH1 if it exists, a NULL pointer otherwise </dd></dl>
<p class="definition">Definition at line <a class="el" href="_plotting_8h_source.html#l00536">536</a> of file <a class="el" href="_plotting_8h_source.html">Plotting.h</a>.</p>
</div>
</div>
<a id="a526842799b4de3a542d8114989dba48d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a526842799b4de3a542d8114989dba48d">◆ </a></span>MakeRatioHist()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">TH1 * MakeRatioHist </td>
<td>(</td>
<td class="paramtype">TH1 * </td>
<td class="paramname"><em>num</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TH1 * </td>
<td class="paramname"><em>den</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>num_err</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>den_err</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new histogram by dividing one by the other. </p>
<p>The errors on the two inputs are optionally propagated. Note that these are just combined in quadrature, thus assuming the inputs are uncorrelated. This does not hold for efficiency calculations.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">num</td><td>Numerator histogram </td></tr>
<tr><td class="paramname">den</td><td>Denominator histogram </td></tr>
<tr><td class="paramname">num_err</td><td>Propagate errors on the numerator </td></tr>
<tr><td class="paramname">den_err</td><td>Propagate errors on the denominator</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the newly created TH1 </dd></dl>
<p class="definition">Definition at line <a class="el" href="_plotting_8h_source.html#l00567">567</a> of file <a class="el" href="_plotting_8h_source.html">Plotting.h</a>.</p>
</div>
</div>
<a id="a9359e5d70c59b3cd3ec03c4c7b449d1f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9359e5d70c59b3cd3ec03c4c7b449d1f">◆ </a></span>TGraphFromTree()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">TGraph TGraphFromTree </td>
<td>(</td>
<td class="paramtype">TTree * </td>
<td class="paramname"><em>tree</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TString const & </td>
<td class="paramname"><em>xvar</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TString const & </td>
<td class="paramname"><em>yvar</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TString const & </td>
<td class="paramname"><em>selection</em> = <code>""</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a TGraph from entries in a TTree. </p>
<p>Note that the graph entries will be filled in whichever order they are found in the TTree. It may be desirable to call <code>TGraph::Sort</code> on the resulting object.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">tree</td><td>Input TTree </td></tr>
<tr><td class="paramname">xvar</td><td>Branch or expression for the x-values </td></tr>
<tr><td class="paramname">yvar</td><td>Branch or expression for the y-values </td></tr>
<tr><td class="paramname">selection</td><td>Optional cut string to apply to each entry </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_plotting_8h_source.html#l00581">581</a> of file <a class="el" href="_plotting_8h_source.html">Plotting.h</a>.</p>
</div>
</div>
<a id="afd3d99fcf4abb2cc459734f0d7ce44e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd3d99fcf4abb2cc459734f0d7ce44e6">◆ </a></span>TGraph2DFromTree()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">TGraph2D TGraph2DFromTree </td>
<td>(</td>
<td class="paramtype">TTree * </td>
<td class="paramname"><em>tree</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TString const & </td>
<td class="paramname"><em>xvar</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TString const & </td>
<td class="paramname"><em>yvar</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TString const & </td>
<td class="paramname"><em>zvar</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TString const & </td>
<td class="paramname"><em>selection</em> = <code>""</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a TGraph2D from entries in a TTree. </p>
<p>Note that the graph entries will be filled in whichever order they are found in the TTree. It may be desirable to call <code>TGraph::Sort</code> on the resulting object.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">tree</td><td>Input TTree </td></tr>
<tr><td class="paramname">xvar</td><td>Branch or expression for the x-values </td></tr>
<tr><td class="paramname">yvar</td><td>Branch or expression for the y-values </td></tr>
<tr><td class="paramname">zvar</td><td>Branch or expression for the y-values </td></tr>
<tr><td class="paramname">selection</td><td>Optional cut string to apply to each entry </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_plotting_8h_source.html#l00588">588</a> of file <a class="el" href="_plotting_8h_source.html">Plotting.h</a>.</p>
</div>
</div>
<a id="af2524f9f02ac66a16164c87bfc149628"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af2524f9f02ac66a16164c87bfc149628">◆ </a></span>ReZeroTGraph()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ReZeroTGraph </td>
<td>(</td>
<td class="paramtype">TGraph * </td>
<td class="paramname"><em>gr</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Shift all the graph y-values upwards such that there are no negative values and the minimum point is at zero. </p>
<p>Useful for fixing graphs of log-likelihood scans extracted from <code>combine</code> where the true minimum was not found correctly in the initial fit. </p>
<p class="definition">Definition at line <a class="el" href="_plotting_8h_source.html#l00595">595</a> of file <a class="el" href="_plotting_8h_source.html">Plotting.h</a>.</p>
</div>
</div>
<a id="addb5de4f8e6a8a5fa83d7d824d3d9934"></a>
<h2 class="memtitle"><span class="permalink"><a href="#addb5de4f8e6a8a5fa83d7d824d3d9934">◆ </a></span>CreateTransparentColor()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int CreateTransparentColor </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>color</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>alpha</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a transparent version of a colour. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">color</td><td>ROOT colour code </td></tr>
<tr><td class="paramname">alpha</td><td>Transparency (0 = fully transparent, 1 = opaque)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The code for the new TColor </dd></dl>
<p class="definition">Definition at line <a class="el" href="_plotting_8h_source.html#l00614">614</a> of file <a class="el" href="_plotting_8h_source.html">Plotting.h</a>.</p>
</div>
</div>
<a id="ac22871e6dbf88fd29fa06f8a2cfb5f8d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac22871e6dbf88fd29fa06f8a2cfb5f8d">◆ </a></span>SetupTwoPadSplitAsRatio() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SetupTwoPadSplitAsRatio </td>
<td>(</td>
<td class="paramtype">std::vector< TPad * > const & </td>
<td class="paramname"><em>pads</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TH1 * </td>
<td class="paramname"><em>upper</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TH1 * </td>
<td class="paramname"><em>lower</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TString </td>
<td class="paramname"><em>y_title</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>y_centered</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>y_min</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>y_max</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set a few style options for a two-pad setup used to show a data-MC comparison and ratio plot. </p>
<p>Use this version of the function if the axis histograms haven't been drawn yet. This function will:</p>
<ul>
<li>remove the x-axis title and labels on the main plot</li>
<li>fix the axis tick-lengths to be consistent between both plots</li>
<li>enable x- and y-axis ticks on the ratio plot</li>
<li>Set the range and title options for the ratio plot y-axis</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pads</td><td>Vector of TPad pointers where [0] = upper pad, [1] = lower pad </td></tr>
<tr><td class="paramname">upper</td><td>Pointer to the upper pad axis TH1 </td></tr>
<tr><td class="paramname">lower</td><td>Pointer to the lower pad axis TH1 </td></tr>
<tr><td class="paramname">y_title</td><td>Title for the y-axis of the ratio plot </td></tr>
<tr><td class="paramname">y_centered</td><td>Centre (vertically) the y-axis title on the ratio plot. </td></tr>
<tr><td class="paramname">y_min</td><td>Set the y-axis minimum in the ratio plot </td></tr>
<tr><td class="paramname">y_max</td><td>Set the y-axis maximum in the ratio plot </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_plotting_8h_source.html#l00632">632</a> of file <a class="el" href="_plotting_8h_source.html">Plotting.h</a>.</p>
</div>
</div>
<a id="a293279a5520769bf993d81e4dc070709"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a293279a5520769bf993d81e4dc070709">◆ </a></span>SetupTwoPadSplitAsRatio() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SetupTwoPadSplitAsRatio </td>
<td>(</td>
<td class="paramtype">std::vector< TPad * > const & </td>
<td class="paramname"><em>pads</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TString </td>
<td class="paramname"><em>y_title</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>y_centered</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>y_min</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>y_max</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set a few style options for a two-pad setup used to show a data-MC comparison and ratio plot. </p>
<p>This function should be called after the axis histograms have been created in both pads (e.g. after some TH1, TGraph etc. has been drawn). It will:</p>
<ul>
<li>remove the x-axis title and labels on the main plot</li>
<li>fix the axis tick-lengths to be consistent between both plots</li>
<li>enable x- and y-axis ticks on the ratio plot</li>
<li>Set the range and title options for the ratio plot y-axis</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pads</td><td>Vector of TPad pointers where [0] = upper pad, [1] = lower pad </td></tr>
<tr><td class="paramname">y_title</td><td>Title for the y-axis of the ratio plot </td></tr>
<tr><td class="paramname">y_centered</td><td>Centre (vertically) the y-axis title on the ratio plot. </td></tr>
<tr><td class="paramname">y_min</td><td>Set the y-axis minimum in the ratio plot </td></tr>
<tr><td class="paramname">y_max</td><td>Set the y-axis maximum in the ratio plot </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_plotting_8h_source.html#l00623">623</a> of file <a class="el" href="_plotting_8h_source.html">Plotting.h</a>.</p>
</div>
</div>
<a id="a976a4920cd03f97ded8454279c895a32"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a976a4920cd03f97ded8454279c895a32">◆ </a></span>StandardAxes()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void StandardAxes </td>
<td>(</td>
<td class="paramtype">TAxis * </td>
<td class="paramname"><em>xaxis</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TAxis * </td>
<td class="paramname"><em>yaxis</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TString </td>
<td class="paramname"><em>var</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TString </td>
<td class="paramname"><em>units</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets standard x- and y-axis titles with given units. </p>
<p>Will create an x-axis title of the form <code><variable> (<units>)</code> and a y-axis title of the form <code>Events / <bin_width> <units></code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">xaxis</td><td>Target x-axis </td></tr>
<tr><td class="paramname">yaxis</td><td>Target y-axis </td></tr>
<tr><td class="paramname">var</td><td>String of the variable name </td></tr>
<tr><td class="paramname">units</td><td>String of the units, e.g. <code>GeV</code>. Leave empty if the variable is dimensionless </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_plotting_8h_source.html#l00651">651</a> of file <a class="el" href="_plotting_8h_source.html">Plotting.h</a>.</p>
</div>
</div>
<a id="a434781fa740199ba94f267d8263cc1a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a434781fa740199ba94f267d8263cc1a2">◆ </a></span>UnitAxes()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void UnitAxes </td>
<td>(</td>
<td class="paramtype">TAxis * </td>
<td class="paramname"><em>xaxis</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TAxis * </td>
<td class="paramname"><em>yaxis</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TString </td>
<td class="paramname"><em>var</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TString </td>
<td class="paramname"><em>units</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets standard x- and y-axis titles when histograms are drawn divided by bin width. </p>
<p>Will create an x-axis title of the form <code><variable> (<units>)</code> and a y-axis title of the form <code>dN/d<var> (1/<units>)</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">xaxis</td><td>Target x-axis </td></tr>
<tr><td class="paramname">yaxis</td><td>Target y-axis </td></tr>
<tr><td class="paramname">var</td><td>String of the variable name </td></tr>
<tr><td class="paramname">units</td><td>String of the units, e.g. <code>GeV</code> </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_plotting_8h_source.html#l00664">664</a> of file <a class="el" href="_plotting_8h_source.html">Plotting.h</a>.</p>
</div>
</div>
<a id="a658a1da4505b61eb5a0f0db01c01e161"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a658a1da4505b61eb5a0f0db01c01e161">◆ </a></span>PositionedLegend()</h2>