Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ParticleChangeForOccurenceBiasing Class Reference

#include <G4ParticleChangeForOccurenceBiasing.hh>

Inheritance diagram for G4ParticleChangeForOccurenceBiasing:

Public Member Functions

 G4ParticleChangeForOccurenceBiasing (const G4String &name)
 ~G4ParticleChangeForOccurenceBiasing ()=default
void SetOccurenceWeightForNonInteraction (G4double w)
G4double GetOccurenceWeightForNonInteraction () const
void SetOccurenceWeightForInteraction (G4double w)
G4double GetOccurenceWeightForInteraction () const
void SetWrappedParticleChange (G4VParticleChange *wpc)
G4VParticleChangeGetWrappedParticleChange () const
void StealSecondaries ()
virtual G4StepUpdateStepForAtRest (G4Step *step)
virtual G4StepUpdateStepForAlongStep (G4Step *step)
virtual G4StepUpdateStepForPostStep (G4Step *step)
const G4StringGetName () const
Public Member Functions inherited from G4VParticleChange
 G4VParticleChange ()
virtual ~G4VParticleChange ()=default
 G4VParticleChange (const G4VParticleChange &right)=delete
G4VParticleChangeoperator= (const G4VParticleChange &right)=delete
virtual void Initialize (const G4Track &)
G4double GetTrueStepLength () const
void ProposeTrueStepLength (G4double truePathLength)
G4double GetLocalEnergyDeposit () const
void ProposeLocalEnergyDeposit (G4double anEnergyPart)
G4double GetNonIonizingEnergyDeposit () const
void ProposeNonIonizingEnergyDeposit (G4double anEnergyPart)
G4TrackStatus GetTrackStatus () const
void ProposeTrackStatus (G4TrackStatus status)
const G4TrackGetCurrentTrack () const
G4SteppingControl GetSteppingControl () const
void ProposeSteppingControl (G4SteppingControl StepControlFlag)
G4bool GetFirstStepInVolume () const
G4bool GetLastStepInVolume () const
void ProposeFirstStepInVolume (G4bool flag)
void ProposeLastStepInVolume (G4bool flag)
void Clear ()
void SetNumberOfSecondaries (G4int totSecondaries)
G4int GetNumberOfSecondaries () const
G4TrackGetSecondary (G4int anIndex) const
void AddSecondary (G4Track *aSecondary)
G4double GetWeight () const
G4double GetParentWeight () const
void ProposeWeight (G4double finalWeight)
void ProposeParentWeight (G4double finalWeight)
void SetSecondaryWeightByProcess (G4bool)
G4bool IsSecondaryWeightSetByProcess () const
void SetParentWeightByProcess (G4bool)
G4bool IsParentWeightSetByProcess () const
virtual void DumpInfo () const
void SetVerboseLevel (G4int vLevel)
G4int GetVerboseLevel () const
virtual G4bool CheckIt (const G4Track &)
void ClearDebugFlag ()
void SetDebugFlag ()
G4bool GetDebugFlag () const

Additional Inherited Members

Protected Member Functions inherited from G4VParticleChange
G4StepUpdateStepInfo (G4Step *Step)
void InitializeLocalEnergyDeposit ()
void InitializeSteppingControl ()
void InitializeParentWeight (const G4Track &)
void InitializeStatusChange (const G4Track &)
void InitializeSecondaries ()
void InitializeFromStep (const G4Step *)
G4double ComputeBeta (G4double kinEnergy)
G4bool CheckSecondary (G4Track &)
G4double GetAccuracyForWarning () const
G4double GetAccuracyForException () const
Protected Attributes inherited from G4VParticleChange
const G4TracktheCurrentTrack = nullptr
G4TrackStatus theStatusChange = fAlive
G4SteppingControl theSteppingControlFlag = NormalCondition
G4double theLocalEnergyDeposit = 0.0
G4double theNonIonizingEnergyDeposit = 0.0
G4double theTrueStepLength = 0.0
G4double theParentWeight = 1.0
G4double theParentGlobalTime = 0.0
G4int theNumberOfSecondaries = 0
G4int theSizeOftheListOfSecondaries = 0
G4int verboseLevel = 1
G4int nError = 0
G4bool theFirstStepInVolume = false
G4bool theLastStepInVolume = false
G4bool isParentWeightProposed = false
G4bool fSetSecondaryWeightByProcess = false
G4bool debugFlag = false
std::vector< G4Track * > theListOfSecondaries
Static Protected Attributes inherited from G4VParticleChange
static const G4double accuracyForWarning = 1.0e-9
static const G4double accuracyForException = 0.001
static const G4int maxError = 10

Detailed Description

Definition at line 44 of file G4ParticleChangeForOccurenceBiasing.hh.

Constructor & Destructor Documentation

◆ G4ParticleChangeForOccurenceBiasing()

G4ParticleChangeForOccurenceBiasing::G4ParticleChangeForOccurenceBiasing ( const G4String & name)

Definition at line 31 of file G4ParticleChangeForOccurenceBiasing.cc.

34 fName(name)
35{}

◆ ~G4ParticleChangeForOccurenceBiasing()

G4ParticleChangeForOccurenceBiasing::~G4ParticleChangeForOccurenceBiasing ( )
default

Member Function Documentation

◆ GetName()

const G4String & G4ParticleChangeForOccurenceBiasing::GetName ( ) const
inline

Definition at line 75 of file G4ParticleChangeForOccurenceBiasing.hh.

75{ return fName; }

◆ GetOccurenceWeightForInteraction()

G4double G4ParticleChangeForOccurenceBiasing::GetOccurenceWeightForInteraction ( ) const
inline

Definition at line 57 of file G4ParticleChangeForOccurenceBiasing.hh.

58 { return fOccurenceWeightForInteraction; }

◆ GetOccurenceWeightForNonInteraction()

G4double G4ParticleChangeForOccurenceBiasing::GetOccurenceWeightForNonInteraction ( ) const
inline

Definition at line 53 of file G4ParticleChangeForOccurenceBiasing.hh.

54 { return fOccurenceWeightForNonInteraction; }

◆ GetWrappedParticleChange()

G4VParticleChange * G4ParticleChangeForOccurenceBiasing::GetWrappedParticleChange ( ) const
inline

Definition at line 63 of file G4ParticleChangeForOccurenceBiasing.hh.

64 { return fWrappedParticleChange; }

◆ SetOccurenceWeightForInteraction()

void G4ParticleChangeForOccurenceBiasing::SetOccurenceWeightForInteraction ( G4double w)
inline

Definition at line 55 of file G4ParticleChangeForOccurenceBiasing.hh.

56 { fOccurenceWeightForInteraction = w; }

◆ SetOccurenceWeightForNonInteraction()

void G4ParticleChangeForOccurenceBiasing::SetOccurenceWeightForNonInteraction ( G4double w)
inline

Definition at line 51 of file G4ParticleChangeForOccurenceBiasing.hh.

52 { fOccurenceWeightForNonInteraction = w; }

◆ SetWrappedParticleChange()

void G4ParticleChangeForOccurenceBiasing::SetWrappedParticleChange ( G4VParticleChange * wpc)

Definition at line 37 of file G4ParticleChangeForOccurenceBiasing.cc.

39{
40 fWrappedParticleChange = wpc;
41}

◆ StealSecondaries()

void G4ParticleChangeForOccurenceBiasing::StealSecondaries ( )

Definition at line 43 of file G4ParticleChangeForOccurenceBiasing.cc.

44{
45 SetNumberOfSecondaries( fWrappedParticleChange->GetNumberOfSecondaries() );
46 for (G4int isecond = 0; isecond < fWrappedParticleChange->GetNumberOfSecondaries(); isecond++)
47 {
48 G4Track* secondary = fWrappedParticleChange->GetSecondary(isecond);
49 secondary->SetWeight ( secondary->GetWeight() * fOccurenceWeightForInteraction );
50 AddSecondary( secondary );
51 }
52 fWrappedParticleChange->Clear();
53}
int G4int
Definition G4Types.hh:85
G4double GetWeight() const
void SetWeight(G4double aValue)
void AddSecondary(G4Track *aSecondary)
void SetNumberOfSecondaries(G4int totSecondaries)

◆ UpdateStepForAlongStep()

G4Step * G4ParticleChangeForOccurenceBiasing::UpdateStepForAlongStep ( G4Step * step)
virtual

Reimplemented from G4VParticleChange.

Definition at line 60 of file G4ParticleChangeForOccurenceBiasing.cc.

61{
62 // -- make particle change of wrapped process to apply its changes:
63 if ( fWrappedParticleChange )
64 fWrappedParticleChange->UpdateStepForAlongStep( step );
65
66 // -- multiply parent weight by weight due to occurrence biasing:
67 G4StepPoint* postStepPoint = step->GetPostStepPoint();
68 postStepPoint->SetWeight( postStepPoint->GetWeight()*fOccurenceWeightForNonInteraction );
69
70 return step;
71}
void SetWeight(G4double aValue)
G4double GetWeight() const
G4StepPoint * GetPostStepPoint() const

◆ UpdateStepForAtRest()

G4Step * G4ParticleChangeForOccurenceBiasing::UpdateStepForAtRest ( G4Step * step)
virtual

Reimplemented from G4VParticleChange.

Definition at line 55 of file G4ParticleChangeForOccurenceBiasing.cc.

56{
57 return step;
58}

◆ UpdateStepForPostStep()

G4Step * G4ParticleChangeForOccurenceBiasing::UpdateStepForPostStep ( G4Step * step)
virtual

Reimplemented from G4VParticleChange.

Definition at line 73 of file G4ParticleChangeForOccurenceBiasing.cc.

74{
75 // -- let make first wrapped process to apply its changes:
76 fWrappedParticleChange->UpdateStepForPostStep(step);
77 // -- then apply weight correction due to occurrence biasing:
78 G4StepPoint* postStepPoint = step->GetPostStepPoint();
79 postStepPoint->SetWeight( postStepPoint->GetWeight()*fOccurenceWeightForInteraction );
80
81 return step;
82}

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