The km3 code
Download
Report
Transcript The km3 code
The km3 code
C.W.James, Bologna, April 25th 2012
The km3 package
• Used in ANTARES to simulate the photon detection from
muons
• Code:
- Fortran77 (I hate it)
- Written in the late 90s
- Documentation: various ANTARES internal notes
- Numerous updates by various authors – v2: David Bailey; v3v4r2 Goulven Guillard, v4r3+ myself)
- v4r3 documented, v4r4 development version
• Gen, hit, km3mc:
- Three separate programs
- Many interdependencies (explicit and implicit)
- Incorporate GEANT 3.21 and MUSIC
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
2
Gen (physics lives here)
• Uses GEANT 3.21 to model particle interactions
from an initial input (e.g. a muon)
• Generates Cherenkov photons from GEANT
tracks.
• Propagates photons using (wavelengthdependent) scattering and absorption.
• Records photon properties to disk at each of
several spheres.
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
3
Gen geometry
record all photons
that get here
record photon properties at sphere 1
*
record new photon
properties
at of
sphere 2
Record
a fraction
photons crossing here
…
*
L=1m
20 radial bins ~ log-spaced
*
•
Problem: Few photons make it to the outer shells: generate many photons
•
Excess of photons on inner shells
•
Solution: record a random fraction of photons, with p increasing with r
C.W.James, ANTARES collaboration meeting Strasbourg, Nov 21st-24th 2011.
4
Gen output:
• Writes photon information at each shell:
Nshell, Nscat , x, k, t
- Writes only a fraction of the photons generated.
- Fraction increases with distance
(less photons make it to outer shells)
• Major disk-space requirement!
N shell current shell number
N scat
number of scattering interactions
x
position on shell
k
t
direction vector & wavelength
time at shell
- Photon statistics limited by 1 GB output file size of f77
• Currently more annoyance than a limitation: but
may need to be overcome in the future.
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
5
Tables: electrons and muons
• Muons
- Simulates 1 m of 100 GeV muon track
- Includes secondary electrons below 200 MeV
- Generates photons using Frank-Tamm formula
• Electrons
- Photons from electron (sub) showers
- Tracks particles to Cherenkov threshold
- 4 runs: 100 Mev, 1 GeV, 10 GeV, 100 GeV
• Output: 5 x 1 GB files
• Run-time: O ~ 10 hr on a single CPU (=nothing)
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
6
Major limitations to gen
• Only used to generate electron and muon tables
(what about hadronic showers from neutrino
interactions in the detector?)
• i/o (=f77) currently limits statistics
• Scattering and absorption models are imperfect
– in situ measurements are often inconclusive.
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012.
7
Hit (the boring program)
• Photon list -> summary histograms
- Reads photon data from Gen.
- Creates histograms as function of distance, angles to the track segment.
- Folds in OM response (e.g. quantum efficiency of PMTs).
- Generates tables of photon-hit probabilities and hit-time distributions.
Nshell, Nscat , x, k, t
Nshell, Nscat , x, k, t
Nshell, Nscat , x, k, t
Nshell, Nscat , x, k, t
Nshell, Nscat , x, k, t
Nshell, Nscat , x, k, t
e -,
100
GeV
• Summary tables -> file.
- Inverse cumulative time distributions & hit probabilities.
- All tables for given [gen] particle type/energy
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
8
Histogramming (in gen and hit)
• Hit times (t)
- 50 bins in time
• OM orientation (in angles θ,ϕ)
- Direct: 10x1
- Scattered: 5x3
• Distance from track segment
- 20 log-spaced bins in r for all photons
• Angle from track segment
Again – thanks Claudio
for the figure!
- 1 bin for direct photons from muons
- 20 bins for all other cases
• Emitting particle type/energy
- 4 electron energies (102, 103, 104, 105 MeV)
- 1 muon energy (105 MeV)
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
9
+ binning scattered photons by hit
photons per sr per track
Gen v4r2: photons at 80 m
10
‘low’ bins
‘high’ bins
Legend
100 GeV muons
Edges of theta-bins
Direct only
Scattered only
1
10-1
10-2
-3
10
0
20
40
θ60C
80
100
180
160
140
120
theta (angle to muon track)
• OLD distribution: new distribution has a greater weighting
towards the Cherenkov peak
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
10
Inverse cumulative distributions…
OM theta 1.570796 phi 0.000000 radius 80.940979
time (ns)
1400
Legend
1200
file 0 band 5
1000
file 0 band 4
800
600
400
0
20
40
60
80
100
cumulative probability
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
11
Output:
• 5 files of size ~32 MB
• 4 photon tables:
- Direct and scattered hit probabilities
- Direct and scattered hit times
• These are created once and used repeatedly for
ANTARES simulation input
• Limitations:
- Histograms are sparse (wrong choice of spacing has caused
problems in the past)
- Extremely memory-inefficient (by a factor of x30 or more)
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
12
Example of gen output
photons per sr per track
Gen v4r2: photons at 80 m
10
Legend
100 GeV muons
Direct only
Scattered only
1
These are scattered photons!
(most scatters are small)
10-1
10-2
-3
10
0
20
40
60
80
100
120
140
160
180
theta (angle to muon track)
Wavelength and directional information not shown)
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
13
km3mc
• Inputs:
- Hit tables
e-,
100
Me
V
e-,
1
Ge
V
e-,
10
Ge
V
e-,
100
Ge
V
μ,
100
Ge
V
- PMT locations and orientations
- Incident particle (single muon)
μ
• Step 1: run MUSIC
- Muon propagation code
- Simulates muon interactions: muon energy-loss, and
secondary EM sub-showers above 100 MeV
• Step 2: get detector hits
- Interpolate between, and sample from, tables to get photon
hit times for each (2m) track segment, and each EM subshower
- Outputs a list of OM hit magnitudes (nphtons) and times
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
14
km3mc
• A program to determine photon arrival times at
optical modules from muon tracks.
INPUTS to km3
Tables of hit probabilities & times
(function of relative photon/OM geometry)
e -,
100
MeV
e -,
1 GeV
μ,
100
GeV
e -,
10
GeV
t, ng
e -,
100
GeV
Source & Detectors
- Incident muon (e.g. genhen)
- Detector geometry (ANTARES)
t, ng
What km3 does
1: generate muon & secondary tracks (use MUSIC)
Detector hits
2: interpolate between, and sample from,
tables to get photons hits from tracks.
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
15
Testing km3: toy experiments
• Use simple ‘detector’ to test
performance of km3
PMT
d = 50 m
- Use a single PMT
• Repeat for many
muon tracks
(O~106)
identical
• Plot time-distribution of photon hits
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
θC
Direct Cherenkov
photon path (430 nm)
45 m
- Use characteristic geometry
l = 100 m
- Fix muon energy, e.g. 1 TeV
16
Example of toy-experiment
6
Case B4; 0.1 ns bins; 10 km3 events; 50m facing track-wards
0.1
0.01
peak water transparency
hits per event per ns
direct photons
(chromatic dispersion)
0.001
0.0001
480
485
490
v4r2 (BELO/HI = 0.7)
20 bins (BELO/HI = 0.2)
50 bins (BELO/HI = 0,2)
495
500
505
510
unsmeared hit times t (ns)
• Red: what you get when histogramming goes wrong
• Green/blue: (more) correct time-distribution
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
17
Desired improvements in km3mc
• Handling of hadronic cascades
- Current tables are only for EM showers and muons
- Require the geasim package to handle neutrino ‘shower’
events
• Potential fixes:
- Approximate cascades from recoil quark jet particles (mostly
pions) with an effective electron cascade (‘one-particle
approximation’
- Produce pion tables in gen?
• More accurate histograms
- More bins in all dimensions for better interpolation
- Requires restructuring the i/o of gen & hit
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012.
18
What is km3 really?
• Five functions, three programs, one package
- Simulation of particle tracks (gen)
Storing this information is prohibitive - keeping it as one package is sensible
- Creation, propagation, and detection of photons (gen)
Storing this information is becoming difficult… merge into hit, or re-write i/o?
- Histogramming (hit)
Tables produced are km3mc-specific: separate this process?
- Simulation of stochastic energy-loss (km3mc)
Generated information is small – processes could be separated
- Interpolation between and sampling from histograms (km3mc)
• Thinking of km3 as a single ‘thing’ is difficult – and some
parts work better than others
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
19
Summary
• km3 handles photon production and detection
from high-energy muons in ANTARES
• Consists of three sub-programs (gen, hit,
km3mc)
• Implementation currently limits histogram
precision (will be overcome… some time)
• Next set of modifications: test ‘one-particle
approximation’
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012.
20
Light scattering and propagation
• ‘Rayleigh’ scattering (should be EinsteinSmoluchowski scattering):
æ 550 nm ö
bW ( l ) =1.944 ´10-3 ç
÷
è l ø
4.32
m
-1
bW (y ) = 0.06225 (1+ 0.835cos2 y ) sr -1
dn
¹1 (otherwise = 4)
dl
Water molecules not spherical
(otherwise =1)
- Consider this ~100% accurate (theory + measurements)
• Particulates (Kopelevich model): ‘Mie scattering’
- Water = molecules + small + large particles
1.7
0.3
æ 550 nm ö
æ 550 nm ö
b ( l, y ) = bW ( l, y ) +1.34vs bs (y ) ç
m -1 sr -1
÷ + 0.312vl bl (y ) ç
÷
è l ø
è l ø
- vl and vs are the ppm concentrations: ANTARES uses 0.0075
ppm
P (y ) = 2p sin yb (y )
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
21
Comparison with measurements
• Best (~only) measurements of angular-dependent volumescattering function in actual seawater: Petzold (1972)
Scattering due to
turbulence: what is
the wavelengthdependence of
this???
(figure shamelessly p
• Kopelevich model OK at angles >1 degree (~514 nm)
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
22
Antares approach
• Scattering probability:
- Onsite measurements of scattering + absorption (difficult to
deconvolve)
- Fit to Kopelevich vs and vl for total scattering probability
(2004) (get 0.0075 ppm)
• Scattered angle:
- Calculate ratio of ‘Rayleigh’ / ‘Mie’ scattering using
Kopelevich
- ‘Rayleigh’: use analytic formula to get scattering angle ψ
- ‘Mie’: use the measurements of Petzold
• Ratio of Mie/Rayleigh was fixed until ~now (v4r4
of km3 separates them)
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
23
Problems with current approach
• Petzold’s measurements not wavelengthdependent
• Wavelength-dependence of turbulent scattering
probability unknown
• ‘Mie’ scattering will be time-dependent (mostly
off biological material)
• Kopelevich theory fits Petzold’s measurements:
does this mean it’s correct?
• …
• Does all of this really matter? (requires end-toend MC study of errors)
C.W.James, ANTARES Monte-Carlo group workshop, Bologna, April 26th-28th, 2012
24