Skip to content
Snippets Groups Projects
Commit 4c35acf1 authored by Ryan-Ambrose's avatar Ryan-Ambrose Committed by Eric Pooser
Browse files

Improved error estimation in the SPE for the HGC calibration (#355)

* Improved errors on SPE peak for HGC calibration

* Updated chnged fit parameter
parent 6ec47bb8
No related branches found
No related tags found
No related merge requests found
......@@ -108,7 +108,7 @@ void calibration::SlaveBegin(TTree * /*tree*/)
{
ADC_min = -10;
ADC_max = 200;
bins = 2*(abs(ADC_min) + abs(ADC_max));
bins = 12*(abs(ADC_min) + abs(ADC_max));
}
fPulseInt = new TH1F*[4];
......@@ -655,7 +655,7 @@ void calibration::Terminate()
nbins = (PulseInt[ipmt]->GetXaxis()->GetNbins());
//With the scale of ADC to NPE create a histogram that has the conversion applied
fscaled[ipmt] = new TH1F(Form("fscaled_PMT%d", ipmt+1), Form("Scaled ADC spectra for PMT%d; NPE; Normalized Counts",ipmt+1), fNGC ? 210 : 210, -1, fNGC ? 20 : 20);
fscaled[ipmt] = new TH1F(Form("fscaled_PMT%d", ipmt+1), Form("Scaled ADC spectra for PMT%d; NPE; Normalized Counts",ipmt+1), fNGC ? 1260 : 1260, -1, fNGC ? 20 : 20);
//Fill this histogram bin by bin
for (Int_t ibin=0; ibin<nbins; ibin++)
......@@ -679,7 +679,7 @@ void calibration::Terminate()
fFullShow ? fscaled[ipmt]->Fit("Poisson","RQ") : fscaled[ipmt]->Fit("Poisson","RQN");
//Make and fill histogram with the background removed
fscaled_nobackground[ipmt] = new TH1F(Form("fscaled_nobackground_pmt%d", ipmt+1), Form("NPE spectra background removed for PMT%d; NPE; Normalized Counts",ipmt+1), fNGC ? 210 : 210, -1, fNGC ? 20 : 20);
fscaled_nobackground[ipmt] = new TH1F(Form("fscaled_nobackground_pmt%d", ipmt+1), Form("NPE spectra background removed for PMT%d; NPE; Normalized Counts",ipmt+1), fNGC ? 1260 : 1260, -1, fNGC ? 20 : 20);
for (Int_t ibin=0; ibin<nbins; ibin++)
{
......@@ -702,7 +702,7 @@ void calibration::Terminate()
Gauss3->SetParLimits(8, 0.2, 0.5);
fFullShow ? fscaled_nobackground[ipmt]->Fit("Gauss3","RQ") : fscaled_nobackground[ipmt]->Fit("Gauss3","RQN");
if (fFullShow) fscaled_nobackground[ipmt]->GetXaxis()->SetRangeUser(0,5);
if (fFullShow) fscaled_nobackground[ipmt]->GetYaxis()->SetRangeUser(0,0.2);
if (fFullShow) fscaled_nobackground[ipmt]->GetYaxis()->SetRangeUser(0,0.3);
//Create a TGraphErrors to determine the spacing of the NPE
y_npe[0] = Gauss3->GetParameter(1), y_npe[1] = Gauss3->GetParameter(4), y_npe[2] = Gauss3->GetParameter(7);
......@@ -726,7 +726,7 @@ void calibration::Terminate()
Double_t xscale_mk2 = xscale * Gauss3->GetParameter(1);
//Take this new xscale and repeat the exact same procedure as before
fscaled_mk2[ipmt] = new TH1F(Form("fhgc_scaled_mk2_PMT%d", ipmt+1), Form("Scaled ADC spectra for PMT%d; NPE; Normalized Counts",ipmt+1), fNGC ? 210 : 210, -1, fNGC ? 20 : 20);
fscaled_mk2[ipmt] = new TH1F(Form("fhgc_scaled_mk2_PMT%d", ipmt+1), Form("Scaled ADC spectra for PMT%d; NPE; Normalized Counts",ipmt+1), fNGC ? 1260 : 1260, -1, fNGC ? 20 : 20);
//Fill this histogram bin by bin
for (Int_t ibin=0; ibin<nbins; ibin++)
......@@ -750,7 +750,7 @@ void calibration::Terminate()
fFullShow ? fscaled_mk2[ipmt]->Fit("Poisson","RQ"):fscaled_mk2[ipmt]->Fit("Poisson","RQN");
//Make and fill histogram with the background removed
fscaled_mk2_nobackground[ipmt] = new TH1F(Form("fscaled_mk2_nobackground_pmt%d", ipmt+1), Form("NPE spectra background removed for PMT%d; NPE; Normalized Counts",ipmt+1), fNGC ? 210 : 210, -1, fNGC ? 20 : 20);
fscaled_mk2_nobackground[ipmt] = new TH1F(Form("fscaled_mk2_nobackground_pmt%d", ipmt+1), Form("NPE spectra background removed for PMT%d; NPE; Normalized Counts",ipmt+1), fNGC ? 1260 : 1260, -1, fNGC ? 20 : 20);
for (Int_t ibin=0; ibin<nbins; ibin++)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment