4 plFgtSSim(
int page=3,
char *core=
"m1",
int pl=0){
10 core=
"pp200_QCDprodMBc";
11 TString fullInpName=path; fullInpName+=core;
12 fullInpName+=
".fgt.hist.root";
16 fd=
new TFile(fullInpName);
18 printf(
"EROR: input histo file not found, quit\n",fullInpName.Data());
22 gStyle->SetPalette(1,0);
24 char *nameA[]={
"ss_inDE",
"ss_inDS",
"ss_inZ",
"ss_hitStat",
"ss_inXY",
"ss_cTof",
"ss_inR",
"ss_cPmag",
"ss_gXY1"};
25 char *nameB[]={
"fr_pairEne",
"fr_nPrimPair",
"fr_totEne",
"fr_nTotPair",
"fr_pathL",
"fr_avrTPath"};
26 char *nameC[]={
"ss_hitStat",
"cl_Stat1D",
"ev_Stat1D"};
31 can=
new TCanvas(
"aa",
"aa",800,500); TPad *c=makeTitle(can,core,page);
32 c->Divide(1,2);gStyle->SetOptStat(111111);
34 for(
int i=0;i<1;i++) {
35 printf(
"->%s<\n",nameX[i]);
36 h=(TH1*)fd->Get(nameX[i]); assert(h);
37 c->cd(i+1); h->Draw();
45 can=
new TCanvas(
"aa",
"aa",720,700); TPad *c=makeTitle(can,core,page);
50 printf(
"->%s<\n",nameX[i]);
51 h=(TH1*)fd->Get(nameX[i]); assert(h);
52 c->cd(i+1); h->Draw();
53 if(i==4|| i==8) h->Draw(
"colz");
54 if(i==3 ||i==6)
if(h->GetEntries()>0) c->GetPad(1+i)->SetLogz();
60 can=
new TCanvas(
"aa",
"aa",800,420); TPad *c=makeTitle(can,core,page);
63 c->cd(2);digXYAll->Draw(
"colz"); gPad->SetLogz();
70 can=
new TCanvas(
"aa",
"aa",600,600); TPad *c=makeTitle(can,core,page);
72 digXY->SetAxisRange(23,30,
"y"); digXY->SetAxisRange(23,30,
"x");
84 can=
new TCanvas(
"aa",
"aa",950,620); TPad *c=makeTitle(can,core,page);
85 gStyle->SetOptStat(1000010);
87 for(
int id=0;
id<6;
id++) {
89 h=(TH2*)fd->Get(Form(
"ss_gXY%d",
id+1)); assert(h);
99 gStyle->SetOptStat(110);
100 can=
new TCanvas(
"aa",
"aa",800,500); TPad *c=makeTitle(can,core,page);
103 for(
int i=0;i<6;i++) {
104 printf(
"->%s<\n",nameX[i]);
105 h=(TH1*)fd->Get(nameX[i]); assert(h);
106 c->cd(i+1); h->Draw();
107 if(i==5) { h->SetAxisRange(0,2);}
113 can=
new TCanvas(
"aa",
"aa",800,420); TPad *c=makeTitle(can,core,page);
114 c->Divide(1,2);gStyle->SetOptStat(1001111);
115 c->cd(1);digRAll->Draw();
116 c->cd(2);digPAll->Draw();
121 can=
new TCanvas(
"aa",
"aa",800,420); TPad *c=makeTitle(can,core,page);
122 c->Divide(1,2);gStyle->SetOptStat(1001111);
123 c->cd(1);dg_Padc->Draw();
124 c->cd(2);dg_Radc->Draw();
131 can=
new TCanvas(
"aa",
"aa",800,550); TPad *c=makeTitle(can,core,page);
132 c->Divide(3,2);gStyle->SetOptStat(111111);
133 c->cd(1);cl_RmxAmp->Draw();
134 cl_RmxAmp->Fit(
"landau",
"R",
"",seedThres,99999);
136 c->cd(2);cl_Rwid->Draw();
137 c->cd(4);cl_Rpf->Draw();
140 ev_errRad->Fit(
"gaus");
141 c->cd(6);ev_dRad_R->Draw(
"colz");
147 can=
new TCanvas(
"aa",
"aa",800,550); TPad *c=makeTitle(can,core,page);
148 c->Divide(3,2);gStyle->SetOptStat(111111);
149 c->cd(1);cl_PmxAmp->Draw();cl_PmxAmp->Fit(
"landau",
"R",
"",seedThres,99999);
151 c->cd(2);cl_Pwid->Draw();
152 c->cd(4);cl_Ppf->Draw();
153 c->cd(5);ev_RerrPhi->Fit(
"gaus",
"R",
"",-100,100);
154 c->cd(6);ev_RdPhi_R->Draw(
"colz");
160 can=
new TCanvas(
"aa",
"aa",500,280); TPad *c=makeTitle(can,core,page);
161 c->Divide(2,1);gStyle->SetOptStat(111111);
162 c->cd(1);cl_rpMul->Draw(
"colz");
169 can=
new TCanvas(
"aa",
"aa",800,420); TPad *c=makeTitle(can,core,page);
170 c->Divide(2,1);gStyle->SetOptStat(0);gStyle->SetOptFit(1);
172 c->cd(1);spreadFit(ev_dRad_R->RebinX(nReb,
"dRreb"));
173 c->cd(2);spreadFit(ev_RdPhi_R->RebinX(nReb,
"RdPreb"));
179 can=
new TCanvas(
"aa",
"aa",1100,850); TPad *c=makeTitle(can,core,page);
180 c->Divide(3,2);gStyle->SetOptStat(111111);
181 c->cd(1);cl_rpMul->Draw(
"colz");
182 c->cd(4);ev_Stat1D->Draw(); ev_Stat1D->SetAxisRange(0,6);
183 float yy=ev_Stat1D->GetMaximum();
184 ev_Stat1D->SetMinimum(yy*.75);
185 c->cd(2);ev_errRad->Fit(
"gaus",
"R",
"",-200,200);
186 c->cd(3);ev_dRad_R->Draw(
"colz");
188 c->cd(5);ev_RerrPhi->Fit(
"gaus",
"R",
"",-60,60);
189 c->cd(6);ev_RdPhi_R->Draw(
"colz");
195 can=
new TCanvas(
"aa",
"aa",500,280); TPad *c=makeTitle(can,core,page);
197 c->cd(1);cl_RmxAmp->Fit(
"landau",
"R",
"",seedThres,99999);
198 c->cd(2);cl_PmxAmp->Fit(
"landau",
"R",
"",seedThres,99999);
204 can=
new TCanvas(
"aa",
"aa",1100,400); TPad *c=makeTitle(can,core,page);
205 c->Divide(3,1);gStyle->SetOptStat(1111);
206 c->cd(1);ev_Stat1D->Draw(); ev_Stat1D->SetAxisRange(0,6);
207 float yy=ev_Stat1D->GetMaximum();
208 ev_Stat1D->SetMinimum(yy*.75);
209 c->cd(2);ev_errRad->Fit(
"gaus",
"R",
"",-200,200);
210 c->cd(3);ev_RerrPhi->Fit(
"gaus",
"R",
"",-60,60);
216 can=
new TCanvas(
"aa",
"aa",900,750); TPad *c=makeTitle(can,core,page);
217 c->Divide(3,2);gStyle->SetOptStat(1111);
218 c->cd(1);cl_RmxAmp->Fit(
"landau",
"R",
"",seedThres,99999);
219 c->cd(2);cl_Rpf->Draw();
220 c->cd(3);ev_errRad->Fit(
"gaus",
"R",
"",-200,200);
222 c->cd(4);cl_PmxAmp->Fit(
"landau",
"R",
"",seedThres,99999);
223 c->cd(5);cl_Ppf->Draw();
224 c->cd(6);ev_RerrPhi->Fit(
"gaus",
"R",
"",-80,80);
230 can=
new TCanvas(
"aa",
"aa",1100,800); TPad *c=makeTitle(can,core,page);
231 c->Divide(3,2);gStyle->SetOptStat(111111);
232 c->cd(4);ev_RokXY->Draw(
"colz");
234 c->cd(1);ev_Stat1D->Draw(); ev_Stat1D->SetAxisRange(0,6);
235 float yy=ev_Stat1D->GetMaximum();
236 ev_Stat1D->SetMinimum(yy*.75);
239 c->cd(2);ev_RerrPhi->Fit(
"gaus",
"R",
"",-100,100);
241 c->cd(3);spreadFit(ev_RdPhi_R->RebinX(nReb,
"RdPreb"),370);
243 c->cd(5);ev_errRad->Fit(
"gaus",
"R",
"",-300,300);
244 c->cd(6);spreadFit(ev_dRad_R->RebinX(nReb,
"dRreb"),370);
251 printf(
"page=%d NOT defined\n",page);
256 sprintf(text,
"%s_page%03d",core,page);
262 if(pl&1) can->Print(tit+
".gif");
263 if(pl&2) can->Print(tit+
".ps");
269 TPad *makeTitle(TCanvas *c,
char *core,
int page) {
272 TPad *pad0 =
new TPad(
"pad0",
"apd0",0.0,0.95,1.,1.);
276 TPaveText *pt =
new TPaveText(0,0.,1,1,
"br");
289 pad =
new TPad(
"pad1",
"apd1",0.0,0.0,1,.95);
295 void doStat(
char *name0,
char *name3){
296 printf(
"->%s<\n",name0);
297 h0=(TH1*)fd->Get(name0); assert(h0);
298 int nEve=h0->GetEntries()/ h0->GetNbinsX();
299 printf(
"nEve=%d\n",nEve);
301 h3=(TH1F*)fd->Get(name3); assert(h3);
302 int nb=h3->GetNbinsX();
304 for(i=1; i<=nb;i++) {
305 float y=h3->GetBinContent(i);
309 float er=sqrt(y)/nEve;
310 if(r>0.001){ printf(
"* "); n1++;}
314 printf(
" HankCh=%d failProb=%.3f +/- %.3f\n", i-1,r,er);
316 printf(
"bigErr n1=%d n=%d\n",n1,n);
322 spreadFit( TH2* h2,
double Ymx=370) {
324 ln0=
new TLine(0,0,450,0); ln0->SetLineColor(kBlack);ln0->SetLineWidth(2.);
325 ln0->SetLineStyle(2);
326 TString tt=h2->GetName();
327 h2->GetListOfFunctions()->Clear();
328 TString tt=h2->GetName();
330 TH1D*hd= (TH1D*)gROOT->FindObject(tt+
"_1");
331 h2->SetAxisRange(-Ymx,Ymx,
"y");
333 hd->SetMarkerStyle(20);
339 memset(er1,0,
sizeof(er1));
341 TH1D *he= (TH1D*)gROOT->FindObject(tt+
"_2");
342 he->Fit(
"pol1",
"",
"same");
344 TH1D *yu=(TH1D*) hd->Clone(); yu->SetLineColor(kMagenta);
345 yu->Add(he); yu->SetError(er1);yu->SetLineWidth(2.);
348 TH1D *yd=(TH1D*) hd->Clone();
349 yd->Add(he,-1); yd->SetError(er1); yd->SetLineColor(kMagenta);
350 yd->Draw(
"same");yd->SetLineWidth(2.);
357 plAll(
char *core=
"d1") {
359 for(i=1; i<=4; i++) plFgtSS(i,core,2);
360 for(i=6; i<=7; i++) plFgtSS(i,core,2);