3TString
str_vec[5] = {
"electron",
"muon",
"pion",
"kaon",
"proton"};
6const double masses[5] = {0.511e-3, 105.658e-3, 139.570e-3, 493.677e-3, 938.272e-3};
10const double y_matrix[5][2] = {{1.0,1.0},{2.0,2.0},{3.0,3.0},{4.0,4.0},{5.0,5.0}};
12const TCut
vec_cut[5]={
"",
"",
"",
"",
"dEdx_meas>500"};
16 cout <<
"begin of drawmom()" << endl;
21 TMultiGraph *mg =
new TMultiGraph();
23 TCanvas *c1 =
new TCanvas(
"momentum",
"momentum",10,10,1200,642);
26 for(
int i=0; i<5; i++){
28 t[i] = (TTree*)
f[i]->Get(
"n103");
33 mom_matrix[i][0] = h[i]->GetBinCenter(h[i]->FindFirstBinAbove(6.0));
34 mom_matrix[i][1] = h[i]->GetBinCenter(h[i]->FindLastBinAbove(6.0));
41 c1->SaveAs(
"figs/mom.eps");
45 TCanvas *c1 =
new TCanvas(
"#beta#gamma",
"#beta#gamma",10,10,1200,642);
47 for(
int i=0; i<5; i++){
54 c1->SaveAs(
"figs/bg_hists.eps");
56 TCanvas *c2 =
new TCanvas(
"betagamma",
"betagamma",10,10,800,642);
59 mg->GetXaxis()->SetTitle(
"#beta#gamma range");
60 for(
int j=0; j<5; j++) l[j]->
Draw();
61 c2->SaveAs(
"figs/bg.eps");
64 for(
int i=0; i<5; i++){
65 cout <<
str_vec[i] <<
" bins " << h[i]->GetNbinsX() << endl;
71 TCanvas *c3 =
new TCanvas(
"dedx vs momentum",
"dedx vs momentum",10,10,1200,642);
73 for(
int i=0; i<5; i++){
75 if(i==4)
t[i]->Draw(
"dEdx_meas:ptrk", Form(
"ptrk<%f & dEdx_meas<%f & dEdx_meas>500",
mom_max_vec[i],
dedx_max_vec[i]),
"", 100000);
78 c3->SaveAs(
"figs/dedx_vs_mom.eps");
82const double input_bg[5][2] = {{421.97,3187.82}, {10.98,115.6}, {0.74,10.98}, {0.64,0.74}, {0.26,0.64}};
84 double output_mom[5][2];
85 for(
int i=0; i<5; i++){
90 for(
int j=0; j<5; j++) cout <<
"low " << output_mom[j][0] <<
" high " << output_mom[j][1] <<
" virtual bins for 1MeV width:" << (output_mom[j][1]-output_mom[j][0])/0.001 << endl << endl;
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
const double input_bg[5][2]
const double dedx_max_vec[5]
const double y_matrix[5][2]
const double mom_max_vec[5]
void rebg(int i, double bg)