ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbbAnalysis/VHbbDataFormats/macros/setTDRStyle.C
Revision: 1.1
Committed: Fri Jul 29 10:34:15 2011 UTC (13 years, 9 months ago) by arizzi
Content type: text/plain
Branch: MAIN
CVS Tags: EDMV42_Step2_V8, EDMV42_Step2_V7, EDMV42_Step2_V6, EDMV42_Step2_V5a, EDMV42_Step2_V5, tauCandV42, hbbsubstructDev_11, hbbsubstructDev_10, hbbsubstructDev_9, hbbsubstructDev_8, hbbsubstructDev_7, hbbsubstructDev_6, hbbsubstructDev_5, hbbsubstructDev_4, hbbsubstructDev_3, hbbsubstructDev_2, hbbsubstructDev_1, hbbsubstructDev, V21TauCand_0, EDMV42_Step2_V4a, EDMV42_Step2_V4, EDMV42_Step2_V3, EDMV42_Step2_V2, EDMV42_Step2_V1, EdmV42, EdmV41alpha1, EdmV40alpha1, EdmV40alpha, V21emuCand, EdmV33Jun12v2_consistent, Step2ForV33_v2, Step2ForV33_v1, EdmV33Jun12v2, EdmV33Jun12v1, EdmV33Jun12v0, Step2ForV32_v2, Step2ForV32_v1, Step2ForV32_v0, Step2ForV31_v0, EdmV32May24v0, EdmV31May21v1, EdmV31May17v0, May14thStep2, EdmV30Apr10, EdmV21Apr10v2, EdmV22May9, EdmV21Apr06, EdmV21Apr10, EdmV21Apr04, EdmV21Apr03, EdmV21Apr2, EdmV21Mar30, EdmV20Mar12, AR_Nov10Ntuple, AR_step2_Oct25, AR_step2_oct19, EdmV11Oct2011, AR_Step2_Oct13, AR_Oct9Ntuple, AR_Oct7_step2ntuple, AR_Oct5Ntuple, EdmV10Oct2011, EdmV9Sept2011, Sept19th2011_2, Sept19th2011, Sept19th, VHNtupleV9_AR1, VHSept15_AR1, Sept14th2011_2, Sept14th2011_AR1, Sept14th2011, Sept13th2011, AR_Sep8_LightNtuple, VHBB_EDMNtupleV3, AndreaAug10th, HEAD
Branch point for: V42TauCandidate, hbbsubstructDevPostHCP, V21TauCand, V21emuCandidate
Log Message:
macros

File Contents

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