ATLAS Offline Software
Loading...
Searching...
No Matches
AtlasLabels.cxx File Reference
#include "AtlasLabels.h"
#include "TLatex.h"
#include "TLine.h"
#include "TPave.h"
#include "TPad.h"
#include "TMarker.h"
#include <string>
Include dependency graph for AtlasLabels.cxx:

Go to the source code of this file.

Functions

void ATLASLabel (Double_t x, Double_t y, const std::string &text, Color_t color, int nx, int ny)
void Label (Double_t x, Double_t y, const std::string &text, Color_t color, int nx, int ny)
void ATLASLabelOld (Double_t x, Double_t y, bool Preliminary, Color_t color)
void ATLASVersion (const std::string &version, Double_t x, Double_t y, Color_t color)

Detailed Description

Author
mark sutton
Date
Fri 11 Jan 2019 07:41:26 CET

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

Definition in file AtlasLabels.cxx.

Function Documentation

◆ ATLASLabel()

void ATLASLabel ( Double_t x,
Double_t y,
const std::string & text,
Color_t color,
int nx,
int ny )

Definition at line 21 of file AtlasLabels.cxx.

22{
23 TLatex l; //l.SetTextAlign(12); l.SetTextSize(tsize);
24 l.SetNDC();
25 l.SetTextFont(72);
26 l.SetTextColor(color);
27
28 double delx = 0.115*696*gPad->GetWh()*nx/(472*gPad->GetWw()*ny);
29
30 l.DrawLatex(x,y,"ATLAS");
31 if (text!="") {
32 TLatex p;
33 p.SetNDC();
34 p.SetTextFont(42);
35 p.SetTextColor(color);
36 p.DrawLatex(x+delx,y,text.c_str());
37 // p.DrawLatex(x,y,"#sqrt{s}=900GeV");
38 }
39}
#define y
#define x
l
Printing final latex table to .tex output file.

◆ ATLASLabelOld()

void ATLASLabelOld ( Double_t x,
Double_t y,
bool Preliminary,
Color_t color )

Definition at line 64 of file AtlasLabels.cxx.

65{
66 TLatex l; //l.SetTextAlign(12); l.SetTextSize(tsize);
67 l.SetNDC();
68 l.SetTextFont(72);
69 l.SetTextColor(color);
70 l.DrawLatex(x,y,"ATLAS");
71 if (Preliminary) {
72 TLatex p;
73 p.SetNDC();
74 p.SetTextFont(42);
75 p.SetTextColor(color);
76 p.DrawLatex(x+0.115,y,"Preliminary");
77 }
78}

◆ ATLASVersion()

void ATLASVersion ( const std::string & version,
Double_t x,
Double_t y,
Color_t color )

Definition at line 82 of file AtlasLabels.cxx.

83{
84
85 if (version!="") {
86 char versionString[100];
87 sprintf(versionString,"Version %s",version.c_str());
88 TLatex l;
89 l.SetTextAlign(22);
90 l.SetTextSize(0.04);
91 l.SetNDC();
92 l.SetTextFont(72);
93 l.SetTextColor(color);
94 l.DrawLatex(x,y,versionString);
95 }
96}

◆ Label()

void Label ( Double_t x,
Double_t y,
const std::string & text,
Color_t color,
int nx,
int ny )

Definition at line 42 of file AtlasLabels.cxx.

43{
44 TLatex l; //l.SetTextAlign(12); l.SetTextSize(tsize);
45 l.SetNDC();
46 l.SetTextFont(72);
47 l.SetTextColor(color);
48
49 double delx = 0.115*696*gPad->GetWh()*nx/(472*gPad->GetWw()*ny);
50
51 if (text!="") {
52 TLatex p;
53 p.SetNDC();
54 p.SetTextFont(42);
55 p.SetTextColor(color);
56 p.DrawLatex(x+delx,y,text.c_str());
57 // p.DrawLatex(x,y,"#sqrt{s}=900GeV");
58 }
59}