data analysis scripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

127 lines
3.7 KiB

void beamenergyfile_int_p()
{
//=========Macro generated from canvas: c1_n2/c1_n2
//========= (Tue Dec 5 12:03:43 2017) by ROOT version6.06/02
TCanvas *c1_n2 = new TCanvas("c1_n2", "c1_n2",10,71,700,500);
gStyle->SetOptStat(0);
gStyle->SetOptTitle(0);
c1_n2->Range(-616.6917,-4.050633,3788.249,21.26582);
c1_n2->SetFillColor(0);
c1_n2->SetBorderMode(0);
c1_n2->SetBorderSize(2);
c1_n2->SetTickx(1);
c1_n2->SetTicky(1);
c1_n2->SetLeftMargin(0.14);
c1_n2->SetRightMargin(0.08);
c1_n2->SetTopMargin(0.05);
c1_n2->SetBottomMargin(0.16);
c1_n2->SetFrameLineWidth(2);
c1_n2->SetFrameBorderMode(0);
c1_n2->SetFrameLineWidth(2);
c1_n2->SetFrameBorderMode(0);
Double_t Graph0_fx1003[10] = {
77.5122,
116.351,
193.951,
310.193,
387.817,
581.737,
776.317,
1164.85,
1948.34,
3130.55};
Double_t Graph0_fy1003[10] = {
0.429555,
0.643733,
1.0764,
1.72565,
2.16159,
3.24754,
4.33832,
6.52111,
10.9109,
17.5223};
Double_t Graph0_fex1003[10] = {
0,
0,
0,
0,
0,
0,
0,
0,
0,
0};
Double_t Graph0_fey1003[10] = {
0.000673582,
0.000994535,
0.00168363,
0.00264345,
0.0034271,
0.00536572,
0.00688484,
0.00997276,
0.015779,
0.0260387};
TGraphErrors *gre = new TGraphErrors(10,Graph0_fx1003,Graph0_fy1003,Graph0_fex1003,Graph0_fey1003);
gre->SetName("Graph0");
gre->SetTitle("Protons");
gre->SetFillColor(1);
gre->SetLineWidth(2);
gre->SetMarkerStyle(20);
TH1F *Graph_Graph1003 = new TH1F("Graph_Graph1003","Protons",100,0,3435.854);
Graph_Graph1003->SetMinimum(0);
Graph_Graph1003->SetMaximum(20);
Graph_Graph1003->SetDirectory(0);
Graph_Graph1003->SetStats(0);
Graph_Graph1003->SetLineWidth(2);
Graph_Graph1003->SetMarkerStyle(21);
Graph_Graph1003->GetXaxis()->SetTitle("Intensity / 10^{6}s^{-1}");
Graph_Graph1003->GetXaxis()->SetNdivisions(505);
Graph_Graph1003->GetXaxis()->SetLabelFont(22);
Graph_Graph1003->GetXaxis()->SetLabelOffset(0.015);
Graph_Graph1003->GetXaxis()->SetLabelSize(0.05);
Graph_Graph1003->GetXaxis()->SetTitleSize(0.06);
Graph_Graph1003->GetXaxis()->SetTitleFont(22);
Graph_Graph1003->GetYaxis()->SetTitle("#bar{A}_{BPM} / 10^{3} a.u.");
Graph_Graph1003->GetYaxis()->SetLabelFont(22);
Graph_Graph1003->GetYaxis()->SetLabelSize(0.05);
Graph_Graph1003->GetYaxis()->SetTitleSize(0.06);
Graph_Graph1003->GetYaxis()->SetTitleFont(22);
Graph_Graph1003->GetZaxis()->SetLabelFont(22);
Graph_Graph1003->GetZaxis()->SetLabelSize(0.05);
Graph_Graph1003->GetZaxis()->SetTitleSize(0.06);
Graph_Graph1003->GetZaxis()->SetTitleFont(22);
gre->SetHistogram(Graph_Graph1003);
TF1 *pol11004 = new TF1("pol1","pol1",0,3435.854);
pol11004->SetFillStyle(0);
pol11004->SetMarkerStyle(21);
pol11004->SetLineWidth(2);
pol11004->SetChisquare(16.16133);
pol11004->SetNDF(8);
pol11004->GetXaxis()->SetNdivisions(505);
pol11004->GetXaxis()->SetLabelFont(22);
pol11004->GetXaxis()->SetLabelOffset(0.015);
pol11004->GetXaxis()->SetLabelSize(0.05);
pol11004->GetXaxis()->SetTitleSize(0.06);
pol11004->GetXaxis()->SetTitleFont(22);
pol11004->GetYaxis()->SetLabelFont(22);
pol11004->GetYaxis()->SetLabelSize(0.05);
pol11004->GetYaxis()->SetTitleSize(0.06);
pol11004->GetYaxis()->SetTitleFont(22);
pol11004->SetParameter(0,-0.005407782);
pol11004->SetParError(0,0.0006990141);
pol11004->SetParLimits(0,0,0);
pol11004->SetParameter(1,0.005593003);
pol11004->SetParError(1,3.747116e-06);
pol11004->SetParLimits(1,0,0);
gre->GetListOfFunctions()->Add(pol11004);
gre->Draw("ap");
c1_n2->Modified();
c1_n2->cd();
c1_n2->SetSelected(c1_n2);
}