Geant4  10.02.p03
G4ParticleChangeForOccurenceBiasing Class Reference

#include <G4ParticleChangeForOccurenceBiasing.hh>

Inheritance diagram for G4ParticleChangeForOccurenceBiasing:
Collaboration diagram for G4ParticleChangeForOccurenceBiasing:

Public Member Functions

 G4ParticleChangeForOccurenceBiasing (G4String name)
 
 ~G4ParticleChangeForOccurenceBiasing ()
 
void SetOccurenceWeightForNonInteraction (G4double w)
 
G4double GetOccurenceWeightForNonInteraction () const
 
void SetOccurenceWeightForInteraction (G4double w)
 
G4double GetOccurenceWeightForInteraction () const
 
void SetWrappedParticleChange (G4VParticleChange *wpc)
 
G4VParticleChange * GetWrappedParticleChange () const
 
void StealSecondaries ()
 
virtual G4Step * UpdateStepForAtRest (G4Step *step)
 
virtual G4Step * UpdateStepForAlongStep (G4Step *step)
 
virtual G4Step * UpdateStepForPostStep (G4Step *step)
 
const G4StringGetName () const
 

Private Attributes

G4String fName
 
G4VParticleChange * fWrappedParticleChange
 
G4double fOccurenceWeightForNonInteraction
 
G4double fOccurenceWeightForInteraction
 

Detailed Description

Definition at line 48 of file G4ParticleChangeForOccurenceBiasing.hh.

Constructor & Destructor Documentation

◆ G4ParticleChangeForOccurenceBiasing()

G4ParticleChangeForOccurenceBiasing::G4ParticleChangeForOccurenceBiasing ( G4String  name)

◆ ~G4ParticleChangeForOccurenceBiasing()

G4ParticleChangeForOccurenceBiasing::~G4ParticleChangeForOccurenceBiasing ( )

Definition at line 36 of file G4ParticleChangeForOccurenceBiasing.cc.

37 {}

Member Function Documentation

◆ GetName()

const G4String& G4ParticleChangeForOccurenceBiasing::GetName ( void  ) const
inline

◆ GetOccurenceWeightForInteraction()

G4double G4ParticleChangeForOccurenceBiasing::GetOccurenceWeightForInteraction ( ) const
inline

Definition at line 57 of file G4ParticleChangeForOccurenceBiasing.hh.

Here is the call graph for this function:

◆ GetOccurenceWeightForNonInteraction()

G4double G4ParticleChangeForOccurenceBiasing::GetOccurenceWeightForNonInteraction ( ) const
inline

◆ GetWrappedParticleChange()

G4VParticleChange* G4ParticleChangeForOccurenceBiasing::GetWrappedParticleChange ( ) const
inline

Definition at line 62 of file G4ParticleChangeForOccurenceBiasing.hh.

Here is the call graph for this function:

◆ SetOccurenceWeightForInteraction()

void G4ParticleChangeForOccurenceBiasing::SetOccurenceWeightForInteraction ( G4double  w)
inline

Definition at line 56 of file G4ParticleChangeForOccurenceBiasing.hh.

Here is the caller graph for this function:

◆ SetOccurenceWeightForNonInteraction()

void G4ParticleChangeForOccurenceBiasing::SetOccurenceWeightForNonInteraction ( G4double  w)
inline

Definition at line 54 of file G4ParticleChangeForOccurenceBiasing.hh.

Here is the caller graph for this function:

◆ SetWrappedParticleChange()

void G4ParticleChangeForOccurenceBiasing::SetWrappedParticleChange ( G4VParticleChange *  wpc)

Definition at line 39 of file G4ParticleChangeForOccurenceBiasing.cc.

Here is the caller graph for this function:

◆ StealSecondaries()

void G4ParticleChangeForOccurenceBiasing::StealSecondaries ( )

Definition at line 44 of file G4ParticleChangeForOccurenceBiasing.cc.

45 {
46  SetNumberOfSecondaries( fWrappedParticleChange->GetNumberOfSecondaries() );
47  for (G4int isecond = 0; isecond < fWrappedParticleChange->GetNumberOfSecondaries(); isecond++)
48  {
49  G4Track* secondary = fWrappedParticleChange->GetSecondary(isecond);
50  secondary->SetWeight ( secondary->GetWeight() * fOccurenceWeightForInteraction );
51  AddSecondary( secondary );
52  }
53  fWrappedParticleChange->Clear();
54 }
int G4int
Definition: G4Types.hh:78
Here is the caller graph for this function:

◆ UpdateStepForAlongStep()

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

Definition at line 62 of file G4ParticleChangeForOccurenceBiasing.cc.

63 {
64  // -- make particle change of wrapped process to apply its changes:
65  if ( fWrappedParticleChange ) fWrappedParticleChange->UpdateStepForAlongStep( step );
66 
67  // -- multiply parent weight by weight due to occurence biasing:
68  G4StepPoint* postStepPoint = step->GetPostStepPoint();
69  postStepPoint->SetWeight( postStepPoint->GetWeight() * fOccurenceWeightForNonInteraction );
70 
71  return step;
72 }
Here is the caller graph for this function:

◆ UpdateStepForAtRest()

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

Definition at line 57 of file G4ParticleChangeForOccurenceBiasing.cc.

58 {
59  return step;
60 }
Here is the caller graph for this function:

◆ UpdateStepForPostStep()

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

Definition at line 74 of file G4ParticleChangeForOccurenceBiasing.cc.

75 {
76  // -- let make first wrapped process to apply its changes:
77  fWrappedParticleChange->UpdateStepForPostStep(step);
78  // -- then apply weight correction due to occurence biasing:
79  G4StepPoint* postStepPoint = step->GetPostStepPoint();
80  postStepPoint->SetWeight( postStepPoint->GetWeight() * fOccurenceWeightForInteraction );
81 
82  return step;
83 }
Here is the caller graph for this function:

Member Data Documentation

◆ fName

G4String G4ParticleChangeForOccurenceBiasing::fName
private

Definition at line 77 of file G4ParticleChangeForOccurenceBiasing.hh.

◆ fOccurenceWeightForInteraction

G4double G4ParticleChangeForOccurenceBiasing::fOccurenceWeightForInteraction
private

Definition at line 80 of file G4ParticleChangeForOccurenceBiasing.hh.

◆ fOccurenceWeightForNonInteraction

G4double G4ParticleChangeForOccurenceBiasing::fOccurenceWeightForNonInteraction
private

Definition at line 79 of file G4ParticleChangeForOccurenceBiasing.hh.

◆ fWrappedParticleChange

G4VParticleChange* G4ParticleChangeForOccurenceBiasing::fWrappedParticleChange
private

Definition at line 78 of file G4ParticleChangeForOccurenceBiasing.hh.


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