14 void t0_ana(TString input)
19 gStyle->SetTitleOffset(1.25);
20 gStyle->SetCanvasBorderMode(0);
21 gStyle->SetPadBorderMode(0);
22 gStyle->SetPadColor(0);
23 gStyle->SetCanvasColor(0);
24 gStyle->SetTitleColor(0);
25 gStyle->SetStatColor(0);
26 gStyle->SetPalette(1);
27 gStyle->SetOptStat(0);
33 TCanvas *c1 =
new TCanvas(
"c1",
"RadialStep West",200,10,700,500);
34 TCanvas *c2 =
new TCanvas(
"c2",
"RadialStep East",230,40,730,530);
35 TCanvas *c3 =
new TCanvas(
"c3",
"RadialStep East/West (fit)",260,70,760,560);
36 TCanvas *c4 =
new TCanvas(
"c4",
"Diff. RadialStep East/West (fit)",290,100,790,590);
40 cout<<
"T0 summary..."<<endl;
44 leg =
new TLegend(0.126,0.5,0.3,0.9);
45 leg->SetTextSize(0.03);
52 const Float_t rinner=7.73;
54 Float_t stepw[anz],dt[anz],stepe[anz];
55 Float_t dstepw[anz], dstepe[anz];
59 for (
int i=mindt;i<=maxdt;i++)
62 TString filename=input;
74 filename +=
"_0_t0.root";
76 sprintf(t,
"%.2f",step);
80 sprintf(t,
"%.2f",step);
84 filename +=
"_0_t0.root";
87 cout<<
"Process file "<<filename<<endl;
89 TFile *f =
new TFile(filename);
95 TH1F *rstep=
new TH1F();
96 TH1F *rstep2=
new TH1F();
98 TString title=
"#Delta_{t0} = ";
102 rstep=(TH1F*) f->Get(
"rad_west");
103 rstep->SetName(title);
108 rstep2=(TH1F*) f->Get(
"rad_east");
109 rstep2->SetName(title);
118 rstep->SetMarkerStyle(22);
119 rstep2->SetMarkerStyle(22);
126 rstep->SetMarkerColor((i)+10);
127 rstep->SetLineColor((i)+10);
128 rstep2->SetMarkerColor((i)+10);
129 rstep2->SetLineColor((i)+10);
137 rstep->SetMarkerColor((i)+40);
138 rstep->SetLineColor((i)+40);
139 rstep2->SetMarkerColor((i)+40);
140 rstep2->SetLineColor((i)+40);
150 rstep->DrawCopy(
"h");
152 rstep2->DrawCopy(
"h");
157 rstep->DrawCopy(
"hsame");
159 rstep2->DrawCopy(
"hsame");
162 leg->AddEntry(title,title,
"l");
166 Float_t maxrad=rstep->GetXaxis()->GetBinCenter(rstep->GetMaximumBin());
167 Float_t maxrad2=rstep->GetXaxis()->GetBinCenter(rstep2->GetMaximumBin());
178 TF1 *gfit=
new TF1(
"gfit",
"gaus",minrad,maxrad+delta);
180 rstep->Fit(gfit,
"NQR");
182 stepw[zaehl]=(gfit->GetParameter(1)-gfit->GetParameter(2));
183 dstepw[zaehl]=fabs(rinner-(gfit->GetParameter(1)-gfit->GetParameter(2)));
186 TF1 *gfit2=
new TF1(
"gfit2",
"gaus",minrad,maxrad2+delta);
188 rstep2->Fit(gfit2,
"NQR");
190 stepe[zaehl]=(gfit2->GetParameter(1)-gfit2->GetParameter(2));
191 dstepe[zaehl]=fabs(rinner-(gfit2->GetParameter(1)-gfit2->GetParameter(2)));
209 TH2F *hr=
new TH2F(
"hr",
"RadiusStep vs. #Delta_{t0} (read=east/ black=west)",100,(mindt/10.0)-0.25,
int (maxdt/10)+0.25,100,5,10);
212 TLine *inner=
new TLine(mindt/10.0,7.73,((maxdt)/10.0),7.73);inner->SetLineColor(3);inner->Draw(
"same");
214 TGraph *gw=
new TGraph(anz,dt,stepw);
215 gw->SetMarkerStyle(21);
216 gw->SetMarkerSize(1);
217 gw->SetMarkerColor(1);
220 TGraph *ge=
new TGraph(anz,dt,stepe);
221 ge->SetMarkerStyle(21);
222 ge->SetMarkerSize(1);
223 ge->SetMarkerColor(2);
231 TH2F *hr1=
new TH2F(
"hr1",
"abs(Radius_{inner}-RadiusStep) vs. #Delta_{t0} (read=east/ black=west)",100,(mindt/10.0)-0.25,
int (maxdt/10)+0.25,100,-0.25,1.25);
234 TGraph *gwd=
new TGraph(anz,dt,dstepw);
235 gwd->SetMarkerStyle(21);
236 gwd->SetMarkerSize(1);
237 gwd->SetMarkerColor(1);
238 gwd->SetLineColor(1);
240 TGraph *ged=
new TGraph(anz,dt,dstepe);
241 ged->SetMarkerStyle(21);
242 ged->SetMarkerSize(1);
243 ged->SetMarkerColor(2);
244 ged->SetLineColor(2);