Presentation is loading. Please wait.

Presentation is loading. Please wait.

Improving the Generation of Random Numbers in PLACET Comparision of RNG replacements Martin Blaha University of Vienna AT CERN 31.07.2013.

Similar presentations


Presentation on theme: "Improving the Generation of Random Numbers in PLACET Comparision of RNG replacements Martin Blaha University of Vienna AT CERN 31.07.2013."— Presentation transcript:

1 Improving the Generation of Random Numbers in PLACET Comparision of RNG replacements Martin Blaha University of Vienna AT CERN 31.07.2013

2 Random Number Generators Current state 37 functions to run RNGs ~3 functions per RNG redundancy danger of confusion

3 Random Number Generators rndmst5brndm1rndm5rndm7gasdev2RANDOM_GAUSS rndm5brndmst2rndmst5arndmst8rndmstRandomSelect rndm5b_copy_datarndm2rndm5arndm8rndm_saveRndmSelect rndmst0rndmst3rndmst6expdevrndm_loadgasdev8_select rndm0rndm3rndm6gasdev_0RANDOMrndmst8_select rndmst1rndmst5rndmst7gasdevRANDOM8rndm8_select

4 new implementation one class for RNGs use of gsl library - up to date more functionality providence of different RNGs as "streams" Random Number Generators

5 New class Functionality set seeds and generators reset RNGs storage of state uniform/gaussian/discrete distributions 7 global “streams” MisalignmentsCavity RadiationGroundmotion InstrumentationSelect User

6 Testing Random Numbers Problem of comparision → numdiff tests not working Kolmogorov Sminorv Test 76% probability for same function → still good idea to compare distances

7 Performed Tests 1.Random Numbers from normal distribution 2.Emittance growth without correction 3.Emittance growth with simple correction 4.Beamtracking without correction 5.Beamtracking with correction 6.Radiation in beam delivery system 7.Groundmotion ATL law 8.Groundmotion Generator

8 1. Random Number Generators Comparision between old and new Placet implementation of 100 and 10 000 sorted random numbers, weight by a gaussian distribution

9 Distance betwee the random number functions and close up for the first 3500 numbers (2 different tests) Numbers are distributed between +/- 4 Distance for 1000 samples 0.04 <1% of the total range 1. Random Number Generators

10 2. Emittance growth - no correction Comparision of emittance growth without correction Numbers are distributed between (0,7e6) Distance for 3500 samples 1.823e4 <1% of the total range

11 3. Emittance growth - simple correction Comparision of emittance growth with correction Numbers are distributed between (0,13) Distance for 3500 samples 0.039 <1% of the total range

12 4. Beamtracking - no correction Comparision of emittance without correction Numbers are distributed between (0,7e5) Distance for 3500 samples 1500,3 <1% of the total range

13 5. Beamtracking - simple correction Comparision of emittance with correction Numbers are distributed between (0,3) Distance for 3500 samples 0.031 ~1% of the total range

14 6. Radiation in Beam delivery system Radiation is single particle effect → difficult to compare → needs many particles - 30 000 Tracking and Radiation

15 6. Radiation in Beam delivery system Comparision of radiation All distributions show distances below 1% of the total range

16 6. Radiation Comparision of covariance matrices Covariance matrix of new code Covariance matrix of old code

17 6. Radiation Comparision of covariance matrices Squareroot of covariance matrix of new code Squareroot of covariance matrix of old code Frobenius norm:

18 7. Groundmotion ATL law Beam tracking Numbers are distributed between (0.2,0.2002) Distance for 100 machines 2.49e-6 ~1% of the total range 5 timesteps, no filters, no bpm noise, no feedback

19 7. Groundmotion ATL law Beam tracking in measure station 1 Numbers are distributed between (2033.12,2033.14) Distance for 100 machines 0.001 ~5% of the total range 5 timesteps, no filters, no bpm noise, no feedback

20 8. Groundmotion Generator Beam tracking Numbers are distributed between (0,2,0.205) Distance for 100 machines 7.4e-5 <1% of the total range Distance for 1000 machines 1.6e-5 <1% of total range 5 timesteps, no filters, no bpm noise, no feedback

21 8. Groundmotion Generator Beam tracking in measure Station 1 Numbers are distributed between (2033.65,2033.95) Distance for 100 machines 0.09174 ~30% of the total range Distance for 1000 machines 0.013082 ~3% of total range 5 timesteps, no filters, no bpm noise, no feedback

22 8. Groundmotion Generator function behaviour Beam Tracking in Measure Station 1Conclusion: 1000 machines are not enough Standarddeviation for 100 machines Standarddeviation for 1000 machines

23 What has been done - Outlook # changed lines ~ 2500 # removed lines ~ 900 # headers and files ~ 30 Testing: Results show similar behaviour Conclusion: results are reproduceable ready to make code parallel new TCL implimentations allow more flexibility


Download ppt "Improving the Generation of Random Numbers in PLACET Comparision of RNG replacements Martin Blaha University of Vienna AT CERN 31.07.2013."

Similar presentations


Ads by Google