Rev 84 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 84 | Rev 85 | ||
---|---|---|---|
Line 88... | Line 88... | ||
88 | { |
88 | { |
89 | if(show_data) { |
89 | if(show_data) { |
90 | char sbuff[256]; |
90 | char sbuff[256]; |
91 | sprintf(sbuff, "SiPM = %.1lf, L.y. = %.2lf, d = %.1lf | gap = (%.1lf, %.1lf, %.1lf), #theta = %.1lf | acceptance = %.3lf", |
91 | sprintf(sbuff, "SiPM = %.1lf, L.y. = %.2lf, d = %.1lf | gap = (%.1lf, %.1lf, %.1lf), #theta = %.1lf | acceptance = %.3lf", |
92 | parameters.getA(), parameters.getLightYield()*acc, parameters.getD(), |
92 | parameters.getA(), parameters.getLightYield()*acc, parameters.getD(), |
93 | parameters.getGap().x(), parameters.getGap().y(), parameters.getGap().z(), theta, acc); |
93 | parameters.getGap().x(), parameters.getGap().y(), parameters.getGap().z(), theta, acc*100); |
94 | 94 | ||
95 | if(!only2d) { |
95 | if(!only2d) { |
96 | RTCanvas *cdata = new RTCanvas((char*)"Data", sbuff, 350, 0, 950, 950); |
96 | RTCanvas *cdata = new RTCanvas((char*)"Data", sbuff, 350, 0, 950, 950); |
97 | cdata->Divide(3,3); |
97 | cdata->Divide(3,3); |
98 | int cpc = 1; |
98 | int cpc = 1; |
99 | cdata->cd(cpc++); |
99 | cdata->cd(cpc++); |
100 | TH2F* generated = detector->GetGenerated(); |
100 | TH2F* generated = detector->GetGenerated(); |
101 |
|
101 | double nGenerated = generated->GetEntries(); |
102 |
|
102 | //int minimum = generated->GetBinContent(generated->GetMinimumBin()); |
103 | int maximum = generated->GetBinContent(generated->GetMaximumBin()); |
103 | int maximum = generated->GetBinContent(generated->GetMaximumBin()); |
104 | generated->GetZaxis()->SetRangeUser(0, 1.05*maximum); |
104 | generated->GetZaxis()->SetRangeUser(0, 1.05*maximum); |
105 |
|
105 | //double variation = (maximum-minimum)/(double)nGenerated; |
106 | printf("Statistical variation (max-min)/all = %f perc. \n", variation*100); |
- | |
107 | generated->SetTitle("Generated"); |
106 | generated->SetTitle("Generated"); |
108 | generated->Draw("colz"); |
107 | generated->Draw("colz"); |
109 | cdata->cd(cpc++); //((detector->GetLG())->GetHIn())->Draw("COLZ"); |
108 | cdata->cd(cpc++); //((detector->GetLG())->GetHIn())->Draw("COLZ"); |
110 | TH2F* histoPlate = detector->GetHPlate(); |
109 | TH2F* histoPlate = detector->GetHPlate(); |
111 | histoPlate->Draw("COLZ"); |
110 | histoPlate->Draw("COLZ"); |
Line 113... | Line 112... | ||
113 | TH2F* histoGlass = (detector->GetHGlass()); |
112 | TH2F* histoGlass = (detector->GetHGlass()); |
114 | histoGlass->Draw("COLZ"); |
113 | histoGlass->Draw("COLZ"); |
115 | 114 | ||
116 | cdata->cd(cpc++); |
115 | cdata->cd(cpc++); |
117 | TH2F* histoActive = (detector->GetHActive()); |
116 | TH2F* histoActive = (detector->GetHActive()); |
- | 117 | //double nAccepted = histoActive->GetEntries(); |
|
- | 118 | //double variation = 1 / sqrt(nAccepted); |
|
- | 119 | double variation = sqrt(acc*(1-acc)/nGenerated); |
|
- | 120 | printf("Statistical error = %f perc.\n", variation*100); |
|
118 | histoActive->Draw("COLZ"); |
121 | histoActive->Draw("COLZ"); |
119 | cdata->cd(cpc++); |
122 | cdata->cd(cpc++); |
120 | TH2F* histoLaser = (detector->GetHLaser()); |
123 | TH2F* histoLaser = (detector->GetHLaser()); |
121 | histoLaser->Draw("COLZ"); |
124 | histoLaser->Draw("COLZ"); |
122 | cdata->cd(cpc++); |
125 | cdata->cd(cpc++); |