14 #include <TDirectory.h>
16 #include <TPaveLabel.h>
17 #include <TPaletteAxis.h>
54 TFile *
df =
new TFile(input_filename);
55 std::ofstream st_prop_time_constants;
56 st_prop_time_constants.open (
"st_prop_time_constants.txt", std::ofstream::out);
60 for (
unsigned int j = 0; j <
NCHANNELS; j++)
63 PT_can[j] =
new TCanvas( Form(
"PT_can_%i",j+1), Form(
"PT_can_%i",j+1), 800, 450);
66 TopDirectory = (TDirectory*) df->FindObjectAny(
"ST_Propagation_Time");
69 char* ss = Form(
"h2_PropTime_z_SS_chan_%i",j+1);
72 char* bs = Form(
"h2_PropTime_z_BS_chan_%i",j+1);
74 char* ns = Form(
"h2_PropTime_z_NS_chan_%i",j+1);
77 cout <<
"==================================================" << endl;
78 cout <<
"Processing Channel " << j+1 << endl;
79 cout <<
"==================================================" << endl;
84 gStyle->SetOptFit(111111);
88 h2_ss->SetTitle(
"Straight Section");
89 h2_ss->GetZaxis()->SetRangeUser(0,4);
90 h2_ss->GetYaxis()->SetRangeUser(0.,5.);
91 h2_ss->GetYaxis()->SetTitle(
"ST Propagation Time (ns)");
92 h2_ss->GetXaxis()->SetTitle(
"Path Length (cm)");
93 h2_ss->GetXaxis()->SetRangeUser(0.,40.0);
96 TF1 *pol1 =
h2_ss->GetFunction(
"pol1");
109 h2_bs->SetTitle(
"Bend Section");
110 h2_bs->GetZaxis()->SetRangeUser(0,4);
111 h2_bs->GetYaxis()->SetRangeUser(0.,5.);
112 h2_bs->GetYaxis()->SetTitle(
"ST Propagation Time (ns)");
113 h2_bs->GetXaxis()->SetTitle(
"Path Length (cm)");
114 h2_bs->GetXaxis()->SetRangeUser(39.,43.0);
118 pol1 =
h2_bs->GetFunction(
"pol1");
127 gStyle->SetOptStat(0);
128 gStyle->SetErrorX(0);
132 h2_ns->SetTitle(
"Nose Section");
133 h2_ns->GetZaxis()->SetRangeUser(0,4);
134 h2_ns->GetYaxis()->SetRangeUser(0.,5.);
135 h2_ns->GetYaxis()->SetTitle(
"ST Propagation Time (ns)");
136 h2_ns->GetXaxis()->SetTitle(
"Path Length (cm)");
137 h2_ns->GetXaxis()->SetRangeUser(43.,60.0);
139 pol1 =
h2_ns->GetFunction(
"pol1");
149 st_prop_time_constants.close();
Double_t t_z_ss_fit_intercept[NCHANNELS][3]
void st_prop_time_v1(char const *input_filename)
Double_t t_z_ss_fit_intercept_err[NCHANNELS][3]
Double_t t_z_bs_fit_slope_err[NCHANNELS][3]
Double_t t_z_bs_fit_intercept[NCHANNELS][3]
TDirectory * TopDirectory
Double_t t_z_ns_fit_slope_err[NCHANNELS][3]
Double_t t_z_bs_fit_slope[NCHANNELS][3]
Double_t t_z_ss_fit_slope[NCHANNELS][3]
Double_t t_z_ns_fit_intercept[NCHANNELS][3]
Double_t t_z_ns_fit_intercept_err[NCHANNELS][3]
Double_t t_z_ns_fit_slope[NCHANNELS][3]
int sss[NCHANNELS][NOXbins][NOYbins]
Double_t t_z_bs_fit_intercept_err[NCHANNELS][3]
Double_t t_z_ss_fit_slope_err[NCHANNELS][3]
Double_t ss_max[NCHANNELS]