CMS 3D CMS Logo

officialStyle.py
Go to the documentation of this file.
1 from ROOT import kBlack, TPaveText
2 
3 def officialStyle(style):
4  style.SetCanvasColor (0)
5  style.SetCanvasBorderSize(10)
6  style.SetCanvasBorderMode(0)
7  style.SetCanvasDefH (700)
8  style.SetCanvasDefW (700)
9  style.SetCanvasDefX (100)
10  style.SetCanvasDefY (100)
11 
12  # color palette for 2D temperature plots
13  # style.SetPalette(1,0)
14 
15  # Pads
16  style.SetPadColor (0)
17  style.SetPadBorderSize (10)
18  style.SetPadBorderMode (0)
19  style.SetPadBottomMargin(0.16)
20  style.SetPadTopMargin (0.08)
21  style.SetPadLeftMargin (0.15)
22 # style.SetPadRightMargin (0.3)
23  style.SetPadRightMargin (0.05)
24  style.SetPadGridX (1)
25  style.SetPadGridY (1)
26  style.SetPadTickX (1)
27  style.SetPadTickY (1)
28 
29  # Frames
30  style.SetLineWidth(3)
31  style.SetFrameFillStyle ( 0)
32  style.SetFrameFillColor ( 0)
33  style.SetFrameLineColor ( 1)
34  style.SetFrameLineStyle ( 0)
35  style.SetFrameLineWidth ( 2)
36  style.SetFrameBorderSize(10)
37  style.SetFrameBorderMode( 0)
38 
39  # Histograms
40  style.SetHistFillColor(2)
41  style.SetHistFillStyle(0)
42  style.SetHistLineColor(1)
43  style.SetHistLineStyle(0)
44  style.SetHistLineWidth(3)
45  style.SetNdivisions(505)
46 
47  # Functions
48  style.SetFuncColor(1)
49  style.SetFuncStyle(0)
50  style.SetFuncWidth(2)
51 
52  # Various
53  style.SetMarkerStyle(20)
54  style.SetMarkerColor(kBlack)
55  style.SetMarkerSize (1.4)
56 
57  style.SetTitleBorderSize(0)
58  style.SetTitleFillColor (0)
59  style.SetTitleX (0.3)
60 
61  style.SetTitleSize (0.055,"X")
62  style.SetTitleOffset(1.200,"X")
63  style.SetLabelOffset(0.005,"X")
64  style.SetLabelSize (0.050,"X")
65  style.SetLabelFont (42 ,"X")
66 
67  style.SetStripDecimals(False)
68  style.SetLineStyleString(11,"20 10")
69 
70  style.SetTitleSize (0.055,"Y")
71  style.SetTitleOffset(1.100,"Y")
72  style.SetLabelOffset(0.010,"Y")
73  style.SetLabelSize (0.050,"Y")
74  style.SetLabelFont (42 ,"Y")
75 
76  style.SetTextSize (0.055)
77  style.SetTextFont (42)
78 
79  style.SetStatFont (42)
80  style.SetTitleFont (42)
81  style.SetTitleFont (42,"X")
82  style.SetTitleFont (42,"Y")
83 
84  style.SetOptStat (0)
85 
86 
87 def CMSPrelim(dataset, channel, lowX, lowY):
88  cmsprel = TPaveText(lowX, lowY+0.06, lowX+0.30, lowY+0.16, "NDC")
89  cmsprel.SetBorderSize( 0 )
90  cmsprel.SetFillStyle( 0 )
91  cmsprel.SetTextAlign( 12 )
92  cmsprel.SetTextSize ( 0.04 )
93  cmsprel.SetTextColor( 1 )
94  cmsprel.SetTextFont ( 62 )
95  cmsprel.AddText(dataset)
96 
97 
105 
106  chan = TPaveText(lowX+0.68, lowY+0.061, lowX+0.80, lowY+0.161, "NDC")
107  chan.SetBorderSize( 0 )
108  chan.SetFillStyle( 0 )
109  chan.SetTextAlign( 12 )
110  chan.SetTextSize ( 0.05 )
111  chan.SetTextColor( 1 )
112  chan.SetTextFont ( 62 )
113  chan.AddText(channel)
114 
115  return cmsprel, chan
116 
officialStyle.CMSPrelim
def CMSPrelim(dataset, channel, lowX, lowY)
Definition: officialStyle.py:87
officialStyle.officialStyle
def officialStyle(style)
Definition: officialStyle.py:3