File indexing completed on 2024-04-06 12:32:14
0001 #include "TStyle.h"
0002
0003 void setTDRStyle() {
0004 TStyle *tdrStyle = new TStyle("tdrStyle", "Style for P-TDR");
0005
0006
0007 tdrStyle->SetCanvasBorderMode(0);
0008 tdrStyle->SetCanvasColor(kWhite);
0009 tdrStyle->SetCanvasDefH(600);
0010 tdrStyle->SetCanvasDefW(600);
0011 tdrStyle->SetCanvasDefX(0);
0012 tdrStyle->SetCanvasDefY(0);
0013
0014
0015 tdrStyle->SetPadBorderMode(0);
0016
0017 tdrStyle->SetPadColor(kWhite);
0018 tdrStyle->SetPadGridX(false);
0019 tdrStyle->SetPadGridY(false);
0020 tdrStyle->SetGridColor(0);
0021 tdrStyle->SetGridStyle(3);
0022 tdrStyle->SetGridWidth(1);
0023
0024
0025 tdrStyle->SetFrameBorderMode(0);
0026 tdrStyle->SetFrameBorderSize(1);
0027 tdrStyle->SetFrameFillColor(0);
0028 tdrStyle->SetFrameFillStyle(0);
0029 tdrStyle->SetFrameLineColor(1);
0030 tdrStyle->SetFrameLineStyle(1);
0031 tdrStyle->SetFrameLineWidth(1);
0032
0033
0034
0035
0036 tdrStyle->SetHistLineColor(1);
0037 tdrStyle->SetHistLineStyle(0);
0038 tdrStyle->SetHistLineWidth(1);
0039
0040
0041
0042 tdrStyle->SetEndErrorSize(2);
0043
0044
0045
0046 tdrStyle->SetMarkerStyle(20);
0047
0048
0049 tdrStyle->SetOptFit(1);
0050 tdrStyle->SetFitFormat("5.4g");
0051 tdrStyle->SetFuncColor(2);
0052 tdrStyle->SetFuncStyle(1);
0053 tdrStyle->SetFuncWidth(1);
0054
0055
0056 tdrStyle->SetOptDate(0);
0057
0058
0059
0060
0061 tdrStyle->SetOptFile(0);
0062 tdrStyle->SetOptStat(0);
0063 tdrStyle->SetStatColor(kWhite);
0064 tdrStyle->SetStatFont(42);
0065 tdrStyle->SetStatFontSize(0.025);
0066 tdrStyle->SetStatTextColor(1);
0067 tdrStyle->SetStatFormat("6.4g");
0068 tdrStyle->SetStatBorderSize(1);
0069 tdrStyle->SetStatH(0.1);
0070 tdrStyle->SetStatW(0.15);
0071
0072
0073
0074
0075
0076 tdrStyle->SetPadTopMargin(0.05);
0077 tdrStyle->SetPadBottomMargin(0.13);
0078 tdrStyle->SetPadLeftMargin(0.16);
0079 tdrStyle->SetPadRightMargin(0.02);
0080
0081
0082
0083 tdrStyle->SetOptTitle(0);
0084 tdrStyle->SetTitleFont(42);
0085 tdrStyle->SetTitleColor(1);
0086 tdrStyle->SetTitleTextColor(1);
0087 tdrStyle->SetTitleFillColor(10);
0088 tdrStyle->SetTitleFontSize(0.05);
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098 tdrStyle->SetTitleColor(1, "XYZ");
0099 tdrStyle->SetTitleFont(42, "XYZ");
0100 tdrStyle->SetTitleSize(0.06, "XYZ");
0101
0102
0103 tdrStyle->SetTitleXOffset(0.9);
0104 tdrStyle->SetTitleYOffset(1.0);
0105
0106
0107
0108
0109 tdrStyle->SetLabelColor(1, "XYZ");
0110 tdrStyle->SetLabelFont(42, "XYZ");
0111 tdrStyle->SetLabelOffset(0.007, "XYZ");
0112 tdrStyle->SetLabelSize(0.05, "XYZ");
0113
0114
0115
0116 tdrStyle->SetAxisColor(1, "XYZ");
0117 tdrStyle->SetStripDecimals(kTRUE);
0118 tdrStyle->SetTickLength(0.03, "XYZ");
0119 tdrStyle->SetNdivisions(510, "XYZ");
0120 tdrStyle->SetPadTickX(1);
0121 tdrStyle->SetPadTickY(1);
0122
0123
0124 tdrStyle->SetOptLogx(0);
0125 tdrStyle->SetOptLogy(0);
0126 tdrStyle->SetOptLogz(0);
0127
0128
0129 tdrStyle->SetPaperSize(20., 20.);
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142 tdrStyle->SetHatchesLineWidth(5);
0143 tdrStyle->SetHatchesSpacing(0.05);
0144
0145 tdrStyle->cd();
0146 }