1 #ifndef _ALIGNMENT_OFFLINEVALIDATION_CMS_LUMI_H_ 2 #define _ALIGNMENT_OFFLINEVALIDATION_CMS_LUMI_H_ 43 void CMS_lumi(TPad* pad,
int iPeriod = 3,
int iPosX = 10);
45 void CMS_lumi(TPad* pad,
int iPeriod,
int iPosX) {
46 bool outOfFrame =
false;
47 if (iPosX / 10 == 0) {
65 int align_ = 10 * alignX_ + alignY_;
67 float H = pad->GetWh();
68 float W = pad->GetWw();
69 float l = pad->GetLeftMargin();
70 float t = pad->GetTopMargin();
71 float r = pad->GetRightMargin();
72 float b = pad->GetBottomMargin();
80 lumiText +=
" (7 TeV)";
81 }
else if (iPeriod == 2) {
83 lumiText +=
" (8 TeV)";
84 }
else if (iPeriod == 3) {
86 lumiText +=
" (8 TeV)";
89 lumiText +=
" (7 TeV)";
90 }
else if (iPeriod == 4) {
92 lumiText +=
" (#sqrt{s} = 13 TeV)";
93 }
else if (iPeriod == 5) {
95 lumiText +=
" (#sqrt{s} = 0.9 TeV)";
96 }
else if (iPeriod == 6) {
98 lumiText +=
" (#sqrt{s} = 13.6 TeV)";
99 }
else if (iPeriod == 7) {
101 lumiText +=
"#scale[0.85]{";
103 lumiText +=
" (13 TeV)";
106 lumiText +=
" (8 TeV)";
109 lumiText +=
" (7 TeV)";
112 }
else if (iPeriod == 12) {
114 }
else if (iPeriod == 0) {
122 latex.SetTextAngle(0);
123 latex.SetTextColor(kBlack);
127 latex.SetTextFont(42);
128 latex.SetTextAlign(31);
134 latex.SetTextAlign(11);
142 if (iPosX % 10 <= 1) {
144 }
else if (iPosX % 10 == 2) {
145 posX_ =
l + 0.5 * (1 -
l -
r);
146 }
else if (iPosX % 10 == 3) {
152 posX_ =
l + 0.045 * (1 -
l -
r) * W /
H;
153 posY_ = 1 -
t - 0.045 * (1 -
t -
b);
155 float yl_0 = posY_ - 0.15;
156 float xl_1 = posX_ + 0.15 *
H / W;
158 TPad* pad_logo =
new TPad(
"logo",
"logo", xl_0, yl_0, xl_1, yl_1);
161 pad_logo->Modified();
166 latex.SetTextAlign(align_);
167 latex.DrawLatex(posX_, posY_,
cmsText);
170 latex.SetTextAlign(align_);
171 latex.SetTextSize(extraTextSize *
t);
181 latex.SetTextSize(extraTextSize *
t);
182 latex.SetTextAlign(align_);
183 latex.DrawLatex(posX_, posY_,
extraText);
float extraOverCmsTextSize
void CMS_lumi(TPad *pad, int iPeriod=3, int iPosX=10)