9 gROOT->SetStyle(
"Plain");
11 c1 =
new TCanvas (
"c1",
"",20,20,800,800);
14 TFile
f(
"slowing.root");
17 h1 = (TH1F*)
f.Get(
"1");
18 h2 = (TH1F*)
f.Get(
"2");
19 h3 = (TH1F*)
f.Get(
"3");
23 Int_t
nbinsx = h1->GetXaxis()->GetNbins();
43 sum = sum + h1->GetBinContent(i);
45 mini = h1->GetBinLowEdge(i);
46 maxi = mini + h1->GetBinWidth(i);
47 largeur = std::pow(10,maxi)-std::pow(10,mini);
50 h1->SetBinContent(i,h1->GetBinContent(i)*(1E9/1.6)/
largeur);
51 h2->SetBinContent(i,
h2->GetBinContent(i)*(1E9/1.6)/
largeur);
52 h3->SetBinContent(i,
h3->GetBinContent(i)*(1E9/1.6)/
largeur);
56 gStyle->SetOptStat(000000);
59 cout <<
"--> Integral of Phi (nm/eV) = " << sum << endl;
64 TH2F *ht =
new TH2F(
"",
"",2,1,6,2,1E2,1E8);
66 ht->GetXaxis()->SetTitle(
"Log(E (eV))");
67 ht->GetYaxis()->SetTitle(
"#phi/D (/cm^{2}/eV/Gy)");
68 ht->GetXaxis()->SetTitleSize(0.03);
69 ht->GetYaxis()->SetTitleSize(0.03);
70 ht->GetXaxis()->SetTitleOffset(1.7);
71 ht->GetYaxis()->SetTitleOffset(1.7);
82 TLegend *
legend=
new TLegend(0.6,0.65,0.88,0.85);
83 legend->AddEntry(h1,
"All e-",
"L");
84 legend->AddEntry(
h2,
"Primaries",
"L");
85 legend->AddEntry(
h3,
"Secondaries",
"L");
TFile f("microbeam.root")
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.