4 plZana(
int page=3,
int pl=0,
char *core0=
"R10096140",
char *iPath=
"",
char *oPath=
""){
6 iPath=
"/star/data05/scratch/balewski/2009-Wana-SL09g-feb24/data/";
20 char *nameA[]={
"_Z_EventType"};
21 char *nameB[]={
"_Z_et1iso",
"_Z_et1val",
"_Z_et1frac",
"_Z_et2iso",
"_Z_et2val",
"_Z_et2frac"};
22 char *nameC[]={
"_Z_phi12",
"_Z_ZmassLike",
"_Z_chRecPNp",
"_Z_ZmassUnlike"};
23 char *nameD[]={
"muEne_Deta",
"_Z_Ene_Deta"};
26 TString fullInpName=iPath; fullInpName+=core0;
27 fullInpName+=
".wana.hist.root";
28 fd=
new TFile(fullInpName);
30 printf(
"EROR: input histo file not found, quit\n",fullInpName.Data());
33 printf(
"Opened: %s\n",fullInpName.Data());
37 h0=(TH1*)fd->Get(
"_Z_EventType"); assert(h0);
38 printf(
"%s: ",h0->GetName());
39 for(
int k=1;k<=14;k++) printf(
"%.0f, ",h0->GetBinContent(k));
42 gStyle->SetPalette(1,0);
43 gStyle->SetOptStat(0);
45 sprintf(padTit,
"%s",core0);
50 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
51 c->Divide(1,1);gStyle->SetOptStat(0);
53 for(
int i=0;i<1;i++) {
55 printf(
"->%s<\n",nameX[i]);
56 h=(TH1*)fd->Get(nameX[i]); assert(h);
57 c->cd(i+1); h->Draw();
58 if(i==0) h->Draw(
"h text");
60 c->GetPad(1)->SetLogy();
65 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
66 c->Divide(3,2);gStyle->SetOptStat(1110);
68 for(
int i=0;i<6;i++) {
70 printf(
"->%s<\n",nameX[i]);
71 h=(TH1*)fd->Get(nameX[i]); assert(h);
72 c->cd(i+1); h->Draw();
74 c->GetPad(2)->SetLogy();
80 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
82 c->Divide(2,2);gStyle->SetOptStat(10);
84 for(
int i=0;i<4;i++) {
86 printf(
"->%s<\n",nameX[i]);
87 h=(TH1*)fd->Get(nameX[i]); assert(h);
88 c->cd(i+1); h->Draw();
91 h2->Rebin2D(2,2);h2->SetMaximum(3);
92 h2->Draw(
"box"); h2->SetFillColor(kBlack);
93 h3=(TH2F*)pubchRecPNp; h3->Rebin2D(2,2);
94 h3->Draw(
"colz same");
99 h->SetAxisRange(0,130);
100 h->Fit(
"gaus",
"",
"RH",75.,115.);
108 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
109 c->Divide(1,2);gStyle->SetOptStat(1110);
111 for(
int i=0;i<2;i++) {
113 printf(
"->%s<\n",nameX[i]);
114 h2=(TH2F*)fd->Get(nameX[i]); assert(h2);
116 c->cd(i+1); h2->Draw(
"colz");
123 printf(
"page=%d NOT defined\n",page);
128 sprintf(text,
"%s%s_page%03d",oPath,core0,page);
134 if(pl&1) can->Print(tit+
".gif");
135 if(pl&2) can->Print(tit+
".ps");
140 void splitPadX(
float x, TPad **cL, TPad **cR) {
141 (*cL) =
new TPad(
"padL",
"apdL",0.0,0.,x,0.95);
143 (*cR) =
new TPad(
"padL",
"apdL",x+0.005,0.,1.0,0.95);
148 TPad *makeTitle(TCanvas *c,
char *core,
int page) {
150 TPad *pad0 =
new TPad(
"pad0",
"apd0",0.0,0.95,1.,1.);
154 TPaveText *pt =
new TPaveText(0,0.,1,1,
"br");
167 pad =
new TPad(
"pad1",
"apd1",0.0,0.0,1,.95);
174 for(
int i=1;i<=4;i++) {