4 plFgtSS(
int page=1,
char *core=
"d1",
int pl=0){
7 TString fullInpName=path; fullInpName+=core;
8 fullInpName+=
".fgt.hist.root";
12 fd=
new TFile(fullInpName);
14 printf(
"EROR: input histo file not found, quit\n",fullInpName.Data());
18 gStyle->SetPalette(1,0);
20 char *nameA[]={
"ss_inDE",
"ss_inDS",
"ss_inZ",
"ss_hitStat",
"ss_inXY",
"ss_cTof",
"ss_inR",
"ss_cPmag",
"ss_gXY1"};
21 char *nameB[]={
"fr_pairEne",
"fr_nPrimPair",
"fr_totEne",
"fr_nTotPair",
"fr_pathL",
"fr_avrTPath"};
22 char *nameC[]={
"ss_hitStat",
"cl_Stat1D",
"ev_Stat1D"};
27 can=
new TCanvas(
"aa",
"aa",800,500); TPad *c=makeTitle(can,core,page);
28 c->Divide(1,3);gStyle->SetOptStat(111111);
30 for(
int i=0;i<3;i++) {
31 printf(
"->%s<\n",nameX[i]);
32 h=(TH1*)fd->Get(nameX[i]); assert(h);
33 c->cd(i+1); h->Draw();
41 can=
new TCanvas(
"aa",
"aa",800,700); TPad *c=makeTitle(can,core,page);
46 printf(
"->%s<\n",nameX[i]);
47 h=(TH1*)fd->Get(nameX[i]); assert(h);
48 c->cd(i+1); h->Draw();
49 if(i==4|| i==8) h->Draw(
"colz");
50 if(i==3)
if(h->GetEntries()>0) c->GetPad(1+i)->SetLogz();
56 can=
new TCanvas(
"aa",
"aa",800,420); TPad *c=makeTitle(can,core,page);
58 c->cd(1);ss_inXY->Draw(
"colz");
59 c->cd(2);digXY->Draw(
"colz");
64 can=
new TCanvas(
"aa",
"aa",400,420); TPad *c=makeTitle(can,core,page);
65 digXY->SetAxisRange(14.,15.,
"x");
66 digXY->SetAxisRange(35.,36.,
"y");
72 can=
new TCanvas(
"aa",
"aa",800,420); TPad *c=makeTitle(can,core,page);
73 c->Divide(1,2);gStyle->SetOptStat(1001111);
74 c->cd(1);digRad->Draw();
75 c->cd(2);digPhi->Draw();
80 can=
new TCanvas(
"aa",
"aa",800,500); TPad *c=makeTitle(can,core,page);
83 for(
int i=0;i<6;i++) {
84 printf(
"->%s<\n",nameX[i]);
85 h=(TH1*)fd->Get(nameX[i]); assert(h);
86 c->cd(i+1); h->Draw();
87 if(i==5) { h->SetAxisRange(0,2);}
93 can=
new TCanvas(
"aa",
"aa",800,550); TPad *c=makeTitle(can,core,page);
94 c->Divide(3,2);gStyle->SetOptStat(111111);
95 c->cd(1);cl_RmxAmp->Draw();
96 cl_RmxAmp->Fit(
"landau",
"R",
"",seedThres,99999);
98 c->cd(2);cl_Rwid->Draw();
99 c->cd(4);cl_Rpf->Draw();
102 ev_errRad->Fit(
"gaus");
103 c->cd(6);ev_dRad_R->Draw(
"colz");
109 can=
new TCanvas(
"aa",
"aa",800,550); TPad *c=makeTitle(can,core,page);
110 c->Divide(3,2);gStyle->SetOptStat(111111);
111 c->cd(1);cl_PmxAmp->Draw();cl_PmxAmp->Fit(
"landau",
"R",
"",seedThres,99999);
113 c->cd(2);cl_Pwid->Draw();
114 c->cd(4);cl_Ppf->Draw();
115 c->cd(5);ev_RerrPhi->Fit(
"gaus",
"R",
"",-100,100);
116 c->cd(6);ev_RdPhi_R->Draw(
"colz");
122 can=
new TCanvas(
"aa",
"aa",500,280); TPad *c=makeTitle(can,core,page);
123 c->Divide(2,1);gStyle->SetOptStat(111111);
124 c->cd(1);cl_rpMul->Draw(
"colz");
131 can=
new TCanvas(
"aa",
"aa",800,420); TPad *c=makeTitle(can,core,page);
132 c->Divide(2,1);gStyle->SetOptStat(0);gStyle->SetOptFit(1);
134 c->cd(1);spreadFit(ev_dRad_R->RebinX(nReb,
"dRreb"));
135 c->cd(2);spreadFit(ev_RdPhi_R->RebinX(nReb,
"RdPreb"));
141 can=
new TCanvas(
"aa",
"aa",1100,850); TPad *c=makeTitle(can,core,page);
142 c->Divide(3,2);gStyle->SetOptStat(111111);
143 c->cd(1);cl_rpMul->Draw(
"colz");
144 c->cd(4);ev_Stat1D->Draw(); ev_Stat1D->SetAxisRange(0,6);
145 float yy=ev_Stat1D->GetMaximum();
146 ev_Stat1D->SetMinimum(yy*.75);
147 c->cd(2);ev_errRad->Fit(
"gaus",
"R",
"",-200,200);
148 c->cd(3);ev_dRad_R->Draw(
"colz");
150 c->cd(5);ev_RerrPhi->Fit(
"gaus",
"R",
"",-60,60);
151 c->cd(6);ev_RdPhi_R->Draw(
"colz");
157 can=
new TCanvas(
"aa",
"aa",500,280); TPad *c=makeTitle(can,core,page);
159 c->cd(1);cl_RmxAmp->Fit(
"landau",
"R",
"",seedThres,99999);
160 c->cd(2);cl_PmxAmp->Fit(
"landau",
"R",
"",seedThres,99999);
166 can=
new TCanvas(
"aa",
"aa",1100,400); TPad *c=makeTitle(can,core,page);
167 c->Divide(3,1);gStyle->SetOptStat(1111);
168 c->cd(1);ev_Stat1D->Draw(); ev_Stat1D->SetAxisRange(0,6);
169 float yy=ev_Stat1D->GetMaximum();
170 ev_Stat1D->SetMinimum(yy*.75);
171 c->cd(2);ev_errRad->Fit(
"gaus",
"R",
"",-200,200);
172 c->cd(3);ev_RerrPhi->Fit(
"gaus",
"R",
"",-60,60);
178 can=
new TCanvas(
"aa",
"aa",900,750); TPad *c=makeTitle(can,core,page);
179 c->Divide(3,2);gStyle->SetOptStat(1111);
180 c->cd(1);cl_RmxAmp->Fit(
"landau",
"R",
"",seedThres,99999);
181 c->cd(2);cl_Rpf->Draw();
182 c->cd(3);ev_errRad->Fit(
"gaus",
"R",
"",-200,200);
184 c->cd(4);cl_PmxAmp->Fit(
"landau",
"R",
"",seedThres,99999);
185 c->cd(5);cl_Ppf->Draw();
186 c->cd(6);ev_RerrPhi->Fit(
"gaus",
"R",
"",-80,80);
192 can=
new TCanvas(
"aa",
"aa",1100,800); TPad *c=makeTitle(can,core,page);
193 c->Divide(3,2);gStyle->SetOptStat(111111);
194 c->cd(4);ev_RokXY->Draw(
"colz");
196 c->cd(1);ev_Stat1D->Draw(); ev_Stat1D->SetAxisRange(0,6);
197 float yy=ev_Stat1D->GetMaximum();
198 ev_Stat1D->SetMinimum(yy*.75);
201 c->cd(2);ev_RerrPhi->Fit(
"gaus",
"R",
"",-100,100);
203 c->cd(3);spreadFit(ev_RdPhi_R->RebinX(nReb,
"RdPreb"),370);
205 c->cd(5);ev_errRad->Fit(
"gaus",
"R",
"",-300,300);
206 c->cd(6);spreadFit(ev_dRad_R->RebinX(nReb,
"dRreb"),370);
213 printf(
"page=%d NOT defined\n",page);
218 sprintf(text,
"%s_page%03d",core,page);
224 if(pl&1) can->Print(tit+
".gif");
225 if(pl&2) can->Print(tit+
".ps");
231 TPad *makeTitle(TCanvas *c,
char *core,
int page) {
234 TPad *pad0 =
new TPad(
"pad0",
"apd0",0.0,0.95,1.,1.);
238 TPaveText *pt =
new TPaveText(0,0.,1,1,
"br");
251 pad =
new TPad(
"pad1",
"apd1",0.0,0.0,1,.95);
257 void doStat(
char *name0,
char *name3){
258 printf(
"->%s<\n",name0);
259 h0=(TH1*)fd->Get(name0); assert(h0);
260 int nEve=h0->GetEntries()/ h0->GetNbinsX();
261 printf(
"nEve=%d\n",nEve);
263 h3=(TH1F*)fd->Get(name3); assert(h3);
264 int nb=h3->GetNbinsX();
266 for(i=1; i<=nb;i++) {
267 float y=h3->GetBinContent(i);
271 float er=sqrt(y)/nEve;
272 if(r>0.001){ printf(
"* "); n1++;}
276 printf(
" HankCh=%d failProb=%.3f +/- %.3f\n", i-1,r,er);
278 printf(
"bigErr n1=%d n=%d\n",n1,n);
284 spreadFit( TH2* h2,
double Ymx=370) {
286 ln0=
new TLine(0,0,450,0); ln0->SetLineColor(kBlack);ln0->SetLineWidth(2.);
287 ln0->SetLineStyle(2);
288 TString tt=h2->GetName();
289 h2->GetListOfFunctions()->Clear();
290 TString tt=h2->GetName();
292 TH1D*hd= (TH1D*)gROOT->FindObject(tt+
"_1");
293 h2->SetAxisRange(-Ymx,Ymx,
"y");
295 hd->SetMarkerStyle(20);
301 memset(er1,0,
sizeof(er1));
303 TH1D *he= (TH1D*)gROOT->FindObject(tt+
"_2");
304 he->Fit(
"pol1",
"",
"same");
306 TH1D *yu=(TH1D*) hd->Clone(); yu->SetLineColor(kMagenta);
307 yu->Add(he); yu->SetError(er1);yu->SetLineWidth(2.);
310 TH1D *yd=(TH1D*) hd->Clone();
311 yd->Add(he,-1); yd->SetError(er1); yd->SetLineColor(kMagenta);
312 yd->Draw(
"same");yd->SetLineWidth(2.);
319 plAll(
char *core=
"d1") {
321 for(i=1; i<=3; i++) plFgtSS(i,core,2);
322 for(i=6; i<=10; i++) plFgtSS(i,core,2);
323 for(i=101; i<=105; i++) plFgtSS(i,core,2);