1 / 19

Geometrical Event biasing and Variance Reduction – Talk 2

Geometrical Event biasing and Variance Reduction – Talk 2. 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

gratia
Download Presentation

Geometrical Event biasing and Variance Reduction – Talk 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Geometrical Event biasing and Variance Reduction – Talk 2 • 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

  2. 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

  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. W=0.5 W=1 W=0.5 P = 2 • Splitting a track ( P > 1 ) • E.g. creating two particles with half the ‘weight’ if it moves into volume with double importance value. P = 0.5 X W=1 W=0.5 • Russian-roulette (P < 1 ) in opposite direction • E.g. Kill particles according to the survival probability (1 - P).

  4. 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 . The Weight Window Technique Upper weight Upper Energy Survival weight Upper Energy Lower weight E Split Lower weight Lower Weight D C B Kill/Survive A Lower weight • Apply in combination with other techniques such as cross-section biasing, leading particle and implicit capture, or combinations of these.

  5. WL*CU WL*CS WL 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 P = W / (WL*CS)

  6. 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

  7. 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

  8. Examples • Extended/Biasing contains 3 examples of biasing • B01 • B02 • B03 (really just a python implementation of B02) • Now redundant? • TIARA (again pythonized)

  9. Biasing example B01 • Shows the importance samplingin 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

  10. Flux multiplied by Kinetic energy of particle (MeV)

  11. 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

  12. 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

  13. 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?

  14. 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

  15. 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?

  16. 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

  17. 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?

  18. 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

  19. Spare slides

More Related