1 #ifndef _ALIGNMENT_OFFLINEVALIDATION_CMS_LUMI_H_ 2 #define _ALIGNMENT_OFFLINEVALIDATION_CMS_LUMI_H_ 44 void CMS_lumi(TPad* pad,
int iPeriod = 3,
int iPosX = 10);
46 inline void CMS_lumi(TPad* pad,
int iPeriod,
int iPosX) {
47 bool outOfFrame =
false;
48 if (iPosX / 10 == 0) {
66 int align_ = 10 * alignX_ + alignY_;
68 float H = pad->GetWh();
69 float W = pad->GetWw();
70 float l = pad->GetLeftMargin();
71 float t = pad->GetTopMargin();
72 float r = pad->GetRightMargin();
73 float b = pad->GetBottomMargin();
82 lumiText +=
" (7 TeV)";
83 }
else if (iPeriod == 2) {
86 lumiText +=
" (8 TeV)";
87 }
else if (iPeriod == 3) {
90 lumiText +=
" (8 TeV)";
93 lumiText +=
" (7 TeV)";
95 }
else if (iPeriod == 4) {
98 lumiText +=
" (#sqrt{s} = 13 TeV)";
99 }
else if (iPeriod == 5) {
102 lumiText +=
" (#sqrt{s} = 0.9 TeV)";
103 }
else if (iPeriod == 6) {
106 lumiText +=
" (#sqrt{s} = 13.6 TeV)";
107 }
else if (iPeriod == 7) {
109 lumiText +=
"#scale[0.85]{";
112 lumiText +=
" (13 TeV)";
115 lumiText +=
" (8 TeV)";
118 lumiText +=
" (7 TeV)";
122 }
else if (iPeriod == 12) {
125 }
else if (iPeriod == 0) {
134 latex.SetTextAngle(0);
135 latex.SetTextColor(kBlack);
139 latex.SetTextFont(42);
140 latex.SetTextAlign(31);
146 latex.SetTextAlign(11);
154 if (iPosX % 10 <= 1) {
156 }
else if (iPosX % 10 == 2) {
157 posX_ =
l + 0.5 * (1 -
l -
r);
158 }
else if (iPosX % 10 == 3) {
164 posX_ =
l + 0.045 * (1 -
l -
r) * W /
H;
165 posY_ = 1 -
t - 0.045 * (1 -
t -
b);
167 float yl_0 = posY_ - 0.15;
168 float xl_1 = posX_ + 0.15 *
H / W;
170 TPad* pad_logo =
new TPad(
"logo",
"logo", xl_0, yl_0, xl_1, yl_1);
173 pad_logo->Modified();
178 latex.SetTextAlign(align_);
179 latex.DrawLatex(posX_, posY_,
cmsText);
182 latex.SetTextAlign(align_);
183 latex.SetTextSize(extraTextSize *
t);
193 latex.SetTextSize(extraTextSize *
t);
194 latex.SetTextAlign(align_);
195 latex.DrawLatex(posX_, posY_,
extraText);
float extraOverCmsTextSize
void CMS_lumi(TPad *pad, int iPeriod=3, int iPosX=10)