1 #ifndef _ALIGNMENT_OFFLINEVALIDATION_CMS_LUMI_H_ 2 #define _ALIGNMENT_OFFLINEVALIDATION_CMS_LUMI_H_ 42 void CMS_lumi(TPad* pad,
int iPeriod = 3,
int iPosX = 10);
44 void CMS_lumi(TPad* pad,
int iPeriod,
int iPosX) {
45 bool outOfFrame =
false;
46 if (iPosX / 10 == 0) {
64 int align_ = 10 * alignX_ + alignY_;
66 float H = pad->GetWh();
67 float W = pad->GetWw();
68 float l = pad->GetLeftMargin();
69 float t = pad->GetTopMargin();
70 float r = pad->GetRightMargin();
71 float b = pad->GetBottomMargin();
79 lumiText +=
" (7 TeV)";
80 }
else if (iPeriod == 2) {
82 lumiText +=
" (8 TeV)";
83 }
else if (iPeriod == 3) {
85 lumiText +=
" (8 TeV)";
88 lumiText +=
" (7 TeV)";
89 }
else if (iPeriod == 4) {
91 lumiText +=
" (#sqrt{s} = 13 TeV)";
92 }
else if (iPeriod == 5) {
94 lumiText +=
" (#sqrt{s} = 0.9 TeV)";
95 }
else if (iPeriod == 7) {
97 lumiText +=
"#scale[0.85]{";
99 lumiText +=
" (13 TeV)";
102 lumiText +=
" (8 TeV)";
105 lumiText +=
" (7 TeV)";
108 }
else if (iPeriod == 12) {
110 }
else if (iPeriod == 0) {
118 latex.SetTextAngle(0);
119 latex.SetTextColor(kBlack);
123 latex.SetTextFont(42);
124 latex.SetTextAlign(31);
130 latex.SetTextAlign(11);
138 if (iPosX % 10 <= 1) {
140 }
else if (iPosX % 10 == 2) {
141 posX_ =
l + 0.5 * (1 -
l -
r);
142 }
else if (iPosX % 10 == 3) {
148 posX_ =
l + 0.045 * (1 -
l -
r) * W /
H;
149 posY_ = 1 -
t - 0.045 * (1 -
t -
b);
151 float yl_0 = posY_ - 0.15;
152 float xl_1 = posX_ + 0.15 *
H / W;
154 TPad* pad_logo =
new TPad(
"logo",
"logo", xl_0, yl_0, xl_1, yl_1);
157 pad_logo->Modified();
162 latex.SetTextAlign(align_);
163 latex.DrawLatex(posX_, posY_,
cmsText);
166 latex.SetTextAlign(align_);
167 latex.SetTextSize(extraTextSize *
t);
177 latex.SetTextSize(extraTextSize *
t);
178 latex.SetTextAlign(align_);
179 latex.DrawLatex(posX_, posY_,
extraText);
float extraOverCmsTextSize
void CMS_lumi(TPad *pad, int iPeriod=3, int iPosX=10)