Rev 25 | Rev 70 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 25 | Rev 54 | ||
|---|---|---|---|
| Line 151... | Line 151... | ||
| 151 | { |
151 | { |
| 152 | //printf(" gap (x,y,z) | theta phi | Back | Loss | Total| Miss | Exit | Acceptance\n"); |
152 | //printf(" gap (x,y,z) | theta phi | Back | Loss | Total| Miss | Exit | Acceptance\n"); |
| 153 | printf("Acceptance\n"); |
153 | printf("Acceptance\n"); |
| 154 | } |
154 | } |
| 155 | //----------------------------------------------------------------------------- |
155 | //----------------------------------------------------------------------------- |
| 156 | void PrintGuideStat( |
156 | void PrintGuideStat(double acceptance) |
| 157 | { |
157 | { |
| 158 | /*int n_active = (detector->GetHActive())->GetEntries(); |
158 | /*int n_active = (detector->GetHActive())->GetEntries(); |
| 159 | int n_enter = (detector->GetLG())->GetEnteranceHits(); |
159 | int n_enter = (detector->GetLG())->GetEnteranceHits(); |
| 160 | double izkoristek = n_active/(double)n_enter; |
160 | double izkoristek = n_active/(double)n_enter; |
| 161 | int fates[7]; (detector->GetLG())->GetVFate(fates); |
161 | int fates[7]; (detector->GetLG())->GetVFate(fates); |
| Line 166... | Line 166... | ||
| 166 | (detector->GetVGap()).x(), (detector->GetVGap()).y(), (detector->GetVGap()).z(), theta, phi); |
166 | (detector->GetVGap()).x(), (detector->GetVGap()).y(), (detector->GetVGap()).z(), theta, phi); |
| 167 | for(int i=0;i<5;i++) printf("%5.1lf |", 100.0*fates[i]/(double)n_enter); |
167 | for(int i=0;i<5;i++) printf("%5.1lf |", 100.0*fates[i]/(double)n_enter); |
| 168 | |
168 | |
| 169 | printf("%5.1lf\n", 100.0*izkoristek);*/ |
169 | printf("%5.1lf\n", 100.0*izkoristek);*/ |
| 170 | 170 | ||
| 171 |
|
171 | //double n_active = (detector->GetHActive())->GetEntries(); |
| 172 |
|
172 | //double r_acc = 100.0 * n_active / n_in; |
| - | 173 | double r_acc = 100.0 * acceptance; |
|
| 173 | printf("%7.3lf\n", r_acc); |
174 | printf("%7.3lf\n", r_acc); |
| 174 | } |
175 | } |
| 175 | //----------------------------------------------------------------------------- |
176 | //----------------------------------------------------------------------------- |
| 176 | 177 | ||
| 177 | //----------------------------------------------------------------------------- |
178 | //----------------------------------------------------------------------------- |
| Line 266... | Line 267... | ||
| 266 | 267 | ||
| 267 | if(i < show_rays) |
268 | if(i < show_rays) |
| 268 | detector->Propagate(*ray0, ray1, show_3d); |
269 | detector->Propagate(*ray0, ray1, show_3d); |
| 269 | else |
270 | else |
| 270 | detector->Propagate(*ray0, ray1, 0); |
271 | detector->Propagate(*ray0, ray1, 0); |
| 271 |
|
272 | //delete ray0; |
| 272 |
|
273 | //delete ray1; |
| 273 | } |
274 | } |
| 274 | 275 | ||
| 275 | return (detector->GetHActive())->GetEntries() / (double)NN; |
276 | return (detector->GetHActive())->GetEntries() / (double)NN; |
| 276 | } |
277 | } |
| 277 | //----------------------------------------------------------------------------- |
278 | //----------------------------------------------------------------------------- |
| Line 342... | Line 343... | ||
| 342 | } |
343 | } |
| 343 | else { |
344 | else { |
| 344 | detector->Propagate(*ray0, ray1, 0); |
345 | detector->Propagate(*ray0, ray1, 0); |
| 345 | } |
346 | } |
| 346 | 347 | ||
| 347 |
|
348 | //delete ray0; |
| 348 |
|
349 | //delete ray1; |
| 349 | } |
350 | } |
| 350 | 351 | ||
| 351 | if(show_rand) { |
352 | if(show_rand) { |
| 352 | TCanvas *c2rand = (TCanvas*)gROOT->FindObject("c2rand"); |
353 | TCanvas *c2rand = (TCanvas*)gROOT->FindObject("c2rand"); |
| 353 | if(!c2rand) c2rand = new TCanvas("c2rand", "Random", 750, 550, 700, 700); |
354 | if(!c2rand) c2rand = new TCanvas("c2rand", "Random", 750, 550, 700, 700); |