Monte Carlo Techniques - PowerPoint PPT Presentation

1 / 44
About This Presentation
Title:

Monte Carlo Techniques

Description:

Monte Carlo Techniques. Numerical integration. Sampling of (statistical) ... 1) Generate angles as before in the primed coordinates. ... – PowerPoint PPT presentation

Number of Views:153
Avg rating:3.0/5.0
Slides: 45
Provided by: jlab5
Category:

less

Transcript and Presenter's Notes

Title: Monte Carlo Techniques


1
Monte Carlo Techniques
  • Numerical integration
  • Sampling of (statistical) distributions for
    simulations
  • Determining solid angle acceptance
  • Acceptance function example HMS spectrometer
  • Bin-to-bin migration
  • Event (re)weighting

multiple scattering and energy straggling
2
Basic Idea (by Example) 1D integration
We wish to find the integral of a function f(x)
on the interval

x1 lt x lt x2
y
YMAX
f(x)
0
x
x2
x1
Randomly pick sets of x and y for
x1 lt x lt x2 and y lt ymax
3
y
Ymax
f(x)
0
x
x2
x1
4
y
Ymax


f(x)

























0
x


x2
x1
Then
1
Fractional uncertainty ? Nacc ?
Many events for good accuracy!
5
Example Area under Gaussian
-5? lt x lt 5??? can shift x -gt xx0 if x0 ? 0
Generate x uniformly from y
uniformly from
0 lt y lt 1 A is just scale factor
Check that y lt G(x)/A
Gaussian with ???? 1 x0 0 A 1
Generated Accepted
6
(No Transcript)
7

Accuracy can be improved using mean value theorem
?ab f(x)dx (b-a) f(c), for some c, with a lt
c lt b
???? f(c) ?ab f(x)dx ? f(a,b)
(average of f on (a,b))
Note that

Therefore, ?ab f(x)dx (b-a) f(a,b)
and f(a,b) can be found via
For x randomly distributed

The fractional uncertainty 1/N Better than
previous method!
8
Integration of Gaussian
with ? 1, x0 0, A 1
??
-x2
?? dx e ????
Recall that
??
??
?? dx e ?2???????????
-x2/2

??
9
Example Determine ? from rainfall
A circular pan is placed in a square pan and then
placed outside into a uniform rainfall. The
volume of water contained in each pan should be
proportional to the area.
10
We can simulate this by randomly generating the
x,y positions of raindrops inside the square pan.
x
x
Ratio of areas (circle/square) f????r2/(2r)2
?/4 gt ? 4f
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
29 inside 41 total
x
x
x
x
x
x
x
x
x
x
x
f 29/41
gt ? ? 429/41 2.83
Better statistics will improve the result!
11
? Sampling Fortran Code
  • For each event X and Y positions sampled
    uniformly on interval -1,1 (Ngen)?
  • Check whether event is within circle of radius
    1 ( Nacc )?
  • Determine fraction of events within circle, f
    Nacc / Ngen
  • ?? 4f

12
Solid Angle Acceptance
13
Solid Angle Acceptance of Circular hole
d
R
cos???max) d/??R2d2 1/ ?(R/d)2 1
For d 3 cm, R1 cm, cos???max) 0.9487
???? ?d? ?d? ?dcos(?) 2? cos(?)
2????????????????????????
-gt We can calculate this explicitly.
14
Determination of solid angle ???with Monte Carlo
  • Generate event directions uniformly in cos(?)
    for z gt 0 (Ngen events)
    ie 0 lt cos(?) lt 1
  • Check whether events hit the collimator (
    Nacc events)
    ie
    cos(?) lt cos(?max)?
  • The total solid angle generated into is ½ of
    4???so that
  • The solid angle covered by the collimator is
    then determined from

?? 2???Nacc / Ngen)
Results from simulation of 1M generated events
Nacc 51224 ??????????? 2????????????????)
0.1024(5)?
15
Solid Angle Acceptance Extended ? source with
uniform emission
Metal collimator
Determine the solid angle acceptance
for particles coming from target center which
make it through circular hole of radius R. Same
as previous example.
y
x
For extended source we can 1) Generate angles
as before. 2) Generate x positions (x0) at
vertex. 3) Apply translation to tracks vectors.
(see next slide)? 4) Project
translated track to zd and check whether
x2y2 lt r2
t
d
16
Apply translation for extended source
1) Generate angles as before in the primed
coordinates.
At zd
X' d tan(?) cos(?)?
Y' d tan(?) sin(?)?
2) Generate x positions (x0) at vertex and apply
translation.
X X' X0
17
(No Transcript)
18
Cartesian approximation
Consider the spherical cap below.
Clearly the ratio of this area to it's cap area
is much closer to 1 then this area to it's cap
area
If the angular range is small then the cap area
is ? the flat area.
For small angles it is a good approximation to
treat the cap area as flat and then use the
following cartesian angles X' (angle
between trajectory and X-axis)? Y' (angle
between trajectory and Y-axis)?
19
HMS Detector Hut
Scattered e-
Spectrometer axis (central ray)
?c
Scattering Angles In-plane ?????c Y'
Out-of-plane cos(?)
collimator
??
Y' (angle relative to central ray in
horizontal plane)?
Target
e- beam
20
Example HMS octagonal collimator
Constraint on straight sides
x lt 9 cm y lt 3.5 cm
X'max 9 cm / 126.2 cm 71.3 mrad
y'max 3.5 cm / 126.2 cm 27.7 mrad
gt generate uniformly on -80 mrad lt
x lt 80 mrad -40 mrad lt y lt 40 mrad
y
Each diagonal side has a slope of 3.5/9
x
Constraint on all diagonal sides
y lt -3.5/9x - 3/23.5 (top right,
xlt0)? y lt 3.5/9x - 3/23.5 (bottom
right, xgt0)?
y lt 3.5/9x -3/23.5
  • Generate uniformly in x', y'
  • Transport to collimator (x dx' , y dy',
    with d 126.3 cm)
  • Check x,y positions at collimator

21
Results of simulation
Generated (100k)? Accepted (54k)?
Total generation volume (2.0.040 rad)(20.08
rad) 0.0128 Sr
?? 54k (0.0128 Sr / 100k) 6.91 mSr
22
(No Transcript)
23
The acceptance function
24
Calculating Acceptance Corrections

25
However,???eff does not depend on the generation
limits. For uniform generation, ??eff(???) ?
Nrec(???) ??gen(?)
tot
tot
Nrec(???) Ngen(???)
??gen????
A(???) ??gen(???)?
(momentum from central value)?
26
Multiple scattering effects
Multiple Coulomb scattering (multiple scattering)
causes changes in trajectory and position at
detectors after the scattering.
Ignoring the small of large angle single
scatterings, the angular distribution for
multiple scattering is approximately Gaussian,
P(?) 2??exp(-?2 /lt?2gt)d?????with lt?2gt the
mean squared scattering angle
see
previous lecture notes (W.R. Leo pg 46).
27
Multiple Scattering can
  • affect the acceptance if it occurs before the
    apertures.
  • affect the angle resolution or apparent
    efficiency of detectors if it happens after the
    apertures.

Events that and a vertex angle in a particular
bin can migrate to another bin (typically an
adjacent bin)? This is called bin-to-bin
migration and should be included in the full
response function for the detector system
(acceptance bin migration due to resolution,
MS, energy loss, etc.)?
28
Energy loss effects
  • affect the acceptance if it occurs before the
    apertures.
  • affect the angle resolution or apparent
    efficiency of detectors if it happens after the
    apertures.

Events that have a vertex energy in a particular
bin can migrate to another bin (typically an
adjacent bin)? This is called bin-to-bin
migration and should be included in the full
response function for the detector system
(acceptance bin migration due to resolution,
MS, energy loss, etc.)?
Must generate in kinematics from which events
can migrate into kinematic range of
interest.
29
Event weighting versus distribution sampling
Can generate uniformly and then apply a physics
weighting factor, W eg. N(E') N(E')
W(E'), where N(E') is the event distribution in

E' as generated (uniformly in this case).


Event weighting after event generation can
significantly improve statistical uncertainties
in regions where the distribution of physical
events is small. ie. uniform generation implies
equal statistics in generation variables!
As generated weighted
30
MC Normalization factor, A
If we know the distribution, N(E'), of events
with energy E' for some physical process, then
the physical of events we would observe with
perfect detection devices should be
Where E'min lt E' lt E'max is the energy
measurement range.
However we generated Ngen events uniformly in
this range, so that the MC scale factor A should
be
Ntot 1 ? N(E')dE'
gt A
The integral we get for free during the
generation process by the methods previously
discussed.
31
An Example electron proton inclusive
scattering with the HMS spectrometer in Hall C
32
Reminder about cross sections and scattering
probabilities
Define the (differential) cross section by
d??
N(cos?)?

dcos?
dcos???e???L
N(cos?) of detected electrons in
d(cos?)? Ne of incident
electrons ?L of target particles per
Area
33
Evidence of nucleus substructure
angular distribution expected in scattering
electrons from a point nucleus
R. Hofstadter, 1953
Can also study structure of protons and neutrons
by comparing measured scattering distributions
to those expected for point particle.
34
Inclusive cross sections in the resonance region
(Experiment E94-110)
Resonances (Hadron excitations)?
Statistical uncertainties included!
  • Hadrons particles made of tightly bound
    quarks (ie protons).
  • W2 value of peak indicates the mass of the
    resonance.
  • Resonances disappear at large Q2 .

35
Cross Section Extraction Methods
For each bin in ????????the number of detected
electrons is N- L(d?/d?d?'?(?E'
??)?A(E',?) BG with L Integrated
Luminosity ( of beam electronstargets/area)?
? Total efficiency for detection
A(E',?) Acceptance for bin BG
Background events. The efficiency corrected
electron yield is Y (N- -
BG)/?????????L???data?????????????'???? For
known A(E',?), ???data???Y?????????????'????L??

36
From previous slide ????d??d?dE'???Y(?'???
?????????????'????L?????Acceptance correction
method)? ? ??????'????is the?probability that a
particle will make it through the
spectrometer and?must be measured or
determined from simulation! ??eff??? ??
A(E',?) is the effective solid angle or solid
angle acceptance. ?? Conversely, we can
simulate Monte Carlo data using a cross section
model to obtain YMC(?'???
L???mod??????????MC(E',?) Taking ratio to
data and assuming that AMC A??yields ? ?????????
d??d?d?' ??mod Y(?'???/YMC(?'???? (MC
ratio method)
37
Notes on Acceptance
  • In general, whether a particle makes it to the
    detectors without hitting the collimator, beam
    pipe, or other stopping aperture depends on the
    full vertex coordinate and the momentum vector of
    the particle at the target, and implicitly on the
    spectrometer optics) i.e. A A(E',x,y,z,X',Y').

  • The acceptance above is purely deterministic.
    The trajectory through the spectrometer will
    either intersect with an aperture or not.


  • However, if we know the fraction of particles
    at each vertex location then we can properly
    average over x, y, and z and write A
    A(E',X',Y')
  • The physics only depends on ? (combination of
    X', Y') gt A A(E',?)
    (This has been checked!)
  • Multiple scattering and energy straggling
    enter only though bin migration and
    are accounted for in an approximate way.

38
JLAB HALL C
Shielded Detector Hut
Superconducting Dipole
HMS
Target Scattering Chamber
SOS
Superconducting Quadrupoles
Electron Beam
39
HMS Spectrometer
HMS Properties (pt-pt tune)?
Detector Stack (view from above)?
Kinematic Range
Vertically Segmented Hodoscope
Momentum
0.5 7.5 GeV/c
2 sets of vertical horizontal Drift Chambers
4-layer Electromagnetic Calorimeter
Angular
10.5O - 80O
Acceptance
Gas Cerenkov
??
6.5 msr
?p/p
/-9
Resolution
?p/p
lt 0.1
??
1 mrad
Cer Cal provide p rejection factor 10000/1
Above 1GeV
horizontally Segmented Hodoscope
40
(No Transcript)
41
Momentum Dispersion in Magnetic Spectrometers
Charged particle scattering trajectories (rays)
which have same scattering angles but different
momenta and target.
Measure trajectory at focal plane
Radius of curvature in uniform magnetic field
momentum of particle. gt vertical
position and trajectory at focal
plane determines
momentum of particle
relative to central momentum (?p/p
(p - pc)/pc)?
42
HMS Electron 'Event'
Trigger Hodoscopes (scintillators)?
Electromagnetic Calorimeter
Drift Chambers
Floor
43
MC comparison of eP inclusive scattering with
the HMS spectrometer in Hall C
  • Generate e- scattering uniformly in E', Y', X'
  • Apply physics weighting for each event based on
    depending on ,E, E', ?
  • Transport events through magnetic fields of
    optical elements (using transport
    matrix) and check whether trajectory
    intercepted an aperture (such as the collimator).
  • Compare MC yield to data yield for same
    normalized luminosity.

With physics weighting
Without physics weighting
Same resonance peak
44
MC practical exercise
S1
Multiple scattering
S2
aluminum
S3
Effect of multiple scattering some tracks with
S1S2 will not intersect S3 gt no S1S2S3
coincidence
Efficiency determined from will be affected by
multiple scattering... How much?
? N(S1S2S3)/N(S1S2)?
Write a Comment
User Comments (0)
About PowerShow.com