5 plWjj(
int page=2,
int pl=0,
char *core0=
"R10096140",
char *iPath=
"",
char *oPath=
""){
10 core0=
"rcn10017_10_500evts";
21 char *nameA[]={
"WjjStatEve"};
22 char *nameB[]={
"Wjj_J1",
"Wjj_J2",
"Wjj_K1",
"Wjj_K6",
"Wjj_K5",
"Wjj_K3"};
23 char *nameC[]={
"Wjj_3J",
"Wjj_K4",
"Wjj_K2",
"Wjjphi12"};
24 char *nameD[]={
"Wjj_K1",
"Wjj_P1",
"Wjj_P2",
"Wjj_P4",
"Wjj_P3"};
31 TString fullInpName=iPath; fullInpName+=core0;
32 fullInpName+=
".wana.hist.root";
33 fd=
new TFile(fullInpName);
35 printf(
"EROR: input histo file not found, quit\n",fullInpName.Data());
38 printf(
"Opened: %s\n",fullInpName.Data());
42 h0=(TH1*)fd->Get(ver+
"WjjStatEve"); assert(h0);
43 printf(
"%s: ",h0->GetName());
44 for(
int k=1;k<=h0->GetXaxis()->GetNbins();k++) printf(
"%.0f, ",h0->GetBinContent(k));
47 gStyle->SetPalette(1,0);
48 gStyle->SetOptStat(0);
50 sprintf(padTit,
"%s %s",ver.Data(),core0);
55 can=
new TCanvas(
"aa",
"aa",800,400); TPad *c=makeTitle(can,padTit,page);
56 c->Divide(1,1);gStyle->SetOptStat(0);
58 for(
int i=0;i<1;i++) {
59 printf(
"->%s<\n",nameX[i]);
60 h=(TH1*)fd->Get(ver+nameX[i]); assert(h);
61 c->cd(i+1); h->Draw(); gPad->SetTopMargin(0.2);
62 if(i==0) h->Draw(
"h text");
64 c->GetPad(1)->SetLogy();
69 can=
new TCanvas(
"aa",
"aa",900,600); TPad *c=makeTitle(can,padTit,page);
70 c->Divide(3,2);gStyle->SetOptStat(1110);
72 for(
int i=0;i<6;i++) {
73 printf(
"->%s<\n",nameX[i]);
74 h=(TH1*)fd->Get(ver+nameX[i]); assert(h);
75 c->cd(i+1); h->Draw(
"colz");
77 if(i==2){ h->SetAxisRange(0,180); h->SetMinimum(0.9);}
78 if(i>=4) ((TH2F*)h)->Rebin2D();
79 c->GetPad(i+1)->SetRightMargin(0.15);
82 if(strstr(core0,
"sumR")) c->GetPad(3)->SetLogy();
88 can=
new TCanvas(
"aa",
"aa",700,500); TPad *c=makeTitle(can,padTit,page);
89 c->Divide(3,2);gStyle->SetOptStat(1110);
91 for(
int i=0;i<4;i++) {
92 printf(
"->%s<\n",nameX[i]);
93 h=(TH1*)fd->Get(ver+nameX[i]); assert(h);
101 can=
new TCanvas(
"aa",
"aa",700,500); TPad *c=makeTitle(can,padTit,page);
102 c->Divide(3,2);gStyle->SetOptStat(1110);
104 for(
int i=0;i<5;i++) {
105 printf(
"->%s<\n",nameX[i]);
106 h=(TH1*)fd->Get(ver+nameX[i]); assert(h);
109 if(i==3) h->Draw(
"colz");
117 printf(
"page=%d NOT defined\n",page);
122 sprintf(text,
"%s%s_page%03d_%s",oPath,core0,page,ver.Data());
128 if(pl&1) can->Print(tit+
".gif");
129 if(pl&2) can->Print(tit+
".ps");
134 TPad *makeTitle(TCanvas *c,
char *core,
int page) {
136 TPad *pad0 =
new TPad(
"pad0",
"apd0",0.0,0.95,1.,1.);
140 TPaveText *pt =
new TPaveText(0,0.,1,1,
"br");
153 pad =
new TPad(
"pad1",
"apd1",0.0,0.0,1,.95);
160 for(
int i=1;i<=4;i++) {