diff --git a/Lectures_my/EMPP/MC_examples/Euler_number/e_num.py b/Lectures_my/EMPP/MC_examples/Euler_number/e_num.py new file mode 100644 index 0000000..a27066a --- /dev/null +++ b/Lectures_my/EMPP/MC_examples/Euler_number/e_num.py @@ -0,0 +1,26 @@ +from ROOT import * +import sys + +def main(argv=sys.argv): + e=2.7182818284590452353602874713527 + seed=123 + rand = TRandom(seed) + hist = TH1I("hist", "hist", 100,0.,100.) + for i in range(1,10**8+1): + n=0 + start=0.; + while(true): + tmp=rand.Rndm() + n=n+1 + if(tmp