geometrical event biasing and variance reduction – talk 1

25
Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 1 Geometrical Event biasing and Variance Reduction – Talk 1 Alex Howard, CERN Event Biasing Mini-Workshop, SLAC 19 th March 2007 1. Geometrical Event Biasing - Overview 2. User Requirements – as documented 3. Use Cases 4. Limitations of current implementation 5. Parallel Navigation 6. Scoring – (in)dependency 7. Examples 8. Summary

Upload: wylie-hancock

Post on 31-Dec-2015

25 views

Category:

Documents


1 download

DESCRIPTION

Geometrical Event biasing and Variance Reduction – Talk 1. Geometrical Event Biasing - Overview User Requirements – as documented Use Cases Limitations of current implementation Parallel Navigation Scoring – (in)dependency Examples Summary. Alex Howard, CERN - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 1

Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard, CERNEvent Biasing Mini-Workshop, SLAC 19th March

2007

1. Geometrical Event Biasing - Overview2. User Requirements – as documented3. Use Cases4. Limitations of current implementation 5. Parallel Navigation6. Scoring – (in)dependency7. Examples8. Summary

Page 2: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 2

Geometric Biasing

* Importance sampling technique* Weight window technique

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.

Page 3: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 3

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 Survival probability (P) is defined

by the ratio of importance value. P = Ipost / Ipre

The track weight is changed to W/P.

X

Splitting a track ( P > 1 ) E.g. creating two particles with

half the ‘weight’ if it moves into volume with double importance value.

W=1 W=0.5

W=0.5 Russian-roulette (P < 1 ) in opposite direction E.g. Kill particles according to the

survival probability (1 - P).

W=0.5

W=1

P = 0.5

P = 2

Page 4: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 4

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 .

Apply in combination with other techniques such as cross-section biasing, Apply in combination with other techniques such as cross-section biasing, leading particle and implicit capture, or combinations of these.leading particle and implicit capture, or combinations of these.

Upper EnergyLower weight ELower Weight D

C B A

Upper Energy

Lower weight

Lower weight

Survival weight

Upper weight

Kill/Survive

Split

Page 5: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 5

Original Biasing URD:

BiasingUR 5.1 The user shall be able to apply event biasing and sampling techniques, by specifying particle andgeometry dependent importance (Ref. UR 19-15, and #61):”The user shall be able to apply event biasing and sampling techniques, by specifying particle and geometry dependent importances” – Need: Essential.– Priority: Implemented.– Stability: Subject to change.– Source: ESA joint project.– Clarity: Clear.– Verifiability: Verified.

Page 6: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 6

URD Biasing – PSS-05 format

Currently implemented

Page 7: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 7

Neutron Simulation

A number of neutron simulations require event biasing in order to get meaningful resultsE.g. Radiation Background, Shielding, Dose calculationsParticularly due to the precise (and CPU intensive) handling of neutron_hp – discrete elastic

scattering– Cross-sections

calculated at all temperatures

Page 8: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 8

URDs – Leading particle biasing

Not always informative!

Page 9: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 9

Current Geometrical BiasingIn the default set-up geometrical biasing can be applied to either mass or parallel geometriesIts own parallel navigation is includedCan only be applied to neutral particles (no field or multiple scattering!)Addresses a number of use case caveatsStrongly coupled to scoring (more later)1 Test, 3 extended examples and 1 advanced example are providedFunctionality tested but not performance in terms of physics/variance reduction (CPU gain, statistical significance and variance of output/observable, etc…)

Page 10: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 10

Limitations of "parallel" geometriesCurrent 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?

Page 11: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 11

Use Case I

At a boundary, multiple scattering moves the particle back into the original volumeCurrently this is treated wrongly, should be fixed with coupled transportationOne reason why only recommended for neutral particles

Page 12: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 12

Use Case II

In mass geometry this is treated correctlyIn parallel case particle is not located in volume BShould be fixed in Coupled Transportation?

Page 13: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 13

Use Case III

If boundary is in mass volume then this is treated properly in current navigationIn parallel geometry this creates a problem– ParallelImportanceProc

ess does not occur. Therefore no biasing is applied and the weight is not changed!

– Scoring counts a collision in volume A with the wrong weight.

Should be fixed in Coupled Transportation?

Page 14: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 14

Use Case IV

A particle crosses a biasing particle with volume B having a greater importanceCopies of the particle are createdHandled correctly

Page 15: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 15

Future developments/Coupled Transportation

The use of fields (electric and magnetic) will be permitted along with the ability to bias charge particles (currently only possible for neutral)Multiple scattering and field transportation will be handled correctly and coherently across parallel geometriesEvent biasing and variance reduction will be re-factored once the scoring and related biasing classes/interfaces are defined

Page 16: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 16

Navigation in Parallel Geometries

Page 17: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 17

Biasing and ScoringCurrently in Geant4 we have two scoring implementations – one attached to biasingWhat 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)

Page 18: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 18

SummaryURDs are not exhaustive and could be extendedCurrent implementation has known limitations which are addressed with the new parallel navigation scenarioUse cases need to be handled properlyScoring is currently strongly coupled to biasing, a solution needs to be sought where independence and non-duplication can be exercised – abstract interface?Code refactoring dueExamples and validation vs. physical quantities are requiredRoom for discussion…

Page 19: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 19

Spare slides

Page 20: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 20

Biasing example B01Shows the importance sampling in the mass (tracking) geometryOption to show weight window10 MeV neutron shielding by cylindrical thick concrete materialGeometry– 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.

AirAir

1 1 2 4 8 16 32 64 ……….. 2n

Page 21: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 21

Analogue

Importance Sampling

Example of Standard output

Page 22: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 22

Weight Window Technique

Survival weight bounds

Energy bounds < 1 GeVUpper limit factor : CU = 1, Survival factor : CS = 1Lower limit weight is proportional to 2-n along to slabs

Page 23: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 23

exampleB01

0123456789

10

0 5 10 15 20Cell Number

FluxWGTedEImportance

Analogue

Weight Window

Flux multiplied by Kinetic energy of particle(MeV)

Page 24: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 24

Example B02B02 example for showing– importance sampling in a parallel geometry – 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. Note: The parallel world volume must overlap the mass world

volume The radii of the slabs is larger than the radius of the concrete

cylinder in the mass geometry. The importance value is assigned to each ‘G4GeometryCell’

• Pairs of G4GeometryCell and importance values are stored in the importance store, G4IStore.

– The scoring uses the G4CellSCorer and one customized scorer for the last slab.

– It can be built and run using the PI implementation of AIDA For this see http://cern.ch/PI.

– At the end a histogram called “b02.hbook" is created.

Page 25: Geometrical Event biasing and Variance Reduction – Talk 1

Alex Howard - Event Biasing Mini-Workshop - SLAC 2007 25

Example B03

Uses Geant4 importance sampling and scoring through python. It creates a simple histogram. 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.

It can be built and run using the PI implementation of AIDA – For this see http://cern.ch/PI.At the end a histogram called "trackentering.hbook" is created.