monte carlo simulation -...

21
Monte Carlo Simulation J.L. Tain [email protected] http://ific.uv.es/gamma/ Instituto de Física Corpuscular C.S.I.C - Univ. Valencia

Upload: others

Post on 08-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Monte Carlo Simulation

J.L. Tain

[email protected]://ific.uv.es/gamma/

Instituto de Física Corpuscular

C.S.I.C - Univ. Valencia

Bibliography:1. M. H. Kalos and Paula A. Whitlock. Monte Carlo Methods, volume I, Basics. John Wiley & Sons, New York, 1986.

2. Monte Carlo Transport of Electrons and Photons, edited by T. M. Jenkins, W. R. Nelson and A. Rindi (Plenum Press, 1988).

3. Monte Carlo Particle Transport Methods: Neutron and Photon Calculations, I. Lux and L. Koblinger (CRC Press, 1990).

4. Alex Bielajew, Fundamentals of the Monte Carlo method for neutral and charged particle transport, http://www-personal.engin.umich.edu/~bielajew/MCBook/

book.pdf

Monte Carlo simulation of experiments:• It is one of the most useful tools for experimental nuclear and particle physics.• Allows to design, optimize and analyze a great variety of experiments.

Monte Carlo methods in this sense were introduced by Fermi, Ulam, Von Neumann and Metropolis during the Manhattan Project to calculate neutron transport.

Monte Carlo method: reproduction of the behavior of physical systems and processes by sampling the appropriate random distributions using appropriate computer codes.

Monte Carlo methods are computer intensive. The generalization of their use follows the increase of computing power.

In the present context (nuclear and particle physics experiments) Monte Carlo simulation means:• simulation of the particles and their momenta, polarization state, etc, … produced in the reaction between particles (with given momenta, etc, …) or they disintegration• simulation of the interaction of these particles with detectors and of the information thereby generated and collected (eventually up to the electronics)

The first part, specific of the different experiments, is essentially up to the user, while for the second part there exist general purpose codes (which at least facilitate the job)

Some basic mathematical tools:

[ ]( ) ( ) ( ) ��� ==∈ ��+∞

∞−

������������

( ) ( ) ( )��������

�∞−

=≤=

• Random variable � with probability density function ����and cumulative distribution function ��:

• Uniform random distribution �� :

0 10 1

1

F Pseudo-random number generator:recursive algorithm, sequence determined by a starting seed and periodic

���� ����

• Methods of generating random numbers according a pdf(assumed ���� generator)

Inversion method:• sample �����→→→→ �

• determine ������

Rejection method:If �����≥≥≥≥ ���� and ��� easy• sample twice �����→→→→ ������• determine ����� ���� accept �� if �� ≤≤≤≤ �����������

���

����

����

��

and many more generic or specialized methods

Some useful general purpose codes:

GEANT (GEometry ANd Tracking), Geant4 and GEANT3:

GEANT3: • Subroutines packages in FORTRAN, user assembled.• Developed at CERN (1974, 1982 support discontinued in 1999 ) for electromagnetic interactions (photons, electrons, …) . • Hadron interactions through the incorporation of external codes (as GCALOR)

http://wwwasd.web.cern.ch/wwwasd/geant/

Geant4: • Subroutines packages in C++, user assembled.• Under development by an international collaboration (1994, CERNsupported).• All particles and processes (in principle)

http://geant4.web.cern.ch/geant4/

MCNP (Monte Carlo N-Particle transport):• FORTRAN code. Only neutrons, photons and electrons.• Developed at LANL (1977).• Emphasis in neutron interactions.

http://laws.lanl.gov/x5/MCNP/

PENELOPE• FORTRAN code. Only electrons and photons.• Developed at U. Barcelona (1996).• Emphasis in low energies.

http://www.nea.fr/html/dbprog/peneloperef.html

EGS (Electron Gamma Shower):• FORTRAN code. Uses and special extended FORTRAN. (MORTRAN) language to facilitate user interaction. Only electrons and photons.• Developed originally at SLAC (1978).• Later emphasis in low energies, in particular for medical applications.

http://www.slac.stanford.edu/egs/

Major parts:• Physical processes• Geometrical description• Event generation• Particle tracking• Information recording

EVENT

TRACKING

PHYSICS GEOMETRY

INFORMATION

Generic structure of a simulation code

Example: Geant4

Physical processes: defines particle types and their interactions.

Geometrical description: describes the dimensions of the setup and its material composition.

��������������� ��

���������� �

�� �����

� ��������

������������������

������ ������� ��

��������������

γγγγ � ����� ���� �������������

�� ������ ���������

��� ���� ���������

����� ��

��������

��������

�!������

�� ��������

"������ �

�����

Example: Geant4 electromagnetic interactions

Example: Geant4 geometries and complex detector

Event generation: describes the primary set of particles.

Particle tracking: follows the history of the particles, primary or secondary, under consideration of the geometry and the computation of the occurrence of a given physical process.

Courtesy of R. Taschereau, UCSF

Example: brachytherapysource (192Ir) in Geant4

Example: gamma-ray in a medium

Information recording: stores particles generated, energy deposited, etc, …

Example: fluorescence spectrum from 6.5 keV X-rays with Geant4

Example: particle hits in GLAST from high energy gamma-rays with Geant4

Sketch of a simulation:• A simulation run consists of a sufficient number of events. • The simulation starts with the random generation of one or more particles with given momenta, etc, … (event)• A particle travels freely until it makes an interaction (step).• The process causing the interaction is selected from all possible physical processes according to their probability.• These probabilities are either taken from parameterizations or from data bases. In general coming from experimental information.• Care is also taken on the change of medium, through the recognition of boundary crossings.• In the interaction, the particle can disappear, create new particles or simply change its kinematics• The history of each of the particles is followed in the same way until it disappears, or it comes to a rest, or it reaches avelocity regarded small enough (track).

• In some cases the number of interactions in the track is so large that the effect of many successive interactions has to be condensed in a fictitious step, using an appropriate model, in order to limit the computation time (condensed history).

• In some cases the number of events necessary to achieve a given statistical precision is so high that is necessary to apply some tricks (variance reduction techniques)

A step can be terminated by physics (interaction, decay,…), condensed history model, media boundaries, imposed cuts, …

real path

simulation step

The user has some flexibility to define simulation parameters (geometry, particles, physics, information, …). It is maximum for routine-library based (as GEANT3, Geant4)

Example of a minimum set of user routines for Geant4:• DetectorConstruction (specify geometry and materials)• PhysicsList (specify process available) • PrimaryGenerator (specify particles and momenta)• RunAction (controls the simulation run)• EventAction (controls the information at the event level)• SteppingAction (controls the information* at the step level)• VisManager (allows visualization of geometries and tracks)

*information= position, time, energy lost, secondariesgenerated, momenta of primary and secondaries, …

Some codes are more suited than others for specific purposes: particles and processes included, capacity to define complex geometries, variety of information that can be extracted, speed , user friendliness.

The quality of a simulation code has to be proved using generic test benches, but in general should be verified with calibration measurements.

G4StandardG4 LowE

NIST

15x15 cm2

DOSE PROFILESPHOTON ATENUATION

Some examples of the use of Monte Carlo simulations in experimental nuclear physics

Monte Carlo simulation of light transport in scintillation crystals with rough surfaces

Monte Carlo simulation of TAGS γγγγ-ray (and ββββ-ray,…) response

GEANT3 and Geant4 simulations with detailed geometry, light production and PMT response

C6D6 det.

Al pipe cooling

Ta backing

Monte Carlo simulation of C6D6 γγγγ-response to obtain PHWT weighting function for (n,γγγγ) cross-section measurements

GEANT3 simulations with detailed geometry including measured sample