Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
rootlogon.C
Go to the documentation of this file.
1 {
2  cout << endl << "::: Welcome to ROOT" << " v " << gROOT->GetVersionInt() << endl;
3  cout << "::: * Aliases defined in rootalias.C" << endl;
4  cout << "::: - List them with q<TAB> " << endl;
5  cout << "::: * Visualisation style defined in rootlogon.C" << endl;
6  cout << "::: - Add line gROOT->SetStyle(\"clearRetro\"); to your script to use it" << endl;
7 
8 
9  TStyle *hipStyle= new TStyle("clearRetro","HIP plots style for publications");
10 
11  // use plain black on white colors
12 
13  hipStyle->SetFrameBorderMode(0);
14  hipStyle->SetCanvasBorderMode(0);
15  hipStyle->SetPadBorderMode(0);
16  hipStyle->SetPadBorderSize(0);
17  hipStyle->SetPadColor(0);
18  hipStyle->SetCanvasColor(0);
19  hipStyle->SetTitleColor(0);
20  hipStyle->SetStatColor(0);
21  hipStyle->SetFillColor(0);
22 
23  hipStyle->SetTextSize(0.05);
24  // use bold lines
25  hipStyle->SetHistLineWidth(2);
26  hipStyle->SetLineWidth(2);
27 
28 hipStyle->SetPadBottomMargin(0.10);
29  hipStyle->SetTitleBorderSize(0);
30  hipStyle->SetPadLeftMargin(0.20);
31 
32 
33 // hipStyle->SetTitleAlign(01); //fix :::
34 /*
35  // set the paper & margin sizes
36 // hipStyle->SetPaperSize(20,26);
37  hipStyle->SetPadTopMargin(-0.30);
38 // hipStyle->SetPadRightMargin(0.10);
39 // hipStyle->SetPadBottomMargin(0.10);
40 // hipStyle->SetPadLeftMargin(0.10);
41 
42  // use large Times-Roman fonts
43  //hipStyle->SetTextFont(132);
44 
45  //*-* =============================================================
46  //*-* Font ID X11 Win32 TTF lfItalic lfWeight x 10
47  //*-* 1 : times-medium-i-normal "Times New Roman" 1 4
48  //*-* 2 : times-bold-r-normal "Times New Roman" 0 7
49  //*-* 3 : times-bold-i-normal "Times New Roman" 1 7
50  //*-* 4 : helvetica-medium-r-normal "Arial" 0 4
51  //*-* 5 : helvetica-medium-o-normal "Arial" 1 4
52  //*-* 6 : helvetica-bold-r-normal "Arial" 0 7
53  //*-* 7 : helvetica-bold-o-normal "Arial" 1 7
54  //*-* 8 : courier-medium-r-normal "Courier New" 0 4
55  //*-* 9 : courier-medium-o-normal "Courier New" 1 4
56  //*-* 10 : courier-bold-r-normal "Courier New" 0 7
57  //*-* 11 : courier-bold-o-normal "Courier New" 1 7
58  //*-* 12 : symbol-medium-r-normal "Symbol" 0 6
59  //*-* 13 : times-medium-r-normal "Times New Roman" 0 4
60  //*-* 14 : "Wingdings" 0 4
61  //*-*
62  const int kHipFont=102; // Preferred fonts in orde 102 (courier typewriter),42, 52, 62, 82
63  //hipStyle->SetTextFont(52); //42 OK
64 // hipStyle->SetTextFont(kHipFont); //42 OK
65 
66 // hipStyle->SetLabelFont(kHipFont,"x");
67 // hipStyle->SetLabelFont(kHipFont,"y");
68  // hipStyle->SetLabelFont(kHipFont,"z");
69 
70 // hipStyle->SetTitleFont(kHipFont);
71 // hipStyle->SetTitleFont(kHipFont,"X");
72 // hipStyle->SetTitleFont(kHipFont,"Y");
73 // hipStyle->SetTitleFont(kHipFont,"Z");
74 
75  hipStyle->SetTitleBorderSize(0);
76  hipStyle->SetTitleBorderSize(0);
77  hipStyle->SetTitleFillColor(0);
78  //hipStyle->SetTitleAlign(2); //fix :::
79 
80  hipStyle->SetLabelSize(0.03,"x");
81  hipStyle->SetTitleSize(0.03,"x");
82  hipStyle->SetLabelSize(0.03,"y");
83  hipStyle->SetTitleSize(0.03,"y");
84  hipStyle->SetLabelSize(0.03,"z");
85  hipStyle->SetTitleSize(0.03,"z");
86 
87  // markers
88 
89  //hipStyle->SetMarkerStyle(7); // strong dot
90  hipStyle->SetMarkerStyle(2); // cross +
91 
92  //hipStyle->SetMarkerStyle(26); // open triangle up
93  //hipStyle->SetMarkerStyle(22); // triangle up
94 
95  //hipStyle->SetMarkerStyle(25); // open square
96  //hipStyle->SetMarkerStyle(21); // full square
97 
98  //hipStyle->SetMarkerStyle(24); // open circle
99  //hipStyle->SetMarkerStyle(20); // full circle
100 
101  hipStyle->SetMarkerStyle(25);
102 
103 
104 
105  hipStyle->SetLineStyleString(2,"[12 12]"); // postscript dashes
106 
107  // get rid of X error bars and y error bar caps
108  hipStyle->SetErrorX(0.001);
109 
110  // do not display any of the standard histogram decorations
111  hipStyle->SetOptTitle(0); // if you want title add hipStyle->SetOptTitle(1); to your script
112  hipStyle->SetOptStat(0);
113  hipStyle->SetOptFit(0);
114 
115  // put tick marks on top and RHS of plots
116  hipStyle->SetPadTickX(1);
117  hipStyle->SetPadTickY(1);
118 
119  //gROOT->SetStyle("Plain");
120  gStyle->SetOptStat(1111111);
121  //gStyle->SetPadTickX(1);
122  //gStyle->SetPadTickY(1);
123  */
124 gROOT->SetStyle("clearRetro");
125 }
126