1 |
anderson |
1.1 |
{
|
2 |
|
|
gSystem->Load("libFWCoreFWLite.so");
|
3 |
|
|
AutoLibraryLoader::enable();
|
4 |
|
|
gSystem->Load("libDataFormatsFWLite.so");
|
5 |
|
|
gROOT->ProcessLine("namespace edm {typedef edm::Wrapper<vector<float> > Wrapper<vector<float,allocator<float> > >; }");
|
6 |
|
|
gROOT->ProcessLine("namespace edm {typedef edm::Wrapper<vector<double> > Wrapper<vector<double,allocator<double> > >; }");
|
7 |
|
|
|
8 |
|
|
TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");
|
9 |
|
|
|
10 |
|
|
cout << "TDR Style initialized" << endl;
|
11 |
|
|
|
12 |
|
|
// For the canvas:
|
13 |
|
|
tdrStyle->SetCanvasBorderMode(0);
|
14 |
|
|
tdrStyle->SetCanvasColor(kWhite);
|
15 |
|
|
tdrStyle->SetCanvasDefH(600); //Height of canvas
|
16 |
|
|
tdrStyle->SetCanvasDefW(600); //Width of canvas
|
17 |
|
|
tdrStyle->SetCanvasDefX(0); //POsition on screen
|
18 |
|
|
tdrStyle->SetCanvasDefY(0);
|
19 |
|
|
|
20 |
|
|
// For the Pad:
|
21 |
|
|
tdrStyle->SetPadBorderMode(0);
|
22 |
|
|
// tdrStyle->SetPadBorderSize(Width_t size = 1);
|
23 |
|
|
tdrStyle->SetPadColor(kWhite);
|
24 |
|
|
tdrStyle->SetPadGridX(false);
|
25 |
|
|
tdrStyle->SetPadGridY(false);
|
26 |
|
|
tdrStyle->SetGridColor(0);
|
27 |
|
|
tdrStyle->SetGridStyle(3);
|
28 |
|
|
tdrStyle->SetGridWidth(1);
|
29 |
|
|
|
30 |
|
|
// For the frame:
|
31 |
|
|
tdrStyle->SetFrameBorderMode(0);
|
32 |
|
|
tdrStyle->SetFrameBorderSize(1);
|
33 |
|
|
tdrStyle->SetFrameFillColor(0);
|
34 |
|
|
tdrStyle->SetFrameFillStyle(0);
|
35 |
|
|
tdrStyle->SetFrameLineColor(1);
|
36 |
|
|
tdrStyle->SetFrameLineStyle(1);
|
37 |
|
|
tdrStyle->SetFrameLineWidth(1);
|
38 |
|
|
|
39 |
|
|
// For the histo:
|
40 |
|
|
// tdrStyle->SetHistFillColor(1);
|
41 |
|
|
// tdrStyle->SetHistFillStyle(0);
|
42 |
|
|
tdrStyle->SetHistLineColor(1);
|
43 |
|
|
tdrStyle->SetHistLineStyle(0);
|
44 |
|
|
tdrStyle->SetHistLineWidth(1);
|
45 |
|
|
// tdrStyle->SetLegoInnerR(Float_t rad = 0.5);
|
46 |
|
|
// tdrStyle->SetNumberContours(Int_t number = 20);
|
47 |
|
|
|
48 |
|
|
tdrStyle->SetEndErrorSize(2);
|
49 |
|
|
//tdrStyle->SetErrorMarker(20);
|
50 |
|
|
tdrStyle->SetErrorX(0.);
|
51 |
|
|
|
52 |
|
|
tdrStyle->SetMarkerStyle(20);
|
53 |
|
|
|
54 |
|
|
//For the fit/function:
|
55 |
|
|
tdrStyle->SetOptFit(1);
|
56 |
|
|
tdrStyle->SetFitFormat("5.4g");
|
57 |
|
|
tdrStyle->SetFuncColor(2);
|
58 |
|
|
tdrStyle->SetFuncStyle(1);
|
59 |
|
|
tdrStyle->SetFuncWidth(1);
|
60 |
|
|
|
61 |
|
|
//For the date:
|
62 |
|
|
tdrStyle->SetOptDate(0);
|
63 |
|
|
// tdrStyle->SetDateX(Float_t x = 0.01);
|
64 |
|
|
// tdrStyle->SetDateY(Float_t y = 0.01);
|
65 |
|
|
|
66 |
|
|
// For the statistics box:
|
67 |
|
|
tdrStyle->SetOptFile(0);
|
68 |
|
|
tdrStyle->SetOptStat(0); // To display the mean and RMS: SetOptStat("mr");
|
69 |
|
|
tdrStyle->SetStatColor(kWhite);
|
70 |
|
|
tdrStyle->SetStatFont(42);
|
71 |
|
|
tdrStyle->SetStatFontSize(0.025);
|
72 |
|
|
tdrStyle->SetStatTextColor(1);
|
73 |
|
|
tdrStyle->SetStatFormat("6.4g");
|
74 |
|
|
tdrStyle->SetStatBorderSize(1);
|
75 |
|
|
tdrStyle->SetStatH(0.1);
|
76 |
|
|
tdrStyle->SetStatW(0.15);
|
77 |
|
|
// tdrStyle->SetStatStyle(Style_t style = 1001);
|
78 |
|
|
// tdrStyle->SetStatX(Float_t x = 0);
|
79 |
|
|
// tdrStyle->SetStatY(Float_t y = 0);
|
80 |
|
|
|
81 |
|
|
// Margins:
|
82 |
|
|
tdrStyle->SetPadTopMargin(0.15);
|
83 |
|
|
tdrStyle->SetPadBottomMargin(0.13);
|
84 |
|
|
tdrStyle->SetPadLeftMargin(0.13);
|
85 |
|
|
tdrStyle->SetPadRightMargin(0.15);
|
86 |
|
|
|
87 |
|
|
// For the Global title:
|
88 |
|
|
|
89 |
|
|
// tdrStyle->SetOptTitle(0);
|
90 |
|
|
tdrStyle->SetTitleFont(42);
|
91 |
|
|
tdrStyle->SetTitleColor(1);
|
92 |
|
|
tdrStyle->SetTitleTextColor(1);
|
93 |
|
|
tdrStyle->SetTitleFillColor(10);
|
94 |
|
|
tdrStyle->SetTitleFontSize(0.05);
|
95 |
|
|
// tdrStyle->SetTitleH(0); // Set the height of the title box
|
96 |
|
|
// tdrStyle->SetTitleW(0); // Set the width of the title box
|
97 |
|
|
// tdrStyle->SetTitleX(0); // Set the position of the title box
|
98 |
|
|
// tdrStyle->SetTitleY(0.985); // Set the position of the title box
|
99 |
|
|
// tdrStyle->SetTitleStyle(Style_t style = 1001);
|
100 |
|
|
// tdrStyle->SetTitleBorderSize(2);
|
101 |
|
|
|
102 |
|
|
// For the axis titles:
|
103 |
|
|
|
104 |
|
|
tdrStyle->SetTitleColor(1, "XYZ");
|
105 |
|
|
tdrStyle->SetTitleFont(42, "XYZ");
|
106 |
|
|
tdrStyle->SetTitleSize(0.06, "XYZ");
|
107 |
|
|
// tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size?
|
108 |
|
|
// tdrStyle->SetTitleYSize(Float_t size = 0.02);
|
109 |
|
|
tdrStyle->SetTitleXOffset(1.0);
|
110 |
|
|
// tdrStyle->SetTitleYOffset(1.5);
|
111 |
|
|
tdrStyle->SetTitleOffset(1.5, "Y"); // Another way to set the Offset
|
112 |
|
|
|
113 |
|
|
// For the axis labels:
|
114 |
|
|
|
115 |
|
|
tdrStyle->SetLabelColor(1, "XYZ");
|
116 |
|
|
tdrStyle->SetLabelFont(42, "XYZ");
|
117 |
|
|
tdrStyle->SetLabelOffset(0.007, "XYZ");
|
118 |
|
|
tdrStyle->SetLabelSize(0.05, "XYZ");
|
119 |
|
|
|
120 |
|
|
// For the axis:
|
121 |
|
|
|
122 |
|
|
tdrStyle->SetAxisColor(1, "XYZ");
|
123 |
|
|
tdrStyle->SetStripDecimals(kTRUE);
|
124 |
|
|
tdrStyle->SetTickLength(0.03, "XYZ");
|
125 |
|
|
tdrStyle->SetNdivisions(510, "XYZ");
|
126 |
|
|
tdrStyle->SetPadTickX(1); // To get tick marks on the opposite side of the frame
|
127 |
|
|
tdrStyle->SetPadTickY(1);
|
128 |
|
|
|
129 |
|
|
// Change for log plots:
|
130 |
|
|
tdrStyle->SetOptLogx(0);
|
131 |
|
|
tdrStyle->SetOptLogy(0);
|
132 |
|
|
tdrStyle->SetOptLogz(0);
|
133 |
|
|
|
134 |
|
|
tdrStyle->SetPalette(1,0);
|
135 |
|
|
|
136 |
|
|
// Postscript options:
|
137 |
|
|
// tdrStyle->SetPaperSize(15.,15.);
|
138 |
|
|
// tdrStyle->SetLineScalePS(Float_t scale = 3);
|
139 |
|
|
// tdrStyle->SetLineStyleString(Int_t i, const char* text);
|
140 |
|
|
// tdrStyle->SetHeaderPS(const char* header);
|
141 |
|
|
// tdrStyle->SetTitlePS(const char* pstitle);
|
142 |
|
|
|
143 |
|
|
// tdrStyle->SetBarOffset(Float_t baroff = 0.5);
|
144 |
|
|
// tdrStyle->SetBarWidth(Float_t barwidth = 0.5);
|
145 |
|
|
// tdrStyle->SetPaintTextFormat(const char* format = "g");
|
146 |
|
|
// tdrStyle->SetPalette(Int_t ncolors = 0, Int_t* colors = 0);
|
147 |
|
|
// tdrStyle->SetTimeOffset(Double_t toffset);
|
148 |
|
|
// tdrStyle->SetHistMinimumZero(kTRUE);
|
149 |
|
|
|
150 |
|
|
tdrStyle->cd();
|
151 |
|
|
}
|