3 void z_point_pol2(TString fileName =
"hd_root.root",
int runNumber = 22016, TString variation =
"default")
5 ofstream
outfile(
"z_point_pol2.out");
10 TFile *in = TFile::Open( fileName ,
"READ");
12 cout <<
"Unable to open file " << fileName.Data() <<
"...Exiting" << endl;
26 float eff_velocities_graphs = 0;
27 float eff_velocities_graphs_errors = 0;
30 float p2_graphs_error = 0;
31 float p1_graphs_error = 0;
35 for(
int m = 0; m < channels; ++m){
37 sprintf(
string,
"bcal_point_calibs/h2_tgraph_deltat[%d]", m+1);
39 h2_tgraph = (TGraph*)in->Get(
string);
41 if(h2_tgraph->GetN() > 2){
43 h2_tgraph->Fit(
"pol2");
44 func2 = h2_tgraph->GetFunction(
"pol2");
50 outfile << func2->GetParameter(0) <<
" " << func2->GetParameter(1) <<
" " << func2->GetParameter(2) << endl;
sprintf(text,"Post KinFit Cut")
static TGraph * h2_tgraph[768]
void z_point_pol2(TString fileName="hd_root.root", int runNumber=22016, TString variation="default")