Skip to content
Snippets Groups Projects
Commit b4661999 authored by Fabian Simon Lex's avatar Fabian Simon Lex
Browse files

Added 2D plots for noise and pedestal, fixed binning for noise and pedestal plots

(changed bin edges to int +- 0.5 and fixed error in bin indexing (skip 0th underfill bin)
parent 2560be4b
No related branches found
No related tags found
No related merge requests found
...@@ -90,15 +90,19 @@ void EventLoaderALiBaVa::initialize() { ...@@ -90,15 +90,19 @@ void EventLoaderALiBaVa::initialize() {
hSNR = new TH1F("SNRatio", "Signal to noise ratio; SNRatio; # entries", 100, -50, 200); hSNR = new TH1F("SNRatio", "Signal to noise ratio; SNRatio; # entries", 100, -50, 200);
hPedestal = new TH1F("pedestal", "Uncorrected pedestal; # channel; Pedestal[ADC]", 256, 0, 256); hPedestal = new TH1F("pedestal", "Uncorrected pedestal; # channel; Pedestal[ADC]", 256, -0.5, 255.5);
hPedestalCorrect = new TH1F("pedestalCorrect", "Corrected pedestal; # channel; Pedestal[ADC]", 256, 0, 256); hPedestalCorrect = new TH1F("pedestalCorrect", "Corrected pedestal; # channel; Pedestal[ADC]", 256, -0.5, 255.5);
hNoise = new TH1F("noise", "Uncorrected Noise; # channel; Noise[ADC]", 256, 0, 256); hNoise = new TH1F("noise", "Uncorrected Noise; # channel; Noise[ADC]", 256, -0.5, 255.5);
hNoiseCorrect = new TH1F("noiseCorrect", "Corrected Noise; # channel; Noise[ADC]", 256, 0, 256); hNoiseCorrect = new TH1F("noiseCorrect", "Corrected Noise; # channel; Noise[ADC]", 256, -0.5, 255.5);
hTimeProfile = new TProfile("timeProfile", "Time profile; Time [ns], Ave. signal highest channel [ADC]", 35, 0, 35, 0, 200); hTimeProfile = new TProfile("timeProfile", "Time profile; Time [ns], Ave. signal highest channel [ADC]", 35, 0, 35, 0, 200);
hPedestalCorrect2D = new TH2F("pedestalCorrect2D", "Corrected pedestal in 2D; # columns; # rows; Pedestal[ADC]", 256, -0.5, 255.5, 1, -0.5, 0.5);
hNoiseCorrect2D = new TH2F("noiseCorrect2D", "Corrected Noise in 2D; # columns; # rows; Pedestal[ADC]", 256, -0.5, 255.5, 1, -0.5, 0.5);
// Create a shared pointer with the data file. // Create a shared pointer with the data file.
m_alibava.reset(DataFileRoot::OpenFile(datafilename.c_str())); m_alibava.reset(DataFileRoot::OpenFile(datafilename.c_str()));
...@@ -127,8 +131,8 @@ void EventLoaderALiBaVa::initialize() { ...@@ -127,8 +131,8 @@ void EventLoaderALiBaVa::initialize() {
double ped_val, noise_val; double ped_val, noise_val;
ped_val = PedestalPointer->ped(chan); ped_val = PedestalPointer->ped(chan);
noise_val = PedestalPointer->noise(chan); noise_val = PedestalPointer->noise(chan);
hPedestal->SetBinContent(chan, ped_val); hPedestal->SetBinContent(chan+1, ped_val);
hNoise->SetBinContent(chan, noise_val); hNoise->SetBinContent(chan+1, noise_val);
} }
PedestalPointer->compute_cmmd_alternative(); PedestalPointer->compute_cmmd_alternative();
...@@ -136,8 +140,10 @@ void EventLoaderALiBaVa::initialize() { ...@@ -136,8 +140,10 @@ void EventLoaderALiBaVa::initialize() {
double ped_val, noise_val; double ped_val, noise_val;
ped_val = PedestalPointer->ped(chan); ped_val = PedestalPointer->ped(chan);
noise_val = PedestalPointer->noise(chan); noise_val = PedestalPointer->noise(chan);
hPedestalCorrect->SetBinContent(chan, ped_val); hPedestalCorrect->SetBinContent(chan+1, ped_val);
hNoiseCorrect->SetBinContent(chan, noise_val); hNoiseCorrect->SetBinContent(chan+1, noise_val);
hPedestalCorrect2D->SetBinContent(chan+1, 1, ped_val);
hNoiseCorrect2D->SetBinContent(chan+1, 1, noise_val);
} }
// Save the calculated pedestal information in a temporary file // Save the calculated pedestal information in a temporary file
......
...@@ -57,6 +57,8 @@ namespace corryvreckan { ...@@ -57,6 +57,8 @@ namespace corryvreckan {
TH1F* hPedestalCorrect{}; TH1F* hPedestalCorrect{};
TH1F* hNoiseCorrect{}; TH1F* hNoiseCorrect{};
TProfile* hTimeProfile{}; TProfile* hTimeProfile{};
TH2F* hPedestalCorrect2D{};
TH2F* hNoiseCorrect2D{};
double m_chargecut{}; double m_chargecut{};
double m_calibration_constant{}; double m_calibration_constant{};
......
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