Statistics Toy Monte Carlo

advertisement
Statistics
Toy Monte Carlo
David Forrest
University of Glasgow
1
The Problem
We calculate 4D emittance from the fourth root of a
determinant of a matrix of covariances...We want to
measure fractional change in emittance with 0.1%
error. The problem is compounded because our data is
2
highly correlated between two trackers.
G4MICE Study-1
• Ran ~500 simulations for N events for 8
beams, where N=1000,2000,10000 using
G4MICE (tens of thousands of simulations
on Grid)
• Got distributions of fractional change in
8pi
emittance
• Acquired s for different
beams at different
numbers of events
3
G4MICE Study-2
• Plot s against 1/sqrt(N)
-> proportionality
• The gradient of this
line, K, can tell us
how many events we
require to make a precise
measurement
• Full details in MICE CM24 presentation
• Conclusion: Require ~105 muons
4
Toy Monte Carlo
• Wish to confirm results using a toy monte carlo
and understand origin of results
• Have modelled energy loss and multiple
scattering in absorbers (incl windows)
• Do not have acceleration, proper transport of
beam, etc which you get with G4MICE
• Do have, so far, 3000 muons/sec (generationselection-measurement-propagation through
experiment-measurement)
5
Generation
Calculating random vectors (x, px, y, py) describing particles,
within envelope defined by some covariance matrix
Selection
Ensure each of the parameters in our vector are gaussian. (the
collection of many of our vectors becomes a multivariate gaussian)
Model Experiment
Only model the absorbers, in series. Essentially beam starts
before the first absorber and ends after the last absorber, with no
cavities in between.
Calculate Emittance
Before and after - > fractional change in emittance. Plot identical
distributions to G4MICE study, get s for each beam and each
number of events, get K for each beam, compare with G4MICE
6
Generate
• Have rms for x, Px, y, Py, from an ideal
covariance matrix for each beam
• Using CLHEP randomisation package
• Uniformly sample (selection, described in
the next slide, retains x, px, y, py only
when they fit a gaussian)
• Generate many vectors of (x, px, y, py)
7
Selection
The probability distribution function (which is a
gaussian) is as follows:
X is our vector (x,px,y,py), V is our covariance
matrix, m is (0,0,0,0)
f is between 0..1. We keep X when a random
number is below f. This selects x,px,y,py with
proper gaussian distributed values. We keep N
such X vectors.
8
Model Experiment
• Absorbers (not to scale at all. Correct
scale in toy mc )
At each arrow I calculate energy loss and
then multiple scattering as additive
adjustments to px and py only. I do not ever
drift x, y.
9
Model Experiment 2
Equation for energy loss:
Equation for multiple scattering:
Q0 here is the s for a distribution from which we
sample Q, in a gaussian manner, and scatter
with this Q
10
Calculate Emittance
• You could get a 4x4 covariance matrix from
every X=(x,px,y,py), ie for every muon.
• But I want emittance for the full sample of say
10,000 such muons. I take the mean value* for
<x2>,<xpx>,<xy>,<xpy>…each of those, get a
4x4 covariance matrix and calculate e
* Should this be the mean or the variance?
11
Issues
• Not comparing like for like (beam from a matcher card I
used vs beam from matrix, not measuring in trackers but
absorbers) – could fix these problems directly by doing a
fresh run of 3x500 sims in G4MICE on Grid (~1 day) with
the same matrix.
• Have modelled Pz as 200 MeV/c for all particles,
whereas Px, Py are randomly generated for each
particle. I haven’t dropped Pz after each absorber and
perhaps I really should.
• Is covariance matrix valid for start of absorber ?
• Other assumptions which have been described in the
previous slides
12
Results so far….
• G4MICE K=0.293
• ToyMC K=0.132536
• So far do not agree, so need to keep
working on this …
13
Download