ATLAS Offline Software
Functions
Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/AtlasStyle.h File Reference

ATLAS Style, based on a style file from BaBar. More...

#include "TStyle.h"
Include dependency graph for Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/AtlasStyle.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void SetAtlasStyle ()
 
TStyle * AtlasStyle ()
 

Detailed Description

ATLAS Style, based on a style file from BaBar.

Author
mark sutton
Date
Thu 25 Mar 2010 10:34:20 CET

Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration

Definition in file Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/AtlasStyle.h.

Function Documentation

◆ AtlasStyle()

TStyle* AtlasStyle ( )

Definition at line 34 of file AtlasStyle.cxx.

35 {
36  // TStyle *atlasStyle = new TStyle("ATLAS","Atlas style");
37  TStyle *atlasStyle = gROOT->GetStyle("Plain");
38 
39  // use plain black on white colors
40  Int_t icol=0; // WHITE
41  atlasStyle->SetFrameBorderMode(icol);
42  atlasStyle->SetFrameFillColor(icol);
43  atlasStyle->SetCanvasBorderMode(icol);
44  atlasStyle->SetCanvasColor(icol);
45  atlasStyle->SetPadBorderMode(icol);
46  atlasStyle->SetPadColor(icol);
47  atlasStyle->SetStatColor(icol);
48  //atlasStyle->SetFillColor(icol); // don't use: white fill color for *all* objects
49 
50  // set the paper & margin sizes
51  atlasStyle->SetPaperSize(20,26);
52 
53  // set margin sizes
54  atlasStyle->SetPadTopMargin(0.05);
55  atlasStyle->SetPadRightMargin(0.05);
56  atlasStyle->SetPadBottomMargin(0.16);
57  atlasStyle->SetPadLeftMargin(0.16);
58 
59  // set title offsets (for axis label)
60  atlasStyle->SetTitleXOffset(1.4);
61  atlasStyle->SetTitleYOffset(1.4);
62 
63  // use large fonts
64  //Int_t font=72; // Helvetica italics
65  Int_t font=42; // Helvetica
66  Double_t tsize=0.05;
67  atlasStyle->SetTextFont(font);
68 
69  atlasStyle->SetTextSize(tsize);
70  atlasStyle->SetLabelFont(font,"x");
71  atlasStyle->SetTitleFont(font,"x");
72  atlasStyle->SetLabelFont(font,"y");
73  atlasStyle->SetTitleFont(font,"y");
74  atlasStyle->SetLabelFont(font,"z");
75  atlasStyle->SetTitleFont(font,"z");
76 
77  atlasStyle->SetLabelSize(tsize,"x");
78  atlasStyle->SetTitleSize(tsize,"x");
79  atlasStyle->SetLabelSize(tsize,"y");
80  atlasStyle->SetTitleSize(tsize,"y");
81  atlasStyle->SetLabelSize(tsize,"z");
82  atlasStyle->SetTitleSize(tsize,"z");
83 
84  // use bold lines and markers
85  atlasStyle->SetMarkerStyle(20);
86  atlasStyle->SetMarkerSize(1.2);
87  atlasStyle->SetHistLineWidth(2.);
88  atlasStyle->SetLineStyleString(2,"[12 12]"); // postscript dashes
89 
90  // get rid of X error bars
91  //atlasStyle->SetErrorX(0.001);
92  // get rid of error bar caps
93  atlasStyle->SetEndErrorSize(0.);
94 
95  // do not display any of the standard histogram decorations
96  atlasStyle->SetOptTitle(0);
97  //atlasStyle->SetOptStat(1111);
98  atlasStyle->SetOptStat(0);
99  //atlasStyle->SetOptFit(1111);
100  atlasStyle->SetOptFit(0);
101 
102  // put tick marks on top and RHS of plots
103  atlasStyle->SetPadTickX(1);
104  atlasStyle->SetPadTickY(1);
105 
107 
108  return atlasStyle;
109 
110 }

◆ SetAtlasStyle()

void SetAtlasStyle ( )
inline

Definition at line 17 of file InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Macro/AtlasStyle.h.

17  {
18  TStyle *atlasStyle= new TStyle("ATLAS","Atlas style");
19 
20  // use plain black on white colors
21  Int_t icol=0;
22  atlasStyle->SetFrameBorderMode(icol);
23  atlasStyle->SetFrameFillColor(icol);
24  atlasStyle->SetCanvasBorderMode(icol);
25  atlasStyle->SetPadBorderMode(icol);
26  atlasStyle->SetPadColor(icol);
27  atlasStyle->SetCanvasColor(icol);
28  atlasStyle->SetStatColor(icol);
29  //atlasStyle->SetFillColor(icol);
30 
31  // set the paper & margin sizes
32  atlasStyle->SetPaperSize(20,26);
33  atlasStyle->SetPadTopMargin(0.05);
34  atlasStyle->SetPadRightMargin(0.05);
35  atlasStyle->SetPadBottomMargin(0.16);
36  atlasStyle->SetPadLeftMargin(0.12);
37 
38  // use large fonts
39  //Int_t font=72;
40  Int_t font=42;
41  Double_t tsize=0.05;
42  atlasStyle->SetTextFont(font);
43 
44 
45  atlasStyle->SetTextSize(tsize);
46  atlasStyle->SetLabelFont(font,"x");
47  atlasStyle->SetTitleFont(font,"x");
48  atlasStyle->SetLabelFont(font,"y");
49  atlasStyle->SetTitleFont(font,"y");
50  atlasStyle->SetLabelFont(font,"z");
51  atlasStyle->SetTitleFont(font,"z");
52 
53  atlasStyle->SetLabelSize(tsize,"x");
54  atlasStyle->SetTitleSize(tsize,"x");
55  atlasStyle->SetLabelSize(tsize,"y");
56  atlasStyle->SetTitleSize(tsize,"y");
57  atlasStyle->SetLabelSize(tsize,"z");
58  atlasStyle->SetTitleSize(tsize,"z");
59 
60 
61  //use bold lines and markers
62  atlasStyle->SetMarkerStyle(20);
63  atlasStyle->SetMarkerSize(1.2);
64  atlasStyle->SetHistLineWidth(2);
65  atlasStyle->SetLineStyleString(2,"[12 12]"); // postscript dashes
66 
67  //get rid of X error bars and y error bar caps
68  //atlasStyle->SetErrorX(0.001);
69 
70  //do not display any of the standard histogram decorations
71  atlasStyle->SetOptTitle(0);
72  //atlasStyle->SetOptStat(1111);
73  atlasStyle->SetOptStat(0);
74  //atlasStyle->SetOptFit(1111);
75  atlasStyle->SetOptFit(0);
76 
77  // put tick marks on top and RHS of plots
78  atlasStyle->SetPadTickX(1);
79  atlasStyle->SetPadTickY(1);
80 
81  gROOT->SetStyle("ATLAS");
82 
83 }
atlasStyleMacro.atlasStyle
atlasStyle
Definition: atlasStyleMacro.py:8
setpalette
void setpalette(TStyle *style)
Definition: AtlasStyle.cxx:114
atlasStyleMacro.icol
int icol
Definition: atlasStyleMacro.py:13
plotBeamSpotMon.font
font
Definition: plotBeamSpotMon.py:80
atlasStyleMacro.tsize
float tsize
Definition: atlasStyleMacro.py:37