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, TString RLabel =
"");
46 inline void CMS_lumi(TPad* pad,
int iPeriod,
int iPosX, TString RLabel) {
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);
150 latex.SetTextAlign(11);
158 if (iPosX % 10 <= 1) {
160 }
else if (iPosX % 10 == 2) {
161 posX_ =
l + 0.5 * (1 -
l -
r);
162 }
else if (iPosX % 10 == 3) {
168 posX_ =
l + 0.045 * (1 -
l -
r) * W /
H;
169 posY_ = 1 -
t - 0.045 * (1 -
t -
b);
171 float yl_0 = posY_ - 0.15;
172 float xl_1 = posX_ + 0.15 *
H / W;
174 TPad* pad_logo =
new TPad(
"logo",
"logo", xl_0, yl_0, xl_1, yl_1);
177 pad_logo->Modified();
182 latex.SetTextAlign(align_);
183 latex.DrawLatex(posX_, posY_,
cmsText);
186 latex.SetTextAlign(align_);
187 latex.SetTextSize(extraTextSize *
t);
197 latex.SetTextSize(extraTextSize *
t);
198 latex.SetTextAlign(align_);
199 latex.DrawLatex(posX_, posY_,
extraText);
float extraOverCmsTextSize
void CMS_lumi(TPad *pad, int iPeriod=3, int iPosX=10, TString RLabel="")