source: Benoit/FermiDirac/FD_Distr.C @ 1

Last change on this file since 1 was 1, checked in by benoit, 13 years ago
File size: 1.2 KB
Line 
1{
2
3double k=8.617343e-5;
4double T=200.0;
5
6TF1 *f = new TF1("Fermi-Dirac Distribution, T= 100 K ","1.0/(TMath::Exp((x-[0])/[1])+1)",-0.1,0.1);
7f->SetParameter(0,0);
8f->SetParameter(1,k*100);
9
10
11TF1 *f2 = new TF1("Fermi-Dirac Distribution, T= 200 K","1.0/(TMath::Exp((x-[0])/[1])+1)",-0.1,0.1);
12f2->SetParameter(0,0);
13f2->SetParameter(1,k*200);
14
15
16TF1 *f3 = new TF1("Fermi-Dirac Distribution, T= 250 K","1.0/(TMath::Exp((x-[0])/[1])+1)",-0.1,0.1);
17f3->SetParameter(0,0);
18f3->SetParameter(1,k*250);
19
20TF1 *f4 = new TF1("Fermi-Dirac Distribution, T= 300 K","1.0/(TMath::Exp((x-[0])/[1])+1)",-0.1,0.1);
21f4->SetParameter(0,0);
22f4->SetParameter(1,k*300);
23
24TF1 *f5 = new TF1("Fermi-Dirac Distribution, T= 400 K ","1.0/(TMath::Exp((x-[0])/[1])+1)",-0.1,0.1);
25f5->SetParameter(0,0);
26f5->SetParameter(1,k*400);
27
28f->SetTitle("T=100K");
29f2->SetTitle("T=200K");
30f3->SetTitle("T=250K");
31f4->SetTitle("T=300K");
32f5->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
44f->SetLineColor(1);
45f2->SetLineColor(2);
46f3->SetLineColor(3);
47f4->SetLineColor(4);
48f5->SetLineColor(5);
49
50
51f->Draw("");
52f2->Draw("same");
53f3->Draw("same");
54f4->Draw("same");
55f5->Draw("same");
56
57
58
59}
Note: See TracBrowser for help on using the repository browser.