5 TFile f("SDD_histos_test.root");
10 a = local->ProjectionX();
11 t = local->ProjectionY();
13 TF1 *faa = new TF1("faa","gaus",-100.,100.);
14 a->Fit("faa","R","Q",-100.,100.);
15 TF1 *fat = new TF1("fat","gaus",-50,50);
16 t->Fit("fat","R","Q",-50,50);
18 TH1F *anode_resolution = new TH1F("anoder","Anode resolution vs Drift Path",nbins,0.,dmax);
20 Float_t res_anodes[nbins];
21 Float_t errres_anodes[nbins];
24 for(Int_t i=0;i<nbins;i++){
27 TString *aa = new TString("aa_");
31 anodes[i] = at->ProjectionY(aa->Data(),i,i+1);
32 TF1 *fa = new TF1("fa","gaus",-1.*dmin,dmin);
33 anodes[i]->Fit("fa","R","Q",-1.*dmin,dmin);
34 res_anodes[i] = fa->GetParameter(2);
35 Float_t RMS = anodes[i]->GetRMS();
36 //if(res_anodes[i] > RMS)
38 errres_anodes[i] = fa->GetParError(2);
39 anode_resolution->Fill(i*dmax/nbins+dmax/(2*nbins),res_anodes[i]);
40 anode_resolution->SetBinError(i+1,(Stat_t) errres_anodes[i]);
41 anode_resolution->SetMarkerColor(2);
42 anode_resolution->SetLineColor(2);
47 TH1F *time_resolution = new TH1F("timer","Time resolution vs Drift Path",nbins,0.,dmax);
49 Float_t res_times[nbins];
50 Float_t errres_times[nbins];
51 for(Int_t i=0;i<nbins;i++){
52 TString *ta = new TString("tt_");
56 times[i] = tt->ProjectionY(ta->Data(),i,i+1);
57 TF1 *ft = new TF1("ft","gaus",-50,50);
58 times[i]->Fit("ft","R","Q",-50,50);
59 res_times[i] = ft->GetParameter(2);
60 Float_t RMS = times[i]->GetRMS();
61 //if(res_times[i] > RMS)
63 errres_times[i] = ft->GetParError(2);
64 time_resolution->Fill(i*dmax/nbins+dmax/(2*nbins),res_times[i]);
65 time_resolution->SetBinError(i+1,(Stat_t) errres_times[i]);
66 time_resolution->SetMarkerColor(6);
67 time_resolution->SetLineColor(6);
74 TMarker *m1 = new TMarker(x1,y1,21);
75 TMarker *m2 = new TMarker(x2,y2,22);
76 Text_t *text1 = "Anode";
77 Text_t *text2 = "Time";
78 TText *t1 = new TText(x1 + 250,y1-2,text1);
79 TText *t2 = new TText(x2 + 250,y2-2,text2);
81 anode_resolution->SetMarkerStyle(21);
82 anode_resolution->SetMaximum(100.);
83 time_resolution->SetMarkerStyle(23);
87 c1->SaveAs("ITS_at.ps");
91 c1->SaveAs("ITS_tt.ps");
97 nanodes_pfx->SetLineColor(2);
98 nanodes_pfx->Draw("SAME");
99 c1->SaveAs("ITS_clsize.ps");
102 anoder->SetMinimum(0.);
104 anoder->SetXTitle("Drift Path (mm)");
105 anoder->SetYTitle("Resolution (um)");
106 TMarker *mk0 = new TMarker(16.,54.,23);
107 mk0->SetMarkerColor(6);
109 TMarker *mk3 = new TMarker(16.,46.,21);
110 mk3->SetMarkerColor(2);
112 Text_t *text = "294 um pitch detector";
113 TText *t3 = new TText(2,90,text);
114 Text_t *text0 = "Spatial Resolution";
115 TText *t0 = new TText(2,82,text0);
116 Text_t *text2 = "Simulation (Anode)";
117 TText *t2 = new TText(18,44,text2);
118 Text_t *text4 = "Simulation (Time)";
119 TText *t4 = new TText(18,52,text4);
125 c1->SaveAs("ITS_res_check_294.ps");
128 nanodes_pfx->SetXTitle("Drift Time (ns)");
129 nanodes_pfx->SetYTitle("Anodes/Cluster");
130 nanodes_pfx->SetMaximum(3.);
131 nanodes_pfx->SetMarkerStyle(21);
132 nanodes_pfx->SetLineColor(2);
133 nanodes_pfx->SetMarkerColor(2);
135 TMarker *mk2 = new TMarker(4000.,0.3,21);
136 mk2->SetMarkerColor(2);
138 Text_t *text = "294 um pitch detector";
139 TText *t3 = new TText(200,2.7,text);
140 Text_t *text0 = "Average Number of Anodes/Cluster";
141 TText *t0 = new TText(200,2.4,text0);
142 Text_t *text2 = "Simulation";
143 TText *t2 = new TText(4200,0.2,text2);
147 c1->SaveAs("ITS_and_check_294.ps");
150 nsampls_pfx->SetXTitle("Drift Time (ns)");
151 nsampls_pfx->SetYTitle("Time bins/Anode/Cluster");
152 nsampls_pfx->SetMaximum(10.);
153 nsampls_pfx->SetMarkerStyle(21);
154 nsampls_pfx->SetLineColor(2);
155 nsampls_pfx->SetMarkerColor(2);
157 TMarker *mk2 = new TMarker(4000.,1.,21);
158 mk2->SetMarkerColor(2);
160 Text_t *text = "294 um pitch detector";
161 TText *t3 = new TText(200,9.,text);
162 Text_t *text0 = "Average Number of Time bins/Anode/Cluster";
163 TText *t0 = new TText(200,8.,text0);
164 Text_t *text2 = "Simulation";
165 TText *t2 = new TText(4200,0.8,text2);
169 c1->SaveAs("ITS_tim_check_294.ps");
173 amplit_pfx->SetLineColor(2);
174 amplit_pfx->SetMaximum(500.);
175 amplit_pfx->SetMarkerStyle(21);
176 amplit_pfx->SetMarkerColor(2);
178 TMarker *mk2 = new TMarker(500.,50,21);
179 mk2->SetMarkerColor(2);
181 Text_t *text = "294 um pitch detector";
182 TText *t3 = new TText(1000,450.,text);
183 Text_t *text0 = "Peak Amplitude";
184 TText *t0 = new TText(1000,400.,text0);
185 Text_t *text2 = "Simulation";
186 TText *t2 = new TText(700,40.,text2);
190 c1->SaveAs("ITS_amp_check_294.ps");
194 chp_pfx->SetLineColor(2);
195 chp_pfx->SetMaximum(2000.);
196 chp_pfx->SetMarkerStyle(21);
197 chp_pfx->SetMarkerColor(2);
199 TMarker *mk2 = new TMarker(500.,200.,21);
200 mk2->SetMarkerColor(2);
202 Text_t *text = "294 um pitch detector";
203 TText *t3 = new TText(300,1800.,text);
204 Text_t *text0 = "Total Charge";
205 TText *t0 = new TText(300,1600.,text0);
206 Text_t *text2 = "Simulation";
207 TText *t2 = new TText(700,150.,text2);
211 c1->SaveAs("ITS_cha_check_294.ps");
213 TH1F *eff = f.Get("rec_vs_time");
214 TH1F *efh = f.Get("hit_vs_time");
217 TH1F *effn = new TH1F("effn","Efficiency vs. drift path (mm)",18,0.,36.);
218 effn->SetMinimum(0.9);
220 for(Int_t i=1;i<=36;i++) {
221 Float_t cont = eff->GetBinContent(i);
223 cont += eff->GetBinContent(i);
225 effn->SetBinContent(i/2,cont);
228 effn->SetXTitle("Drift Path (mm)");
229 effn->SetYTitle("Reconstruction Efficiency");
230 effn->SetMaximum(1.2);
231 effn->SetMinimum(0.6);
232 effn->SetMarkerStyle(21);
233 effn->SetLineColor(2);
234 effn->SetMarkerColor(2);
236 TMarker *mk2 = new TMarker(20.,0.7,21);
237 mk2->SetMarkerColor(2);
239 Text_t *text = "294 um pitch detector";
240 TText *t3 = new TText(2.,1.13,text);
241 Text_t *text2 = "Simulation";
242 TText *t2 = new TText(22,0.685,text2);
246 c1->SaveAs("ITS_eff_check_294.ps");
250 ntotal->SetMarkerStyle(21);
251 ntotal->SetLineColor(2);
252 ntotal->SetMarkerColor(2);
253 ntotal_pfx->SetMaximum(20);
254 ntotal_pfx->SetMarkerStyle(21);
255 ntotal_pfx->SetMarkerColor(2);
256 ntotal_pfx->SetLineColor(2);
257 ntotal_pfx->SetXTitle("Drift Time (ns)");
258 ntotal_pfx->SetYTitle("N_total");
261 TH1F *nsi = new TH1F("nsi","nsi",28,0.,7000.);
262 for(Int_t i=1;i<=28;i++) {
264 Float_t tscal = nsampls_pfx->GetBinContent(i);
265 Float_t cont = nanodes_pfx->GetBinContent(i);
267 nsi->SetMaximum(20.);
268 nsi->SetBinContent(i,cont);
270 nsi->SetMarkerStyle(21);
271 nsi->SetMarkerColor(2);
272 nsi->SetLineColor(2);
275 TMarker *mk2 = new TMarker(300.,2.,21);
276 mk2->SetMarkerColor(2);
278 Text_t *text = "294 um pitch detector";
279 TText *t3 = new TText(300.,18.,text);
280 Text_t *text2 = "Simulation";
281 TText *t2 = new TText(500,1.8,text2);
285 c1->SaveAs("ITS_ncl_check_294.ps");