−Table of Contents
Response Function for Simulation Data
SiPM Data
Code
- Issues with randomness (fixed)
- gRandom→SetSeed(0);
- j = f1→GetRandom();
#ifndef response_function
#define response_function
double response(int pe, int sipm) {
double sipmDist[3] = {0.21, 0.16, 0.23};
TF1 *sigma = new TF1("sigma", "[0]*TMath::Power(x,0.5)");
sigma->SetParameter(0,sipmDist[sipm]);
double fitPars[2]; //mean, stDev
fitPars[0] = pe;
fitPars[1] = sigma->Eval(pe);
TF1 *pdf = new TF1("pdf", "gaus",pe-10*fitPars[1],pe+10*fitPars[1]); //,pe-5,pe+5
pdf->SetParameter(0,1); //10./(double)bins
pdf->SetParameter(1,fitPars[0]); //mean
pdf->SetParameter(2,fitPars[1]); //stDev
gRandom->SetSeed(0);
return pdf->GetRandom();
} #endif
Response Function
- Had trouble accessing Ryan's data
- In figure, used Poisson distribution with mean=8, width=3
Working with Gaussian PDF for each PE peak Implement Polya instead for PE peak