diff --git a/Lectures_my/EMPP/MC_examples/CLT/clt.py b/Lectures_my/EMPP/MC_examples/CLT/clt.py new file mode 100644 index 0000000..bf24dbe --- /dev/null +++ b/Lectures_my/EMPP/MC_examples/CLT/clt.py @@ -0,0 +1,31 @@ +from ROOT import * +import sys + +def main(argv=sys.argv): + + + pi=3.14159265359 + c=TCanvas("c1", "c1", 800,600) + + NTOYS=1000000 + rand=TRandom(123) + + hists=[] + + for i in range(1,13, 2): + hist=TH1D("hist", "hist", 400, 0, 10) + for j in range(0, NTOYS): + tmp=0. + for k in range(0,i): + tmp+=rand.Rndm() + hist.Fill(tmp) + hists.append(hist) + + for i in range(0,len(hists)): + if(i==0): hists[i].DrawNormalized() + else: hists[i].DrawNormalized("SAME") + + c.SaveAs("clt.png") + c.SaveAs("clt.pdf") +if __name__ == "__main__": + sys.exit(main()) diff --git a/Lectures_my/EMPP/MC_examples/CLT/dupa.png b/Lectures_my/EMPP/MC_examples/CLT/dupa.png deleted file mode 100644 index 70db5f7..0000000 --- a/Lectures_my/EMPP/MC_examples/CLT/dupa.png +++ /dev/null Binary files differ diff --git a/Lectures_my/EMPP/MC_examples/CLT/ht.py b/Lectures_my/EMPP/MC_examples/CLT/ht.py deleted file mode 100644 index bfa1be7..0000000 --- a/Lectures_my/EMPP/MC_examples/CLT/ht.py +++ /dev/null @@ -1,31 +0,0 @@ -from ROOT import * -import sys - -def main(argv=sys.argv): - - - pi=3.14159265359 - c=TCanvas("c1", "c1", 800,600) - - NTOYS=1000000 - rand=TRandom(123) - - hists=[] - - for i in range(1,13, 2): - hist=TH1D("hist", "hist", 400, 0, 10) - for j in range(0, NTOYS): - tmp=0. - for k in range(0,i): - tmp+=rand.Rndm() - hist.Fill(tmp) - hists.append(hist) - - for i in range(0,len(hists)): - if(i==0): hists[i].DrawNormalized() - else: hists[i].DrawNormalized("SAME") - - c.SaveAs("dupa.png") - -if __name__ == "__main__": - sys.exit(main()) diff --git a/Lectures_my/EMPP/MC_examples/CLT/ht.py~ b/Lectures_my/EMPP/MC_examples/CLT/ht.py~ deleted file mode 100644 index d9f4fdf..0000000 --- a/Lectures_my/EMPP/MC_examples/CLT/ht.py~ +++ /dev/null @@ -1,31 +0,0 @@ -from ROOT import * -import sys - -def main(argv=sys.argv): - - - pi=3.14159265359 - c=TCanvas("c1", "c1", 800,600) - - NTOYS=10000 - rand=TRandom(123) - - hists=[] - - for i in range(1,13, 2): - hist=TH1D("hist", "hist", 400, 0, 10) - for j in range(0, NTOYS): - tmp=0. - for k in range(0,i): - tmp+=rand.Rndm() - hist.Fill(tmp) - hists.append(hist) - - for i in range(0,len(hists)): - if(i==0): hists[i].DrawNormalized() - else: hists[i].DrawNormalized("SAME") - - c.SaveAs("dupa.png") - -if __name__ == "__main__": - sys.exit(main())