Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please provide complete computations and python codes (thonny if possible) for the following acitivity. Thank you and will upvote! Use Monte - Carlo methods to
Please provide complete computations and python codes (thonny if possible) for the following acitivity. Thank you and will upvote!
Use Monte - Carlo methods to evaluate the scattering cross section for Compton scattering: ddeC,KN=2re2(EE)2(EE+EEsin2) wherein re is the classical electron radius, and E and E are the energies of the incident and scattered photon, respectively. Use any sampling technique (such as the inversion method, Neumann method and simple rejection method), as well as the distribution function g(x) that will be used to evaluate this cross - section. Methods: 1. Implement the algorithm given in O. N. Vassiliev's textbook "Monte Carlo Methods for Radiation Transport", for the following range of energies: a. 20kV to 200kV b. 5MV to 20MV The first range of energies corresponds to diagnostic radiological level energies, while the second corresponds to radiation therapy level energies. For (a) and (b), choose 10 representative energies which fall within the given range. 2. Run the algorithm between 100 to 500 times for each representative energy, and in each run, determine the energy E' of the scattered photon. 3. For each representative energy chosen, compute for the following: a. Average value of E resulting from the series of runs. b. Standard deviation of the distribution of values E. These should be the following output: 1. Probability density functions g(x) used to evaluate the Compton scattering cross - section. 2. Plots of the distribution of values E corresponding to each representative energy from the ranges given, together with the values of the average and standard deviation for each distribution. 3. Histogram plotting the average energy E corresponding to each representative energy value chosen. Reminder: 1. Include in the methodology of your laboratory report the algorithm used to solve these integrals. You may write it in flow chart form, or enumerate the steps. 2. If you are to use Neumann's method, demonstrate that Cg(x) satisfies the condition stated in the method by showing the graph of Cg(x) and f(x) as a function of x. For this problem, the instruction below can also be used as guide: Compton DCS: f(E)=ddeC,KN=2re2(EE)2(EE+EEsin2)=2re2(EE)2(EE+EE)(1EEEEsin2) Let us first define a distribution g(E) that will allow us, using the Neumann method, to sample this distribution: g(E)=21(A1E3E3+A2EE) For this distribution, we can make the following definitions: g1(E)=(E3A1)E3,g2(E)=(EA2)E The normalization constants 1 and 2 can be found as follows: EminEmaxg1(E)dE=E3A1EminEmaxE3=4E3A1(Emax4Emin4)=1E3A1=(Emax4Emin4)4EminEmaxg2(E)dE=EA2EminEmaxE=2EA2(Emax2Emin2)=1EA2=(Emax2Emin2)2 Note that the minimum and maximum input energies would have the following values: Emin=1+2EE,Emax=E By using g(E) derived earlier, take the ratio of f(E) and Cg(E) for all E' from Emin to Emax, then determine the smallest value of C1 such that Cg(E)f(E)1. If you have found the value of C that establishes the above condition, the algorithm can then proceed as follows: 1. Sample from g(E), over the interval [Emin,Emax]. Use the CDF to sample g(E). 2. Generate [Emin,Emax] using a uniform distribution. (NOTE: The RAND function can be used here). 3. If cg()f() for the given value of sampled earlier, then is your output value. Otherwise, start over from step 1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started