1 #ifndef _ALIGNMENT_OFFLINEVALIDATION_CMS_LUMI_H_
2 #define _ALIGNMENT_OFFLINEVALIDATION_CMS_LUMI_H_
41 void CMS_lumi(TPad* pad,
int iPeriod = 3,
int iPosX = 10);
43 void CMS_lumi(TPad* pad,
int iPeriod,
int iPosX) {
44 bool outOfFrame =
false;
45 if (iPosX / 10 == 0) {
63 int align_ = 10 * alignX_ + alignY_;
65 float H = pad->GetWh();
66 float W = pad->GetWw();
67 float l = pad->GetLeftMargin();
68 float t = pad->GetTopMargin();
69 float r = pad->GetRightMargin();
70 float b = pad->GetBottomMargin();
78 lumiText +=
" (7 TeV)";
79 }
else if (iPeriod == 2) {
81 lumiText +=
" (8 TeV)";
82 }
else if (iPeriod == 3) {
84 lumiText +=
" (8 TeV)";
87 lumiText +=
" (7 TeV)";
88 }
else if (iPeriod == 4) {
90 lumiText +=
" (#sqrt{s} = 13 TeV)";
91 }
else if (iPeriod == 7) {
93 lumiText +=
"#scale[0.85]{";
95 lumiText +=
" (13 TeV)";
98 lumiText +=
" (8 TeV)";
101 lumiText +=
" (7 TeV)";
104 }
else if (iPeriod == 12) {
106 }
else if (iPeriod == 0) {
114 latex.SetTextAngle(0);
115 latex.SetTextColor(kBlack);
119 latex.SetTextFont(42);
120 latex.SetTextAlign(31);
126 latex.SetTextAlign(11);
134 if (iPosX % 10 <= 1) {
136 }
else if (iPosX % 10 == 2) {
137 posX_ =
l + 0.5 * (1 -
l -
r);
138 }
else if (iPosX % 10 == 3) {
144 posX_ =
l + 0.045 * (1 -
l -
r) * W /
H;
145 posY_ = 1 -
t - 0.045 * (1 -
t -
b);
147 float yl_0 = posY_ - 0.15;
148 float xl_1 = posX_ + 0.15 *
H / W;
150 TPad* pad_logo =
new TPad(
"logo",
"logo", xl_0, yl_0, xl_1, yl_1);
153 pad_logo->Modified();
158 latex.SetTextAlign(align_);
159 latex.DrawLatex(posX_, posY_,
cmsText);
162 latex.SetTextAlign(align_);
163 latex.SetTextSize(extraTextSize *
t);
173 latex.SetTextSize(extraTextSize *
t);
174 latex.SetTextAlign(align_);
175 latex.DrawLatex(posX_, posY_,
extraText);