Line | |
---|
1 | { |
---|
2 | |
---|
3 | double k=8.617343e-5; |
---|
4 | double T=200.0; |
---|
5 | |
---|
6 | TF1 *f = new TF1("Fermi-Dirac Distribution, T= 100 K ","1.0/(TMath::Exp((x-[0])/[1])+1)",-0.1,0.1); |
---|
7 | f->SetParameter(0,0); |
---|
8 | f->SetParameter(1,k*100); |
---|
9 | |
---|
10 | |
---|
11 | TF1 *f2 = new TF1("Fermi-Dirac Distribution, T= 200 K","1.0/(TMath::Exp((x-[0])/[1])+1)",-0.1,0.1); |
---|
12 | f2->SetParameter(0,0); |
---|
13 | f2->SetParameter(1,k*200); |
---|
14 | |
---|
15 | |
---|
16 | TF1 *f3 = new TF1("Fermi-Dirac Distribution, T= 250 K","1.0/(TMath::Exp((x-[0])/[1])+1)",-0.1,0.1); |
---|
17 | f3->SetParameter(0,0); |
---|
18 | f3->SetParameter(1,k*250); |
---|
19 | |
---|
20 | TF1 *f4 = new TF1("Fermi-Dirac Distribution, T= 300 K","1.0/(TMath::Exp((x-[0])/[1])+1)",-0.1,0.1); |
---|
21 | f4->SetParameter(0,0); |
---|
22 | f4->SetParameter(1,k*300); |
---|
23 | |
---|
24 | TF1 *f5 = new TF1("Fermi-Dirac Distribution, T= 400 K ","1.0/(TMath::Exp((x-[0])/[1])+1)",-0.1,0.1); |
---|
25 | f5->SetParameter(0,0); |
---|
26 | f5->SetParameter(1,k*400); |
---|
27 | |
---|
28 | f->SetTitle("T=100K"); |
---|
29 | f2->SetTitle("T=200K"); |
---|
30 | f3->SetTitle("T=250K"); |
---|
31 | f4->SetTitle("T=300K"); |
---|
32 | f5->SetTitle("T=400K"); |
---|
33 | |
---|
34 | |
---|
35 | |
---|
36 | TCanvas *can = new TCanvas(); |
---|
37 | |
---|
38 | f->SetNpx(1000.); |
---|
39 | f2->SetNpx(1000.); |
---|
40 | f3->SetNpx(1000.); |
---|
41 | f4->SetNpx(1000.); |
---|
42 | f5->SetNpx(1000.); |
---|
43 | |
---|
44 | f->SetLineColor(1); |
---|
45 | f2->SetLineColor(2); |
---|
46 | f3->SetLineColor(3); |
---|
47 | f4->SetLineColor(4); |
---|
48 | f5->SetLineColor(5); |
---|
49 | |
---|
50 | |
---|
51 | f->Draw(""); |
---|
52 | f2->Draw("same"); |
---|
53 | f3->Draw("same"); |
---|
54 | f4->Draw("same"); |
---|
55 | f5->Draw("same"); |
---|
56 | |
---|
57 | |
---|
58 | |
---|
59 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.