5 TFile *fin =
new TFile(
"output/x_q2_pythia_ep_18x275_10M.root",
"OPEN");
7 THnSparse *hfull = (THnSparse*)fin->Get(
"hn_dis_electron");
8 THnSparse *hfull_accept = (THnSparse*)fin->Get(
"hn_dis_electron_accept");
10 TH2F* hxQ2 = (TH2F*)hfull->Projection(1,0);
11 hxQ2->SetName(
"hxQ2");
13 TH2F* hxQ2_accept = (TH2F*)hfull_accept->Projection(1,0);
14 hxQ2_accept->SetName(
"hxQ2_accept");
16 TH2F *hxQ2 = (TH2F*)fin->Get(
"hxQ2");
17 TH2F *hxQ2_fullaccept = (TH2F*)fin->Get(
"hxQ2");
24 TString str_ebeam = TString::Format(
"%.0f GeV x %.0f GeV", ebeam_e, ebeam_p );
26 TPaveText *pt_ebeam_lumi_ul =
new TPaveText(1
e-5,1e3,1
e-3,1e4,
"none");
27 pt_ebeam_lumi_ul->SetFillStyle(0);
28 pt_ebeam_lumi_ul->SetLineColor(0);
29 pt_ebeam_lumi_ul->AddText(str_ebeam);
32 TF1 *f_y095 =
new TF1(
"f_y095",
"4*x*[0]*[1]*[2]", 1
e-5, 1);
33 f_y095->SetParameter( 0, ebeam_e);
34 f_y095->SetParameter( 1, ebeam_p);
35 f_y095->SetParameter( 2, 0.95);
36 TF1 *f_y001 = (TF1*)f_y095->Clone(
"f_y01");
37 f_y001->SetParameter(2 , 0.01);
41 TCanvas *c3 =
new TCanvas();
42 c3->SetRightMargin(0.12);
43 TH2F* hxQ2_acceptance_ratio = hxQ2_accept->Clone(
"x_Q2_acceptance_ratio");
44 hxQ2_acceptance_ratio->GetZaxis()->SetNdivisions(505);
45 hxQ2_acceptance_ratio->Divide(hxQ2);
46 hxQ2_acceptance_ratio->Draw(
"colz");
53 pt_ebeam_lumi_ul->Draw();