Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4ParticleChangeForOccurenceBiasing Class Reference

#include <G4ParticleChangeForOccurenceBiasing.hh>

Inheritance diagram for G4ParticleChangeForOccurenceBiasing:
G4VParticleChange

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)
 
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 ()
 
G4bool operator== (const G4VParticleChange &right) const
 
G4bool operator!= (const G4VParticleChange &right) const
 
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)
 
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
 G4VParticleChange (const G4VParticleChange &right)
 
G4VParticleChangeoperator= (const G4VParticleChange &right)
 
G4StepUpdateStepInfo (G4Step *Step)
 
void InitializeTrueStepLength (const G4Track &)
 
void InitializeLocalEnergyDeposit (const G4Track &)
 
void InitializeSteppingControl (const G4Track &)
 
void InitializeParentWeight (const G4Track &)
 
void InitializeParentGlobalTime (const G4Track &)
 
void InitializeStatusChange (const G4Track &)
 
void InitializeSecondaries (const G4Track &)
 
void InitializeStepInVolumeFlags (const G4Track &)
 
G4bool CheckSecondary (G4Track &)
 
G4double GetAccuracyForWarning () const
 
G4double GetAccuracyForException () const
 
- Protected Attributes inherited from G4VParticleChange
G4TrackFastVectortheListOfSecondaries
 
G4int theNumberOfSecondaries
 
G4int theSizeOftheListOfSecondaries
 
G4TrackStatus theStatusChange
 
G4SteppingControl theSteppingControlFlag
 
G4double theLocalEnergyDeposit
 
G4double theNonIonizingEnergyDeposit
 
G4double theTrueStepLength
 
G4bool theFirstStepInVolume
 
G4bool theLastStepInVolume
 
G4double theParentWeight
 
G4bool isParentWeightProposed
 
G4bool fSetSecondaryWeightByProcess
 
G4double theParentGlobalTime
 
G4int verboseLevel
 
G4bool debugFlag
 
- Static Protected Attributes inherited from G4VParticleChange
static const G4double accuracyForWarning = 1.0e-9
 
static const G4double accuracyForException = 0.001
 

Detailed Description

Definition at line 47 of file G4ParticleChangeForOccurenceBiasing.hh.

Constructor & Destructor Documentation

G4ParticleChangeForOccurenceBiasing::G4ParticleChangeForOccurenceBiasing ( G4String  name)

Definition at line 28 of file G4ParticleChangeForOccurenceBiasing.cc.

30  fName(name),
31  fWrappedParticleChange(0),
32  fOccurenceWeightForNonInteraction(-1.0),
33  fOccurenceWeightForInteraction(-1.0)
34 {}
G4ParticleChangeForOccurenceBiasing::~G4ParticleChangeForOccurenceBiasing ( )

Definition at line 36 of file G4ParticleChangeForOccurenceBiasing.cc.

37 {}

Member Function Documentation

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

Definition at line 73 of file G4ParticleChangeForOccurenceBiasing.hh.

73 {return fName;}
G4double G4ParticleChangeForOccurenceBiasing::GetOccurenceWeightForInteraction ( ) const
inline

Definition at line 56 of file G4ParticleChangeForOccurenceBiasing.hh.

56 {return fOccurenceWeightForInteraction;}
G4double G4ParticleChangeForOccurenceBiasing::GetOccurenceWeightForNonInteraction ( ) const
inline

Definition at line 54 of file G4ParticleChangeForOccurenceBiasing.hh.

54 {return fOccurenceWeightForNonInteraction;}
G4VParticleChange* G4ParticleChangeForOccurenceBiasing::GetWrappedParticleChange ( ) const
inline

Definition at line 61 of file G4ParticleChangeForOccurenceBiasing.hh.

61 {return fWrappedParticleChange;}
void G4ParticleChangeForOccurenceBiasing::SetOccurenceWeightForInteraction ( G4double  w)
inline

Definition at line 55 of file G4ParticleChangeForOccurenceBiasing.hh.

Referenced by G4BiasingProcessInterface::PostStepDoIt().

55 {fOccurenceWeightForInteraction = w;}
void G4ParticleChangeForOccurenceBiasing::SetOccurenceWeightForNonInteraction ( G4double  w)
inline

Definition at line 53 of file G4ParticleChangeForOccurenceBiasing.hh.

Referenced by G4BiasingProcessInterface::AlongStepDoIt().

53 {fOccurenceWeightForNonInteraction = w;}
void G4ParticleChangeForOccurenceBiasing::SetWrappedParticleChange ( G4VParticleChange wpc)

Definition at line 39 of file G4ParticleChangeForOccurenceBiasing.cc.

Referenced by G4BiasingProcessInterface::AlongStepDoIt(), and G4BiasingProcessInterface::PostStepDoIt().

40 {
41  fWrappedParticleChange = wpc;
42 }
void G4ParticleChangeForOccurenceBiasing::StealSecondaries ( )

Definition at line 44 of file G4ParticleChangeForOccurenceBiasing.cc.

References G4VParticleChange::AddSecondary(), G4VParticleChange::Clear(), G4VParticleChange::GetNumberOfSecondaries(), G4VParticleChange::GetSecondary(), G4Track::GetWeight(), G4VParticleChange::SetNumberOfSecondaries(), and G4Track::SetWeight().

Referenced by G4BiasingProcessInterface::PostStepDoIt().

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 }
G4int GetNumberOfSecondaries() const
G4Track * GetSecondary(G4int anIndex) const
int G4int
Definition: G4Types.hh:78
void SetWeight(G4double aValue)
void AddSecondary(G4Track *aSecondary)
void SetNumberOfSecondaries(G4int totSecondaries)
G4double GetWeight() const
G4Step * G4ParticleChangeForOccurenceBiasing::UpdateStepForAlongStep ( G4Step step)
virtual

Reimplemented from G4VParticleChange.

Definition at line 62 of file G4ParticleChangeForOccurenceBiasing.cc.

References G4Step::GetPostStepPoint(), G4StepPoint::GetWeight(), G4StepPoint::SetWeight(), and G4VParticleChange::UpdateStepForAlongStep().

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  // G4cout << " part change along : w = " << postStepPoint->GetWeight() << " , wOcc = " << fOccurenceWeightForNonInteraction << G4endl; // !
70  postStepPoint->SetWeight( postStepPoint->GetWeight() * fOccurenceWeightForNonInteraction );
71 
72  return step;
73 }
virtual G4Step * UpdateStepForAlongStep(G4Step *Step)
G4double GetWeight() const
void SetWeight(G4double aValue)
G4StepPoint * GetPostStepPoint() const
G4Step * G4ParticleChangeForOccurenceBiasing::UpdateStepForAtRest ( G4Step step)
virtual

Reimplemented from G4VParticleChange.

Definition at line 57 of file G4ParticleChangeForOccurenceBiasing.cc.

58 {
59  return step;
60 }
G4Step * G4ParticleChangeForOccurenceBiasing::UpdateStepForPostStep ( G4Step step)
virtual

Reimplemented from G4VParticleChange.

Definition at line 75 of file G4ParticleChangeForOccurenceBiasing.cc.

References G4Step::GetPostStepPoint(), G4StepPoint::GetWeight(), G4StepPoint::SetWeight(), and G4VParticleChange::UpdateStepForPostStep().

76 {
77  // -- let make first wrapped process to apply its changes:
78  fWrappedParticleChange->UpdateStepForPostStep(step);
79  // -- then apply weight correction due to occurence biasing:
80  G4StepPoint* postStepPoint = step->GetPostStepPoint();
81  postStepPoint->SetWeight( postStepPoint->GetWeight() * fOccurenceWeightForInteraction );
82 
83  return step;
84 }
G4double GetWeight() const
void SetWeight(G4double aValue)
G4StepPoint * GetPostStepPoint() const
virtual G4Step * UpdateStepForPostStep(G4Step *Step)

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