00001 {
00002 gROOT->Reset();
00003
00004 gStyle->SetPalette(1);
00005 gSystem->Load("/LC/Detecteurs/MicroMegas/Offline/micromegasFrameWork/trunk/lib/libMicro.so");
00006
00007
00008 bool rotate90 = 0;
00009
00010
00011
00012
00013 int offset_y;
00014 int offset_x;
00015
00016 if(rotate90)
00017 {
00018 offset_y = 39;
00019 offset_x = 28;
00020 }
00021 else
00022 {
00023 offset_y = 66;
00024 offset_x = 35;
00025 }
00026
00027
00028
00029 int search = 3;
00030
00031
00032 int dt_min = 6;
00033 int dt_max = 9;
00034
00035
00036 int nhit_m2_max = 500;
00037
00038
00039 int adc_cut = 30;
00040
00041
00042
00043
00044 std::ifstream xml;
00045 xml.open("complete_detector.xml",ifstream::in);
00046 std::string line = "";
00047 std::string lineb = "";
00048 while(line.find("path=")==string::npos || lineb.find("<output")==string::npos)
00049 {
00050 lineb=line;
00051 xml>>line;
00052 }
00053 int start = line.find("\"")+1;
00054 int end = line.rfind("\"")-6;
00055 TString file = line.substr(start,end);
00056
00057 for (int i=0;i<5;i++){file.Chop();}
00058 file += "_MGT.root";
00059
00060 file = "/gpfs/LAPP-DATA/LC/Detecteurs/MicroMegas/data/TB2011/SPS_H4_aug_2011/Production/Complete_detector/2011-08-08_18:26:00_MGT.root";
00061
00062
00063 bool hot_pad[96][96];
00064 vector <int> vhot_pad;
00065 for (int i=0;i<96;i++){
00066 for (int j=0;j<96;j++){
00067 hot_pad[i][j] = 0;}}
00068
00069 bool noisy[9][96];
00070 for (int i=0;i<9;i++){
00071 for (int j=0;j<96;j++){
00072 noisy[i][j] = 0;}}
00073
00074
00075 noisy[6][77] = 1;
00076 noisy[7][77] = 1;
00077 noisy[8][77] = 1;
00078
00079
00080 noisy[6][9] = 1;
00081 noisy[8][33] = 1;
00082
00083
00084
00085
00086
00087 int nhot_m2 = 0;
00088 int nhot_tel = 0;
00089 int nsuper_hot_tel = 0;
00090 int nhit[10];
00091 bool hot[10];
00092 bool super_hot[10];
00093 for (int i=0;i<10;i++){nhit[i] = 0;hot[i] = 0;}
00094 bool align = 0;
00095
00096 int nhit_m2 = 0;
00097 int nhit_m2_cut = 0;
00098 int nhit_m2_dac0 = 0;
00099 int nhit_m2_cut_dac0 = 0;
00100 int nhit_m2_dac1 = 0;
00101 int nhit_m2_cut_dac1 = 0;
00102 int nhit_m2_dac2 = 0;
00103 int nhit_m2_cut_dac2 = 0;
00104 int nchannel = 0;
00105 int hardid = 0;
00106 int chipid = 0;
00107 int xpos = 0;
00108 int ypos = 0;
00109 int zpos = 0;
00110 int adc = 0;
00111 int chbid = 0;
00112 int ntree = 0;
00113 int mult = 0;
00114 int mult_dac1 = 0;
00115 int mult_dac2 = 0;
00116 int ntrack = 0;
00117 int neff = 0;
00118 int neff_dac1 = 0;
00119 int neff_dac2 = 0;
00120 int track_x = 0;
00121 int track_y = 0;
00122 int target_x = 0;
00123 int target_y = 0;
00124 int dt_tp_max = 0;
00125 int digit = 0;
00126
00127 Long64_t t,t0,t1,t2,t3,dt;
00128
00129 TH2I * hxy_m2 = new TH2I("hxy_m2","Hit position distribution;y (pad);x (pad)",96,0,96,96,0,96);
00130 TH2I * hxy_new_pad = new TH2I("hxy_new_pad","Hit position;y (pad);x (pad)",96,0,96,96,0,96);
00131 TH2I * hxy_m2_dac0 = new TH2I("hxy_m2_dac0","Hits passing the low threshold;y (pad);x (pad)",96,0,96,96,0,96);
00132 TH2I * hxy_m2_dac1 = new TH2I("hxy_m2_dac1","Hits passing the medium threshold;y (pad);x (pad)",96,0,96,96,0,96);
00133 TH2I * hxy_m2_dac2 = new TH2I("hxy_m2_dac2","Hits passing the high threshold;y (pad);x (pad)",96,0,96,96,0,96);
00134 TH2I * hxy_m2_cut_dac0 = new TH2I("hxy_m2_cut_dac0","Hits passing the low threshold;y (pad);x (pad)",96,0,96,96,0,96);
00135 TH2I * hxy_m2_cut_dac1 = new TH2I("hxy_m2_cut_dac1","Hits passing the medium threshold;y (pad);x (pad)",96,0,96,96,0,96);
00136 TH2I * hxy_m2_cut_dac2 = new TH2I("hxy_m2_cut_dac2","Hits passing the high threshold;y (pad);x (pad)",96,0,96,96,0,96);
00137 TH2I * hxy_m2_target = new TH2I("hxy_m2_target","Extrapolated hit position distribution;y (pad);x (pad)",96,0,96,96,0,96);
00138 TH2I * hxy_m2_cut = new TH2I("hxy_m2_cut","Hit position distribution - time cut;y (pad);x (pad)",96,0,96,96,0,96);
00139 TH2I * hxy_m2_cut_track = new TH2I("hxy_m2_cut_track","Hit position distribution when track in telescope- time cut;y (pad);x (pad)",96,0,96,96,0,96);
00140 TH2I * hxy_m2_cut_temp = new TH2I("hxy_m2_cut_temp","Hit position distribution - time cut;y (pad);x (pad)",96,0,96,96,0,96);
00141 TH1I * hnhit_m2 = new TH1I("hnhit_m2","Number of hit per readout distribution;Nhits/RO",1000,0,10000);
00142 TH1I * hnhit_m2_cut = new TH1I("hnhit_m2_cut","Number of hit per readout distribution - time cut;Nhits/RO",1000,0,1000);
00143 TH1I * hnhit_m2_dac0 = new TH1I("hnhit_m2_dac0","Number of hit per readout distribution DAC0;Nhits/RO",1000,0,10000);
00144 TH1I * hnhit_m2_cut_dac0 = new TH1I("hnhit_m2_cut_dac0","Number of hit per readout distribution DAC0 - time cut;Nhits/RO",1000,0,1000);
00145 TH1I * hnhit_m2_cut_roi_dac0 = new TH1I("hnhit_m2_cut_roi_dac0","Number of hit per readout distribution - time cut - region of interest;Nhits/RO",1000,0,1000);
00146 TH1I * hnhit_m2_dac1 = new TH1I("hnhit_m2_dac1","Number of hit per readout distribution DAC1;Nhits/RO",1000,0,10000);
00147 TH1I * hnhit_m2_cut_dac1 = new TH1I("hnhit_m2_cut_dac1","Number of hit per readout distribution DAC1 - time cut;Nhits/RO",1000,0,1000);
00148 TH1I * hnhit_m2_cut_roi_dac1 = new TH1I("hnhit_m2_cut_roi_dac1","Number of hit per readout distribution DAC1 - time cut - region of interest;Nhits/RO",1000,0,1000);
00149 TH1I * hnhit_m2_dac2 = new TH1I("hnhit_m2_dac2","Number of hit per readout distribution DAC2;Nhits/RO",1000,0,10000);
00150 TH1I * hnhit_m2_cut_dac2 = new TH1I("hnhit_m2_cut_dac2","Number of hit per readout distribution DAC2 - time cut;Nhits/RO",1000,0,1000);
00151 TH1I * hnhit_m2_cut_roi_dac2 = new TH1I("hnhit_m2_cut_roi_dac2","Number of hit per readout distribution DAC2 - time cut - region of interest;Nhits/RO",1000,0,1000);
00152 TH1I * hnhit_m2_ro = new TH1I("hnhit_m2_ro","Number of hit per read out;readout;Nhits",20000,0,20000);
00153 TH1I * hmult_m2 = new TH1I("hmult_m2","Number of hit in target area in m2;Nhit",10,0,10);
00154 TH1I * hmult_m2_dac1 = new TH1I("hmult_m2_dac1","Number of hit in target area in m2 passing medium threshold;Nhit",10,0,10);
00155 TH1I * hmult_m2_dac2 = new TH1I("hmult_m2_dac2","Number of hit in target area in m2 passing high threshold;Nhit",10,0,10);
00156 TH1I * hnhot_tel = new TH1I("hnhot_tel","Number of hot telescope chambers (Nhit>0);Nhot",9,0,9);
00157 TH1I * hnsuper_hot_tel = new TH1I("hnsuper_hot_tel","Number of super hot telescope chambers (Nhit=1);Nhot",9,0,9);
00158 TH1I * hnhit_cut = new TH1I("hnhit_cut","Number of hit distribution - time cut;Nhits",10000,0,10000);
00159 TH1I * hdt = new TH1I("hdt","Time to readout distribution;time (200 ns clock cycle)",200,0,200);
00160 TH1I * hdt_track = new TH1I("hdt_track","Time to readout distribution for track in telescope;time (200 ns clock cycle)",200,0,200);
00161 TH1I * hdt_dac0 = new TH1I("hdt_dac0","Time to readout distribution DAC 0;time (200 ns clock cycle)",200,0,200);
00162 TH1I * hdt_dac1 = new TH1I("hdt_dac1","Time to readout distribution DAC 1;time (200 ns clock cycle)",200,0,200);
00163 TH1I * hdt_dac2 = new TH1I("hdt_dac2","Time to readout distribution DAC 2;time (200 ns clock cycle)",200,0,200);
00164 TH1I * hdt_first = new TH1I("hdt_first","Time to readout of first hit;time (200 ns clock cycle)",20,0,20);
00165 TH1I * hdt_width = new TH1I("hdt_width","Time to first hit distribution;time (200 ns clock cycle)",20,0,20);
00166 TH1I * hdt_tp = new TH1I("hdt_tp","Time to readout distribution;time (200 ns clock cycle)",20,0,20);
00167 TH1I * hx_res = new TH1I("hx_res","Vertical residuals Prototype - telescope;Xm2 - Xtarget (pad)",101,-50,50);
00168 TH1I * hy_res = new TH1I("hy_res","Horizontal residuals Prototype - telescope;Ym2 - Ytarget (pad)",101,-50,50);
00169 TH1F * hr_res = new TH1F("hr_res","Residuals Prototype - telescope;d(m2 - target) (pad)",100,0,25);
00170 TH2I * hx_cor = new TH2I("hx_cor","Correlation Prototype - telescope;Xtarget (pad);Xm2 (pad)",100,0,100,100,0,100);
00171 TH2I * hy_cor = new TH2I("hy_cor","Correlation Prototype - telescope;Ytarget (pad);Ym2 (pad)",100,0,100,100,0,100);
00172 TH2I * hxy_tel_pad_temp = new TH2I("hxy_tel_pad_temp","Hit position distribution in telescope pad chamber for super hot events (Nhit=1);y (pad);x (pad)",32,0,32,32,0,32);
00173 TH1I * hdigit = new TH1I("hdigit","Number of hits above 3 thresholds",10,0,10);
00174 TH1I * hdigit_cut = new TH1I("hdigit_cut","Number of hits above 3 thresholds - time cut",10,0,10);
00175 TH1I * hchip = new TH1I("hchip","Number of hit per chip;chip id",144,0,144);
00176 TH1I * hchip_cut = new TH1I("hchip_cut","Number of hit per chip - time cut;chip id",144,0,144);
00177
00178 TH1I * hnhit_tel[9];
00179 TH2I * hxy_tel[9];
00180 TH2I * hxy_tel_temp[9];
00181 TString title,name;
00182
00183 for (int i=0;i<9;i++)
00184 {
00185 name = Form("hxy_tel_chamber_%i",i+1);
00186 title = Form("Hit pattern (adc>%i) chamber %i;y (pad);x (pad)",adc_cut,i+1);
00187 hxy_tel[i] = new TH2I(name,title,32,0,32,32,0,32);
00188
00189 name = Form("hxy_tel_temp_chamber_%i",i+1);
00190 title = Form("Hit pattern (adc>%i) chamber %i;y (pad);x (pad)",adc_cut,i+1);
00191 hxy_tel_temp[i] = new TH2I(name,title,32,0,32,32,0,32);
00192
00193 name = Form("hnhit_tel_chamber_%i",i+1);
00194 title = Form("Number of hits (adc>%i) in chamber %i;Nhit",adc_cut,i+1);
00195 hnhit_tel[i] = new TH1I(name,title,96,0,96);
00196 }
00197
00198
00199
00200
00201 TFile *f = new TFile(file);
00202 cout<<endl;
00203 cout<<"Reading file : "<<file<<endl;
00204 cout<<endl;
00205
00206 TIter nextkey(f.GetListOfKeys());
00207 TKey *key;
00208
00209
00210
00211
00212 while (key = (TKey*)nextkey())
00213 {
00214
00215 TTree *tree = (TTree*)key->ReadObj();
00216 MTRun* run = (MTRun*)tree->GetUserInfo()->FindObject("MTRun");
00217
00218 int nEvent = tree.GetEntries();
00219 ntree++;
00220 cout<<" Tree "<<ntree<<" contains "<<nEvent<<" events"<<endl;
00221
00222 MTEvent *evt = new MTEvent();
00223
00224 TBranch *branch= tree->GetBranch("MTEvent");
00225 branch->SetAddress(&evt);
00226
00227 for (int i=0;i<nEvent-1;i++)
00228 {
00229
00230
00231 if (i%100==0){cout<<"Progress: "<<i/1./nEvent*100<<" \r"<<flush;}
00232
00233 tree.GetEntry(i);
00234 nchannel = evt->GetNchannel();
00235
00236 nhit_m2 = 0;
00237 nhit_m2_cut = 0;
00238
00239 nhit_m2_dac0 = 0;
00240 nhit_m2_cut_dac0 = 0;
00241
00242 nhit_m2_dac1 = 0;
00243 nhit_m2_cut_dac1 = 0;
00244
00245 nhit_m2_dac2 = 0;
00246 nhit_m2_cut_dac2 = 0;
00247
00248 nhot_m2 = 0;
00249 nhot_tel = 0;
00250 nsuper_hot_tel = 0;
00251 for (int k=0;k<10;k++){nhit[k] = 0;super_hot[k] = 0;}
00252
00253
00254 for (int j=0;j<nchannel;j++)
00255 {
00256
00257 MTChannel* channel = (MTChannel*)evt->GetChannels()->UncheckedAt(j);
00258 chbid = channel->GetChamberId();
00259 if (chbid < 10)
00260 {
00261 if (!noisy[chbid-1][hardid])
00262 {
00263
00264 if(rotate90)
00265 {
00266 xpos = channel->GetY()*1e-4;
00267 ypos = 15-channel->GetX()*1e-4;
00268 }
00269 else
00270 {
00271 xpos = channel->GetX()*1e-4;
00272 ypos = channel->GetY()*1e-4;
00273 }
00274
00275 adc = channel->GetAnalogValue();
00276
00277 if (adc>=adc_cut)
00278 {
00279 nhit[chbid-1]++;
00280
00281 hxy_tel[chbid-1]->Fill(ypos,xpos);
00282 hxy_tel_temp[chbid-1]->Fill(ypos,xpos);
00283
00284 if (chbid == 7 || chbid == 8 || chbid == 9)
00285 {
00286
00287 hxy_tel_pad_temp->Fill(ypos,xpos);
00288
00289 }
00290
00291 if (chbid == 8)
00292 {
00293
00294 track_x = xpos;
00295 track_y = ypos;
00296
00297 }
00298
00299 }
00300 }
00301 }
00302
00303 else
00304 {
00305 nhit_m2++;
00306
00307 t2 = channel->GetBcId_Dif();
00308 t3 = channel->GetBcId_Hit();
00309 dt = t2 - t3;
00310 hdt->Fill(dt);
00311
00312 digit = channel->GetDigitalValue();
00313 if (digit>=1)
00314 {
00315 nhit_m2_dac0++;
00316 if (digit>=2)
00317 {
00318 nhit_m2_dac1++;
00319 if (digit==3)
00320 {
00321 nhit_m2_dac2++;
00322 }
00323 }
00324 }
00325
00326 if (dt>=dt_min && dt<=dt_max)
00327 {
00328 nhit_m2_cut++;
00329
00330 if (digit>=1)
00331 {
00332 nhit_m2_cut_dac0++;
00333 if (digit>=2)
00334 {
00335 nhit_m2_cut_dac1++;
00336 if (digit==3)
00337 {
00338 nhit_m2_cut_dac2++;
00339 }
00340 }
00341 }
00342
00343 }
00344
00345 }
00346
00347 }
00348
00349
00350 hnhit_m2_ro->SetBinContent(i+1,nhit_m2);
00351 hnhit_m2_cut->Fill(nhit_m2_cut);
00352 hnhit_m2->Fill(nhit_m2);
00353
00354 hnhit_m2_cut_dac0->Fill(nhit_m2_cut_dac0);
00355 hnhit_m2_dac0->Fill(nhit_m2_dac0);
00356
00357 hnhit_m2_cut_dac1->Fill(nhit_m2_cut_dac1);
00358 hnhit_m2_dac1->Fill(nhit_m2_dac1);
00359
00360 hnhit_m2_cut_dac2->Fill(nhit_m2_cut_dac2);
00361 hnhit_m2_dac2->Fill(nhit_m2_dac2);
00362
00363
00364
00365 if (nhit_m2<=nhit_m2_max)
00366
00367 {
00368
00369
00370
00371 for (int k=6;k<9;k++)
00372 {
00373
00374 if (nhit[k] != 0)
00375 {
00376 hot[k] = 1;
00377
00378 if (nhit[k] == 1)
00379 {
00380 super_hot[k] = 1;
00381 }
00382 }
00383
00384 hnhit_tel[k]->Fill(nhit[k]);
00385
00386 if (hot[k])
00387 {
00388 nhot_tel++;
00389 }
00390
00391 if (super_hot[k])
00392 {
00393 nsuper_hot_tel++;
00394 }
00395 }
00396
00397 hnhot_tel->Fill(nhot_tel);
00398 hnsuper_hot_tel->Fill(nsuper_hot_tel);
00399
00400 align = (hxy_tel_pad_temp->GetRMS(1) == 0 && hxy_tel_pad_temp->GetRMS(2) == 0);
00401
00402
00403
00404
00405 if (nsuper_hot_tel == 3)
00406 {
00407
00408 if (align){
00409
00410
00411
00412 target_x = track_x + offset_x;
00413 target_y = track_y + offset_y;
00414
00415 ntrack++;
00416
00417 hxy_m2_target->Fill(target_y,target_x);
00418
00419 for (int j=0;j<nchannel;j++)
00420 {
00421
00422 MTChannel* channel = (MTChannel*)evt->GetChannels()->UncheckedAt(j);
00423 chbid = channel->GetChamberId();
00424
00425 if (chbid == 10)
00426 {
00427
00428 t2 = channel->GetBcId_Dif();
00429 t3 = channel->GetBcId_Hit();
00430 dt = t2 - t3;
00431
00432 xpos = channel->GetX()*1e-4;
00433 ypos = channel->GetY()*1e-4;
00434 chipid = channel->GetChipId();
00435
00436 hdt_track->Fill(dt);
00437 hdt_tp->Fill(dt);
00438
00439
00440
00441 hxy_m2->Fill(ypos,xpos);
00442 hchip->Fill(chipid);
00443
00444 digit = channel->GetDigitalValue();
00445
00446 if (digit>=1)
00447 {
00448 hdigit->Fill(1);
00449 hdt_dac0->Fill(dt);
00450 hxy_m2_dac0->Fill(ypos,xpos);
00451 if (digit>=2)
00452 {
00453 hdigit->Fill(2);
00454 hdt_dac1->Fill(dt);
00455 hxy_m2_dac1->Fill(ypos,xpos);
00456 if (digit==3)
00457 {
00458 hdigit->Fill(3);
00459 hdt_dac2->Fill(dt);
00460 hxy_m2_dac2->Fill(ypos,xpos);
00461 }
00462 }
00463 }
00464
00465 if (dt>=dt_min && dt<=dt_max)
00466 {
00467
00468 if (digit>=1)
00469 {
00470 hdigit_cut->Fill(1);
00471 hxy_m2_cut_dac0->Fill(ypos,xpos);
00472 if (digit>=2)
00473 {
00474 hdigit_cut->Fill(2);
00475 hxy_m2_cut_dac1->Fill(ypos,xpos);
00476 if (digit==3)
00477 {
00478 hdigit_cut->Fill(3);
00479 hxy_m2_cut_dac2->Fill(ypos,xpos);
00480 }
00481 }
00482 }
00483
00484 nhit[chbid-1]++;
00485 hchip_cut->Fill(chipid);
00486 hxy_m2_cut->Fill(ypos,xpos);
00487 hxy_m2_cut_temp->Fill(ypos,xpos);
00488
00489 hx_cor->Fill(target_x,xpos);
00490 hy_cor->Fill(target_y,ypos);
00491
00492 hr_res->Fill(sqrt(pow(xpos-target_x,2) + pow(ypos-target_y,2)));
00493 hx_res->Fill(xpos - target_x);
00494 hy_res->Fill(ypos - target_y);
00495
00496
00497 if (fabs(xpos - target_x)<=search && fabs(ypos - target_y)<=search && hxy_new_pad->GetBinContent(ypos+1,xpos+1)==0)
00498 {
00499
00500 mult++;
00501 hxy_m2_cut_track->Fill(ypos,xpos);
00502 hxy_new_pad->Fill(ypos,xpos);
00503
00504 if (digit==2){mult_dac1++;}
00505 if (digit==3){mult_dac1++;mult_dac2++;}
00506
00507 }
00508 }
00509 }
00510 }
00511
00512 hxy_new_pad->Reset();
00513
00514 for (k=10;k>0;k--){if (hdt_tp->GetBinContent(k+1)!=0){dt_tp_max = k;k = 0;}}
00515 hdt_first->Fill(dt_tp_max);
00516 for (k=10;k>0;k--){if (hdt_tp->GetBinContent(k+1)!=0){hdt_width->Fill(dt_tp_max-k);}}
00517 hdt_tp->Reset();
00518
00519 hnhit_m2_cut_roi_dac0->Fill(mult);
00520 hnhit_m2_cut_roi_dac1->Fill(mult_dac1);
00521 hnhit_m2_cut_roi_dac2->Fill(mult_dac2);
00522
00523 if (mult != 0)
00524 {
00525 neff++;
00526 hmult_m2->Fill(mult);
00527 mult = 0;
00528
00529 if (mult_dac1 != 0)
00530 {
00531 neff_dac1++;
00532 hmult_m2_dac1->Fill(mult_dac1);
00533 mult_dac1 = 0;
00534 }
00535
00536 if (mult_dac2 != 0)
00537 {
00538 neff_dac2++;
00539 hmult_m2_dac2->Fill(mult_dac2);
00540 mult_dac2 = 0;
00541 }
00542 }
00543
00544 hxy_m2_cut_temp->Reset();
00545
00546 }
00547 }
00548
00549 hxy_tel_pad_temp->Reset();
00550
00551 }
00552 }
00553 }
00554
00555
00556 float eff = neff*1./ntrack;
00557 float eff_dac1 = neff_dac1*1./ntrack;
00558 float eff_dac2 = neff_dac2*1./ntrack;
00559
00560 float multi = 0;
00561 float multi_dac1 = 0;
00562 float multi_dac2 = 0;
00563
00564 for (int i=1;i<10;i++)
00565 {
00566 multi += i*hmult_m2->GetBinContent(i+1);
00567 multi_dac1 += i*hmult_m2_dac1->GetBinContent(i+1);
00568 multi_dac2 += i*hmult_m2_dac2->GetBinContent(i+1);
00569 }
00570
00571 multi /= (1.*hmult_m2->Integral(2,10));
00572 multi_dac1 /= (1.*hmult_m2_dac1->Integral(2,10));
00573 multi_dac2 /= (1.*hmult_m2_dac2->Integral(2,10));
00574
00575
00576 cout<<endl;
00577 cout<<endl;
00578 cout<<"Number of tracks in telescope = "<<ntrack<<endl;
00579 cout<<"Number of time the m2 prototype was efficienct (search area of "<<search*2+1<<"*"<<search*2+1<<") = "<<neff<<endl;
00580 cout<<endl;
00581 cout<<"** Low threshold **"<<endl;
00582 cout<<endl;
00583 cout<<"Global efficiency = "<<neff<<" / "<<ntrack<<" = "<<eff*100.<<" %"<<"+/-"<<100.*sqrt(eff*(1-eff)/ntrack)<<"%"<<endl;
00584 cout<<endl;
00585 cout<<"Hit multiplicity = "<<hmult_m2->GetMean()<<" +/- "<<hmult_m2->GetMeanError()<<endl;
00586 cout<<endl;
00587 cout<<"** Medium threshold **"<<endl;
00588 cout<<endl;
00589 cout<<"Global efficiency = "<<neff_dac1<<" / "<<ntrack<<" = "<<eff_dac1*100.<<" %"<<"+/-"<<100.*sqrt(eff_dac1*(1-eff_dac1)/ntrack)<<"%"<<endl;
00590 cout<<endl;
00591 cout<<"Hit multiplicity = "<<hmult_m2_dac1->GetMean()<<" +/- "<<hmult_m2_dac1->GetMeanError()<<endl;
00592 cout<<endl;
00593 cout<<"** High threshold **"<<endl;
00594 cout<<endl;
00595 cout<<"Global efficiency = "<<neff_dac2<<" / "<<ntrack<<" = "<<eff_dac2*100.<<" %"<<"+/-"<<100.*sqrt(eff_dac2*(1-eff_dac2)/ntrack)<<"%"<<endl;
00596 cout<<endl;
00597 cout<<"Hit multiplicity = "<<hmult_m2_dac2->GetMean()<<" +/- "<<hmult_m2_dac2->GetMeanError()<<endl;
00598 cout<<endl;
00599 cout<<endl;
00600
00601 cout<<neff*1./ntrack*100.<<" 0 "<<100.*sqrt(eff*(1-eff)/ntrack)<<endl;
00602 cout<<hmult_m2->GetMean()<<" 0 "<<hmult_m2->GetMeanError()<<endl;
00603
00604
00605
00606 }
00607
00608