# Development in Variance Reductio by fjzhxb

VIEWS: 3 PAGES: 20

• pg 1
```									Geant4 2003 Workshop TRIUMF, September 2003

Development in Variance Reduction Techniques
Michael Dressel EP-SFT CERN presented by John Apostolakis

1

Outline
• Variance Reduction in brief • Samplers • Importance sampling • Weight window sampling • Weight Roulette • Scoring • Veriﬁcation of importance sampling against experimental data • Future development

2

General v.r. aspects
Concept of variance reduction: • reduce computing time in the most diﬃcult calculations • measure for eﬃciency of calculation: F OM =
1 R2 T

• idea: augmented sampling of interesting events → bias • correct for the bias by introducing statistical weights Comparing analog to variance reduced MC for equal computing time: • x: equal (mean value) • vx : reduced (variance of mean value ) for more details see: http://dressel.home.cern.ch/dressel/biasscore/BiasingW02.pdf
3

Top level classes
The top level classes for setting up variance reduction and scoring are called “samplers”. “G4MassGeometrySampler” and “G4ParallelGeometrySampler” are used for mass and parallel geometries respectively. The samplers provide methods for conﬁguring: • importance sampling • weight window sampling • weight roulette • scoring

4

Imp. samp. concept
example: two cells with I2 = 2*I1
splitting : W
cell: 1 cell: 2

and

W*0.5 W*0.5 W*2 0 (killed)

roulette : W

or

5

Default algorithm
• divide geometry into cells • assign importance values to the cells • when crossing from cell m to cell n: r = In /Im 1. if r = 1: continue transport 2. if r < 1: play Russian roulette 3. if r > 1: split into r tracks • real numbers possible for importance values: change in r > 1: two values for number of particles after splitting: – int(r) + 1 particles with probability p = r − int(r) – int(r) particles with probability 1 − p • particle weight W → W/r (expected value splitting)
6

Implementation basics
• importance sampling is applicable particle type wise • only supported for ﬁeld free applications and neutral particles. • support for customized importance sampling algorithm • mass geometry as well as parallel geometries supported for deﬁning the importance cells

7

Weight window introduction
implemented for geant4-05-02-ref-03 Weight window technique, a weight based alternative to importance sampling: • apply splitting and Russian roulette dependent on space (cells) and energy • user deﬁnes weight windows in contrast to deﬁning importance values as in importance sampling

8

Weight window concept
A weight window can be speciﬁed for every cell and for several energy regions → space-energy cell

splitting to survival weight
weight window

upper weight bound

survival weight lower weight bound

Russian roulete kill or move to survival weight

9

Weight window speciﬁcation
• user speciﬁes lower weight bound WL for every space-energy cell • upper WU and survival WS weights are calculated as: WU = CU · WL and WS = CS · WL • user speciﬁes CS and CU once for the whole problem • user may give diﬀerent sets of energy bounds for every cell or one set for all geometrical cells • special case: if CS = CU = 1 for all energies than weight window is equivalent to importance sampling (with WL = 1/importance) • user can chose to apply the technique: on boundaries, on collisions or on boundaries and collisions

10

Weight roulette
Reduce the number of very low weight tracks to be simulated. Applied in combination with other variance reduction techniques e.g. implicit capture. the parameters and default values used in weight roulette: • wsurvival = 0.5: used in assigning the weight of a particle surving the Russian roulette • wlimit = 0.25: used to determine if Russian roulette will be plaied • isource = 1: the importance of the source cell setting of parameters via the samplers

11

Weight roulette algorithm
• calculate R = isource/Ic the ratio of the importance values of the source to the cureent cell Ic • if particle weight w is lower than R ∗ wlimit – play Russian roulette with servival probability p = w/ws – if particle survives set it’s weight to: ws = wsurvival ∗ R

12

Scoring
A framework for scoring on the “process” level has been created. It is intended mainly to help controlling the importance sampling performance. Features: • particle type wise or it integrate over several particle types • quantities diﬀerentiated per cell • applicable to mass and parallel geometries • independent from importance sampling • customized scorers are supported • the scorers have to be given to the samplers to use the framework
13

Default scorer
• scores similar to MCNP: Importance, Tr.Entering, Population, Collisions, Coll*WGT, NumWGTedE, FluxWGTedE, Av.Tr.WGT (see http://dressel.home.cern.ch/dressel/biasscore/Sampling.html) • provides scores for every cell in the given geometry • scores nay be printed in a table

14

TIARA benchmark experiment
Comparing data of the TIARA experiment with Geant4 calculations using and not using importance sampling Experiment: • shielding against neutrons • neutrons produced with 43 and 68 M eV protons on 7 Li target • measure neutron ﬂux behind 25 to 200 cm thick concrete shields Simulation: • comparing data with simulation using and not using importance sampling • the simulation may be found in: “examples/advanced/Tiara”
15

Example measurement
One example of the simulation: 68 M eV protons on 7 Li target, 200 cm concrete shield, measure neutron ﬂux on beam axis processing times: analog 400 hours non-analog 100 hours
1 R2 T

Estimation of the gain in computing time (from FOM = FOMimp. G= FOMana.

):

Interpretation: For adequate statistics G is the factor the analog calculation would have to run longer than the non-analog calculation for the same precision.
16

Result of TIARA simulation
Exp. or Sim. Exp G4-imp G4-ana 10 - 60 M eV Flux [ cmnµC ] 2˙ 5.17E-01 3.41E-01 3.37E-01 R [%] – 1.33 6.26
Sim. Exp.

G

– 0.66 0.65 89

60 - 70 M eV Exp G4-imp G4-ana 2.80E-01 2.71E-01 2.86E-01 – 1.81 6.92 – 0.97 1.02 59

Analog needs 89 times longer for same precision (10 - 60 M eV )
17

68 MeV p->Li
200 cm concrete shield 10 data G4-ana G4-imp 1

dn/dlnE [n/cm^2/muCol]

0.1

0.01

10

E [MeV]
18

Documentation
• Description in the “Geant4 User’s Guide - For Application Developers -” Section 3.7 • More detailed description: http://dressel.home.cern.ch/dressel/biasscore/Sampling.html • Slides from Geant4 Workshop 2002 at CERN: http://dressel.home.cern.ch/dressel/biasscore/BiasingW02.pdf • Examples: – examples/extended/biasing – examples/advanced/Tiara

19

Future development
Tallying: • support MCNP like “per history” tallying: easy access to physical quantities with error estimation, related to volumes and surfaces, statistical analysis, bins in E, T A, ...? • understand which tallies are requested by interrogating potential users A proposal of implementation for discussion: • a slightly more general monitoring framework • most of info from “User...Actions” therefore: change Geant4 to provide “User...Actions” containers to support multiple “User...Actions” instead of simple pointers to “User...Actions” • than implement tallying mostly by “User...Actions”
20

```
To top