© Copyright QinetiQ 2006 G4 C-S Biasing Based on the G4WrapperProcess Fan Lei Geant4 Biasing Mini Workshop, SLAC 21 March 2007
© Copyright QinetiQ Plc Contents Introduction G4WarpperProcess Two Algorithms G4XWrapperProcess classes Status & Examples Discussions
© Copyright QinetiQ Plc Introduction C-S biasing is a technique to artificially enhance/reduce the interaction cross-section of a particular process, in order to improve the statistics of a simulation (variance reduction). Use cases: –Thin layer interactions (enhancement) –Thick layer shielding penetration (reduction) –... Other similar variance reduction techniques: forced collisions; path length stretching
© Copyright QinetiQ Plc C-S biasing in Geant4: Background Started the discussion in 2001, at the SLAC mini-workshop –Identified the wrapper approach as the implementation model –A virtual class G4WrapperProcess was created by H. Kurahige Prototype G4XWrapperProcess class created by F.Lei (2003 Triumf workshop) –Applicable to all discrete processes GHAD Implementation by H-P Wellish (2003 Triumf workshop) –for photo-nuclear processes only Further work done to G4XWrapperProcess in ESA REAT-MS project (2006)
© Copyright QinetiQ Plc G4WrapperProcess DoIT //////////// –virtual G4VParticleChange* PostStepDoIt –virtual G4VParticleChange* AlongStepDoIt –virtual G4VParticleChange* AtRestDoIt GPIL ////////////// –virtual G4double AlongStepGetPhysicalInteractionLen gth –virtual G4double AtRestGetPhysicalInteractionLength –virtual G4double PostStepGetPhysicalInteractionLeng th
© Copyright QinetiQ Plc C-S Biasing: Algorithms No “standard algorithm”. It depends on the application requirements Simple application cases: (right) –True PHS (simple) –True Secondary Radiation (simple) –Both PHS & Secondary radiation (complicated) Detector/shield Incident radiation E deposition /PHS Secondary radiation
© Copyright QinetiQ Plc Algorithm-1 At each step: If the biased process is being selected, the weights of current track and the secondaries are changed to w’’ = (1 – exp(-s/x))/(1-exp(-f*s/x) * w If the process is not being selected, the weight of the current track is changed to w’ = exp(-(1-f)*s/x) * w where w: the original parent particle weight s: the step length x: the unbiased current interaction length of the process f: the enhancement factor Normal scoring for both PHS and fluence s w W’’ Selected s w Unselected W’
© Copyright QinetiQ Plc Algorithm-2 At step level, if the process is selected: The primary is not killed, but continues its flight with a reduced weight: The weight of the secondary is where w: the original parent particle weight nl: the number of interaction length traversed f: the enhancement factor Special scoring is required for PHS W’’ W’ w
© Copyright QinetiQ Plc New Classes G4XWrapperProcess –G4XWrapperProcess(const G4String& aName = "X-",G4ProcessType aType = fNotDefined ) –void SetEnhanceFactor( G4double ) –void SetBiasMode2(G4bool mode) G4XProcessManager – void AddDiscreteProcess(G4VProcess*); – void AddProcess(G4VProcess*, G4int, G4int, G4int); G4XProcessManagerMessenger –/xsbias/setProcess LowEnCompton 10 false
© Copyright QinetiQ Plc G4XWrapperProcess – example (GPIL)
© Copyright QinetiQ Plc G4XWrapperProcess – example (DoIt)
© Copyright QinetiQ Plc Impact to Physics List The only change required
© Copyright QinetiQ Plc Current Status Available from –G4XWrapperProcess, G4XProcessManager & G4XProcessManagerMesseneger –Biased physics list version of Exrdm (extended/radioactivity/exrdm) MULASSIS GRAS Limitations: –Not working for Std-EM after g4.7.0 ( see VI’s presentation) –Not yet Region/Volume sensitive
© Copyright QinetiQ Plc GeV p + 1mm Si Slab 2hrs CPU time for both biased/unbiased simulations Proton elastic/inelastic cross-section x10
© Copyright QinetiQ Plc eV n + 1mm Si Slab 2hrs CPU time for both biased/unbiased simulations Neutron elastic, inelastic and capture cross-sections x10
© Copyright QinetiQ Plc keV gamma + 0.1mm Si Slab 2hrs CPU time for both biased/unbiased simulations Both photo-e & Compton cross-sections x10
© Copyright QinetiQ Plc Discussions-1: Simple implementation based on the wrapper approach No change to existing process required and easy to use Minimum impact to existing Physics Lists Same approach can be used for Forced Interaction biasing No special scoring required for algorithm-1 implementation
© Copyright QinetiQ Plc Discussions-2: Not working with current version of Standard EM –See Vladimir’s presentaion No activation/deactivation for region Process based only –most hadron physics are model based –expand the biasing mechanism in G4HadronicProcess Possible multiple interactions in the volume of interest –Optimal enhancement factor –Move the un-interacted part to the next boundary