Event Biasing
Event Biasing
p01
Event Biasing
Geant4 Tutorial: version 10.0.p01
Michael Kelsey, Thu 6 Mar 2014
Geant4 version 10.0.p01
Outline
• Motivation
• What Is Event Biasing?
• Geometric Biasing in GEANT4
• Physics Biasing in GEANT4
• User Defined Biasing
• NEW General Biasing Interface
• Bremsstrahlung Splitting
• Summary
2
Geant4 version 10.0.p01
Motivation
3
Geant4 version 10.0.p01
4
Geant4 Built-In Biasing (Application Guide, Sec
Geant4 version 10.0.p01
3.7)
GEANT4 does analogue simulation by default
For expert/specialty users, provides methods to manipulate processing
stages and apply B(x) bias early
Physics biasing
• Changes production of primary or secondary particles
• Changes relative branching fractions
User-defined biasing
• Available through the G4WrapperProcess interface
• For situations not covered by the built-in algorithms
5
Geant4 version 10.0.p01
6
Geant4 version 10.0.p01
7
Geant4 version 10.0.p01
8
Geant4 version 10.0.p01
9
Geant4 version 10.0.p01
Importance Store
class G4IStore : public G4VIStore {
public:
explicit G4IStore(const G4VPhysicalVolume &worldvolume);
virtual ~G4IStore();
virtual G4double GetImportance(const G4GeometryCell &gCell) const;
virtual G4bool IsKnown(const G4GeometryCell &gCell) const;
virtual const G4VPhysicalVolume &GetWorldVolume() const;
void AddImportanceGeometryCell(G4double importance,
const G4GeometryCell &gCell);
void AddImportanceGeometryCell(G4double importance,
const G4VPhysicalVolume &, G4int aRepNum=0);
void ChangeImportance(G4double importance, const G4GeometryCell &gCell);
void ChangeImportance(G4double importance, const G4VPhysicalVolume &,
G4int aRepNum=0);
G4double GetImportance(const G4VPhysicalVolume &, G4int aRepNum=0) const;
private: .....
};
11
Geant4 version 10.0.p01
15
Geant4 version 10.0.p01
16
Geant4 version 10.0.p01
MyPrimaryGeneratorAction::MyPrimaryGeneratorAction() {
generator = new G4GeneralParticleSource;
}
17
Geant4 version 10.0.p01
Examples in examples/extended/radioactivedecay
18
Geant4 version 10.0.p01
19
Geant4 version 10.0.p01
20
Geant4 version 10.0.p01
Cross-Section Biasing
Controlled via
G4HadronicProcess::BiasCrossSectionByFactor()
void MyPhysicsList::ConstructProcess() {
...
G4ElectroNuclearReaction *theElectroReaction =
new G4ElectroNuclearReaction;
G4ElectronNuclearProcess theElectronNuclearProcess;
theElectronNuclearProcess.RegisterMe(theElectroReaction);
theElectronNuclearProcess.BiasCrossSectionByFactor(100);
pManager->AddDiscreteProcess(&theElectronNuclearProcess);
...
}
21
Geant4 version 10.0.p01
22
Geant4 version 10.0.p01
void MyPhysicsList::ConstructProcess() {
...
G4LowEnergyBremsstrahlung* bremProcess =
new G4LowEnergyBremsstrahlung();
MyWrapperProcess* wrapper = new MyWrapperProcess();
wrapper->RegisterProcess(bremProcess);
processManager->AddProcess(wrapper);
}
23
Geant4 version 10.0.p01
G4BiasingProcessInterface
• Wrapper class for physics processes
G4VBiasingOperation
• Base class to define single biasing action
G4VBiasingOperator
• Configuration to apply one or more operations
24
Geant4 version 10.0.p01
GetPostStepPhysicalInteractionLength()
• Returns the distance at which the
process will make an interaction
75 cm • Analog exponential law is at play
G4PhotoelectricEffect
• Above analog behavior
superseded by biased behavior (if
wished)
5 cm 1. PostStepDoIt()
G4GammaConversion
• Called if the process has
responded the shortest of the
interaction distances
9 cm
G4ComptonSca2ering • Generate final state, according to
specific process analog physical
law
• Above analog behavior
superseded by biased behavior (if
wished)
25
Geant4 version 10.0.p01
GetPostStepPhysicalInteractionLength()
• Returns the distance at which the
process will make an interaction
75 cm • Analog exponential law is at play
G4PhotoelectricEffect
• Above analog behavior
superseded by biased behavior (if
e+ wished)
5 cm PostStepDoIt()
G4GammaConversion
• Called if the process has
e -
responded the shortest of the
interaction distances
9 cm
G4ComptonSca2ering • Generate final state, according to
specific process analog physical
law
• Above analog behavior
superseded by biased behavior (if
wished)
26
Geant4 version 10.0.p01
27
Geant4 version 10.0.p01
28
Geant4 version 10.0.p01
29
Geant4 version 10.0.p01
31
Geant4 version 10.0.p01
G4VParticleChange*
BremSplittingProcess::PostStepDoIt(const G4Track& track,
const G4Step& step) {
G4double weight = track.GetWeight()/fNSplit;
...
std::vector<G4Track*> secondaries(fNSplit); // Secondary store
32
Geant4 version 10.0.p01
G4LowEnergyBremsstrahlung* bremProcess =
new G4LowEnergyBremsstrahlung();
BremSplittingProcess* bremSlitting =
new BremSplittingProcess;
bremSplitting->RegisterProcess(bremProcess);
pmanager->AddProcess(bremSplitting);
33
Geant4 version 10.0.p01
Scoring
Surface
34