16 plJetsL2(
char *hFile=
"xx.hist.root",
char *pathPS=0) {
19 gStyle->SetPalette(1,0);
20 gStyle->SetOptStat(10);
22 TString rootHistFname=hFile;
23 fd=
new TFile(rootHistFname);
25 c=
new TCanvas(
"aa",
"aa",600,500);
26 printf(
"To view plots exec: plJetsL2(1) ,2,3,4,5,6,10,20,21,22\n");
27 if(pathPS) plAll(pathPS);
33 int pgA[]={1,2,3,4,5,6,10,20,21,22};
39 sprintf(txt,
"%s/L2jet_Page%02d.ps",pathPS,page);
44 printf(
"#L2jet_plALL_done_%d\n",k);
53 printf(
" execute plJetsL2() first to open the Canvas, QUIT\n");
57 TString tit=
"L2Jet-page"; tit+=page;
64 gStyle->SetOptStat(1110);
65 char *names[]={
"h10",
"h11",
"h12"};
70 TH1F *h=(TH1F *)fd->Get(names[i]);
74 h->SetFillColor(kBlue);
75 h->SetXTitle(
"Input: 1=btow, 2=etaw Accept: 4=oneJet, 5=diJet, 6=rnd" );
76 h->SetTitle(
"total events 0=anyInput 8=anyAccept");
80 h->Rebin(nbin); h->Scale(1./nbin);
92 char *names2[]={
"h13",
"h14",
"h15"};
94 TH1F *h=(TH1F *)fd->Get(names2[i]);
95 h->Rebin(nbin); h->Scale(1./nbin);
98 h->SetTitle(
"accpet rate blue:monoJet, red:diJet, black:random");
99 }
else h->Draw(
"same");
100 if(i==0) {h->SetLineColor(kBlue);}
101 if(i==1) {h->SetLineColor(kRed); h->SetLineStyle(2);}
102 if(i==2) {h->SetLineColor(kBlack); h->SetLineStyle(2);}
103 if(yMax<h->GetMaximum()) yMax=h->GetMaximum();
107 for(i=0;i<mxh;i++) hA[i]->SetMaximum(yMax*1.1);
108 if(yMax>0.5) gPad->SetLogy();
113 gStyle->SetOptStat(0);
114 TH1F *h0=(TH1F *)fd->Get(
"h21");
115 float yMax=h0->GetMaximum();
116 h0->SetMaximum(yMax*1.1);
118 h0->SetFillColor(kRed);
119 h0->SetLineColor(kRed);
125 TH1F *ha=(TH1F *)h0->Clone();
126 ha->SetAxisRange(nx*i, nx*(i+1));
132 aaa+=nx*i+1; aaa+=
"+";
133 tx=
new TText(nx*i-100,1.,aaa);
134 tx->SetTextSize(0.15);
142 gStyle->SetOptStat(0);
143 TH1F *h0=(TH1F *)fd->Get(
"h31");
144 h0->SetFillColor(kBlue);
145 float yMax=h0->GetMaximum();
146 h0->SetMaximum(yMax*1.1);
148 int nx=h0->GetNbinsX()/nd;
152 TH1F *ha=(TH1F *)h0->Clone();
153 ha->SetAxisRange(nx*i, nx*(i+1));
158 TString aaa=
"crate=";
160 tx=
new TText(nx*i-15,1.,aaa);
161 tx->SetTextSize(0.2);
169 gStyle->SetOptStat(10);
170 TH1F *hb=(TH1F *)fd->Get(
"h22");
171 TH1F *he=(TH1F *)fd->Get(
"h32");
172 he->SetTitle(
"ETOW");
177 pdL =
new TPad(
"padL",
"padL",0.0,0.,xDiv,1.);
180 pdR =
new TPad(
"padR",
"padR",xDiv,0.,1.,1.);
183 float zMx=hb->GetMaximum();
184 if(zMx<he->GetMaximum()) zMx=he->GetMaximum();
185 hb->SetMaximum(zMx*1.2);
186 he->SetMaximum(zMx*1.2);
190 TLine* ln=
new TLine(20.,-10.,20., 130);
191 ln->SetLineColor(kMagenta);
193 tx=
new TText(5,121,
"BTOW-East"); tx->Draw();tx->SetTextColor(kMagenta);
194 tx=
new TText(25,121,
"BTOW-West"); tx->Draw();tx->SetTextColor(kMagenta);
198 tx=
new TText(4,61,
"Endcap"); tx->Draw();tx->SetTextColor(kMagenta);
199 tx->SetTextSize(0.1);
203 gStyle->SetOptStat(10);
204 char *names[]={
"h40",
"h41",
"h43",
"h42"};
209 TH1F *h=(TH1F *)fd->Get(names[i]);
211 if(i%2) draw_eta_phi_text();
217 gStyle->SetOptStat(1110);
218 char *names[]={
"h44",
"h45",
"h47",
"h46",
"h48"};
223 TH1F *h=(TH1F *)fd->Get(names[i]);
226 if(i!=2 && i!=4) gPad->SetLogy();
232 gStyle->SetOptStat(10);
233 char *names[]={
"h50",
"h51",
"h53",
"h52"};
238 TH1F *h=(TH1F *)fd->Get(names[i]);
239 if(i==1) h->Draw(
"colz");
241 if(i==0) gPad->SetLogy();
242 if(i==1) draw_eta_phi_text();
243 if(i>1) h->SetMinimum(0);
248 gStyle->SetOptStat(10);
249 char *names[]={
"h60",
"h61",
"h63",
"h62"};
254 TH1F *h=(TH1F *)fd->Get(names[i]);
256 if(i%2) draw_eta_phi_text();
261 gStyle->SetOptStat(1110);
262 char *names1[]={
"h64",
"h66",
"h68"};
263 char *names2[]={
"h65",
"h67",
"h69"};
268 TH1F *h1=(TH1F *)fd->Get(names1[i]);
269 h1->Draw(); h1->SetLineColor(kRed);
270 h1->SetLineWidth(2.);
271 TH1F *h2=(TH1F *)fd->Get(names2[i]);
272 h2->SetLineWidth(2.); h2->Draw(
"same");
273 h2->SetLineColor(kBlue); h2->SetLineStyle(2);
275 if(i==0) gPad->SetLogy();
280 if(i==0)h1->SetTitle(
"diJet Et (accepted)");
281 if(i==1)h1->SetTitle(
"diJet eta (accepted)");
282 if(i==2)h1->SetTitle(
"diJet phi (accepted)");
283 lg=
new TLegend(0.4,0.42,.7,0.55);
284 lg->AddEntry(h1,
"High Et jet");
285 lg->AddEntry(h2,
"Low Et jet");
289 else h1->SetMinimum(0);
291 float yMax=h1->GetMaximum();
292 if(yMax<h2->GetMaximum()){
293 yMax=h2->GetMaximum();
294 h1->SetMaximum(yMax*1.1);
297 t=
new TText(2.8,yMax/5,
"RED Jet1 ET > GREEN Jet2 ET ");
302 TH1F *h=(TH1F *)fd->Get(
"h70");
306 t=
new TLatex(3,h->GetMaximum()*.3,
"#Delta #zeta=phi(J1,J2) * sign( K_{T} x S_{Y} )");
312 gStyle->SetOptStat(110);
313 char *names[]={
"h71",
"h72",
"h73",
"h74"};
318 TH1F *h=(TH1F *)fd->Get(names[i]);
319 if(i<=2) h->Draw(
"colz");
324 if(i==1) draw_eta12_text();
337 void draw_eta_phi_text() {
338 ln=
new TLine(5.,0.,5., 33); ln->SetLineColor(kMagenta); ln->Draw();
339 ln=
new TLine(10.,0.,10., 33); ln->SetLineColor(kMagenta); ln->Draw();
340 tx=
new TText(.8,29.8,
"BTOW-East"); tx->Draw();tx->SetTextColor(kMagenta);
341 tx=
new TText(5.8,30.5,
"BTOW-West"); tx->Draw();tx->SetTextColor(kMagenta);
342 tx=
new TText(10.5,30.5,
"Endcap"); tx->Draw();tx->SetTextColor(kMagenta);
347 void draw_eta12_text() {
348 ln=
new TLine(10.,0.,10., 16); ln->SetLineColor(kMagenta); ln->Draw();
349 ln=
new TLine(-1.,10.,15., 10); ln->SetLineColor(kMagenta); ln->Draw();
351 tx=
new TText(4.8,14.8,
"BTOW"); tx->Draw();tx->SetTextColor(kMagenta);
352 tx=
new TText(10.5,15.1,
"Endcap"); tx->Draw();tx->SetTextColor(kMagenta);
354 tx=
new TText(14.5,7,
"BTOW"); tx->Draw();tx->SetTextColor(kMagenta);
355 tx=
new TText(14.5,12,
"Endcap"); tx->Draw();tx->SetTextColor(kMagenta);