4 #ifndef CRV_DQM_STYLE_H
5 #define CRV_DQM_STYLE_H
16 static void SetStyle() {
18 TStyle *style =
new TStyle(
"CrvStyle",
"CRV DQM styling");
21 style->SetCanvasColor(kWhite);
22 style->SetCanvasBorderMode(0);
23 style->SetPadColor(kWhite);
24 style->SetPadBorderMode(0);
25 style->SetPadTopMargin(0.05);
26 style->SetPadBottomMargin(0.13);
27 style->SetPadLeftMargin(0.15);
28 style->SetPadRightMargin(0.05);
31 style->SetTextFont(42);
32 style->SetLabelFont(42,
"xyz");
33 style->SetTitleFont(42,
"xyz");
36 style->SetTextSize(0.045);
37 style->SetLabelSize(0.045,
"xyz");
38 style->SetTitleSize(0.05,
"xyz");
41 style->SetTitleOffset(1.2,
"y");
42 style->SetTitleOffset(1.0,
"x");
45 style->SetFillColor(kWhite);
46 style->SetFillStyle(1001);
49 style->SetPadTickX(1);
50 style->SetPadTickY(1);
51 style->SetTickLength(0.015);
52 style->SetNdivisions(505,
"xyz");
55 style->SetFrameLineWidth(1);
56 style->SetLineWidth(1);
61 gROOT->SetStyle(
"CrvStyle");
65 static void FormatHist(TH1* hist,
const std::string& colour =
"blue") {
69 hist->SetLineWidth(2);
70 hist->SetFillStyle(1001);
71 hist->SetLineStyle(1);
72 hist->GetYaxis()->SetTitleOffset(1.6);
73 hist->GetXaxis()->SetTitleOffset(1.2);
76 if (colour ==
"blue") {
77 hist->SetLineColor(kAzure+2);
78 hist->SetFillColor(kAzure-9);
80 else if (colour ==
"green") {
81 hist->SetLineColor(kGreen+2);
82 hist->SetFillColor(kGreen-9);
84 else if (colour ==
"red") {
85 hist->SetLineColor(kRed+2);
86 hist->SetFillColor(kRed-9);