File indexing completed on 2025-02-23 09:21:01
0001 {
0002 gROOT->Reset();
0003
0004
0005
0006
0007 double minE = 40;
0008 double maxE = 10000;
0009 double minY = 1e-2;
0010 double maxY = 1e+2;
0011 double minY1 = 1e-8;
0012 double maxY1 = 1;
0013
0014
0015
0016 TFile f("testem6_0.root");
0017
0018
0019
0020 TH1D* h7 = (TH1D*)f.Get("h7");
0021 TH1D* h8 = (TH1D*)f.Get("h8");
0022 TH1D* h9 = (TH1D*)f.Get("h9");
0023 TH1D* h10 = (TH1D*)f.Get("h10");
0024 TH1D* h11 = (TH1D*)f.Get("h11");
0025
0026
0027 TH1D* h12 = (TH1D*)f.Get("h12");
0028 TH1D* h13 = (TH1D*)f.Get("h13");
0029 TH1D* h14 = (TH1D*)f.Get("h14");
0030 TH1D* h15 = (TH1D*)f.Get("h15");
0031 TH1D* h16 = (TH1D*)f.Get("h16");
0032
0033
0034 TH1D* h17 = (TH1D*)f.Get("h17");
0035
0036
0037
0038 TCanvas* c1 = new TCanvas("c1", " ");
0039 gPad->SetLogy();
0040 h7->SetMinimum(minY);
0041 h7->SetMaximum(maxY);
0042 h7->GetXaxis()->SetLimits(std::log10(minE),std::log10(maxE));
0043 h7->SetTitle("Comparison of e+ Annihilation Processes(totcrsPerAtom)");
0044 h7->GetXaxis()->SetTickLength(0);
0045 h7->GetXaxis()->SetLabelOffset(999);
0046 h7->GetYaxis()->SetTitle("microbarn");
0047
0048 h7->SetLineColor(kRed);
0049 h9->SetLineColor(kBlue);
0050 h11->SetMarkerColor(kRed);
0051 h11->SetMarkerStyle(22);
0052 h10->SetMarkerStyle(22);
0053
0054 c1->cd();
0055 h7->Draw("HIST");
0056 h8->Draw("HIST SAME");
0057 h9->Draw("HIST SAME");
0058 h10->Draw("HIST P SAME");
0059 h11->Draw("HIST P SAME");
0060
0061 TGaxis *xaxis = new TGaxis(std::log10(minE),minY,std::log10(maxE),minY,minE,maxE,510,"G");
0062 xaxis->SetTitle("GeV");
0063 xaxis->Draw();
0064
0065 gStyle->SetOptStat(0);
0066
0067 TLegend* leg = new TLegend(0.78,0.59,0.98,0.76);
0068 leg->AddEntry(h8,"to 2 gammas","l");
0069 leg->AddEntry(h7,"to MuPair","l");
0070 leg->AddEntry(h9,"to Hadrons","l");
0071 leg->Draw();
0072
0073
0074
0075 TCanvas* c2 = new TCanvas("c2", " ");
0076 c2->cd();
0077
0078 gPad->SetLogy();
0079 h15->SetMinimum(minY1);
0080 h15->SetMaximum(maxY1);
0081 h15->GetXaxis()->SetLimits(std::log10(minE),std::log10(maxE));
0082 h15->SetTitle("Comparison of EM Processes(totcrsPerVolume)");
0083 h15->GetXaxis()->SetTickLength(0);
0084 h15->GetXaxis()->SetLabelOffset(999);
0085 h15->GetYaxis()->SetTitle("1/mm");
0086
0087 h12->SetLineColor(6);
0088 h13->SetLineColor(kGreen);
0089 h14->SetLineColor(kRed);
0090 h16->SetLineColor(kBlue);
0091
0092 c2->cd();
0093 h15->Draw("HIST");
0094 h13->Draw("HIST SAME");
0095 h14->Draw("HIST SAME");
0096 h12->Draw("HIST SAME");
0097 h16->Draw("HIST SAME");
0098
0099 TGaxis *xaxis1 = new TGaxis(std::log10(minE),minY1,std::log10(maxE),minY1,minE,maxE,510,"G");
0100 xaxis1->SetTitle("GeV");
0101 xaxis1->Draw();
0102
0103 gStyle->SetOptStat(0);
0104
0105 TLegend* leg1 = new TLegend(0.78,0.59,0.98,0.76);
0106 leg1->AddEntry(h15,"to 2 gammas","l");
0107 leg1->AddEntry(h14,"to MuPair","l");
0108 leg1->AddEntry(h16,"to Hadrons","l");
0109 leg1->AddEntry(h12,"Bremsstrahlung","l");
0110 leg1->AddEntry(h13,"Ionization","l");
0111 leg1->Draw();
0112 }