Skip to content
Snippets Groups Projects
Commit 53938fc0 authored by Yero1990's avatar Yero1990 Committed by Eric Pooser
Browse files

Dc calib (#148)

* minor fixes to shms dc calib

* Changed the binning scheme in the shms calibrations such that at 0 ns (tzero-corrected) will be centerd about its corresponding bin, and not at an edge.
parent f91f2210
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,8 @@
#define NPLANES 12
#define NBINS 400
#define bin_min -50.5
#define bin_max 349.5
void get_pdc_time_histo()
{
......@@ -58,7 +59,7 @@ void get_pdc_time_histo()
//Create Histograms
h[ip] = new TH1F(drift_time_histo, title, NBINS, -50, 350); //set time to 400 ns/200 bins = 2ns/bin
h[ip] = new TH1F(drift_time_histo, title, NBINS, bin_min, bin_max); //set time to 400 ns/200 bins = 2ns/bin
h[ip]->GetXaxis()->SetTitle("Drift Time (ns)");
h[ip]->GetYaxis()->SetTitle("Number of Entries / 1 ns");
}
......
......@@ -3,6 +3,8 @@
#define NPLANES 12
#define NBINS 400
#define bin_min -50.5
#define bin_max 349.5
void get_pdc_time_histo_tzero_corrected_v2()
{
......@@ -158,7 +160,7 @@ void get_pdc_time_histo_tzero_corrected_v2()
//Create Histograms
h[ip] = new TH1F(drift_time_histo, title, NBINS, -50, 350); //set time to 400 ns/200 bins = 2ns/bin
h[ip] = new TH1F(drift_time_histo, title, NBINS, bin_min, bin_max); //set time to 400 ns/200 bins = 2ns/bin
h[ip]->GetXaxis()->SetTitle("Drift Time (ns)");
h[ip]->GetYaxis()->SetTitle("Number of Entries / 1 ns");
}
......
......@@ -3,8 +3,11 @@
#include <TH2.h>
#include <TStyle.h>
#include <TCanvas.h>
#define NPLANES 12
#define NBINS 400
#define bin_min -50.5
#define bin_max 349.5
void wire_drift_times::Loop()
{
// In a ROOT session, you can do:
......@@ -76,7 +79,7 @@ void wire_drift_times::Loop()
if(ip == 0 || ip == 1 || ip == 4 || ip == 5 || ip == 6 || ip == 7 || ip == 10 || ip == 11) {
TH1F *cell_dt[total_wires_uv];
TH2F *drifttime_vs_wire = new TH2F("drifttime_vs_wire", "", 107., 0.,107., NBINS, -50., 350.);
TH2F *drifttime_vs_wire = new TH2F("drifttime_vs_wire", "", 107., 0.,107., NBINS, bin_min, bin_max);
......@@ -85,7 +88,7 @@ void wire_drift_times::Loop()
//Initialize wire drift time histograms
for (wirenum=1; wirenum<=total_wires_uv; wirenum++){
cell_dt[wirenum-1] = new TH1F(Form("wire_%d", wirenum), "", NBINS, -50., 350.);
cell_dt[wirenum-1] = new TH1F(Form("wire_%d", wirenum), "", NBINS, bin_min, bin_max);
cell_dt[wirenum-1]->GetXaxis()->SetTitle("Drift Time (ns)");
cell_dt[wirenum-1]->GetYaxis()->SetTitle("Number of Entries / 1 ns");
......@@ -210,7 +213,7 @@ void wire_drift_times::Loop()
if(ip == 2 || ip == 3 || ip == 8 || ip == 9) {
TH1F *cell_dt[total_wires_x];
TH2F *drifttime_vs_wire = new TH2F("drifttime_vs_wire", "", 79., 0., 79., NBINS, -50., 350.);
TH2F *drifttime_vs_wire = new TH2F("drifttime_vs_wire", "", 79., 0., 79., NBINS, bin_min, bin_max);
......@@ -219,7 +222,7 @@ void wire_drift_times::Loop()
//Initialize wire drift time histograms
for (int wirenum=1; wirenum<=total_wires_x; wirenum++){
cell_dt[wirenum-1] = new TH1F(Form("wire_%d", wirenum), "", NBINS, -50., 350.);
cell_dt[wirenum-1] = new TH1F(Form("wire_%d", wirenum), "", NBINS, bin_min, bin_max);
cell_dt[wirenum-1]->GetXaxis()->SetTitle("Drift Time (ns)");
cell_dt[wirenum-1]->GetYaxis()->SetTitle("Number of Entries / 1 ns");
......
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