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