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

#include <G4VAdjointReverseReaction.hh>

+ Inheritance diagram for G4VAdjointReverseReaction:

Public Member Functions

 G4VAdjointReverseReaction (G4String process_name, G4bool whichScatCase)
 
 ~G4VAdjointReverseReaction () override
 
void BuildPhysicsTable (const G4ParticleDefinition &) override
 
G4VParticleChangePostStepDoIt (const G4Track &, const G4Step &) override
 
 G4VAdjointReverseReaction (G4VAdjointReverseReaction &)=delete
 
G4VAdjointReverseReactionoperator= (const G4VAdjointReverseReaction &right)=delete
 
- Public Member Functions inherited from G4VDiscreteProcess
 G4VDiscreteProcess (const G4String &aName, G4ProcessType aType=fNotDefined)
 
 G4VDiscreteProcess (G4VDiscreteProcess &)
 
virtual ~G4VDiscreteProcess ()
 
G4VDiscreteProcessoperator= (const G4VDiscreteProcess &)=delete
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &, G4ForceCondition *)
 
virtual G4VParticleChangeAtRestDoIt (const G4Track &, const G4Step &)
 
virtual G4VParticleChangeAlongStepDoIt (const G4Track &, const G4Step &)
 
virtual G4double GetCrossSection (const G4double, const G4MaterialCutsCouple *)
 
virtual G4double MinPrimaryEnergy (const G4ParticleDefinition *, const G4Material *)
 
- 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
 
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 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 const G4VProcessGetCreatorProcess () const
 
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

G4double GetMeanFreePath (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
 
- Protected Member Functions inherited from G4VDiscreteProcess
- Protected Member Functions inherited from G4VProcess
void SubtractNumberOfInteractionLengthLeft (G4double prevStepSize)
 
void ClearNumberOfInteractionLengthLeft ()
 

Protected Attributes

G4VEmAdjointModelfAdjointModel = nullptr
 
G4bool fIsScatProjToProj
 
- 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 47 of file G4VAdjointReverseReaction.hh.

Constructor & Destructor Documentation

◆ G4VAdjointReverseReaction() [1/2]

G4VAdjointReverseReaction::G4VAdjointReverseReaction ( G4String process_name,
G4bool whichScatCase )
explicit

Definition at line 33 of file G4VAdjointReverseReaction.cc.

35 : G4VDiscreteProcess(process_name)
36{
38 fIsScatProjToProj = whichScatCase;
39 fParticleChange = new G4ParticleChange();
40}
static G4AdjointCSManager * GetAdjointCSManager()

◆ ~G4VAdjointReverseReaction()

G4VAdjointReverseReaction::~G4VAdjointReverseReaction ( )
override

Definition at line 43 of file G4VAdjointReverseReaction.cc.

44{
45 if(fParticleChange)
46 delete fParticleChange;
47}

◆ G4VAdjointReverseReaction() [2/2]

G4VAdjointReverseReaction::G4VAdjointReverseReaction ( G4VAdjointReverseReaction & )
delete

Member Function Documentation

◆ BuildPhysicsTable()

void G4VAdjointReverseReaction::BuildPhysicsTable ( const G4ParticleDefinition & )
overridevirtual

Reimplemented from G4VProcess.

Definition at line 50 of file G4VAdjointReverseReaction.cc.

51{
52 fCSManager->BuildCrossSectionMatrices(); // it will be done just once
53 fCSManager->BuildTotalSigmaTables();
54}

◆ GetMeanFreePath()

G4double G4VAdjointReverseReaction::GetMeanFreePath ( const G4Track & track,
G4double previousStepSize,
G4ForceCondition * condition )
overrideprotectedvirtual

Implements G4VDiscreteProcess.

Definition at line 68 of file G4VAdjointReverseReaction.cc.

71{
73 G4double preStepKinEnergy = track.GetKineticEnergy();
74
75 if(track.GetTrackID() != fTrackId)
76 {
77 fTrackId = track.GetTrackID();
78 }
80 track.GetMaterialCutsCouple(), preStepKinEnergy, fIsScatProjToProj);
81
82 G4double corr = fCSManager->GetCrossSectionCorrection(
83 track.GetDefinition(), preStepKinEnergy, track.GetMaterialCutsCouple(),
84 fIsFwdCSUsed);
85
86 if(std::fabs(corr) > 100.)
87 {
88 sigma = 0.0;
89 }
90 else
91 {
92 sigma *= corr;
93 }
94
95 G4double mean_free_path = 1.e60;
96 if(sigma > 0.)
97 mean_free_path = 1. / sigma;
98
99 return mean_free_path;
100}
G4double condition(const G4ErrorSymMatrix &m)
@ NotForced
double G4double
Definition G4Types.hh:83
G4double GetCrossSectionCorrection(G4ParticleDefinition *aPartDef, G4double PreStepEkin, const G4MaterialCutsCouple *aCouple, G4bool &fwd_is_used)
G4int GetTrackID() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
virtual G4double AdjointCrossSection(const G4MaterialCutsCouple *aCouple, G4double primEnergy, G4bool isScatProjToProj)

◆ operator=()

G4VAdjointReverseReaction & G4VAdjointReverseReaction::operator= ( const G4VAdjointReverseReaction & right)
delete

◆ PostStepDoIt()

G4VParticleChange * G4VAdjointReverseReaction::PostStepDoIt ( const G4Track & track,
const G4Step &  )
overridevirtual

Reimplemented from G4VDiscreteProcess.

Definition at line 57 of file G4VAdjointReverseReaction.cc.

59{
60 fParticleChange->Initialize(track);
61 fAdjointModel->SampleSecondaries(track, fIsScatProjToProj, fParticleChange);
62
64 return fParticleChange;
65}
void Initialize(const G4Track &) override
virtual void SampleSecondaries(const G4Track &aTrack, G4bool isScatProjToProj, G4ParticleChange *fParticleChange)=0
void ClearNumberOfInteractionLengthLeft()

Member Data Documentation

◆ fAdjointModel

◆ fIsScatProjToProj

G4bool G4VAdjointReverseReaction::fIsScatProjToProj
protected

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