Download Presentazione di PowerPoint

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Geometrical Event biasing and
Variance Reduction – Talk 2
1.
2.
3.
4.
5.
6.
7.
8.
Geometrical Event Biasing – Overview
Importance Sampling
Weight Window and Energy biasing
Examples
Parallel Navigation
Scoring – within biasing context
Scoring – (In(ter))-Dependency?
Summary
Alex Howard, CERN
Event Biasing Mini-Workshop, SLAC 19th March 2007
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
1
Geometric Biasing
The purpose of geometry based event biasing is to save computing time
by sampling less often the particle histories entering “less important”
geometry regions, and more often in more “important” regions.
* Importance sampling technique
* Weight window technique
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
2
Importance sampling technique
Importance sampling acts on particles crossing boundaries between “importance
cells”.
The action taken depends on the importance value assigned to the cell.
In general, a track is either split or plays Russian roulette at the geometrical
boundary depending on the importance value assigned to the cell.
I=1
I=2
W=1
W=0.5
W=0.5
P=2
P = 0.5
Survival probability (P) is defined by the
ratio of importance value.
P = Ipost / Ipre
The track weight is changed to W/P.
Splitting a track ( P > 1 )
 E.g. creating two particles with half
the ‘weight’ if it moves into volume with
double importance value.
X
W=1
W=0.5
Russian-roulette (P < 1 ) in opposite direction
 E.g. Kill particles according to the survival
probability (1 - P).
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
3
The Weight Window Technique
The weight window technique is a weight-based algorithm – generally used
together with other techniques as an alternative to importance sampling:
– It applies splitting and Russian roulette depending on space (cells) and
energy
– User defines weight windows in contrast to defining importance values as in
importance sampling
A weight window may be specified for every cell and for several energy regions:
space-energy cell .
Upper Energy Lower weight E
Lower Weight D
C
B
A
Upper Energy
Split
Upper weight
Survival weight
Lower weight
Kill/Survive
Lower weight
Apply in combination with other techniques such as cross-section biasing,
leading particle and implicit capture, or combinations of these.

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
4
The weight window technique (continue)
Checks the particle weight
– Compare the particle weight with a ‘window’ of weights defined for the
current energy-space cell
– Play splitting or roulette in case if it is outside, resulting in 0 or more
particles ‘inside’ the window
 E.g. WL is a lower weight bound of a cell.
CU and CS are upper limit factor and survival factor, respectively.
• W > WL*CU Split track
• W < WL*WL Roulette
WL*CU
WL*CS
P = W / (WL*CS)
WL
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
5
Weight window – improved variance reduction
An MCNP author recently (last November) pointed out
that Splitting to the Survival Weight introduces a
variance itself
A better solution is to split to the minimum integer
that puts the weight into the window, e.g.:
–
–
–
–
Let the lower bound be 1, survival weight 3, upper bound 5
Suppose particle has weight 7
Splitting by the minimum integer gives 2 particles with w=3.5
Splitting by survival weight gives sometimes 2 particles of w=3
and sometimes 3 particles of w=3  so sometimes total split
weight is 2x3 and sometimes 3x3
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
6
Which classes?
G4VSampler (G4MassGeometrySampler,
G4ParallelGeometrySampler)
– configurator of the biasing in terms of the user-defined
geometry
G4GeometryCell
– only simple replicas and no consideration of the hierarchical
positions of physical volumes in the geometry tree
G4VIStore
– for the creation of the importance store
G4VImportanceAlgorithm
– for customizing the importance algorithms
G4VScorer
– for the definition of the information to be scored
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
7
Examples
Extended/Biasing contains 3 examples of biasing
– B01
– B02
– B03 (really just a python implementation of B02)
 Now redundant?
– TIARA (again pythonized)
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
8
Biasing example B01
Shows the importance sampling in the mass (tracking) geometry
Option to show weight window
10 MeV neutron shielding by cylindrical thick concrete material
Geometry
– 80 cm high concrete cylinder divided into 18 slabs
– Importance values assigned to 18 concrete slabs in the DetectorConstruction
for simplicity.
– The G4Scorer is used for the checking result
 Top level class uses the framework provided for scoring.
Air
Air
1
1
2 4
8 16 32 64 ……….. 2n
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
9
Flux multiplied by Kinetic energy of particle
FluxWGTedE
(MeV)
exampleB01
10
9
8
7
6
5
4
3
2
1
0
Importance
Analogue
Weight Window
0
5
10
Cell Number
15
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
20
10
Example B02
Shows importance sampling in a parallel geometry
Includes a customized scoring making use of the
scoring framework
Mass geometry consists of a 180 cm high simple
bulk concrete cylinder
A parallel geometry is created to hold importance
values for slabs of width 10cm and for scoring
The scoring uses the G4CellSCorer and one
customized scorer for the last slab
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
11
Example B03
Uses Geant4 importance sampling and scoring through python.
It demonstrates how to use a customized scorer and importance sampling in
combination with a scripting language, python.
Geant4 code is executed from a python session.
– Note: the swig package is used to create python shadow classes and to
generate the code necessary to use the Geant4 libraries from a python
session
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
12
Limitations of "parallel" geometries
Current scenario has the following limitations:
– The world volume of the parallel geometry must
overlap the world volume of the mass geometry (i.e.
be larger) – still reports of a bug in this…
– Particles crossing a boundary in the parallel geometry
where there is vacuum in the mass geometry are also
biased. This may be optimized in later versions (not
done).
– Mass and parallel geometry boundaries should not be
coincident in the current implementation (to be
verified).
– Charged particles and fields not handled
– Scoring strongly coupled to biasing geometry –
requirement?
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
13
Coupled Transportation
Since release 8.2 coupled transportation has
been included
This is a generic form of parallel navigation
Geometrical biasing was migrated/copied to this
formalism
– No longer duplicate mass and parallel classes/samplers
– Switch between mass and parallel world is through
transportation assignation
– Examples also migrated
 B01  processes/scoring/test/B01_para
 B02  processes/scoring/test/B02_para
 Output seems statistically equivalent although different
random numbers
Examples also run for charged particles
What happens a boundary and Use Cases needs
handling properly/verifying
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
14
Biasing and Scoring
Currently in Geant4 we have two scoring
implementations – one attached to biasing
What happens at a boundary?
– If flux is measured at a biased boundary then the
splitting and killing has to be handled properly
– Who limits the step? Pre-defined hierarchy?
 In current implementation biasing limits the step, scoring
applied secondarily
 For new parallel navigation biasing is applied as an
AlongStepDoIt – necessary?
Sensitive Detectors attached to parallel world –
is it foreseen/possible?
Inter-dependence – scoring has to come after
biasing (e.g. if Splitting or Russian Roulette has
occurred)
Abstract scoring interface?
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
15
Existing implementation of Scoring within biasing context
Optional capability
– Scorer may be used with the Sampler using PrepareScorer(G4Vscorer*).
 G4Scorer is provided as a concrete scoring class.
 A "scorer" class derives from the interface G4VScorer. Users may create
customized "scorers“. See exampleB02 for detail.
Checking importance sampling
– A default implementation is provided through G4Scorer, which provides
following parameters:
  Importance
 Tracks entering: Number of tracks entering the cell
 Population: Number of tracks including produced in the cell
 Collisions: Number of steps limited by physics process in the cell
 Coll*WGT: Weighted sum of collisions
 NumWGTedE: Number weighted energy
 FluxWGTedE: Flux weighted energy
 Av. Track WGT: Average track weight
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
16
Future Developments?
Other forms of geometrical biasing
Point tallies? Particles directed to a point?
Modified sampling methods? (exponential
transform, implicit capture, forced collisions,
source biasing): to sample from any arbitrary
distribution rather than the physical probability
as long as the particle weights are then
adjusted to compensate
Others?
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
17
Summary
Two main geometrical importance biasing
techniques are implemented within Geant4
Extension to charged particles and fields is
possible within the context of Coupled
Transportation
Examples provided of functionality within the
extended and advanced example categories
Need an example to test physicality…
Scoring has a strong link to geometrical biasing
Needs work to be decoupled/interfaced and allow
on Scoring implementation in Geant4
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
18
Spare slides
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007
19