4 plZana(
int page=0,
int pl=2,
char *core0=
"run12long",
char *iPath=
"../9.10.12/",
char *oPath=
"./out/z/"){
12 char *nameA[]={
"_Z_EventType"};
13 char *nameB[]={
"_Z_et1iso",
"_Z_et1val",
"_Z_et1frac",
"_Z_et2iso",
"_Z_et2val",
"_Z_et2frac"};
14 char *nameC[]={
"_Z_phi12",
"_Z_ZmassLike",
"_Z_chRecPNp",
"_Z_ZmassUnlike"};
15 char *nameD[]={
"muEne_Deta",
"_Z_Ene_Deta"};
17 char *nameE[]={
"_Z_Endcap_EventType",
"_Z_Y2",
"_Z_etaZ"};
18 char *nameF[]={
"_Z_Eet1iso",
"_Z_Eet1val",
"_Z_Eet1frac",
"_Z_Eet2iso",
"_Z_Eet2val",
"_Z_Eet2frac"};
19 char *nameG[]={
"_Z_Ephi12",
"_Z_ELike_chRecPNp",
"_Z_E_ZmassLike",
"_Z_Eeta12",
"_Z_EUnlike_chRecPNp",
"_Z_E_ZmassUnlike"}
22 TString fullInpName=iPath; fullInpName+=core0;
23 fullInpName+=
".wana.hist.root";
24 fd=
new TFile(fullInpName);
26 printf(
"EROR: input histo file not found, quit\n",fullInpName.Data());
29 printf(
"Opened: %s\n",fullInpName.Data());
33 if(fd->Get(
"muStatEve")==0)
38 h0=(TH1*)gDirectory->Get(
"_Z_EventType"); assert(h0);
39 printf(
"%s: ",h0->GetName());
40 for(
int k=1;k<=14;k++) printf(
"%.0f, ",h0->GetBinContent(k));
43 gStyle->SetPalette(1,0);
44 gStyle->SetOptStat(0);
46 sprintf(padTit,
"%s",core0);
51 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
52 c->Divide(1,1);gStyle->SetOptStat(0);
54 for(
int i=0;i<1;i++) {
56 printf(
"->%s<\n",nameX[i]);
57 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
58 c->cd(i+1); h->Draw();
59 if(i==0) h->Draw(
"h text");
61 c->GetPad(1)->SetLogy();
66 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
67 c->Divide(3,2);gStyle->SetOptStat(1110);
69 for(
int i=0;i<6;i++) {
71 printf(
"->%s<\n",nameX[i]);
72 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
73 c->cd(i+1); h->Draw();
75 c->GetPad(2)->SetLogy();
81 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
83 c->Divide(2,2);gStyle->SetOptStat(10);
85 for(
int i=0;i<4;i++) {
87 printf(
"->%s<\n",nameX[i]);
88 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
89 c->cd(i+1); h->Draw();
102 h->SetAxisRange(0,130);
111 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
112 c->Divide(1,2);gStyle->SetOptStat(1110);
114 for(
int i=0;i<2;i++) {
117 printf(
"->%s<\n",nameX[i]);
118 h2=(TH2F*)gDirectory->Get(nameX[i]); assert(h2);
120 c->cd(i+1); h2->Draw(
"colz");
126 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
127 c->Divide(2,2);gStyle->SetOptStat(0);
129 for(
int i=0;i<3;i++) {
131 printf(
"->%s<\n",nameX[i]);
132 h=(TH1*)gDirectory->Get(nameX[i]);
134 c->cd(i+1); h->Draw();
135 if(i<2) { h->Draw(
"h text");
138 if(i==2) { h->Rebin(8); h->Draw(); }
141 c->GetPad(1)->SetLogy();
146 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
147 c->Divide(3,2);gStyle->SetOptStat(1110);
149 for(
int i=0;i<6;i++) {
151 printf(
"->%s<\n",nameX[i]);
152 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
153 c->cd(i+1); h->Draw();
155 c->GetPad(2)->SetLogy();
160 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
162 c->Divide(3,2);gStyle->SetOptStat(10);
164 for(
int i=0;i<6;i++) {
166 printf(
"->%s<\n",nameX[i]);
167 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
168 c->cd(i+1); h->Draw();
169 if(i==3) h->Draw(
"colz");
192 printf(
"page=%d NOT defined\n",page);
197 sprintf(text,
"%s%s_page%03d",oPath,core0,page);
203 if(pl&1) can->Print(tit+
".gif");
204 if(pl&2) can->Print(tit+
".ps");
209 void splitPadX(
float x, TPad **cL, TPad **cR) {
210 (*cL) =
new TPad(
"padL",
"apdL",0.0,0.,x,0.95);
212 (*cR) =
new TPad(
"padL",
"apdL",x+0.005,0.,1.0,0.95);
217 TPad *makeTitle(TCanvas *c,
char *core,
int page) {
219 TPad *pad0 =
new TPad(
"pad0",
"apd0",0.0,0.95,1.,1.);
223 TPaveText *pt =
new TPaveText(0,0.,1,1,
"br");
236 pad =
new TPad(
"pad1",
"apd1",0.0,0.0,1,.95);
242 void doAll(
char *core0=
"",
char *iPath=
""){
243 for(
int i=1;i<=7;i++) {
244 plZana(i,2,core0,iPath);