17const float masses[5] = { 0.00051100, 0.10566, 0.13957, 0.4937, 0.93827 };
21 TFile *
f =
new TFile(
"DedxSampleHists.root");
22 TTree *
t = (TTree*)
f->Get(
"bin");
24 t->SetBranchAddress(
"betagammaBounds",&
num);
25 t->SetBranchAddress(
"totalNum",&total);
27 double *pre_x =
new double[
num];
28 t->SetBranchAddress(
"betagamma", pre_x);
31 double *
x =
new double[total];
32 double *
y =
new double[total];
36 const double theta(1), Nohit(15), t0(1200);
38 double *curve_y =
new double[total];
39 for(
int i=0; i<total; i++){
40 TH1F *h = (TH1F*)
f->Get(Form(
"h%d",i));
44 curve_y[i] = mean_exp[2];
45 if(
m_debug) cout <<
"i= " << i <<
" x= " <<
x[i] <<
" y= " <<
y[i] << endl;
48 TCanvas *c1 =
new TCanvas(
"c1",
"curve",10,10,800,642);
50 TGraph *g =
new TGraph(total,
x,
y);
52 TGraph *curve_g =
new TGraph(total,
x, curve_y);
53 curve_g->SetLineColor(2);
54 curve_g->Draw(
"c,same");
56 c1->SaveAs(
"figs/curve.eps");
57 TFile *save_file =
new TFile(
"figs/curve.root",
"recreate");
void dedx_pid_exp(int vflag[3], float dedx, int trkalg, int Nohit, float mom, float theta, float t0, float lsamp, double dedx_exp[5], double ex_sigma[5], double pid_prob[5], double chi_dedx[5], std::vector< double > &par, std::vector< double > &sig_par)