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

#include <G4AdjointAlongStepWeightCorrection.hh>

+ Inheritance diagram for G4AdjointAlongStepWeightCorrection:

Public Member Functions

 G4AdjointAlongStepWeightCorrection (const G4String &name="ContinuousWeightCorrection", G4ProcessType type=fElectromagnetic)
 
virtual ~G4AdjointAlongStepWeightCorrection ()
 
void PreparePhysicsTable (const G4ParticleDefinition &)
 
void BuildPhysicsTable (const G4ParticleDefinition &)
 
G4VParticleChangeAlongStepDoIt (const G4Track &, const G4Step &)
 
- Public Member Functions inherited from G4VContinuousProcess
 G4VContinuousProcess (const G4String &aName, G4ProcessType aType=fNotDefined)
 
 G4VContinuousProcess (G4VContinuousProcess &)
 
virtual ~G4VContinuousProcess ()
 
G4VContinuousProcessoperator= (const G4VContinuousProcess &)=delete
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
 
virtual G4VParticleChangeAlongStepDoIt (const G4Track &, const G4Step &)
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &, G4double, G4ForceCondition *)
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &, G4ForceCondition *)
 
virtual G4VParticleChangeAtRestDoIt (const G4Track &, const G4Step &)
 
virtual G4VParticleChangePostStepDoIt (const G4Track &, const G4Step &)
 
- Public Member Functions inherited from G4VProcess
 G4VProcess (const G4String &aName="NoName", G4ProcessType aType=fNotDefined)
 
 G4VProcess (const G4VProcess &right)
 
virtual ~G4VProcess ()
 
G4VProcessoperator= (const G4VProcess &)=delete
 
G4bool operator== (const G4VProcess &right) const
 
G4bool operator!= (const G4VProcess &right) const
 
virtual G4VParticleChangePostStepDoIt (const G4Track &track, const G4Step &stepData)=0
 
virtual G4VParticleChangeAlongStepDoIt (const G4Track &track, const G4Step &stepData)=0
 
virtual G4VParticleChangeAtRestDoIt (const G4Track &track, const G4Step &stepData)=0
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)=0
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &track, G4ForceCondition *condition)=0
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)=0
 
G4double GetCurrentInteractionLength () const
 
void SetPILfactor (G4double value)
 
G4double GetPILfactor () const
 
G4double AlongStepGPIL (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
 
G4double AtRestGPIL (const G4Track &track, G4ForceCondition *condition)
 
G4double PostStepGPIL (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
virtual G4bool IsApplicable (const G4ParticleDefinition &)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void PreparePhysicsTable (const G4ParticleDefinition &)
 
virtual G4bool StorePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
virtual G4bool RetrievePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
const G4StringGetPhysicsTableFileName (const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
 
const G4StringGetProcessName () const
 
G4ProcessType GetProcessType () const
 
void SetProcessType (G4ProcessType)
 
G4int GetProcessSubType () const
 
void SetProcessSubType (G4int)
 
virtual void StartTracking (G4Track *)
 
virtual void EndTracking ()
 
virtual void SetProcessManager (const G4ProcessManager *)
 
virtual const G4ProcessManagerGetProcessManager ()
 
virtual void ResetNumberOfInteractionLengthLeft ()
 
G4double GetNumberOfInteractionLengthLeft () const
 
G4double GetTotalNumberOfInteractionLengthTraversed () const
 
G4bool isAtRestDoItIsEnabled () const
 
G4bool isAlongStepDoItIsEnabled () const
 
G4bool isPostStepDoItIsEnabled () const
 
virtual void DumpInfo () const
 
virtual void ProcessDescription (std::ostream &outfile) const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
virtual void SetMasterProcess (G4VProcess *masterP)
 
const G4VProcessGetMasterProcess () const
 
virtual void BuildWorkerPhysicsTable (const G4ParticleDefinition &part)
 
virtual void PrepareWorkerPhysicsTable (const G4ParticleDefinition &)
 

Protected Member Functions

virtual G4double GetContinuousStepLimit (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &currentSafety)
 
- Protected Member Functions inherited from G4VContinuousProcess
virtual G4double GetContinuousStepLimit (const G4Track &aTrack, G4double previousStepSize, G4double currentMinimumStep, G4double &currentSafety)=0
 
void SetGPILSelection (G4GPILSelection selection)
 
G4GPILSelection GetGPILSelection () const
 
- Protected Member Functions inherited from G4VProcess
void SubtractNumberOfInteractionLengthLeft (G4double prevStepSize)
 
void ClearNumberOfInteractionLengthLeft ()
 

Protected Attributes

G4ParticleChangefParticleChange
 
- Protected Attributes inherited from G4VProcess
const G4ProcessManageraProcessManager = nullptr
 
G4VParticleChangepParticleChange = nullptr
 
G4ParticleChange aParticleChange
 
G4double theNumberOfInteractionLengthLeft = -1.0
 
G4double currentInteractionLength = -1.0
 
G4double theInitialNumberOfInteractionLength = -1.0
 
G4String theProcessName
 
G4String thePhysicsTableFileName
 
G4ProcessType theProcessType = fNotDefined
 
G4int theProcessSubType = -1
 
G4double thePILfactor = 1.0
 
G4int verboseLevel = 0
 
G4bool enableAtRestDoIt = true
 
G4bool enableAlongStepDoIt = true
 
G4bool enablePostStepDoIt = true
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VProcess
static const G4StringGetProcessTypeName (G4ProcessType)
 

Detailed Description

Definition at line 69 of file G4AdjointAlongStepWeightCorrection.hh.

Constructor & Destructor Documentation

◆ G4AdjointAlongStepWeightCorrection()

G4AdjointAlongStepWeightCorrection::G4AdjointAlongStepWeightCorrection ( const G4String name = "ContinuousWeightCorrection",
G4ProcessType  type = fElectromagnetic 
)

Definition at line 36 of file G4AdjointAlongStepWeightCorrection.cc.

37 : G4VContinuousProcess(name, type)
39 currentMaterialIndex=0;
40 preStepKinEnergy=1.;
41 currentCouple=0;
42}

◆ ~G4AdjointAlongStepWeightCorrection()

G4AdjointAlongStepWeightCorrection::~G4AdjointAlongStepWeightCorrection ( )
virtual

Definition at line 47 of file G4AdjointAlongStepWeightCorrection.cc.

48{delete fParticleChange;
49}

Member Function Documentation

◆ AlongStepDoIt()

G4VParticleChange * G4AdjointAlongStepWeightCorrection::AlongStepDoIt ( const G4Track track,
const G4Step step 
)
virtual

Reimplemented from G4VContinuousProcess.

Definition at line 65 of file G4AdjointAlongStepWeightCorrection.cc.

67{
68
70
71 // Get the actual (true) Step length
72 //----------------------------------
73 G4double length = step.GetStepLength();
74
75
79 preStepKinEnergy,Tkin, currentCouple,length);
80
81
82
83
84 //Caution!!!
85 // It is important to select the weight of the post_step_point
86 // as the current weight and not the weight of the track, as t
87 // the weight of the track is changed after having applied all
88 // the along_step_do_it.
89
90 // G4double new_weight=weight_correction*track.GetWeight(); //old
91 G4double new_weight=weight_correction*step.GetPostStepPoint()->GetWeight();
92
93
94
95 //if (weight_correction >2.) new_weight=1.e-300;
96
97
98 //The following test check for zero weight.
99 //This happens after weight correction of gamma for photo electric effect.
100 //When the new weight is 0 it will be later on consider as nan by G4.
101 //Therefore we do put a lower limit of 1.e-300. for new_weight
102 //Correction by L.Desorgher on 15 July 2009
103 if (new_weight==0 || (new_weight<=0 && new_weight>0)){
104 //G4cout<<new_weight<<'\t'<<weight_correction<<'\t'<<track.GetWeight()<<G4endl;
105 new_weight=1.e-300;
106 }
107
108 //G4cout<<new_weight<<'\t'<<weight_correction<<'\t'<<track.GetWeight()<<G4endl;
112
113
114 return fParticleChange;
115
116}
double G4double
Definition: G4Types.hh:83
G4double GetContinuousWeightCorrection(G4ParticleDefinition *aPartDef, G4double PreStepEkin, G4double AfterStepEkin, const G4MaterialCutsCouple *aCouple, G4double step_length)
static G4AdjointCSManager * GetAdjointCSManager()
G4ParticleDefinition * GetDefinition() const
virtual void Initialize(const G4Track &)
G4double GetKineticEnergy() const
G4double GetWeight() const
G4double GetStepLength() const
G4StepPoint * GetPostStepPoint() const
const G4DynamicParticle * GetDynamicParticle() const
void SetSecondaryWeightByProcess(G4bool)
void SetParentWeightByProcess(G4bool)
void ProposeParentWeight(G4double finalWeight)

◆ BuildPhysicsTable()

void G4AdjointAlongStepWeightCorrection::BuildPhysicsTable ( const G4ParticleDefinition )
virtual

Reimplemented from G4VProcess.

Definition at line 60 of file G4AdjointAlongStepWeightCorrection.cc.

61{;
62}

◆ GetContinuousStepLimit()

G4double G4AdjointAlongStepWeightCorrection::GetContinuousStepLimit ( const G4Track track,
G4double  previousStepSize,
G4double  currentMinimumStep,
G4double currentSafety 
)
protectedvirtual

Implements G4VContinuousProcess.

Definition at line 119 of file G4AdjointAlongStepWeightCorrection.cc.

121{
122 G4double x = DBL_MAX;
123 DefineMaterial(track.GetMaterialCutsCouple());
124 preStepKinEnergy = track.GetKineticEnergy();
125 return x;
126}
G4double GetKineticEnergy() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
#define DBL_MAX
Definition: templates.hh:62

◆ PreparePhysicsTable()

void G4AdjointAlongStepWeightCorrection::PreparePhysicsTable ( const G4ParticleDefinition )
virtual

Reimplemented from G4VProcess.

Definition at line 52 of file G4AdjointAlongStepWeightCorrection.cc.

54{
55;
56}

Member Data Documentation

◆ fParticleChange

G4ParticleChange* G4AdjointAlongStepWeightCorrection::fParticleChange
protected

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