Esercitazione 11 Exercise 1 Write a program that generates the value according to the distribution function f(θ) = (sin^2 θ + a cos^2 θ)^{-1} In the range 0 ≤ θ ≤ 2π. *Compare the rejection technique and the inversion technique: *Generate 10000 values for each method using a = 0,5 and also for a = 0,001 *Plot the results for each and overlay the distribution curve f(θ) properly normalized *Compare the CPU time request for the 4 runs Alternative Alternatively, write a class that inherits with public inheritance from the ROOT TRandom3 class. In the class, the inversion and rejection method for the function f(θ) = (sin2 θ + a cos2 θ)-1 in the range 0 ≤ θ ≤ 2π have to be implemented *Compare the rejection technique and the inversion technique: *Generate 1000000 values for each method using a = 0,5 and also for a = 0,001 *Plot the results for each and overlay the distribution curve f() properly normalized *Compare the CPU time request for the 4 runs (hint: in ROOT it is possible the use the TStopwatch class)