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

#include <G4ILawCommonTruncatedExp.hh>

+ Inheritance diagram for G4ILawCommonTruncatedExp:

Public Member Functions

 G4ILawCommonTruncatedExp (G4String name="expSharedForceInteractionLaw")
 
virtual ~G4ILawCommonTruncatedExp ()
 
virtual G4bool IsSingular () const
 
virtual G4bool IsEffectiveCrossSectionInfinite () const
 
virtual G4double ComputeEffectiveCrossSectionAt (G4double length) const
 
virtual G4double ComputeNonInteractionProbabilityAt (G4double length) const
 
void SetForceCrossSection (G4double xs)
 
void SetSelectedProcessXSfraction (G4double fXS)
 
G4double SetSelectedProcessXSfraction () const
 
void SetMaximumDistance (G4double d)
 
G4double GetMaximumDistance () const
 
G4double GetInteractionDistance () const
 
- Public Member Functions inherited from G4VBiasingInteractionLaw
 G4VBiasingInteractionLaw (G4String name)
 
virtual ~G4VBiasingInteractionLaw ()
 
const G4StringGetName () const
 
virtual G4double ComputeNonInteractionProbabilityAt (G4double length) const =0
 
virtual G4double ComputeEffectiveCrossSectionAt (G4double length) const =0
 
virtual G4bool IsSingular () const
 
virtual G4bool IsEffectiveCrossSectionInfinite () const
 
G4double Sample ()
 
G4double UpdateForStep (G4double truePathLength)
 
G4double GetSampledInteractionLength () const
 

Additional Inherited Members

virtual G4double SampleInteractionLength ()=0
 
virtual G4double UpdateInteractionLengthForStep (G4double)
 

Detailed Description

Definition at line 50 of file G4ILawCommonTruncatedExp.hh.

Constructor & Destructor Documentation

◆ G4ILawCommonTruncatedExp()

G4ILawCommonTruncatedExp::G4ILawCommonTruncatedExp ( G4String  name = "expSharedForceInteractionLaw")

Definition at line 33 of file G4ILawCommonTruncatedExp.cc.

35 fExpInteractionLaw("expLawFor"+name)
36{}

◆ ~G4ILawCommonTruncatedExp()

G4ILawCommonTruncatedExp::~G4ILawCommonTruncatedExp ( )
virtual

Definition at line 38 of file G4ILawCommonTruncatedExp.cc.

39{}

Member Function Documentation

◆ ComputeEffectiveCrossSectionAt()

G4double G4ILawCommonTruncatedExp::ComputeEffectiveCrossSectionAt ( G4double  length) const
virtual

Implements G4VBiasingInteractionLaw.

Definition at line 42 of file G4ILawCommonTruncatedExp.cc.

43{
44 return fExpInteractionLaw.ComputeEffectiveCrossSectionAt( distance ) * fSelectedProcessXSfraction;
45}
virtual G4double ComputeEffectiveCrossSectionAt(G4double length) const

◆ ComputeNonInteractionProbabilityAt()

G4double G4ILawCommonTruncatedExp::ComputeNonInteractionProbabilityAt ( G4double  length) const
virtual

Implements G4VBiasingInteractionLaw.

Definition at line 47 of file G4ILawCommonTruncatedExp.cc.

48{
49 G4double niProba = fExpInteractionLaw.ComputeNonInteractionProbabilityAt( distance );
50
51 if ( niProba <= 0.0 )
52 {
54 ed << " Negative probability for `" << GetName() << "' p = " << niProba << " distance = " << distance << " !!! " << G4endl;
55 G4Exception(" G4ILawCommonTruncatedExp::ComputeNonInteractionProbabilityAt(...)",
56 "BIAS.GEN.08",
58 ed);
59 }
60
61 return niProba;
62
63}
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
double G4double
Definition: G4Types.hh:83
#define G4endl
Definition: G4ios.hh:57
virtual G4double ComputeNonInteractionProbabilityAt(G4double length) const
const G4String & GetName() const

◆ GetInteractionDistance()

G4double G4ILawCommonTruncatedExp::GetInteractionDistance ( ) const
inline

Definition at line 78 of file G4ILawCommonTruncatedExp.hh.

78{ return fExpInteractionLaw.GetInteractionDistance(); }
G4double GetInteractionDistance() const

◆ GetMaximumDistance()

G4double G4ILawCommonTruncatedExp::GetMaximumDistance ( ) const
inline

Definition at line 77 of file G4ILawCommonTruncatedExp.hh.

77{ return fExpInteractionLaw.GetMaximumDistance(); }
G4double GetMaximumDistance() const

Referenced by G4BOptnForceCommonTruncatedExp::UpdateForStep().

◆ IsEffectiveCrossSectionInfinite()

virtual G4bool G4ILawCommonTruncatedExp::IsEffectiveCrossSectionInfinite ( ) const
inlinevirtual

Reimplemented from G4VBiasingInteractionLaw.

Definition at line 59 of file G4ILawCommonTruncatedExp.hh.

60 {return fExpInteractionLaw.IsEffectiveCrossSectionInfinite();}
virtual G4bool IsEffectiveCrossSectionInfinite() const

◆ IsSingular()

virtual G4bool G4ILawCommonTruncatedExp::IsSingular ( ) const
inlinevirtual

Reimplemented from G4VBiasingInteractionLaw.

Definition at line 57 of file G4ILawCommonTruncatedExp.hh.

58 {return fExpInteractionLaw.IsSingular();}
virtual G4bool IsSingular() const

◆ SetForceCrossSection()

void G4ILawCommonTruncatedExp::SetForceCrossSection ( G4double  xs)
inline

Definition at line 73 of file G4ILawCommonTruncatedExp.hh.

73{ fExpInteractionLaw.SetForceCrossSection( xs ); }
void SetForceCrossSection(G4double xs)

Referenced by G4BOptnForceCommonTruncatedExp::Sample().

◆ SetMaximumDistance()

void G4ILawCommonTruncatedExp::SetMaximumDistance ( G4double  d)
inline

Definition at line 76 of file G4ILawCommonTruncatedExp.hh.

76{ fExpInteractionLaw.SetMaximumDistance(d); }
void SetMaximumDistance(G4double d)

Referenced by G4BOptnForceCommonTruncatedExp::Initialize().

◆ SetSelectedProcessXSfraction() [1/2]

G4double G4ILawCommonTruncatedExp::SetSelectedProcessXSfraction ( ) const
inline

Definition at line 75 of file G4ILawCommonTruncatedExp.hh.

75{ return fSelectedProcessXSfraction; }

◆ SetSelectedProcessXSfraction() [2/2]

void G4ILawCommonTruncatedExp::SetSelectedProcessXSfraction ( G4double  fXS)
inline

Definition at line 74 of file G4ILawCommonTruncatedExp.hh.

74{ fSelectedProcessXSfraction = fXS; }

Referenced by G4BOptnForceCommonTruncatedExp::Sample().


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