1from __future__
import print_function
63 lhcbstyle=TStyle(
"lhcbstyle",
"Standard LHCb plots style")
71 lhcbstyle.SetFrameBorderMode(0)
72 lhcbstyle.SetCanvasBorderMode(0)
73 lhcbstyle.SetPadBorderMode(0)
74 lhcbstyle.SetPadColor(0)
75 lhcbstyle.SetCanvasColor(0)
76 lhcbstyle.SetStatColor(0)
77 lhcbstyle.SetPalette(1)
80 lhcbstyle.SetPaperSize(20,26)
81 lhcbstyle.SetPadTopMargin(0.05)
82 lhcbstyle.SetPadRightMargin(0.05)
83 lhcbstyle.SetPadBottomMargin(0.16)
84 lhcbstyle.SetPadLeftMargin(0.14)
87 lhcbstyle.SetTextFont(lhcbFont)
88 lhcbstyle.SetTextSize(0.08)
89 lhcbstyle.SetLabelFont(lhcbFont,
"x")
90 lhcbstyle.SetLabelFont(lhcbFont,
"y")
91 lhcbstyle.SetLabelFont(lhcbFont,
"z")
92 lhcbstyle.SetLabelSize(0.04,
"x")
93 lhcbstyle.SetLabelSize(0.04,
"y")
94 lhcbstyle.SetLabelSize(0.04,
"z")
95 lhcbstyle.SetTitleFont(lhcbFont)
96 lhcbstyle.SetTitleSize(0.05,
"x")
97 lhcbstyle.SetTitleSize(0.05,
"y")
98 lhcbstyle.SetTitleSize(0.05,
"z")
101 lhcbstyle.SetLineWidth(lhcbWidth)
102 lhcbstyle.SetFrameLineWidth(lhcbWidth)
103 lhcbstyle.SetHistLineWidth(lhcbWidth)
104 lhcbstyle.SetFuncWidth(lhcbWidth)
105 lhcbstyle.SetGridWidth(lhcbWidth)
106 lhcbstyle.SetLineStyleString(2,
"[12 12]")
107 lhcbstyle.SetMarkerStyle(20)
108 lhcbstyle.SetMarkerSize(1.5)
111 lhcbstyle.SetLabelOffset(0.015)
114 lhcbstyle.SetOptStat(0)
115 lhcbstyle.SetOptStat(
"emr")
117 lhcbstyle.SetStatFormat(
"6.3g")
118 lhcbstyle.SetOptTitle(0)
119 lhcbstyle.SetOptFit(0)
123 lhcbstyle.SetStatBorderSize(0)
124 lhcbstyle.SetStatFont(lhcbFont)
125 lhcbstyle.SetStatFontSize(0.05)
126 lhcbstyle.SetStatX(0.9)
127 lhcbstyle.SetStatY(0.9)
128 lhcbstyle.SetStatW(0.25)
129 lhcbstyle.SetStatH(0.15)
131 lhcbstyle.SetPadTickX(1)
132 lhcbstyle.SetPadTickY(1)
135 lhcbstyle.SetNdivisions(505,
"x")
136 lhcbstyle.SetNdivisions(510,
"y")
141 lhcbLabel.SetTextFont(lhcbFont)
142 lhcbLabel.SetTextColor(1)
143 lhcbLabel.SetTextSize(0.04)
144 lhcbLabel.SetTextAlign(12)
148 lhcbLatex.SetTextFont(lhcbFont)
149 lhcbLatex.SetTextColor(1)
150 lhcbLatex.SetTextSize(0.04)
151 lhcbLatex.SetTextAlign(12)
154 gROOT.SetStyle(
"lhcbstyle")
166 lhcbName = TPaveText(0.70 - lhcbstyle.GetPadRightMargin(),
167 0.75 - lhcbstyle.SetPadTopMargin(0.05),
168 0.95 - lhcbstyle.GetPadRightMargin(),
169 0.85 - lhcbstyle.SetPadTopMargin(0.05),
172 lhcbName = TPaveText(lhcbstyle.GetPadLeftMargin() + 0.05,
173 0.87 - lhcbstyle.GetPadTopMargin(),
174 lhcbstyle.GetPadLeftMargin() + 0.30,
175 0.95 - lhcbstyle.GetPadTopMargin(),
178 print(
"printLHCb: option unknown" , optLR)
179 if optPrelim==
"Final":
180 lhcbName.AddText(
"LHCb")
181 elif optPrelim==
"Prelim":
182 lhcbName.AddText(
"#splitline{LHCb}{#scale[1.0]{Preliminary}}")
183 elif optPrelim==
"Other":
184 lhcbName.AddText(optText)
186 print(
"printLHCb: option unknown " , optPrelim)
187 lhcbName.SetFillColor(0)
188 lhcbName.SetTextAlign(12)
189 lhcbName.SetBorderSize(0)
printLHCb(optLR="L", optPrelim="Final", optText="")