Rev 47 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 47 | Rev 50 | ||
---|---|---|---|
Line 345... | Line 345... | ||
345 | char hname[128]; |
345 | char hname[128]; |
346 | int chPosition = map[j][i]; |
346 | int chPosition = map[j][i]; |
347 | sprintf(hname, "h2d%d", chPosition); |
347 | sprintf(hname, "h2d%d", chPosition); |
348 | TH2F* h_2d = (TH2F*)rootfile->Get(hname); |
348 | TH2F* h_2d = (TH2F*)rootfile->Get(hname); |
349 | h_2d->Draw("colz"); |
349 | h_2d->Draw("colz"); |
- | 350 | if ( !((i == parameter2) and (j == parameter1)) ) h_2d->GetZaxis()->SetRangeUser(0,200); |
|
350 | } //x |
351 | } //x |
351 | } |
352 | } |
352 | 353 | ||
353 | // Number of photoelectrons - Poissonian correction |
354 | // Number of photoelectrons - Poissonian correction |
354 | TCanvas* canvas8 = new TCanvas("canvas8","canvas8", 1000,1000); |
355 | TCanvas* canvas8 = new TCanvas("canvas8","canvas8", 1000,1000); |
Line 375... | Line 376... | ||
375 | double diffY = yUpUser - yLowUser; |
376 | double diffY = yUpUser - yLowUser; |
376 | //TH2F* h_corrected = new TH2F("h_corrected","h_corrected",binsX, 3.00, 3.00+diffX, binsY, 8.00, 8.00+diffY); |
377 | //TH2F* h_corrected = new TH2F("h_corrected","h_corrected",binsX, 3.00, 3.00+diffX, binsY, 8.00, 8.00+diffY); |
377 | //TH2F* h_corrected = new TH2F("h_corrected","h_corrected",binsX, minX, maxX, binsY, minY, maxY); |
378 | //TH2F* h_corrected = new TH2F("h_corrected","h_corrected",binsX, minX, maxX, binsY, minY, maxY); |
378 | 379 | ||
379 | double noise = getNoise(h_2d, 1, 70); |
380 | double noise = getNoise(h_2d, 1, 70); |
- | 381 | noise = 50; |
|
380 | if(debug) printf("Noise = %f\n", noise); |
382 | if(debug) printf("Noise = %f\n", noise); |
381 | for(int k=minX; k<=maxX; k++) { |
383 | for(int k=minX; k<=maxX; k++) { |
382 | for(int j=minY; j<=maxY; j++) { |
384 | for(int j=minY; j<=maxY; j++) { |
383 | double signal = h_2d->GetBinContent(k,j); // detected |
385 | double signal = h_2d->GetBinContent(k,j); // detected |
384 | //double p = ((signal - noise) > 1) ? (signal-noise) : 1; |
386 | //double p = ((signal - noise) > 1) ? (signal-noise) : 1; |
385 | double p = signal - noise; |
387 | double p = signal - noise; |
386 | /* |
- | |
387 |
|
388 | p /= 10000.; |
388 | double p0 = 1.0 - p; // events with zero photons |
389 | double p0 = 1.0 - p; // events with zero photons |
389 | //double eta = (-log(p0) * p0 ) / (1-p0-0.00001); |
390 | //double eta = (-log(p0) * p0 ) / (1-p0-0.00001); |
390 | double eta = -log(p0); // constant of the poissonian statistics |
391 | double eta = -log(p0); // constant of the poissonian statistics |
391 | if (debug) printf("p=%f p0=%f log(p0)=%f eta=%f\n",p,p0,log(p0),eta); |
392 | if (debug) printf("p=%f p0=%f log(p0)=%f eta=%f\n",p,p0,log(p0),eta); |
392 | */ |
- | |
393 | //double x = xLowUser + k*(xUpUser - xLowUser) / double(binsX); |
393 | //double x = xLowUser + k*(xUpUser - xLowUser) / double(binsX); |
394 | double x = h_2d->GetXaxis()->GetBinCenter(k); |
394 | double x = h_2d->GetXaxis()->GetBinCenter(k); |
395 | //double y = yLowUser + j*(yUpUser-yLowUser)/double(binsY); |
395 | //double y = yLowUser + j*(yUpUser-yLowUser)/double(binsY); |
396 | double y = h_2d->GetYaxis()->GetBinCenter(j); |
396 | double y = h_2d->GetYaxis()->GetBinCenter(j); |
397 | if (debug) printf("x=%f y=%f\n", x, y); |
397 | if (debug) printf("x=%f y=%f\n", x, y); |
Line 399... | Line 399... | ||
399 | } |
399 | } |
400 | } |
400 | } |
401 | //h_corrected->SetTitle("n_pe = - ln P(0);x[mm];y[mm]"); |
401 | //h_corrected->SetTitle("n_pe = - ln P(0);x[mm];y[mm]"); |
402 | h_corrected->SetTitle(";x[mm];y[mm]"); |
402 | h_corrected->SetTitle(";x[mm];y[mm]"); |
403 | //gStyle->SetPalette(52,0); // black and white for print |
403 | //gStyle->SetPalette(52,0); // black and white for print |
404 | // |
404 | //gStyle->SetPalette(1); //black and white 2nd option |
405 | // |
405 | //SetGS(); // inverse |
406 |
|
406 | h_corrected->GetZaxis()->SetRangeUser(-0.05,0.30); |
407 |
|
407 | h_corrected->SetContour(30); |
408 | h_corrected->Draw("colz"); |
408 | h_corrected->Draw("colz"); |
409 | 409 | ||
410 | // collection efficiency |
410 | // collection efficiency |
411 | int nPoints =0; |
411 | int nPoints =0; |
412 | double efficiency=0; |
412 | double efficiency=0; |