BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Wrapper process to produce more muons by resampling the process. More...
#include <BDSWrapperMuonSplitting.hh>
Public Member Functions | |
BDSWrapperMuonSplitting (G4VProcess *originalProcess, G4int splittingFactorIn, G4double splittingThresholdEKIn=0, G4int splittingFactor2In=1, G4double splittingThresholdEK2In=0, G4bool excludeWeight1Particles=false, G4double muonSplittingExclusionWeightIn=1e99) | |
virtual G4VParticleChange * | PostStepDoIt (const G4Track &track, const G4Step &step) |
Do the splitting operation. More... | |
![]() | |
virtual G4double | AlongStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection) |
Same as base class but update currentInteractionLength. More... | |
virtual G4double | AtRestGetPhysicalInteractionLength (const G4Track &track, G4ForceCondition *condition) |
Same as base class but update currentInteractionLength. More... | |
virtual G4double | PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) |
Same as base class but update currentInteractionLength. More... | |
Static Public Attributes | |
static G4int | nCallsThisEvent = 0 |
Counter for understanding occurence. More... | |
Private Attributes | |
G4int | splittingFactor |
G4double | splittingThresholdEK |
G4int | splittingFactor2 |
G4double | splittingThresholdEK2 |
G4bool | excludeWeight1Particles |
G4double | muonSplittingExclusionWeight |
BDSPhysicsVectorLinear * | splitting |
Wrapper process to produce more muons by resampling the process.
Wrap a process. If that process post-step do-it particle change produces a muon, then resample it until we get the desired number of muons. Keep only the new muons. Put together the original secondaries (that are not muons) with the now N muons and weight each muon by w_i * 1/N.
Possibility of 2 splitting factors at threshold energies with linear interpolation of the splitting factor in between (rounded to the nearest integer). The splitting ramps up from 0.8x the 1st threshold in kinetic energy. This is a crude linear way to compensate for a possibly exponential in spectra as we don't know the original function.
Optional flag for excluding weight = 1 incoming particles for the case of heavy cross-section biasing used separately to this class (e.g. decay).
Definition at line 51 of file BDSWrapperMuonSplitting.hh.
BDSWrapperMuonSplitting::BDSWrapperMuonSplitting | ( | G4VProcess * | originalProcess, |
G4int | splittingFactorIn, | ||
G4double | splittingThresholdEKIn = 0 , |
||
G4int | splittingFactor2In = 1 , |
||
G4double | splittingThresholdEK2In = 0 , |
||
G4bool | excludeWeight1Particles = false , |
||
G4double | muonSplittingExclusionWeightIn = 1e99 |
||
) |
Definition at line 34 of file BDSWrapperMuonSplitting.cc.
|
virtual |
Definition at line 68 of file BDSWrapperMuonSplitting.cc.
|
virtual |
Do the splitting operation.
Definition at line 73 of file BDSWrapperMuonSplitting.cc.
References nCallsThisEvent, and BDSPhysicsVectorLinear::Value().
|
private |
Definition at line 76 of file BDSWrapperMuonSplitting.hh.
|
private |
Definition at line 77 of file BDSWrapperMuonSplitting.hh.
|
static |
Counter for understanding occurence.
Definition at line 69 of file BDSWrapperMuonSplitting.hh.
Referenced by PostStepDoIt().
|
private |
Definition at line 78 of file BDSWrapperMuonSplitting.hh.
|
private |
Definition at line 72 of file BDSWrapperMuonSplitting.hh.
|
private |
Definition at line 74 of file BDSWrapperMuonSplitting.hh.
|
private |
Definition at line 73 of file BDSWrapperMuonSplitting.hh.
|
private |
Definition at line 75 of file BDSWrapperMuonSplitting.hh.