diff --git a/CALIBRATION/shms_dc_calib/scripts/get_pdc_time_histo.C b/CALIBRATION/shms_dc_calib/scripts/get_pdc_time_histo.C index d2689e1140933ce1816d989b3bfd7fad4a79e6c7..6bb64537e439447bcf893352e7d5829c2769dbf5 100644 --- a/CALIBRATION/shms_dc_calib/scripts/get_pdc_time_histo.C +++ b/CALIBRATION/shms_dc_calib/scripts/get_pdc_time_histo.C @@ -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"); } diff --git a/CALIBRATION/shms_dc_calib/scripts/get_pdc_time_histo_tzero_corrected_v2.C b/CALIBRATION/shms_dc_calib/scripts/get_pdc_time_histo_tzero_corrected_v2.C index 8feed0310d38519ed9cb300df5855aa05d366e98..a407ba19aecf1e28ce987561a4c86b40fb063150 100644 --- a/CALIBRATION/shms_dc_calib/scripts/get_pdc_time_histo_tzero_corrected_v2.C +++ b/CALIBRATION/shms_dc_calib/scripts/get_pdc_time_histo_tzero_corrected_v2.C @@ -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"); } diff --git a/CALIBRATION/shms_dc_calib/scripts/wire_drift_times.C b/CALIBRATION/shms_dc_calib/scripts/wire_drift_times.C index 8b38a8f45feb73fa74b4ef2336819d728cbe3233..fc7d9d5a3947e0b55fa788d086cbbca360cad972 100644 --- a/CALIBRATION/shms_dc_calib/scripts/wire_drift_times.C +++ b/CALIBRATION/shms_dc_calib/scripts/wire_drift_times.C @@ -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");