74 TStyle* defaultSty =
new TStyle(
"default",
"default");
75 defaultSty->SetPaperSize(TStyle::kA4);
76 defaultSty->SetTextFont(font);
79 defaultSty->SetCanvasBorderMode(0);
80 defaultSty->SetCanvasColor(bgrdcolor);
81 defaultSty->SetCanvasDefH(600);
82 defaultSty->SetCanvasDefW(600);
83 defaultSty->SetCanvasDefX(0);
84 defaultSty->SetCanvasDefY(0);
87 defaultSty->SetPadBorderMode(0);
89 defaultSty->SetPadColor(bgrdcolor);
90 defaultSty->SetPadGridX(
false);
91 defaultSty->SetPadGridY(
false);
92 defaultSty->SetGridColor(0);
93 defaultSty->SetGridStyle(3);
94 defaultSty->SetGridWidth(1);
97 defaultSty->SetFrameBorderMode(0);
98 defaultSty->SetFrameBorderSize(1);
99 defaultSty->SetFrameFillColor(bgrdcolor);
100 defaultSty->SetFrameFillStyle(0);
101 defaultSty->SetFrameLineColor(1);
102 defaultSty->SetFrameLineStyle(1);
103 defaultSty->SetFrameLineWidth(1);
106 defaultSty->SetPadTopMargin(0.075);
107 defaultSty->SetPadBottomMargin(0.18);
108 defaultSty->SetPadLeftMargin(0.18);
109 defaultSty->SetPadRightMargin(0.075);
112 defaultSty->SetHistFillColor(bgrdcolor);
114 defaultSty->SetHatchesSpacing(2.);
115 defaultSty->SetHatchesLineWidth(2);
116 defaultSty->SetHistLineColor(1);
117 defaultSty->SetHistLineStyle(0);
118 defaultSty->SetHistLineWidth(2);
120 defaultSty->SetHistMinimumZero();
122 defaultSty->SetErrorX(0.0);
123 defaultSty->SetLineColor(1);
124 defaultSty->SetMarkerColor(1);
125 defaultSty->SetMarkerStyle(kFullCircle);
126 defaultSty->SetMarkerSize(1.5);
130 defaultSty->SetOptFit(1);
131 defaultSty->SetFitFormat(
"5.4g");
132 defaultSty->SetFuncColor(2);
133 defaultSty->SetFuncStyle(1);
134 defaultSty->SetFuncWidth(1);
137 defaultSty->SetOptDate(22);
140 defaultSty->GetAttDate()->SetTextColor(kGray);
141 defaultSty->GetAttDate()->SetTextFont(font);
142 defaultSty->GetAttDate()->SetTextSize(0.02);
145 defaultSty->SetOptFile(0);
146 defaultSty->SetOptStat(0);
148 defaultSty->SetStatColor(kWhite);
149 defaultSty->SetStatFont(font);
150 defaultSty->SetStatFontSize(0.02);
151 defaultSty->SetStatTextColor(kGray);
152 defaultSty->SetStatFormat(
"6.4g");
153 defaultSty->SetStatBorderSize(1);
154 defaultSty->SetStatH(0.1);
155 defaultSty->SetStatW(0.5);
156 defaultSty->SetStatStyle(kFEmpty);
157 defaultSty->SetStatX(0.01);
158 defaultSty->SetStatY(0.01);
161 defaultSty->SetOptTitle(0);
162 defaultSty->SetTitleFont(font,
"T");
163 defaultSty->SetTitleSize(0.05,
"T");
164 defaultSty->SetTitleColor(bgrdcolor,
"T");
165 defaultSty->SetTitleTextColor(1);
166 defaultSty->SetTitleFillColor(bgrdcolor);
167 defaultSty->SetTitleFontSize(0.06);
169 defaultSty->SetTitleW(0.5);
170 defaultSty->SetTitleX(0.25);
172 defaultSty->SetTitleStyle(kFEmpty);
174 defaultSty->SetPaintTextFormat(
".3f");
178 defaultSty->SetFillStyle(kFEmpty);
179 defaultSty->SetLineColor(0);
180 defaultSty->SetLineWidth(0);
181 defaultSty->SetLineStyle(1);
184 defaultSty->SetTitleColor(1,
"XYZ");
185 defaultSty->SetTitleFont(font,
"XYZ");
186 defaultSty->SetTitleSize(0.06,
"XYZ");
189 defaultSty->SetTitleXOffset(1.0);
190 defaultSty->SetTitleYOffset(1.25);
194 defaultSty->SetLabelColor(1,
"XYZ");
195 defaultSty->SetLabelFont(font,
"XYZ");
196 defaultSty->SetLabelOffset(0.007,
"XYZ");
197 defaultSty->SetLabelSize(0.04,
199 defaultSty->SetLabelSize(0.03,
203 defaultSty->SetHistMinimumZero();
204 defaultSty->SetAxisColor(1,
"XYZ");
207 defaultSty->SetNdivisions(810,
"XYZ");
208 defaultSty->SetPadTickX(1);
209 defaultSty->SetPadTickY(1);
212 defaultSty->SetOptLogx(0);
213 defaultSty->SetOptLogy(0);
214 defaultSty->SetOptLogz(0);
218 const Int_t NRGBs = 5;
219 const Int_t NCont = 255;
221 Double_t red[NRGBs] = {0.00, 0.00, 0.87, 1.00, 0.51};
222 Double_t green[NRGBs] = {0.00, 0.81, 1.00, 0.20, 0.00};
225 Double_t blue[NRGBs] = {0.51, 1.00, 0.12, 0.00, 0.00};
226 Double_t stops[NRGBs] = {0.00, 0.34, 0.61, 0.84, 1.00};
227 TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
228 defaultSty->SetNumberContours(NCont);
232 defaultSty->SetLegendFillColor(bgrdcolor);
234 defaultSty->SetLegendFont(font);
238 defaultSty->SetFillStyle(4000);
239 defaultSty->SetStatStyle(0);
240 defaultSty->SetTitleStyle(0);
241 defaultSty->SetCanvasBorderSize(0);
242 defaultSty->SetFrameBorderSize(0);
243 defaultSty->SetLegendBorderSize(0);
244 defaultSty->SetStatBorderSize(0);
245 defaultSty->SetTitleBorderSize(0);
255 TGaxis::SetMaxDigits(3);
256 TGaxis::SetExponentOffset(-1. * 0.06, 0.,
"y");
479 Double_t maxhgth = 0.0;
480 Double_t symblwdth = 0.065;
481 Double_t txtsze = 0.04;
483 Double_t entrysep = 1.25;
486 Double_t maxwdth = 0.0;
487 TList* llist = leg->GetListOfPrimitives();
488 Int_t nent = llist->GetEntries();
490 if (nent > 5) txtsze = 0.03;
491 leg->SetTextSize(txtsze);
495 for (
Int_t il = 0; il < nent; il++) {
496 TLegendEntry* lent =
static_cast<TLegendEntry*
>(llist->At(il));
497 TString lst(lent->GetLabel());
500 lst.ReplaceAll(
"{",
"");
501 lst.ReplaceAll(
"}",
"");
502 lst.ReplaceAll(
"^",
"");
503 lst.ReplaceAll(
"_",
"");
504 lst.ReplaceAll(
"#LT",
"#");
505 lst.ReplaceAll(
"#GT",
"#");
506 lst.ReplaceAll(
"#phi",
"#");
507 lst.ReplaceAll(
"#rho",
"#");
508 lst.ReplaceAll(
"#omega",
"#");
509 lst.ReplaceAll(
"#eta",
"#");
510 lst.ReplaceAll(
"#epsilon",
"#");
511 lst.ReplaceAll(
"#psi",
"#");
512 lst.ReplaceAll(
"#pi",
"#");
513 lst.ReplaceAll(
"#alpha",
"#");
514 lst.ReplaceAll(
"#gamma",
"#");
515 lst.ReplaceAll(
"#rightarrow",
"#");
518 TLatex entrytex(0., 0., lst.Data());
519 entrytex.SetNDC(kTRUE);
520 entrytex.SetTextSize(txtsze);
521 entrytex.SetTextFont(gStyle->GetLegendFont());
523 Double_t wdth = entrytex.GetXsize();
524 Double_t hgth = entrytex.GetYsize();
526 if (maxwdth < wdth) maxwdth = wdth;
532 maxhgth = nent * txtsze * entrysep;
538 leg->SetY2(1. - gPad->GetTopMargin() - gStyle->GetTickLength(
"X"));
539 leg->SetY1(leg->GetY2() - maxhgth);
542 leg->SetY1(0. + gPad->GetBottomMargin() + gStyle->GetTickLength(
"X"));
543 leg->SetY2(leg->GetY1() + maxhgth);
546 leg->SetX2(1. - gPad->GetRightMargin() - gStyle->GetTickLength(
"Y") * 1.0);
547 leg->SetX1(leg->GetX2() - maxwdth * 1.0 - symblwdth);
550 leg->SetX1(0. + gPad->GetLeftMargin() + gStyle->GetTickLength(
"Y"));
551 leg->SetX2(leg->GetX1() + maxwdth * 1.0 + symblwdth);
555 leg->SetMargin(symblwdth / (leg->GetX2() - leg->GetX1()));
556 leg->SetEntrySeparation(entrysep - 1.);
559 if (fill) leg->SetFillStyle(1001);
561 leg->SetFillStyle(kFEmpty);
575 const Int_t NRGBs = 5;
576 const Int_t NCont = 255;
577 Double_t stops[NRGBs] = {0.00, 0.34, 0.61, 0.84, 1.00};
581 Double_t red[NRGBs] = {0.00, 0.00, 0.87, 1.00, 0.51};
582 Double_t green[NRGBs] = {0.00, 0.81, 1.00, 0.20, 0.00};
583 Double_t blue[NRGBs] = {0.51, 1.00, 0.12, 0.00, 0.00};
584 if (reverse) TColor::CreateGradientColorTable(NRGBs, stops, blue, green, red, NCont);
586 TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
590 Double_t red[NRGBs] = {0.00, 0.00, 0.87, 1.00, 0.36};
591 Double_t green[NRGBs] = {0.20, 0.81, 1.00, 0.20, 0.00};
592 Double_t blue[NRGBs] = {0.00, 0.00, 0.00, 0.00, 0.00};
593 if (reverse) TColor::CreateGradientColorTable(NRGBs, stops, green, red, blue, NCont);
595 TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
601 gStyle->SetNumberContours(NCont);