QCD and Monte Carlo simulation - desy.de
Transcript of QCD and Monte Carlo simulation - desy.de
H. Jung, QCD & MCs, University Antwerp, 2009 1
QCD and Monte Carlo simulation
H. Jung (DESY, University Antwerp)[email protected]
http://www.desy.de/~jung/qcd_and_mc_2009-2010/
H. Jung, QCD & MCs, University Antwerp, 2009 2
Outline of the lectures
24. Nov Intro to Monte Carlo techniques and structure of matter
25. Nov DGLAP: solution with MCs
1. Dec DGLAP/BFKL/CCFM: evolution for small x
2. Dec Cross sections and virtual corrections
15. Dec W/Z production in pp and soft gluon resummation
16. Dec NLO corrections
Exercises in the afternoons: 14:00 – 16:30
H. Jung, QCD & MCs, University Antwerp, 2009 3
Requests to you ...
If things go wrong .. lecture is too easy... too trivial ... too complicated, too chaotic or too boring ...
PLEASE complain immediately !
PLEASE ask questions any time !
H. Jung, QCD & MCs, University Antwerp, 2009 4
Let's start ....
H. Jung, QCD & MCs, University Antwerp, 2009 5
Outline for today
MCs
What is a Monte Carlo simulation ?
Random Numbers
Monte Carlo integration
QCD:
How to learn about the structure of matter ?
partons are free ...
distribution of partons in proton
H. Jung, QCD & MCs, University Antwerp, 2009 6
Literature for Monte Carlo MethodF. James Rep. Prog. Phys., Vol 43, 1145 (1980)
F. James Statistical Methods in Experiemntal Physics World Scientific 2006
S. Weinzierl Introduction to Monte Carlo method hep-ph/0006269
J. Vermaseren, Lectures on Monte Carlo, Madrid 2008 (http://www.nikhef.nl/~form/maindir/courses/course2/course2.html/)
G. Bohm, G. Zech Einfuhrung in Statistik und Messwertanalyse fur Physiker DESY 2007
V. Blobel, E. Lohrmann Statistische und numerische Methoden der Datenanalyse Teubner 1998
Particle Data Book S. Eidelman et al., Physics Letters B592, 1 (2004)
section on: Mathematical Tools (http://pdg.lbl.gov/)Hardware Random Number Generators:
A Fast and Compact Quantum Random Number Generator (
http://arxiv.org/abs/quant-ph/9912118/)
Quantum Random Number Generator (http://www.idquantique.com/products/quantis.htm/)
Hardware random number generator (http://en.wikipedia.org/wiki/)History of Monte Carlo Method
(http://www.geocities.com/CollegePark/Quad/2435/history.html)
H. Jung, QCD & MCs, University Antwerp, 2009 7
What is this ?
H. Jung, QCD & MCs, University Antwerp, 2009 8
What is this ?
Tell the difference between the production of a mini black hole
and a multijet event ?
H. Jung, QCD & MCs, University Antwerp, 2009 9
What is this ?
NO way ...
can only tell
probabilities !
H. Jung, QCD & MCs, University Antwerp, 2009 10
What is this ?
There is nothing
like
THE
BH event !!!
H. Jung, QCD & MCs, University Antwerp, 2009 11
What this is about ...
How to go from text book formula
for DIS
to
ep! e0X
pp! h+X
H. Jung, QCD & MCs, University Antwerp, 2009 12
.... or from gambling
H. Jung, QCD & MCs, University Antwerp, 2009 13
.... to
H. Jung, QCD & MCs, University Antwerp, 2009 14
... via applications in risk management
H. Jung, QCD & MCs, University Antwerp, 2009 15
Why do we need all that ?
because physics and life is more complicated than a simple equation, which can be solved analytically ....
Monte Carlo techniques are
widely used
are of enormous advantages
can be used to simulate any complicated process
are now EVEN used in particle physics theory ...... !!!!! ....
H. Jung, QCD & MCs, University Antwerp, 2009 16
Where is the problem ?
QPM process BGF process
total x-section heavy quarks (charm & bottom)
2-jet 3-jet
O(!s) O(!2s)
H. Jung, QCD & MCs, University Antwerp, 2009 17
Where is the problem ?F2 » !(!
¤p)
QPM process BGF process
total x-section heavy quarks (charm & bottom)
2-jet 3-jet
O(!s) O(!2s)
H. Jung, QCD & MCs, University Antwerp, 2009 18
QPM process BGF process
total x-section heavy quarks (charm & bottom)
2-jet 3-jet
Where is the problem: hadronic final state
O(!s) O(!2s)
F2 » !(!¤p)
!!jj (rad.)!!jj (rad.)
H. Jung, QCD & MCs, University Antwerp, 2009 19
Where is the problem: hadronic final state
processes of have not yet been calculated ...
interesting to go closer to outgoing proton remnant
forward jets !!!
O > !3
s
H. Jung, QCD & MCs, University Antwerp, 2009 20
Where is the problem: hadronic final state
processes of have not yet been calculated ...
interesting to go closer to outgoing proton remnant
forward jets !!!
O > !3
s
H. Jung, QCD & MCs, University Antwerp, 2009 21
Where is the problem: hadronic final state
processes of have not yet been calculated ...
interesting to go closer to outgoing proton remnant
jet veto in Higgs production at LHC
O > !3
s
H. Jung, QCD & MCs, University Antwerp, 2009
How to simulate these processes ?
H. Jung, QCD & MCs, University Antwerp, 2009 23
Monte Carlo methodMonte Carlo method
refers to any procedure that makes use of random numbers
uses probability statistics to solve the problem
Monte Carlo methods are used in:
Simulation of natural phenomena
Simulation of experimental apparatus
Numerical analysis
Random number:
H. Jung, QCD & MCs, University Antwerp, 2009 24
Monte Carlo methodMonte Carlo method
refers to any procedure that makes use of random numbers
uses probability statistics to solve the problem
Monte Carlo methods are used in:
Simulation of natural phenomena
Simulation of experimental apparatus
Numerical analysis
Random number:
one of them is 3
H. Jung, QCD & MCs, University Antwerp, 2009 25
Monte Carlo methodMonte Carlo method
refers to any procedure that makes use of random numbers
uses probability statistics to solve the problem
Monte Carlo methods are used in:
Simulation of natural phenomena
Simulation of experimental apparatus
Numerical analysis
Random number:
one of them is 3
No such thing as a single random number
H. Jung, QCD & MCs, University Antwerp, 2009 26
Monte Carlo methodMonte Carlo method
refers to any procedure that makes use of random numbers
uses probability statistics to solve the problem
Monte Carlo methods are used in:
Simulation of natural phenomena
Simulation of experimental apparatus
Numerical analysis
Random number:
one of them is 3
No such thing as a single random number
A sequence of random numbers is a set of numbers that have
nothing to do with the other numbers in a sequence
H. Jung, QCD & MCs, University Antwerp, 2009 27
Going out to Monte Carlo
H. Jung, QCD & MCs, University Antwerp, 2009 28
Random NumbersIn a uniform distribution of random numbers in [0,1] every number has the same chance of showing up
Note that 0.000000001 is just as likely as 0.5
H. Jung, QCD & MCs, University Antwerp, 2009 29
True Random NumbersRandom numbers from classical physics: coin tossing evolution of such a system can be
predicted, once the initial condition is known... however it is a chaotic process ... extremely sensitive to initial conditions.
Truly Random numbers used for
Cryptography
Confidentiality
AuthenticationScientific Calculation
Lotteries and gambling
do not allow to increase chance of
winning by having a bias ....
too bad
Random numbers from quantum physics: intrinsic random photons on a semi-transparent mirror
Available and tested in MC generator by a summer student
Generator is however very slow...
H. Jung, QCD & MCs, University Antwerp, 2009 30
True Random Numbers
atmospheric noise, which is quite easy to pick up with a normal radio: used by RANDOM.ORG
much more can be found on the web ....
H. Jung, QCD & MCs, University Antwerp, 2009 31
Random NumbersIn a uniform distribution of random numbers in [0,1] every number has the same chance of showing up
Note that 0.000000001 is just as likely as 0.5
H. Jung, QCD & MCs, University Antwerp, 2009 32
Pseudo Random NumbersPseudo Random Numbers
are a sequence of numbers generated by a computer algorithm, usually uniform in the range [0,1]
more precisely: algo's generate integers between 0 and M, and then rn=I
n/M
A very early example: Middle Square (John van Neumann, 1946):
generate a sequence, start with a number of 10 digits, square it, then take the
middle 10 digits from the answer, as the next number etc.:
57721566492 = 33317792380594909291
Hmmmm, sequence is not random, since each number is determined from the
previous, but it appears to be randomthis algorithm has problems .....
BUT a more complex algo does not necessarily lead to better random sequences .... Better us an algo that is well understood
H. Jung, QCD & MCs, University Antwerp, 2009 33
Congruential linear generator
develop our own simple generator
with seed I0
and multiplicative constant a and additive constant c
modulus
!maximal repetition period:
Exercise
m
O(m)
Ij = mod(aIj¡1 + c,m)
Rj =Ij
m
H. Jung, QCD & MCs, University Antwerp, 2009 34
Randomness tests
!Congruential generator is not bad … but it could be better ....
Congruential generator
H. Jung, QCD & MCs, University Antwerp, 2009 35
Randomness tests
!RANLUX much more sophistcated. Developed and used for QCD lattice calcs
RANLUXCongruential generatorM. Lüscher, A portable high-quality random number generator for lattice field theory simulations, Computer Physics Communications 79 (1994) 100 http://luscher.web.cern.ch/luscher/ranlux/index.html
Exercise
H. Jung, QCD & MCs, University Antwerp, 2009 36
Random Number generatorsstudy by B. Domnik (summerstudent 2005)
Compare random number generators with physics process
y spectrum of electron
! observe peaks
! coming from physics ?
H. Jung, QCD & MCs, University Antwerp, 2009 37
Random Number generatorsstudy by B. Domnik (summerstudent 2005)
From now on assume:we have good random number
generator:
we use RANLUX
Compare random number generators with physics process
y spectrum of electron
! observe peaks
! coming from physics ?
BUT coming from bad random number generator
H. Jung, QCD & MCs, University Antwerp, 2009 38
Randomness tests
test uniform distribution
correlation tests
sequence up – sequence down test
gap – test
random walk test
and ...
Blackboard
H. Jung, QCD & MCs, University Antwerp, 2009 39
Expectation values and variance
Expectation value (defined as the average or mean value of function f ):
for uniformly distributed u in [a,b] then
rules for expectation values:
Variance
rules for variance:
if x,y uncorrelated:
if x,y correlated
dG(u) = du/(b¡ a)
E[f ] =
!f(u)dG(u) =
!1
b¡ a
!b
a
f(u)du
!=1
N
N!
i=1
f(ui)
E[cx+ y] = cE[x] + E[y]
V [f ] =
!(f ¡ E[f ])
2dG=
!1
b¡ a
! b
a
(f(u)¡ E[f ])2du
!
V [cx+ y] = c2V [x] + V [y]
V [cx+ y] = c2V [x] + V [y]+2cE [(y ¡E[y]) (x¡E[x])]
Blackboard
H. Jung, QCD & MCs, University Antwerp, 2009 40
Generating distributions
From uniform distributions to distributions for any probability density function
use variable transformation
linear p.d.f:
1/x distribution
f(x) = 2x
u(x) =
!x
0
2tdt = x2
xj =puj
f(x) =1
x
u(x) =
!x
xmin
1
tdt
Fmax ¡ Fmin
xj = xmin
!xmax
xmin
!uj
H. Jung, QCD & MCs, University Antwerp, 2009 41
Generating distributions
Brute Force or Hit & Miss method
use this if there is no easy way to find a analytic integrable function
find
reject if
accept if
Improvements for Hit & Miss method by variable transformation
find
reject if
accept if
c · max f(x)
f(xi) < uj ¢ c
f(xi) > uj ¢ c
c ¢ g(x) > f(x)
f(x) < uj ¢ c ¢ g(x)
f(x) > uj ¢ c ¢ g(x)
H. Jung, QCD & MCs, University Antwerp, 2009 42
Law of large numbersLaw of large numbers
xi independent
random variables, having the same mean and
variances :
for large enough N the sum converges to the correct answer.Convergence
is given with a certain probability …
THIS is a mathematically serious and
precise statement !!!!
1
N
N!
i=1
xi ! µ
!2
i
H. Jung, QCD & MCs, University Antwerp, 2009 43
Central Limit Theorem
!independent on the original sub-distributions
!ixi ¡
!iµi!"
i!2
i
! N(0, 1)
f(x) =1
s
p2!exp
!¡
(x¡ a)2
2s2
!
Central Limit Theorem for large N the sum of independent random variables is always normally (Gaussian) distributed:
H. Jung, QCD & MCs, University Antwerp, 2009 44
Central Limit TheoremCentral Limit Theorem for large N the sum of independent random variables is always normally (Gaussian) distributed:
example: take sum of uniformly distributed random numbers:
f(x) =1
s
p2!exp
!¡
(x¡ a)2
2s2
!
Rn =!n
i=1Ri
E[R1] =!udu = 1/2,
V [R1] =!(u¡ 1/2)2du = 1/12
E[Rn] = n/2V [Rn] = n/12
Blackboard
H. Jung, QCD & MCs, University Antwerp, 2009 46
Central Limit TheoremCentral Limit Theorem for large N the sum of independent random variables is always normally (Gaussian) distributed
!for any starting distribution
!for uniform distribution
!for exponential distribution
Exercise
G. Bohm, G. ZechEinfuhrung in die Statistik und Messwertanalyse fur Physiker
H. Jung, QCD & MCs, University Antwerp, 2009 47
Monte Carlo IntegrationLaw of large numbers
MC estimate converges to true integralCentral limit theorem
MC estimate is asymptotically normally distributed
it approaches a Gaussian density
with effective variance V(f)! to decrease , either reduce V(f) or increase N
advantages for n-dimensional integral ...
i.e. phase space integrals 2 ! n processes
is where other approaches tend to fail
1
N
N!
i=1
f(ui)!1
b¡ a
!b
a
f(u)du
! =
!V [f ]pN
»
1pN
!
H. Jung, QCD & MCs, University Antwerp, 2009 48
Monte Carlo Integration
solve
estimate by
with variance
I =
!b
a
f(x)dx = (b¡ a)E[f(x)]
I » IMC =b¡ a
n
n!
i=1
f(xi)
V [IMC ] = !2
I= V
!b¡ a
n
!
i
f(xi)
!
=(b¡ a)2
nV [f ]
=(b¡ a)2
n
!"if(xi)
2
n¡
!"if(xi)
n
!2!
=1
n
·(b¡ a)2
!if(xi)2
n¡ I
2
MC
!
H. Jung, QCD & MCs, University Antwerp, 2009 49
MC method: advantage of hit & miss
integration ! weighting events
large fluctuations from large weights
weights also to errors applied
difficult to apply further
hadronizationreal events all have weight = 1 !!!
Hit & Miss method:
MC for function f(x): get random number:
R1 in (0,1) and R2 in (0,1) calculate x = R1
reject event if: fx < f
max R2
MC for function f(x): get random number:
R1 in (0,1) and R2 in (0,1) calculate x = R1
reject event if: fx < f
max R2
H. Jung, QCD & MCs, University Antwerp, 2009 50
MC method: advantage of hit & missintegration ! weighting events
large fluctuations from large weights
weights also to errors applied
difficult to apply further
hadronizationreal events all have weight = 1 !!!
Hit & Miss method:
MC for function f(x): get random number:
R1 in (0,1) and R2 in (0,1) calculate x = R1
reject event if: fx < f
max R2
MC for function f(x): get random number:
R1 in (0,1) and R2 in (0,1) calculate x = R1
reject event if: fx < f
max R2
H. Jung, QCD & MCs, University Antwerp, 2009 51
MC method: advantage of hit & missintegration ! weighting events
large fluctuations from large weights
weights also to errors applied
difficult to apply further hadronizationreal events all have weight = 1 !!!
Hit & Miss method:
MC for function f(x): get random number:
R1 in (0,1) and R2 in (0,1) calculate x = R1
reject event if: fx < f
max R2
MC for function f(x): get random number:
R1 in (0,1) and R2 in (0,1) calculate x = R1
reject event if: fx < f
max R2
H. Jung, QCD & MCs, University Antwerp, 2009 52
MC method: advantage of hit & miss
integration ! weighting events
large fluctuations from large weights
weights also to errors applied
difficult to apply further
hadronizationreal events all have weight = 1 !!!
Hit & Miss method:
MC for function f(x): get random number:
R1 in (0,1) and R2 in (0,1) calculate x = R1
reject event if: fx < f
max R2
MC for function f(x): get random number:
R1 in (0,1) and R2 in (0,1) calculate x = R1
reject event if: fx < f
max R2
H. Jung, QCD & MCs, University Antwerp, 2009 54
MC method: do even better ...
Importance sampling
MC for function f(x)approximate f(x) ~ g(x)
with g(x) > f(x) simple and integrable generate x according to g(x):
example:
reject event if: f(x) < g(x) R2
MC for function f(x)approximate f(x) ~ g(x)
with g(x) > f(x) simple and integrable generate x according to g(x):
example:
reject event if: f(x) < g(x) R2
!x
xmin
g(x0)dx0 = R1
!xmax
xmin
g(x0)dx0
f(x) = 1/x0.7
g(x) = 1/x
x = xmin ¢!xmax
xmin
!R1
H. Jung, QCD & MCs, University Antwerp, 2009 55
MC method: do even better ...
Importance sampling
MC for function f(x)approximate f(x) ~ g(x)
with g(x) > f(x) simple and integrable generate x according to g(x):
example:
reject event if: f(x) < g(x) R2
MC for function f(x)approximate f(x) ~ g(x)
with g(x) > f(x) simple and integrable generate x according to g(x):
example:
reject event if: f(x) < g(x) R2
!x
xmin
g(x0)dx0 = R1
!xmax
xmin
g(x0)dx0
f(x) = 1/x0.7
g(x) = 1/x
x = xmin ¢!xmax
xmin
!R1
H. Jung, QCD & MCs, University Antwerp, 2009 56
MC method: do even better ...
Importance sampling
MC for function f(x)approximate f(x) ~ g(x)
with g(x) > f(x) simple and integrable generate x according to g(x):
example:
reject event if: f(x) < g(x) R2
MC for function f(x)approximate f(x) ~ g(x)
with g(x) > f(x) simple and integrable generate x according to g(x):
example:
reject event if: f(x) < g(x) R2
!x
xmin
g(x0)dx0 = R1
!xmax
xmin
g(x0)dx0
f(x) = 1/x0.7
g(x) = 1/x
x = xmin ¢!xmax
xmin
!R1
H. Jung, QCD & MCs, University Antwerp, 2009 57
MC method: do even better ...
Importance sampling
MC for function f(x)approximate f(x) ~ g(x)
with g(x) > f(x) simple and integrable generate x according to g(x):
example:
reject event if: f(x) < g(x) R2
MC for function f(x)approximate f(x) ~ g(x)
with g(x) > f(x) simple and integrable generate x according to g(x):
example:
reject event if: f(x) < g(x) R2
!x
xmin
g(x0)dx0 = R1
!xmax
xmin
g(x0)dx0
f(x) = 1/x0.7
g(x) = 1/x
x = xmin ¢!xmax
xmin
!R1
H. Jung, QCD & MCs, University Antwerp, 2009 58
MC method: do even better ...
Importance sampling
WOW !!! very efficient even for peaked f(x)
MC for function f(x)approximate f(x) ~ g(x)
with g(x) > f(x) simple and integrable generate x according to g(x):
example:
reject event if: f(x) < g(x) R2
MC for function f(x)approximate f(x) ~ g(x)
with g(x) > f(x) simple and integrable generate x according to g(x):
example:
reject event if: f(x) < g(x) R2
!x
xmin
g(x0)dx0 = R1
!xmax
xmin
g(x0)dx0
f(x) = 1/x0.7
g(x) = 1/x
x = xmin ¢!xmax
xmin
!R1
H. Jung, QCD & MCs, University Antwerp, 2009 59
Importance SamplingMC calculations most efficient for small weight fluctuations:
f(x)dx ! f(x) dG(x)/g(x)
chose point according to g(x) instead of uniformly
f is divided by g(x) = dG(x)/dx
generate x according to:
relevant variance is now V(f/g):
small if g(x) ~ f(x)
how-to get g(x)
(1) g(x) is probability: g(x) > 0 and !dG(x) = 1
(2) integral !dG(x) is known analytically
(3) G(x) can be inverted (solved for x)
(4) f(x)/g(x) is nearly constant, so that V(f/g) is small compared to V(f)
R
!b
a
g(x0)dx0 =
!x
a
g(x0)dx0
H. Jung, QCD & MCs, University Antwerp, 2009 60
Integration: Monte Carlo versus others
One dimensional quadrature
Monte Carlo: Hit & Miss
w =1 and xi chosen randomly
Trapezoidal Rule:
approximate integral in sub-
interval by area of trapezoid
below (above) curveSimpson quadrature
approximate by parabolaGauss quadrature
approximate by higher order
polynomial
I =
!f(x)dx =
n!
i=1
wif(xi)
method err (1d) error
MC n¡1/2 n¡1/2
Trapez n¡2 n¡2/d
Simpson n¡4 n¡4/d
Gauss n¡2m+1 n¡(2m¡1)/d
H. Jung, QCD & MCs, University Antwerp, 2009
We have the method,....BUT
HOWTO simulate the physics
????
H. Jung, QCD & MCs, University Antwerp, 2009 62
MC event: hadron and detector level
!s ~ 318 GeV
x ~ 7. 10-5 at Q2 = 4 GeV2
H. Jung, QCD & MCs, University Antwerp, 2009 63
From experiment to measurementtake data • run MC
generator• detector simulation
Compare measurement with
simulation
Upppps ...... all measurements rely on proper MC generators and MC simulation !!!!
H. Jung, QCD & MCs, University Antwerp, 2009 64
From experiment to measurementtake data • run MC
generator• detector simulation
Compare measurement with
simulation
Upppps ...... all measurements rely on proper MC generators and MC simulation !!!!
define visible x - section in kinematic variablescalculate factor C
corr to correct from detector to hadron level
visible x-section on hadron level
d!data
had
dx=d!
data
det
dxCcorr with Ccorr =
d!MC
had
dx
d!MC
det
dx
H. Jung, QCD & MCs, University Antwerp, 2009
and now it is our turn ... to write
Monte Carlo programs
H. Jung, QCD & MCs, University Antwerp, 2009
.... but first,what about the physics ?