BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Static Public Attributes | Private Attributes
BDSWrapperMuonSplitting Class Reference

Wrapper process to produce more muons by resampling the process. More...

#include <BDSWrapperMuonSplitting.hh>

Inheritance diagram for BDSWrapperMuonSplitting:
Inheritance graph
Collaboration diagram for BDSWrapperMuonSplitting:
Collaboration graph

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...
 
- Public Member Functions inherited from BDSWrapperProcess
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
 
BDSPhysicsVectorLinearsplitting
 

Detailed Description

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

Author
Laurie Nevay

Definition at line 51 of file BDSWrapperMuonSplitting.hh.

Constructor & Destructor Documentation

◆ BDSWrapperMuonSplitting()

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.

◆ ~BDSWrapperMuonSplitting()

BDSWrapperMuonSplitting::~BDSWrapperMuonSplitting ( )
virtual

Definition at line 68 of file BDSWrapperMuonSplitting.cc.

Member Function Documentation

◆ PostStepDoIt()

G4VParticleChange * BDSWrapperMuonSplitting::PostStepDoIt ( const G4Track &  track,
const G4Step &  step 
)
virtual

Do the splitting operation.

Definition at line 73 of file BDSWrapperMuonSplitting.cc.

References nCallsThisEvent, and BDSPhysicsVectorLinear::Value().

Here is the call graph for this function:

Field Documentation

◆ excludeWeight1Particles

G4bool BDSWrapperMuonSplitting::excludeWeight1Particles
private

Definition at line 76 of file BDSWrapperMuonSplitting.hh.

◆ muonSplittingExclusionWeight

G4double BDSWrapperMuonSplitting::muonSplittingExclusionWeight
private

Definition at line 77 of file BDSWrapperMuonSplitting.hh.

◆ nCallsThisEvent

G4int BDSWrapperMuonSplitting::nCallsThisEvent = 0
static

Counter for understanding occurence.

Definition at line 69 of file BDSWrapperMuonSplitting.hh.

Referenced by PostStepDoIt().

◆ splitting

BDSPhysicsVectorLinear* BDSWrapperMuonSplitting::splitting
private

Definition at line 78 of file BDSWrapperMuonSplitting.hh.

◆ splittingFactor

G4int BDSWrapperMuonSplitting::splittingFactor
private

Definition at line 72 of file BDSWrapperMuonSplitting.hh.

◆ splittingFactor2

G4int BDSWrapperMuonSplitting::splittingFactor2
private

Definition at line 74 of file BDSWrapperMuonSplitting.hh.

◆ splittingThresholdEK

G4double BDSWrapperMuonSplitting::splittingThresholdEK
private

Definition at line 73 of file BDSWrapperMuonSplitting.hh.

◆ splittingThresholdEK2

G4double BDSWrapperMuonSplitting::splittingThresholdEK2
private

Definition at line 75 of file BDSWrapperMuonSplitting.hh.


The documentation for this class was generated from the following files: