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.
 
 
 
 

446 lines
12 KiB

void betadedxz2()
{
//=========Macro generated from canvas: c1_n12/c1_n12
//========= (Tue Dec 5 12:04:04 2017) by ROOT version6.06/02
TCanvas *c1_n12 = new TCanvas("c1_n12", "c1_n12",10,71,700,500);
gStyle->SetOptStat(0);
gStyle->SetOptTitle(0);
c1_n12->Range(0.2050384,-0.2837461,0.7948584,1.489667);
c1_n12->SetFillColor(0);
c1_n12->SetBorderMode(0);
c1_n12->SetBorderSize(2);
c1_n12->SetTickx(1);
c1_n12->SetTicky(1);
c1_n12->SetLeftMargin(0.14);
c1_n12->SetRightMargin(0.08);
c1_n12->SetTopMargin(0.05);
c1_n12->SetBottomMargin(0.16);
c1_n12->SetFrameLineWidth(2);
c1_n12->SetFrameBorderMode(0);
c1_n12->SetFrameLineWidth(2);
c1_n12->SetFrameBorderMode(0);
TMultiGraph *multigraph = new TMultiGraph();
multigraph->SetName("");
multigraph->SetTitle(" ");
Double_t Graph_fx9[26] = {
0.308525,
0.340994,
0.366173,
0.386744,
0.404198,
0.419413,
0.432945,
0.44518,
0.456345,
0.466617,
0.476154,
0.485023,
0.493348,
0.501186,
0.508639,
0.515744,
0.522563,
0.529111,
0.53538,
0.541398,
0.549576,
0.557429,
0.564849,
0.571868,
0.578541,
0.5849};
Double_t Graph_fy9[26] = {
1.17009,
1.22548,
1.25412,
1.26762,
1.27924,
1.28926,
1.29822,
1.30487,
1.31167,
1.31966,
1.32693,
1.33277,
1.33748,
1.342,
1.34494,
1.34552,
1.34422,
1.34555,
1.34837,
1.35181,
1.35453,
1.35491,
1.35663,
1.35679,
1.35989,
1.36464};
TGraph *graph = new TGraph(26,Graph_fx9,Graph_fy9);
graph->SetName("Graph");
graph->SetTitle("energylist_p_bpmbeta1.txt");
graph->SetFillColor(1);
graph->SetLineWidth(2);
graph->SetMarkerStyle(20);
TH1F *Graph_Graph9 = new TH1F("Graph_Graph9","energylist_p_bpmbeta1.txt",100,0.2808875,0.6125375);
Graph_Graph9->SetMinimum(1.150635);
Graph_Graph9->SetMaximum(1.384095);
Graph_Graph9->SetDirectory(0);
Graph_Graph9->SetStats(0);
Graph_Graph9->SetLineWidth(2);
Graph_Graph9->SetMarkerStyle(21);
Graph_Graph9->GetXaxis()->SetNdivisions(505);
Graph_Graph9->GetXaxis()->SetLabelFont(22);
Graph_Graph9->GetXaxis()->SetLabelOffset(0.015);
Graph_Graph9->GetXaxis()->SetLabelSize(0.05);
Graph_Graph9->GetXaxis()->SetTitleSize(0.06);
Graph_Graph9->GetXaxis()->SetTitleFont(22);
Graph_Graph9->GetYaxis()->SetLabelFont(22);
Graph_Graph9->GetYaxis()->SetLabelSize(0.05);
Graph_Graph9->GetYaxis()->SetTitleSize(0.06);
Graph_Graph9->GetYaxis()->SetTitleFont(22);
Graph_Graph9->GetZaxis()->SetLabelFont(22);
Graph_Graph9->GetZaxis()->SetLabelSize(0.05);
Graph_Graph9->GetZaxis()->SetTitleSize(0.06);
Graph_Graph9->GetZaxis()->SetTitleFont(22);
graph->SetHistogram(Graph_Graph9);
TF1 *tf1_btvbeta110 = new TF1("tf1_btvbeta1","[0]*( (1- 0.5*(TMath::Log(2*0.511E6*x*x/(1-x*x)/[1] -x*x) )/TMath::Log(2*0.511E6*x*x/(1-x*x)/68.7 -x*x) ) / (1+[2]*(1- 0.5*(TMath::Log(2*0.511E6*x*x/(1-x*x)/[1] -x*x) )/TMath::Log(2*0.511E6*x*x/(1-x*x)/68.7 -x*x) )*1*1.65901*TMath::Power(x,-1.7218))+ (0.5*(TMath::Log(2*0.511E6*x*x/(1-x*x)/[1] -x*x) )/TMath::Log(2*0.511E6*x*x/(1-x*x)/68.7 -x*x) ) )",0.2808875,0.6125375);
tf1_btvbeta110->SetFillStyle(0);
tf1_btvbeta110->SetMarkerStyle(21);
tf1_btvbeta110->SetLineWidth(2);
tf1_btvbeta110->SetChisquare(0.001127477);
tf1_btvbeta110->SetNDF(23);
tf1_btvbeta110->GetXaxis()->SetNdivisions(505);
tf1_btvbeta110->GetXaxis()->SetLabelFont(22);
tf1_btvbeta110->GetXaxis()->SetLabelOffset(0.015);
tf1_btvbeta110->GetXaxis()->SetLabelSize(0.05);
tf1_btvbeta110->GetXaxis()->SetTitleSize(0.06);
tf1_btvbeta110->GetXaxis()->SetTitleFont(22);
tf1_btvbeta110->GetYaxis()->SetLabelFont(22);
tf1_btvbeta110->GetYaxis()->SetLabelSize(0.05);
tf1_btvbeta110->GetYaxis()->SetTitleSize(0.06);
tf1_btvbeta110->GetYaxis()->SetTitleFont(22);
tf1_btvbeta110->SetParameter(0,1.18145);
tf1_btvbeta110->SetParError(0,0.00692424);
tf1_btvbeta110->SetParLimits(0,0,0);
tf1_btvbeta110->SetParameter(1,0.05757586);
tf1_btvbeta110->SetParError(1,0.001610998);
tf1_btvbeta110->SetParLimits(1,0,0);
tf1_btvbeta110->SetParameter(2,-1.345384);
tf1_btvbeta110->SetParError(2,0.02225413);
tf1_btvbeta110->SetParLimits(2,0,0);
graph->GetListOfFunctions()->Add(tf1_btvbeta110);
multigraph->Add(graph,"p");
Double_t Graph_fx11[26] = {
0.347272,
0.371222,
0.391037,
0.408018,
0.422922,
0.436235,
0.447968,
0.459299,
0.470415,
0.478846,
0.487649,
0.495887,
0.503656,
0.510991,
0.517959,
0.524572,
0.530889,
0.536926,
0.542699,
0.550671,
0.558452,
0.565815,
0.565815,
0.572799,
0.579449,
0.585785};
Double_t Graph_fy11[26] = {
1.15061,
1.18124,
1.20539,
1.21968,
1.22856,
1.23451,
1.24983,
1.2618,
1.26521,
1.26492,
1.26371,
1.27061,
1.27334,
1.27687,
1.2796,
1.28062,
1.28058,
1.28007,
1.27389,
1.27711,
1.28057,
1.28576,
1.28604,
1.29318,
1.29729,
1.29912};
graph = new TGraph(26,Graph_fx11,Graph_fy11);
graph->SetName("Graph");
graph->SetTitle("energylist_he_bpmbeta1.txt");
graph->SetFillColor(1);
graph->SetLineWidth(2);
graph->SetMarkerStyle(21);
TH1F *Graph_Graph11 = new TH1F("Graph_Graph11","energylist_he_bpmbeta1.txt",100,0.3234207,0.6096363);
Graph_Graph11->SetMinimum(1.135759);
Graph_Graph11->SetMaximum(1.313971);
Graph_Graph11->SetDirectory(0);
Graph_Graph11->SetStats(0);
Graph_Graph11->SetLineWidth(2);
Graph_Graph11->SetMarkerStyle(21);
Graph_Graph11->GetXaxis()->SetNdivisions(505);
Graph_Graph11->GetXaxis()->SetLabelFont(22);
Graph_Graph11->GetXaxis()->SetLabelOffset(0.015);
Graph_Graph11->GetXaxis()->SetLabelSize(0.05);
Graph_Graph11->GetXaxis()->SetTitleSize(0.06);
Graph_Graph11->GetXaxis()->SetTitleFont(22);
Graph_Graph11->GetYaxis()->SetLabelFont(22);
Graph_Graph11->GetYaxis()->SetLabelSize(0.05);
Graph_Graph11->GetYaxis()->SetTitleSize(0.06);
Graph_Graph11->GetYaxis()->SetTitleFont(22);
Graph_Graph11->GetZaxis()->SetLabelFont(22);
Graph_Graph11->GetZaxis()->SetLabelSize(0.05);
Graph_Graph11->GetZaxis()->SetTitleSize(0.06);
Graph_Graph11->GetZaxis()->SetTitleFont(22);
graph->SetHistogram(Graph_Graph11);
multigraph->Add(graph,"p");
Double_t Graph_fx12[26] = {
0.407871,
0.44884,
0.479338,
0.503822,
0.524858,
0.543065,
0.5589,
0.573741,
0.586721,
0.59808,
0.608891,
0.619196,
0.628229,
0.636893,
0.645213,
0.653209,
0.6609,
0.667643,
0.674162,
0.681086,
0.689547,
0.698204,
0.705926,
0.713327,
0.719927,
0.726761};
Double_t Graph_fy12[26] = {
0.70017,
0.75557,
0.795619,
0.823137,
0.846695,
0.867102,
0.886679,
0.902141,
0.91659,
0.929151,
0.94155,
0.952243,
0.961937,
0.970188,
0.976903,
0.987228,
0.994266,
1.00407,
1.00707,
1.01511,
1.02523,
1.03263,
1.04101,
1.04986,
1.05878,
1.06459};
graph = new TGraph(26,Graph_fx12,Graph_fy12);
graph->SetName("Graph");
graph->SetTitle("energylist_c_bpmbeta1.txt");
graph->SetFillColor(1);
graph->SetLineWidth(2);
graph->SetMarkerStyle(22);
TH1F *Graph_Graph12 = new TH1F("Graph_Graph12","energylist_c_bpmbeta1.txt",100,0.375982,0.75865);
Graph_Graph12->SetMinimum(0.663728);
Graph_Graph12->SetMaximum(1.101032);
Graph_Graph12->SetDirectory(0);
Graph_Graph12->SetStats(0);
Graph_Graph12->SetLineWidth(2);
Graph_Graph12->SetMarkerStyle(21);
Graph_Graph12->GetXaxis()->SetNdivisions(505);
Graph_Graph12->GetXaxis()->SetLabelFont(22);
Graph_Graph12->GetXaxis()->SetLabelOffset(0.015);
Graph_Graph12->GetXaxis()->SetLabelSize(0.05);
Graph_Graph12->GetXaxis()->SetTitleSize(0.06);
Graph_Graph12->GetXaxis()->SetTitleFont(22);
Graph_Graph12->GetYaxis()->SetLabelFont(22);
Graph_Graph12->GetYaxis()->SetLabelSize(0.05);
Graph_Graph12->GetYaxis()->SetTitleSize(0.06);
Graph_Graph12->GetYaxis()->SetTitleFont(22);
Graph_Graph12->GetZaxis()->SetLabelFont(22);
Graph_Graph12->GetZaxis()->SetLabelSize(0.05);
Graph_Graph12->GetZaxis()->SetTitleSize(0.06);
Graph_Graph12->GetZaxis()->SetTitleFont(22);
graph->SetHistogram(Graph_Graph12);
multigraph->Add(graph,"p");
Double_t Graph_fx13[21] = {
0.436386,
0.479001,
0.511349,
0.537325,
0.559062,
0.577647,
0.594124,
0.608731,
0.621998,
0.634024,
0.645051,
0.655227,
0.664724,
0.673476,
0.681811,
0.689682,
0.697243,
0.704219,
0.710969,
0.717113,
0.726111};
Double_t Graph_fy13[21] = {
0.637511,
0.682739,
0.716111,
0.740358,
0.761285,
0.780592,
0.797751,
0.814711,
0.828105,
0.838841,
0.851544,
0.861821,
0.871405,
0.881324,
0.891275,
0.901056,
0.909476,
0.915073,
0.921715,
0.925899,
0.939145};
graph = new TGraph(21,Graph_fx13,Graph_fy13);
graph->SetName("Graph");
graph->SetTitle("energylist_o_bpmbeta1.txt");
graph->SetFillColor(1);
graph->SetLineWidth(2);
graph->SetMarkerStyle(23);
TH1F *Graph_Graph13 = new TH1F("Graph_Graph13","energylist_o_bpmbeta1.txt",100,0.4074135,0.7550835);
Graph_Graph13->SetMinimum(0.6073476);
Graph_Graph13->SetMaximum(0.9693084);
Graph_Graph13->SetDirectory(0);
Graph_Graph13->SetStats(0);
Graph_Graph13->SetLineWidth(2);
Graph_Graph13->SetMarkerStyle(21);
Graph_Graph13->GetXaxis()->SetNdivisions(505);
Graph_Graph13->GetXaxis()->SetLabelFont(22);
Graph_Graph13->GetXaxis()->SetLabelOffset(0.015);
Graph_Graph13->GetXaxis()->SetLabelSize(0.05);
Graph_Graph13->GetXaxis()->SetTitleSize(0.06);
Graph_Graph13->GetXaxis()->SetTitleFont(22);
Graph_Graph13->GetYaxis()->SetLabelFont(22);
Graph_Graph13->GetYaxis()->SetLabelSize(0.05);
Graph_Graph13->GetYaxis()->SetTitleSize(0.06);
Graph_Graph13->GetYaxis()->SetTitleFont(22);
Graph_Graph13->GetZaxis()->SetLabelFont(22);
Graph_Graph13->GetZaxis()->SetLabelSize(0.05);
Graph_Graph13->GetZaxis()->SetTitleSize(0.06);
Graph_Graph13->GetZaxis()->SetTitleFont(22);
graph->SetHistogram(Graph_Graph13);
multigraph->Add(graph,"p");
multigraph->Draw("a");
multigraph->GetXaxis()->SetTitle("Lorentz #beta");
multigraph->GetXaxis()->SetNdivisions(505);
multigraph->GetXaxis()->SetLabelFont(22);
multigraph->GetXaxis()->SetLabelOffset(0.015);
multigraph->GetXaxis()->SetLabelSize(0.05);
multigraph->GetXaxis()->SetTitleSize(0.06);
multigraph->GetXaxis()->SetTitleFont(22);
multigraph->GetYaxis()->SetTitle("#frac{dA}{dE}");
multigraph->GetYaxis()->SetLabelFont(22);
multigraph->GetYaxis()->SetLabelSize(0.05);
multigraph->GetYaxis()->SetTitleSize(0.06);
multigraph->GetYaxis()->SetTitleFont(22);
TLegend *leg = new TLegend(0.7,0.7,0.9,0.9,NULL,"brNDC");
leg->SetBorderSize(0);
leg->SetTextFont(22);
leg->SetTextSize(0.047);
leg->SetLineColor(1);
leg->SetLineStyle(1);
leg->SetLineWidth(2);
leg->SetFillColor(0);
leg->SetFillStyle(0);
TLegendEntry *entry=leg->AddEntry("Graph","Protons","p");
entry->SetLineColor(1);
entry->SetLineStyle(1);
entry->SetLineWidth(1);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(20);
entry->SetMarkerSize(1);
entry->SetTextFont(22);
entry=leg->AddEntry("Graph","Helium","p");
entry->SetLineColor(1);
entry->SetLineStyle(1);
entry->SetLineWidth(1);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(21);
entry->SetMarkerSize(1);
entry->SetTextFont(22);
entry=leg->AddEntry("Graph","Carbon","p");
entry->SetLineColor(1);
entry->SetLineStyle(1);
entry->SetLineWidth(1);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(22);
entry->SetMarkerSize(1);
entry->SetTextFont(22);
entry=leg->AddEntry("Graph","Oxygen","p");
entry->SetLineColor(1);
entry->SetLineStyle(1);
entry->SetLineWidth(1);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(23);
entry->SetMarkerSize(1);
entry->SetTextFont(22);
leg->Draw();
c1_n12->Modified();
c1_n12->cd();
c1_n12->SetSelected(c1_n12);
}