17const float masses[5] = { 0.00051100, 0.10566, 0.13957, 0.4937, 0.93827 };
22 TFile *
f =
new TFile(
"DedxSampleHists.root");
23 TTree *
t = (TTree*)
f->Get(
"bin");
25 t->SetBranchAddress(
"betagammaBounds",&
num);
26 t->SetBranchAddress(
"totalNum",&total);
28 double *pre_x =
new double[
num];
29 t->SetBranchAddress(
"betagamma", pre_x);
32 double *
x =
new double[total];
33 double *
y =
new double[total];
37 const double theta(1), Nohit(15), t0(1200);
39 double *curve_y =
new double[total];
40 for(
int i=0; i<total; i++){
41 TH1F *h = (TH1F*)
f->Get(Form(
"h%d",i));
45 curve_y[i] = mean_exp[2];
46 if(
m_debug) cout <<
"i= " << i <<
" x= " <<
x[i] <<
" y= " <<
y[i] << endl;
49 TCanvas *c1 =
new TCanvas(
"c1",
"curve",10,10,800,642);
51 TGraph *g =
new TGraph(total,
x,
y);
53 TGraph *curve_g =
new TGraph(total,
x, curve_y);
54 curve_g->SetLineColor(2);
55 curve_g->Draw(
"c,same");
57 c1->SaveAs(
"figs/official_curve.eps");
58 TFile *save_file =
new TFile(
"figs/new_curve.root",
"recreate");
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
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)
void ReadCurPara(int index)