Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 49 → Rev 50

/sipmScan/examples/sipm.C
347,6 → 347,7
sprintf(hname, "h2d%d", chPosition);
TH2F* h_2d = (TH2F*)rootfile->Get(hname);
h_2d->Draw("colz");
if ( !((i == parameter2) and (j == parameter1)) ) h_2d->GetZaxis()->SetRangeUser(0,200);
} //x
}
377,6 → 378,7
//TH2F* h_corrected = new TH2F("h_corrected","h_corrected",binsX, minX, maxX, binsY, minY, maxY);
double noise = getNoise(h_2d, 1, 70);
noise = 50;
if(debug) printf("Noise = %f\n", noise);
for(int k=minX; k<=maxX; k++) {
for(int j=minY; j<=maxY; j++) {
383,13 → 385,11
double signal = h_2d->GetBinContent(k,j); // detected
//double p = ((signal - noise) > 1) ? (signal-noise) : 1;
double p = signal - noise;
/*
p /= 1000.;
p /= 10000.;
double p0 = 1.0 - p; // events with zero photons
//double eta = (-log(p0) * p0 ) / (1-p0-0.00001);
double eta = -log(p0); // constant of the poissonian statistics
if (debug) printf("p=%f p0=%f log(p0)=%f eta=%f\n",p,p0,log(p0),eta);
*/
//double x = xLowUser + k*(xUpUser - xLowUser) / double(binsX);
double x = h_2d->GetXaxis()->GetBinCenter(k);
//double y = yLowUser + j*(yUpUser-yLowUser)/double(binsY);
401,10 → 401,10
//h_corrected->SetTitle("n_pe = - ln P(0);x[mm];y[mm]");
h_corrected->SetTitle(";x[mm];y[mm]");
//gStyle->SetPalette(52,0); // black and white for print
//h_corrected->GetZaxis()->SetRangeUser(-0.05,1);
//h_corrected->SetContour(100);
//gStyle->SetPalette(1);
//SetGS();
//gStyle->SetPalette(1); //black and white 2nd option
//SetGS(); // inverse
h_corrected->GetZaxis()->SetRangeUser(-0.05,0.30);
h_corrected->SetContour(30);
h_corrected->Draw("colz");
// collection efficiency